Explorar o código

修复资料查询、首件工程的PDF预览

iZaiZaiA %!s(int64=2) %!d(string=hai) anos
pai
achega
2edc673814

+ 4 - 5
src/views/data-fill/components/ListItem.vue

@@ -410,22 +410,21 @@ const delClick = async (item) => {
 
 //复制本表
 const copyClick = async (item,index) => {
-    const pkeyIds = item.pkeyId ? item.pkeyId + '' : ''
-    if (pkeyIds) {
+    if (item.pkeyId) {
         if (isStatus.value !== '3') {
             if (!item.isRenderTableForm) {
-                await copeBussTab(pkeyIds)
+                await copeBussTab(item.pkeyId + '')
             } else if (!item.isTableForm) {
                 window?.$message?.warning('暂无表单数据')
             } else if (item.isRenderTableForm) {
                 const res = await saveExcelBussData(item,index,false)
                 if (res) {
-                    await copeBussTab(pkeyIds)
+                    await copeBussTab(item.pkeyId + '')
                 } else {
                     window?.$message?.warning('复制本表操作失败')
                 }
             } else {
-                window?.$message?.warning(`数据异常了, isRenderTableForm: ${item.isRenderTableForm}, isTableForm: ${item.isTableForm}, pkeyIds:${pkeyIds}`)
+                window?.$message?.warning(`数据异常了, isRenderTableForm: ${item.isRenderTableForm}, isTableForm: ${item.isTableForm}, pkeyIds:${item.pkeyId}`)
             }
         } else {
             window?.$message?.warning('已上报的资料,不允许复制')

+ 4 - 3
src/views/data-fill/query.vue

@@ -172,7 +172,7 @@ import {useAppStore} from "~src/store";
 import WbsTree from "./components/WbsTree.vue"
 import HcTreeData from "./components/HcTreeData.vue"
 import {getStoreData, setStoreData} from '~src/utils/storage'
-import {isType, downloadBlob} from "vue-utils-plus"
+import {isType, downloadBlob, isString} from "vue-utils-plus"
 import queryApi from '~api/data-fill/query';
 import {eVisaTaskCheckApi} from "~api/other"
 
@@ -518,8 +518,9 @@ const batchPrint = async () => {
     const { error, code, data } = await queryApi.batchPrint({ids: ids})
     //处理数据
     printLoading.value = false
-    if (!error && code === 200) {
-        console.log(data)
+    const res = isString(data)? data ?? '': ''
+    if (!error && code === 200 && res) {
+        window.open(res,'_blank')
     }
 }
 

+ 4 - 2
src/views/other/first-item.vue

@@ -667,8 +667,10 @@ const batchPrint = async () => {
     })
     //处理数据
     printLoading.value = false
-    if (!error && code === 200) {
-        console.log(data)
+    //判断状态
+    const res = isString(data)? data ?? '': ''
+    if (!error && code === 200 && res) {
+        window.open(res,'_blank')
     }
 }