Quellcode durchsuchen

变更令>>【添加】报错

duy vor 2 Tagen
Ursprung
Commit
74627b3c04

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20251205113337"
+  "value": "20251217170459"
 }

+ 2 - 2
src/api/modules/alter/admin/order.js

@@ -61,8 +61,8 @@ export default {
     async getChangeNode(form) {
         return HcApi({
             url: '/api/blade-meter/changeTokenForm/getChangeNode',
-            method: 'get',
-            params: form,
+            method: 'post',
+            data: form,
         })
     },
     //下达变更

+ 9 - 3
src/views/alter/admin/components/order/addModal.vue

@@ -4,7 +4,7 @@
             <div id="hc_add_dialog_tree_card">
                 <hc-card-item title="工程部位" scrollbar>
                     <template #extra>
-                        <el-link type="primary" @click="addChangeNode">添加</el-link>
+                        <el-button type="text" :loading="addBtnLoading" @click="addChangeNode">添加</el-button>
                     </template>
                     <hc-lazy-tree show-checkbox tree-key="id" :h-props="treeProps" @load="treeLoadNode" @check="treeNodeCheck" />
                 </hc-card-item>
@@ -314,20 +314,26 @@ const tableColumn = ref([
     { key: 'action', name: '操作', width: 80, align: 'center' },
 ])
 const tableData = ref([])
+
+const addBtnLoading = ref(false)
 const addChangeNode = async () => {
     const nodeId = treeCheckKeys.value ?? ''
     if (isNullES(nodeId)) {
         window.$message.warning('请先选择节点')
         return
     }
+    addBtnLoading.value = true
+    console.log('nodeId', nodeId.split(','))
+    console.log('tableData.value.map((item) => item.id)', tableData.value.map((item) => item.id))
     const { data } = await mainApi.getChangeNode({
         projectId: projectId.value,
         contractId: contractId.value,
-        changeIds: tableData.value.map((item) => item.id).join(),
-        ids: nodeId,
+        changeIds: tableData.value.map((item) => item.id),
+        ids: nodeId.split(','),
     })
     const newArr = getArrValue(data)
     tableData.value.push(...newArr)
+    addBtnLoading.value = false
 }
 
 //删除变更申请部位