稽查查看图片功能修复
parent
3283f7f5f2
commit
db1d2cc4e1
|
@ -334,13 +334,13 @@
|
||||||
<a v-else-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.oldValue">
|
<a v-else-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.oldValue">
|
||||||
{{$t('trials:auditRecord:title:viewDetail')}}
|
{{$t('trials:auditRecord:title:viewDetail')}}
|
||||||
</a>
|
</a>
|
||||||
<viewer v-else-if="(scope.row.DataType === 'Image' || scope.row.DataType === 'ImageList') && scope.row.oldValue" :ref="scope.row.oldValue" :images="imagesList">
|
<viewer v-else-if="(scope.row.DataType === 'Image' || scope.row.DataType === 'ImageList') && scope.row.oldValue && scope.row.oldValue !== '--'" :ref="scope.row.oldValue" :images="imagesList">
|
||||||
<!-- 查看图片 -->
|
<!-- 查看图片 -->
|
||||||
<span style="color:#409eff;cursor: pointer" @click="openImage(scope.row.oldValue)">{{$t('trials:auditRecord:title:viewImage')}}{{scope.row.oldValue instanceof Array ? `(${scope.row.oldValue.length})` : ''}}</span>
|
<span style="color:#409eff;cursor: pointer" @click="openImage(scope.row.oldValue)">{{$t('trials:auditRecord:title:viewImage')}}{{scope.row.oldValue instanceof Array ? `(${scope.row.oldValue.length})` : ''}}</span>
|
||||||
<template v-for="item of scope.row.oldValue">
|
<template v-for="item of scope.row.oldValue">
|
||||||
<img v-if="scope.row.DataType === 'ImageList'" :key="item" :src="item" v-show="false" crossorigin="anonymous" alt="">
|
<img v-if="scope.row.DataType === 'ImageList'" :key="item" :src="OSSclientConfig.basePath + item" v-show="false" crossorigin="anonymous" alt="">
|
||||||
</template>
|
</template>
|
||||||
<img v-if="scope.row.DataType === 'Image'" :src="scope.row.oldValue" v-show="false" crossorigin="anonymous" alt="">
|
<img v-if="scope.row.DataType === 'Image'" :src="OSSclientConfig.basePath + scope.row.oldValue" v-show="false" crossorigin="anonymous" alt="">
|
||||||
</viewer>
|
</viewer>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{ scope.row.oldValue }}
|
{{ scope.row.oldValue }}
|
||||||
|
@ -363,7 +363,7 @@
|
||||||
<a v-else-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.newValue">
|
<a v-else-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.newValue">
|
||||||
{{$t('trials:auditRecord:title:viewDetail')}}
|
{{$t('trials:auditRecord:title:viewDetail')}}
|
||||||
</a>
|
</a>
|
||||||
<viewer v-else-if="(scope.row.DataType === 'Image' || scope.row.DataType === 'ImageList') && scope.row.newValue" :ref="scope.row.newValue" :images="imagesList">
|
<viewer v-else-if="(scope.row.DataType === 'Image' || scope.row.DataType === 'ImageList') && scope.row.newValue && scope.row.newValue !== '--'" :ref="scope.row.newValue" :images="imagesList">
|
||||||
<!-- 查看图片 -->
|
<!-- 查看图片 -->
|
||||||
<span style="color:#409eff;cursor: pointer" @click="openImage(scope.row.newValue)">{{$t('trials:auditRecord:title:viewImage')}}{{scope.row.newValue instanceof Array ? `(${scope.row.newValue.length})` : ''}}</span>
|
<span style="color:#409eff;cursor: pointer" @click="openImage(scope.row.newValue)">{{$t('trials:auditRecord:title:viewImage')}}{{scope.row.newValue instanceof Array ? `(${scope.row.newValue.length})` : ''}}</span>
|
||||||
<template v-for="item of scope.row.newValue">
|
<template v-for="item of scope.row.newValue">
|
||||||
|
@ -633,13 +633,35 @@
|
||||||
:label="OptType === 'Add' ? $t('trials:auditRecord:title:fieldValue') : OptType === 'Delete' ? $t('trials:auditRecord:title:beforeDeletion') : $t('trials:auditRecord:title:beforeModification')"
|
:label="OptType === 'Add' ? $t('trials:auditRecord:title:fieldValue') : OptType === 'Delete' ? $t('trials:auditRecord:title:beforeDeletion') : $t('trials:auditRecord:title:beforeModification')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
<span>
|
<span>
|
||||||
<a v-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.oldValue">{{scope.row.oldValue}}</a>
|
<a v-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.oldValue">{{scope.row.oldValue}}</a>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{ scope.row.oldValue }}
|
{{ scope.row.oldValue }}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
</template> -->
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>
|
||||||
|
<!-- 查看详情 -->
|
||||||
|
<a v-if="scope.row.DataType === 'OSS'" target="_blank" :href="OSSclientConfig.basePath + scope.row.oldValue">
|
||||||
|
{{$t('common:button:download')}}
|
||||||
|
</a>
|
||||||
|
<a v-else-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.oldValue">
|
||||||
|
{{$t('trials:auditRecord:title:viewDetail')}}
|
||||||
|
</a>
|
||||||
|
<viewer v-else-if="(scope.row.DataType === 'Image' || scope.row.DataType === 'ImageList') && scope.row.oldValue && scope.row.oldValue !== '--'" :ref="scope.row.oldValue" :images="imagesList">
|
||||||
|
<!-- 查看图片 -->
|
||||||
|
<span style="color:#409eff;cursor: pointer" @click="openImage(scope.row.oldValue)">{{$t('trials:auditRecord:title:viewImage')}}{{scope.row.oldValue instanceof Array ? `(${scope.row.oldValue.length})` : ''}}</span>
|
||||||
|
<template v-for="item of scope.row.oldValue">
|
||||||
|
<img v-if="scope.row.DataType === 'ImageList'" :key="item" :src="OSSclientConfig.basePath + item" v-show="false" crossorigin="anonymous" alt="">
|
||||||
|
</template>
|
||||||
|
<img v-if="scope.row.DataType === 'Image'" :src="OSSclientConfig.basePath + scope.row.oldValue" v-show="false" crossorigin="anonymous" alt="">
|
||||||
|
</viewer>
|
||||||
|
<span v-else>
|
||||||
|
{{ scope.row.oldValue }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- OptType === 'Add' || OptType === 'Init' ? '值' : OptType === 'Delete' ? '删除后' : '修改后' -->
|
<!-- OptType === 'Add' || OptType === 'Init' ? '值' : OptType === 'Delete' ? '删除后' : '修改后' -->
|
||||||
|
@ -648,11 +670,32 @@
|
||||||
:label="OptType === 'Add' || OptType === 'Init' ? $t('trials:auditRecord:title:fieldValue') : OptType === 'Delete' ? $t('trials:auditRecord:title:afterDeletion') : $t('trials:auditRecord:title:afterModification')"
|
:label="OptType === 'Add' || OptType === 'Init' ? $t('trials:auditRecord:title:fieldValue') : OptType === 'Delete' ? $t('trials:auditRecord:title:afterDeletion') : $t('trials:auditRecord:title:afterModification')"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
<span :style="{ color: scope.row.newValue !== scope.row.oldValue ? '#f66' : null }">
|
<span :style="{ color: scope.row.newValue !== scope.row.oldValue ? '#f66' : null }">
|
||||||
<a v-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.newValue">{{scope.row.newValue}}</a>
|
<a v-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.newValue">{{scope.row.newValue}}</a>
|
||||||
<span v-else>{{ scope.row.newValue }}</span>
|
<span v-else>{{ scope.row.newValue }}</span>
|
||||||
</span>
|
</span>
|
||||||
|
</template> -->
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span :style="{ color: scope.row.newValue !== scope.row.oldValue ? '#f66' : null }">
|
||||||
|
<!-- 查看详情 -->
|
||||||
|
<a v-if="scope.row.DataType === 'OSS'" target="_blank" :href="OSSclientConfig.basePath + scope.row.newValue">
|
||||||
|
{{$t('common:button:download')}}
|
||||||
|
</a>
|
||||||
|
<a v-else-if="scope.row.DataType === 'Link' || scope.row.DataType === 'Router'" target="_blank" :href="scope.row.newValue">
|
||||||
|
{{$t('trials:auditRecord:title:viewDetail')}}
|
||||||
|
</a>
|
||||||
|
<viewer v-else-if="(scope.row.DataType === 'Image' || scope.row.DataType === 'ImageList') && scope.row.newValue && scope.row.newValue !== '--'" :ref="scope.row.newValue" :images="imagesList">
|
||||||
|
<!-- 查看图片 -->
|
||||||
|
<span style="color:#409eff;cursor: pointer" @click="openImage(scope.row.newValue)">{{$t('trials:auditRecord:title:viewImage')}}{{scope.row.newValue instanceof Array ? `(${scope.row.newValue.length})` : ''}}</span>
|
||||||
|
<template v-for="item of scope.row.newValue">
|
||||||
|
<img v-if="scope.row.DataType === 'ImageList'" :key="item" :src="OSSclientConfig.basePath + item" v-show="false" crossorigin="anonymous" alt="">
|
||||||
|
</template>
|
||||||
|
<img v-if="scope.row.DataType === 'Image'" :src="OSSclientConfig.basePath + scope.row.newValue" v-show="false" crossorigin="anonymous" alt="">
|
||||||
|
<!-- <img :src="scope.row.newValue" v-show="false" crossorigin="anonymous" alt="">-->
|
||||||
|
</viewer>
|
||||||
|
<span v-else>{{ scope.row.newValue }}</span>
|
||||||
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -817,16 +860,19 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
openImage(url) {
|
openImage(url) {
|
||||||
console.log(url)
|
console.log(url)
|
||||||
if (url instanceof Array) {
|
|
||||||
this.imagesList = url.map(v => this.OSSclientConfig.basePath + v)
|
this.$nextTick(()=>{
|
||||||
} else {
|
if (url instanceof Array) {
|
||||||
this.imagesList = [this.OSSclientConfig.basePath + url]
|
this.imagesList = url.map(v => this.OSSclientConfig.basePath + v)
|
||||||
}
|
} else {
|
||||||
if(this.$refs[url][0]) {
|
this.imagesList = [this.OSSclientConfig.basePath + url]
|
||||||
this.$refs[url][0].$viewer.show()
|
}
|
||||||
} else {
|
if(this.$refs[url][0]) {
|
||||||
this.$refs[url].$viewer.show()
|
this.$refs[url][0].$viewer.show()
|
||||||
}
|
} else {
|
||||||
|
this.$refs[url].$viewer.show()
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
getTrialCriterionList() {
|
getTrialCriterionList() {
|
||||||
getTrialCriterionList(this.trialId, false).then(res => {
|
getTrialCriterionList(this.trialId, false).then(res => {
|
||||||
|
@ -1135,6 +1181,7 @@ export default {
|
||||||
item.Enum = this.$i18n.locale === 'zh' ? v.ValueCN : v.Value
|
item.Enum = this.$i18n.locale === 'zh' ? v.ValueCN : v.Value
|
||||||
this[auditData].push(item)
|
this[auditData].push(item)
|
||||||
})
|
})
|
||||||
|
console.log(this[auditData])
|
||||||
},
|
},
|
||||||
getJSON(row) {
|
getJSON(row) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
|
@ -1175,7 +1222,6 @@ export default {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
var configList2 = res.Result
|
var configList2 = res.Result
|
||||||
this.formatting(configList2, JsonDetail.Data, ParentJson ? ParentJson.Data : null, JsonDetail.CommonData, row, 'auditData2')
|
this.formatting(configList2, JsonDetail.Data, ParentJson ? ParentJson.Data : null, JsonDetail.CommonData, row, 'auditData2')
|
||||||
console.log(this.auditData2)
|
|
||||||
this.otherData2 = []
|
this.otherData2 = []
|
||||||
if (row.IsSign) {
|
if (row.IsSign) {
|
||||||
// 签名信息
|
// 签名信息
|
||||||
|
|
Loading…
Reference in New Issue