Ver Fonte

Squashed commit of the following:

commit 6cb0aaf0b4a7a9beca0517b5f53297fd43831326
Merge: 5a9e528 351c94a
Author: guoqing <1624870927@qq.com>
Date:   Wed Apr 12 10:56:21 2023 +0800

    Merge branch 'master' of http://123.57.226.179:8080/yin_yu820/HS_MZAP

commit 5a9e528f1dea352b7db28a545a1fa4cc63a6353e
Author: guoqing <1624870927@qq.com>
Date:   Wed Apr 12 10:56:12 2023 +0800

    宗教管理人员选择公管理人员选择功能完成
LuChongMei há 2 anos atrás
pai
commit
9f17daf3b2
2 ficheiros alterados com 63 adições e 36 exclusões
  1. 33 17
      src/views/placeManage/ManageList.vue
  2. 30 19
      src/views/placeManage/ManageList2.vue

+ 33 - 17
src/views/placeManage/ManageList.vue

@@ -39,6 +39,12 @@ export default {
     const finished = ref(false);
     let index = 0;
     let zjList = ref([]);
+    let mechanism1 = ref([]); //宗教
+    new placeRegister().treeDate2().then((res) => {
+      mechanism1.value.push(res[0]);
+      Getzj(mechanism1.value);
+    });
+
     const onLoad = () => {
       // 异步更新数据
       new placeRegister()
@@ -58,26 +64,32 @@ export default {
         });
       let placeAddress = "";
       placeAddress = props.placeAddress.split("/");
-      let mechanism1 = ref([]); //宗教
-      new placeRegister().treeDate2().then((res) => {
-        mechanism1.value.push(res[0]);
-        Getzj(mechanism1.value);
-        let listone = [];
-        let itemId = [];
-        zjList.value.forEach((item1) => {
-          if (item1.regionLevel5 == placeAddress[2]) {
-            itemId.push(item1.id);
+      let itemId = [];
+      let listTwo = [];
+      zjList.value.forEach((item1) => {
+        if (item1.regionLevel5 == placeAddress[2]) {
+          itemId.push(item1.id);
+        }
+      });
+      itemId.forEach((N1) => {
+        if (!listTwo.includes(N1)) {
+          listTwo.push(N1);
+        }
+      });
+      list.value.forEach((item2) => {
+        listTwo.forEach((ID) => {
+          if (ID == item2.officeDTO.id) {
+            list3.value.push(item2);
           }
         });
-        itemId.forEach((ID) => {
-          list.value.forEach((item2) => {
-            if (ID == item2.officeDTO.id) {
-              listone.push(item2);
-            }
-          });
-        });
-        list3.value = listone;
       });
+      let listOne = [];
+      list3.value.forEach((N2)=>{
+        if(!listOne.includes(N2)){
+          listOne.push(N2)
+        }
+      })
+      list3.value = listOne
     };
     //获取宗教部门数组
     function Getzj(list) {
@@ -88,6 +100,9 @@ export default {
         }
       });
     }
+    const close = ()=>{
+      list3.value.splice(0,list3.value.length);
+    }
     //获取公安部门数组
     // function Getga(list) {
     //   list.forEach((item) => {
@@ -163,6 +178,7 @@ export default {
       // 单选
       selectes,
       list3,
+      close
     };
   },
 };

+ 30 - 19
src/views/placeManage/ManageList2.vue

@@ -39,6 +39,13 @@ export default {
     const finished = ref(false);
     let index = 0;
     let gaList = ref([]);
+    let placeAddress = "";
+    placeAddress = props.placeAddress.split("/");
+    let mechanism2 = ref([]); //公安
+    new placeRegister().treeDate2().then((res) => {
+      mechanism2.value.push(res[1]);
+      Getga(mechanism2.value);
+    });
     const onLoad = () => {
       // 异步更新数据
       new placeRegister()
@@ -57,28 +64,32 @@ export default {
             finished.value = true;
           }
         });
-      let placeAddress = "";
-      placeAddress = props.placeAddress.split("/");
-      let mechanism2 = ref([]); //公安
-      new placeRegister().treeDate2().then((res) => {
-        mechanism2.value.push(res[1]);
-        Getga(mechanism2.value);
-        let listtwo = [];
-        let itemId = [];
-        gaList.value.forEach((item3) => {
-          if (item3.regionLevel5 == placeAddress[2]) {
-            itemId.push(item3.id);
+      let itemId = [];
+      let listTwo = [];
+      gaList.value.forEach((item3) => {
+        if (item3.regionLevel5 == placeAddress[2]) {
+          itemId.push(item3.id);
+        }
+      });
+      itemId.forEach((N1) => {
+        if (!listTwo.includes(N1)) {
+          listTwo.push(N1);
+        }
+      });
+      list.value.forEach((item2) => {
+        itemId.forEach((ID) => {
+          if (ID == item2.officeDTO.id) {
+            list4.value.push(item2);
           }
         });
-        list.value.forEach((item2) => {
-          itemId.forEach((ID) => {
-            if (ID == item2.officeDTO.id) {
-              listtwo.push(item2);
-            }
-          });
-          list4.value = listtwo;
-        });
       });
+      let listOne = [];
+      list4.value.forEach((N2)=>{
+        if(!listOne.includes(N2)){
+          listOne.push(N2)
+        }
+      })
+      list4.value = listOne
     };
     //获取公安部门数组
     function Getga(list) {