Browse Source

修改居民/审核/实时任务 添加初始化默认根节点

asd123a20 2 năm trước cách đây
mục cha
commit
4a4e20b8cd

+ 9 - 4
src/views/community/realtime/index.vue

@@ -97,12 +97,12 @@ export default {
         pageNum: 1,
         pageSize: 10,
       },
-      isName: '1'
+      isName: '1',
+      loading: false
     };
   },
-  created() {
-    this.tabClick({ name: 1 });
-    this.getAddrTree();
+  async created() {
+    await this.getAddrTree();
   },
   watch: {
     // 根据名称筛选地址树
@@ -111,6 +111,10 @@ export default {
     },
   },
   methods: {
+    init() {
+      this.queryParams.detectStatus = 1;
+      this.handleNodeClick(this.addrOptions[0]);
+    },
     // 点击标签
     tabClick(e) {
       this.queryParams.detectStatus = e.name;
@@ -169,6 +173,7 @@ export default {
     getAddrTree() {
       addrTreeSelect().then((response) => {
         this.addrOptions = response.data;
+        this.init()
       });
     },
     // 节点单击事件

+ 1 - 1
src/views/community/req/index.vue

@@ -174,7 +174,6 @@ export default {
     };
   },
   created() {
-    this.getList();
     this.getAddrTree();
   },
   watch: {
@@ -188,6 +187,7 @@ export default {
     getAddrTree() {
       addrTreeSelect(this.queryParams).then(response => {
         this.addrOptions = response.data;
+        this.handleNodeClick(this.addrOptions[0]);
       });
     },
     // 节点单击事件

+ 1 - 1
src/views/community/resident/index.vue

@@ -192,7 +192,6 @@ export default {
     };
   },
   created() {
-    this.getList();
     this.getAddrTree();
   },
   watch: {
@@ -206,6 +205,7 @@ export default {
     getAddrTree() {
       addrTreeSelect(this.queryParams).then(response => {
         this.addrOptions = response.data;
+        this.handleNodeClick(this.addrOptions[0]);
       });
     },
     // 节点单击事件

+ 1 - 1
vue.config.js

@@ -37,7 +37,7 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: `http://192.168.0.71:8080`,
+        target: `http://192.168.0.63:8080`,
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API]: ''