稽查附件展示
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d54dfae99f
commit
ebedae85e7
|
@ -245,6 +245,10 @@
|
|||
v-show="false" crossorigin="anonymous" alt="">
|
||||
</viewer>
|
||||
<div v-else-if="scope.row.DataType === 'Dialog'" v-html="scope.row.oldValue"></div>
|
||||
<el-button v-else-if="isFile(scope.row.oldValue)" type="text" size="small"
|
||||
@click.stop="download(scope.row.oldValue)">
|
||||
{{ $t('common:button:download') }}
|
||||
</el-button>
|
||||
<span v-else>
|
||||
{{ scope.row.oldValue }}
|
||||
</span>
|
||||
|
@ -284,6 +288,10 @@
|
|||
<!-- <img :src="scope.row.newValue" v-show="false" crossorigin="anonymous" alt="">-->
|
||||
</viewer>
|
||||
<div v-else-if="scope.row.DataType === 'Dialog'" v-html="scope.row.newValue"></div>
|
||||
<el-button v-else-if="isFile(scope.row.newValue)" type="text" size="small"
|
||||
@click.stop="download(scope.row.newValue)">
|
||||
{{ $t('common:button:download') }}
|
||||
</el-button>
|
||||
<span v-else>{{ scope.row.newValue }}</span>
|
||||
</span>
|
||||
</template>
|
||||
|
@ -630,6 +638,7 @@ import Pagination from '@/components/Pagination'
|
|||
import BaseContainer from '@/components/BaseContainer'
|
||||
import BaseModel from '@/components/BaseModel'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import { downLoadFile } from '@/utils/stream.js'
|
||||
const searchDataDefault = () => {
|
||||
return {
|
||||
SortField: 'CreateTime',
|
||||
|
@ -711,6 +720,22 @@ export default {
|
|||
this.getModuleTypeList()
|
||||
},
|
||||
methods: {
|
||||
isFile(str) {
|
||||
return !!~str.indexOf('❄❅❆❇❈❉❊')
|
||||
},
|
||||
async download(str) {
|
||||
str = str.replace("❄❅❆❇❈❉❊", '')
|
||||
let urls = str.split("|")
|
||||
let name = `${Date.now()}.zip`, files = []
|
||||
urls.forEach(url => {
|
||||
let obj = {
|
||||
url: this.OSSclientConfig.basePath + url,
|
||||
name: url.split("/")[url.split("/").length - 1]
|
||||
}
|
||||
files.push(obj)
|
||||
})
|
||||
await downLoadFile(files, name, 'zip')
|
||||
},
|
||||
openImage(url, type) {
|
||||
console.log(url)
|
||||
|
||||
|
|
Loading…
Reference in New Issue