From 81773ab04fd259e893c2d7f08dbdc9be772d01c4 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 21 Dec 2021 17:18:45 +0800
Subject: [PATCH] +,请求数据,弹框显示,优化代码长度

---
 src/components/mobilePopupOurAfter/index.vue |   68 +++++++++++++++++++++------------
 1 files changed, 43 insertions(+), 25 deletions(-)

diff --git a/src/components/mobilePopupOurAfter/index.vue b/src/components/mobilePopupOurAfter/index.vue
index 5d8e20c..d5714e1 100644
--- a/src/components/mobilePopupOurAfter/index.vue
+++ b/src/components/mobilePopupOurAfter/index.vue
@@ -32,6 +32,20 @@
 </template>
 
 <script>
+import { getList } from "@/api/mobile/orgnav/index"; //机构单位
+import { getChildNavList } from "@/api/mobile/public/arc"; //校园建筑
+import {
+  getListlivingFacilitiesr,
+  getListsupermarket,
+  getListmedical,
+  getListmail,
+  getListbathroom,
+  getListduplicate,
+  getListnetwork,
+  getListaed,
+  getListsignal,
+} from "@/api/mobile/livingFacilities/index"; //生活设施
+import { getListparking } from "@/api/mobile/stop/index"; //停车场
 export default {
   name: "mobilePopupOurAfter",
   data() {
@@ -72,36 +86,40 @@
         },
       ],
       openData1: [
-        { name: "党群机构", type: 1 },
-        { name: "职能部处", type: 2 },
-        { name: "直属及附属单位", type: 3 },
-        { name: "教学与科研机构", type: 4 },
-        { name: "其他机构", type: 5 },
+        { name: "党群机构", type: 1, method: getList },
+        { name: "职能部处", type: 2, method: getList },
+        { name: "直属及附属单位", type: 3, method: getList },
+        { name: "教学与科研机构", type: 4, method: getList },
+        { name: "其他机构", type: 5, method: getList },
       ],
       openData2: [
-        { name: "行政办公", type: 1 },
-        { name: "教学科研", type: 2 },
-        { name: "校内场馆", type: 3 },
-        { name: "宿舍公寓", type: 4 },
-        { name: "文化风景", type: 5 },
-        { name: "家属住宅", type: 6 },
-        { name: "其他楼宇", type: 7 },
+        { name: "行政办公", type: 1, method: getChildNavList },
+        { name: "教学科研", type: 2, method: getChildNavList },
+        { name: "校内场馆", type: 3, method: getChildNavList },
+        { name: "宿舍公寓", type: 4, method: getChildNavList },
+        { name: "文化风景", type: 5, method: getChildNavList },
+        { name: "家属住宅", type: 6, method: getChildNavList },
+        { name: "其他楼宇", type: 7, method: getChildNavList },
       ],
       openData3: [
-        { name: "食堂餐厅", type: 1 },
-        { name: "购物超市", type: 2 },
-        { name: "校内医疗", type: 3 },
-        { name: "邮寄快递", type: 4 },
-        { name: "学生浴室", type: 5 },
-        { name: "圈存机", type: 6 },
-        { name: "打字复印", type: 7 },
-        { name: "AED", type: 8 },
-        { name: "银行网点", type: 9 },
-        { name: "通信营业厅", type: 10 },
+        { name: "食堂餐厅", type: 1, method: getListlivingFacilitiesr },
+        { name: "购物超市", type: 2, method: getListsupermarket },
+        { name: "校内医疗", type: 3, method: getListmedical },
+        { name: "邮寄快递", type: 4, method: getListmail },
+        { name: "学生浴室", type: 5, method: getListbathroom },
+        // { name: "圈存机", type: 6 ,method:getListlivingFacilitiesr},
+        { name: "打字复印", type: 7, method: getListduplicate },
+        { name: "AED", type: 8, method: getListaed },
+        { name: "银行网点", type: 9, method: getListnetwork },
+        { name: "通信营业厅", type: 10, method: getListsignal },
       ],
-      openData4: [{ name: "文化风景", type: 1 }],
-      openData5: [{ name: "出入口", type: 1 }],
-      openData6: [{ name: "停车场", type: 1 }],
+      openData4: [
+        { name: "文化风景", type: 1, method: getListlivingFacilitiesr },
+      ],
+      openData5: [
+        { name: "出入口", type: 1, method: getListlivingFacilitiesr },
+      ],
+      openData6: [{ name: "停车场", type: 1, method: getListparking }],
     };
   },
   mounted() {},

--
Gitblit v1.9.3