From 77e1201f570750033d4f743f55f9362109a7a085 Mon Sep 17 00:00:00 2001
From: 王恒 <318726284@qq.com>
Date: 星期一, 11 八月 2025 14:57:26 +0800
Subject: [PATCH] '对接新增接口'

---
 src/views/system/manage/index.vue |   55 +++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 35 insertions(+), 20 deletions(-)

diff --git a/src/views/system/manage/index.vue b/src/views/system/manage/index.vue
index c9cc324..a15e968 100644
--- a/src/views/system/manage/index.vue
+++ b/src/views/system/manage/index.vue
@@ -117,12 +117,12 @@
         width="180"
       ></el-table-column>
       <el-table-column
-        prop="checkdObject"
+        prop="companyNames"
         label="琚鏌ュ璞�"
         width="180"
       ></el-table-column>
       <el-table-column
-        prop="unifiedSocialCreditCode"
+        prop="companyCodes"
         label="缁熶竴绀句細淇$敤浠g爜"
         width="180"
       ></el-table-column>
@@ -142,7 +142,7 @@
         width="180"
       ></el-table-column>
       <el-table-column
-        prop="executiveSection"
+        prop="executiveSectionNames"
         label="鎵ц绉戝"
         width="180"
       ></el-table-column>
@@ -244,7 +244,7 @@
           <el-col :span="24">
             <el-form-item label="琚鏌ュ璞′俊鎭�">
               <el-table
-                :data="form.checkdObject"
+                :data="checkedList"
                 max-height="200px"
                 style="width: 100%"
               >
@@ -567,15 +567,17 @@
 const deptOptions = ref(undefined);
 const selectOffices = ref([]);
 const officeList = ref([]);
+let checkedList = ref([]); // 閫変腑鐨勪紒涓氬垪琛�
 const data = reactive({
   form: {
     planName: "", // 璁″垝鍚嶇О
     makeOrgId: "", // 鍒跺畾鏈烘瀯id
     makeOrgName: "", // 鍒跺畾鏈烘瀯
     executiveSection: "", // 鎵ц绉戝
-    executiveSectionName: "", // 鎵ц绉戝鍚嶇О
-    checkdObject: [], // 琚鏌ュ璞″垪琛�
-    checkdIds: "", // 琚鏌ュ璞d
+    executiveSectionNames: "", // 鎵ц绉戝鍚嶇О
+    companyNames: "", // 琚鏌ュ璞″悕绉�
+    companyCodes: "", // 缁熶竴绀句細淇$敤浠g爜
+    companyIds: "", // 琚鏌ュ璞d
     checkdType: "", // 妫�鏌ユ柟寮�
     industry: "", // 鎵�灞炶涓�
     checkdContent: "", // 妫�鏌ュ唴瀹�
@@ -664,7 +666,7 @@
   form.value.makeOrgName = e.label;
   selectOffices.value = [];
   form.value.executiveSection = "";
-  form.value.executiveSectionName = "";
+  form.value.executiveSectionNames = "";
   if (e.id) {
     getOfficeList();
   }
@@ -672,12 +674,14 @@
 
 // 绉戝閫夋嫨
 const handleSelectOffices = (value) => {
-  form.value.executiveSectionName = value.map((item) => {
-    return officeList.value.find((obj) => obj.deptId === item).deptName;
-  }).join(",");
+  form.value.executiveSectionNames = value
+    .map((item) => {
+      return officeList.value.find((obj) => obj.deptId === item).deptName;
+    })
+    .join(",");
   form.value.executiveSection = value.join(",");
   console.log(form.value.executiveSection);
-  console.log(form.value.executiveSectionName);
+  console.log(form.value.executiveSectionNames);
 };
 
 /*** 璁″垝瀵煎叆鍙傛暟 */
@@ -751,10 +755,11 @@
     planName: "", // 璁″垝鍚嶇О
     makeOrgId: "", // 鍒跺畾鏈烘瀯id
     makeOrgName: "", // 鍒跺畾鏈烘瀯
-    executiveSection: "", // 鎵ц绉戝
-    executiveSectionName: "", // 鎵ц绉戝鍚嶇О
-    checkdObject: [], // 琚鏌ュ璞″垪琛�
+    executiveSection: "", // 鎵ц绉戝id
+    executiveSectionNames: "", // 鎵ц绉戝鍚嶇О
     checkdIds: "", // 琚鏌ュ璞d
+    companyNames: "", // 琚鏌ュ璞″悕绉�
+    companyCodes: "", // 缁熶竴绀句細淇$敤浠g爜
     checkdType: "", // 妫�鏌ユ柟寮�
     industry: "", // 鎵�灞炶涓�
     checkdContent: "", // 妫�鏌ュ唴瀹�
@@ -819,10 +824,20 @@
           getList();
         });
       } else {
-        addManage(form.value).then((response) => {
-          proxy.$modal.msgSuccess("鏂板鎴愬姛");
-          open.value = false;
-          getList();
+        checkedList.value.forEach((item, index) => {
+          console.log(item)
+          const submitForm = { ...form.value };
+          submitForm.companyIds = item.companyId;
+          submitForm.companyNames = item.companyName;
+          submitForm.companyCodes = item.companyCode;
+          addManage(submitForm).then((response) => {
+            if (index === checkedList.value.length - 1) {
+              proxy.$modal.msgSuccess("鏂板鎴愬姛");
+              open.value = false;
+              getList();
+              reset();
+            }
+          });
         });
       }
     }
@@ -896,7 +911,7 @@
 }
 
 function handleSelectionChange(e) {
-  form.value.checkdObject = e;
+  checkedList.value = e;
   form.value.checkdIds = e.map((item) => item.companyId).join(",");
 }
 

--
Gitblit v1.9.1