|
@@ -12,7 +12,7 @@
|
|
|
<div :id="`hc_table_card_${uuid}`" class="flex-1">
|
|
|
<hc-new-card>
|
|
|
<template #header>
|
|
|
- <div class="text-18px font-bold">工程进度款审核表</div>
|
|
|
+ <div class="text-18px font-bold">{{ pdfTitle }}</div>
|
|
|
</template>
|
|
|
<template #extra>
|
|
|
<el-button hc-btn type="warning" @click="backClick">返回</el-button>
|
|
@@ -58,6 +58,7 @@ watch(isShow, (val) => {
|
|
|
if (val) {
|
|
|
setSplitRef()
|
|
|
pdfIndex.value = 0
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -75,27 +76,35 @@ const setSplitRef = () => {
|
|
|
|
|
|
//深度监听数据
|
|
|
const pdfData = ref(props.datas)
|
|
|
+const pdfTitle = ref('')
|
|
|
watch(() => props.datas, (data) => {
|
|
|
pdfData.value = getArrValue(data)
|
|
|
console.log( pdfData.value, ' pdfData.value')
|
|
|
pdfUrl.value = pdfData.value[0].url
|
|
|
+ pdfTitle.value = pdfData.value[0].title
|
|
|
}, { deep: true })
|
|
|
|
|
|
|
|
|
//深度监听索引
|
|
|
const pdfIndex = ref(0)
|
|
|
|
|
|
-
|
|
|
+watch(() => pdfIndex.value, (index) => {
|
|
|
+ pdfUrl.value = pdfData.value[index].url
|
|
|
+ pdfTitle.value = pdfData.value[index].title
|
|
|
+}, { deep: true })
|
|
|
|
|
|
//返回
|
|
|
const backClick = () => {
|
|
|
isShow.value = false
|
|
|
pdfIndex.value = 0
|
|
|
+
|
|
|
}
|
|
|
const pdfUrl = ref('')
|
|
|
const changePdf = (item, index)=>{
|
|
|
pdfIndex.value = index
|
|
|
pdfUrl.value = item.url
|
|
|
+ pdfTitle.value = item.title
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|