ZaiZai 1 年之前
父节点
当前提交
5fc5d1b774
共有 2 个文件被更改,包括 36 次插入5 次删除
  1. 14 0
      src/api/modules/project/tree.js
  2. 22 5
      src/views/project/list/adjust-excel/set-e-visa.vue

+ 14 - 0
src/api/modules/project/tree.js

@@ -153,4 +153,18 @@ export default {
             params: { pkeyId },
         })
     },
+    async saveSig(form) {
+        return HcApi({
+            url: '/api/blade-manager/textdictinfo/save_sigInfo',
+            method: 'post',
+            data: form,
+        })
+    },
+    async remove(ids, tabId) {
+        return HcApi({
+            url: '/api/blade-manager/textdictinfo/remove',
+            method: 'post',
+            params: { ids, tabId },
+        })
+    },
 }

+ 22 - 5
src/views/project/list/adjust-excel/set-e-visa.vue

@@ -65,6 +65,7 @@
 
 <script setup>
 import { onMounted, ref, watch } from 'vue'
+import { HcDelMsg } from 'hc-vue3-ui'
 import { deepClone, formValidate, getArrValue, getObjValue, isNullES, newWindow } from 'js-fast-way'
 import mainApi from '~api/project/tree'
 
@@ -307,7 +308,21 @@ const saveListClick = async () => {
 
 //删除数据
 const rowDelClick = (row, index) => {
-    tableData.value.splice(index, 1)
+    HcDelMsg(async (resolve) => {
+        if (isNullES(row.id)) {
+            tableData.value.splice(index, 1)
+            resolve() //关闭弹窗的回调
+            return
+        }
+        const { pkeyId } = dataInfo.value
+        const { isRes } = await mainApi.remove(row.id, pkeyId)
+        if (!isRes) {
+            resolve() //关闭弹窗的回调
+            return
+        }
+        tableData.value.splice(index, 1)
+        resolve() //关闭弹窗的回调
+    })
 }
 
 //预览pdf
@@ -329,14 +344,16 @@ const dialogSubmit = async () => {
         window.$message.warning('请先添加数据')
         return
     }
-    //submitLoading.value = true
+    submitLoading.value = true
     const { pkeyId } = dataInfo.value
-    console.log(table)
-    /*const { isRes } = await mainApi.saveTextInfo([form])
+    const { isRes } = await mainApi.saveSig({
+        dataInfo: table,
+        tabId: pkeyId,
+    })
     submitLoading.value = false
     if (!isRes) return
     window.$message.success('操作成功')
-    emit('finish')*/
+    emit('finish')
 }
 
 //设置dom数据