Browse Source

组织结构

Signed-off-by: hsshuxian <3049816743@qq.com>
hsshuxian 5 months ago
parent
commit
2ffa199d72
2 changed files with 22 additions and 3 deletions
  1. 19 1
      ems-ui-cloud/src/views/basecfg/boundaryRel/index.vue
  2. 3 2
      ems-ui-cloud/vue.config.js

+ 19 - 1
ems-ui-cloud/src/views/basecfg/boundaryRel/index.vue

@@ -627,6 +627,16 @@ export default {
 
     /**组织机构*/
     handleDeptNodeClick(data) {
+      console.log("组织结构",data)
+      if (data.deptId === '-1') {
+        this.queryParams.areaCode = null;
+        this.MeterQueryParams.areaCode = null;
+      } else {
+        this.queryParams.areaCode = data.deptId;
+      }
+      this.getMeterData();
+    },
+    handleDeptNodeClick1(data) {
       if (data.deptId === 'all') {
         this.organOptions = this.deptList.slice(1).map(item => {
           const { children, ...rest } = item;
@@ -644,7 +654,6 @@ export default {
         }
       }
       this.getMeterData(data);
-
     },
 
     /** 设施节点点击事件 */
@@ -859,6 +868,15 @@ export default {
           this.loading = false;
         });
       } else if (this.activeTab === 'organ') {
+        objType = 4;
+        listDevice({ ...this.MeterQueryParams, meterCls }).then(response => {
+          this.organUnbound = response.rows;
+          this.loading = false;
+        })
+        listByObj(objType, meterCls, this.queryParams.areaCode).then(response => {
+          this.organBound = response.data;
+          this.loading = false;
+        });
         this.loading = false;
 
       } else if (this.activeTab === 'facs') {

+ 3 - 2
ems-ui-cloud/vue.config.js

@@ -35,8 +35,9 @@ module.exports = {
     proxy: {
       // detail: https://cli.vuejs.org/config/#devserver-proxy
       [process.env.VUE_APP_BASE_API]: {
-        target: 'http://172.192.13.80:9100/',
-        // target: 'http://127.0.0.1:9100/',
+         //target: 'http://172.192.13.95:9091/',
+         //target: 'http://172.192.13.80:9100/',
+         target: 'http://127.0.0.1:9100/',
         changeOrigin: true,
         pathRewrite: {
           ['^' + process.env.VUE_APP_BASE_API + '/ems']: process.env.EMS_REWRITE_URL,