稽查附件展示
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="">
|
v-show="false" crossorigin="anonymous" alt="">
|
||||||
</viewer>
|
</viewer>
|
||||||
<div v-else-if="scope.row.DataType === 'Dialog'" v-html="scope.row.oldValue"></div>
|
<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>
|
<span v-else>
|
||||||
{{ scope.row.oldValue }}
|
{{ scope.row.oldValue }}
|
||||||
</span>
|
</span>
|
||||||
|
@ -284,6 +288,10 @@
|
||||||
<!-- <img :src="scope.row.newValue" v-show="false" crossorigin="anonymous" alt="">-->
|
<!-- <img :src="scope.row.newValue" v-show="false" crossorigin="anonymous" alt="">-->
|
||||||
</viewer>
|
</viewer>
|
||||||
<div v-else-if="scope.row.DataType === 'Dialog'" v-html="scope.row.newValue"></div>
|
<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 v-else>{{ scope.row.newValue }}</span>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -630,6 +638,7 @@ import Pagination from '@/components/Pagination'
|
||||||
import BaseContainer from '@/components/BaseContainer'
|
import BaseContainer from '@/components/BaseContainer'
|
||||||
import BaseModel from '@/components/BaseModel'
|
import BaseModel from '@/components/BaseModel'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
|
import { downLoadFile } from '@/utils/stream.js'
|
||||||
const searchDataDefault = () => {
|
const searchDataDefault = () => {
|
||||||
return {
|
return {
|
||||||
SortField: 'CreateTime',
|
SortField: 'CreateTime',
|
||||||
|
@ -711,6 +720,22 @@ export default {
|
||||||
this.getModuleTypeList()
|
this.getModuleTypeList()
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
openImage(url, type) {
|
||||||
console.log(url)
|
console.log(url)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue