|
@@ -182,11 +182,13 @@
|
|
<div class="hc-switch-tab-content">
|
|
<div class="hc-switch-tab-content">
|
|
<div class="h-full w-full">
|
|
<div class="h-full w-full">
|
|
<div v-if="tableRowData[tabTypeKey]">
|
|
<div v-if="tableRowData[tabTypeKey]">
|
|
- <iframe allow="display-capture" width='100%' height='100%' frameborder='1' :src="tableRowData[tabTypeKey]" style="height:500px;width:90%" />
|
|
|
|
- <el-button type="primary" hc-btn :loading="importModalLoading" @click="deleteFile" style="margin-bottom: 30px;margin-left:5px">
|
|
|
|
|
|
+ <iframe allow="display-capture" width='100%' height='100%' frameborder='1' :src="tableRowData[tabTypeKey]" style="height:500px;width:90%" v-if="tableRowData[tabTypeKey]&&ispdf!==-1"/>
|
|
|
|
+ <el-link type="primary" :href="tableRowData[tabTypeKey]" v-else>{{tableRowData[tabTypeKey]}}</el-link>
|
|
|
|
+ <el-button type="primary" size="small" hc-btn @click="deleteFile" style="float:right">
|
|
<HcIcon name="delete-bin-2"/>
|
|
<HcIcon name="delete-bin-2"/>
|
|
<span>删除</span>
|
|
<span>删除</span>
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="hc-no-table-form" v-else>
|
|
<div class="hc-no-table-form" v-else>
|
|
@@ -626,6 +628,7 @@ const viewAttachmentModalClick = (row) => {
|
|
//类型tab数据和相关处理
|
|
//类型tab数据和相关处理
|
|
const tabTypeKey = ref('productionCertificate')
|
|
const tabTypeKey = ref('productionCertificate')
|
|
const tabTypeKeyType=ref(1)
|
|
const tabTypeKeyType=ref(1)
|
|
|
|
+const ispdf=ref(true)
|
|
const tabTypeTab = ref([
|
|
const tabTypeTab = ref([
|
|
{key:'productionCertificate', name: '生产合格证',type:1},
|
|
{key:'productionCertificate', name: '生产合格证',type:1},
|
|
{key:'qualityInspectionReport', name: '厂家质检报告',type:2},
|
|
{key:'qualityInspectionReport', name: '厂家质检报告',type:2},
|
|
@@ -634,6 +637,8 @@ const tabTypeTab = ref([
|
|
const tabTypeChange = (item) => {
|
|
const tabTypeChange = (item) => {
|
|
tabTypeKey.value = item?.key
|
|
tabTypeKey.value = item?.key
|
|
tabTypeKeyType.value=item?.type
|
|
tabTypeKeyType.value=item?.type
|
|
|
|
+ const row = tableRowData.value, key = tabTypeKey.value
|
|
|
|
+ ispdf.value=getCaption( row[key])
|
|
}
|
|
}
|
|
|
|
|
|
//上传进度
|
|
//上传进度
|
|
@@ -649,6 +654,7 @@ const tableRowPdfFinished = async (data1) => {
|
|
const row = tableRowData.value, key = tabTypeKey.value
|
|
const row = tableRowData.value, key = tabTypeKey.value
|
|
row[key] = data1?.link
|
|
row[key] = data1?.link
|
|
console.log(row,'row');
|
|
console.log(row,'row');
|
|
|
|
+ ispdf.value=getCaption( row[key])
|
|
// //保存请求
|
|
// //保存请求
|
|
// const { error, code } = await approachApi.submitForm({
|
|
// const { error, code } = await approachApi.submitForm({
|
|
// ...row,
|
|
// ...row,
|
|
@@ -677,6 +683,12 @@ const tableRowPdfFinished = async (data1) => {
|
|
await getTableData()
|
|
await getTableData()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+const getCaption =(obj)=> {
|
|
|
|
+ const index = obj.lastIndexOf("pdf")
|
|
|
|
+
|
|
|
|
+ return index
|
|
|
|
+}
|
|
|
|
+
|
|
//删除上传附件
|
|
//删除上传附件
|
|
const deleteFile=()=>{
|
|
const deleteFile=()=>{
|
|
console.log('删除');
|
|
console.log('删除');
|