Forráskód Böngészése

Merge branch 'master' of http://git.xt.wenhq.top:8083/hs/zhny_ui

hsshuxian 9 hónapja
szülő
commit
58737f7a90

+ 12 - 18
ems-ui/src/views/basecfg/device/index.vue

@@ -136,10 +136,7 @@
                 />
               </el-select>
             </el-form-item>
-            <!--            <el-form-item label="安装位置" prop="refArea">-->
-            <!--              <treeselect v-model="form.refArea" :options="totalAreaOptions" :show-count="true" placeholder="请选择所属建筑"-->
-            <!--                @select="handleAreaType" />-->
-            <!--            </el-form-item>-->
+
             <el-form-item label="设备代码" prop="deviceCode">
               <el-input v-model="form.deviceCode" placeholder="请输入设备代码"/>
             </el-form-item>
@@ -237,7 +234,6 @@
           </div>
         </el-dialog>
 
-
         <!--设备器件-->
         <el-drawer :title=ComponentRow.deviceName size="80%" :visible.sync="showDevProcessDrawer" direction="rtl">
           <div class="drawer-content" style="padding-left:50px">
@@ -342,7 +338,6 @@
           </div>
         </el-drawer>
 
-
         <!-- 详情弹框 -->
         <el-dialog :visible.sync="showDrawer" title="设备详情">
           <div v-if="curRow">
@@ -480,8 +475,8 @@ export default {
         deviceCode: null,
         deviceSubCategory: '',
         deviceCategory: 'E',
-        areaType: null,
-        refArea: null,
+        locationType: null,
+        locationRef: null,
         refFacs: null,
         customAttrs: null
       },
@@ -626,7 +621,11 @@ export default {
     /** 查询区域树结构 */
     getAreaTree(tier) {
       areaTreeSelect(tier).then(response => {
-        this.treeAreaOptions = response.data
+        this.treeAreaOptions =  [{
+          id: '-1',
+          label: '全部',
+          children: response.data
+        }]
       })
     },
     // 筛选节点
@@ -636,8 +635,8 @@ export default {
     },
     // 节点单击事件
     handleNodeClick(data) {
-      this.queryParams.refArea = data.id
-      this.queryParams.areaType = data.tier
+      this.queryParams.locationType = data.tier
+      this.queryParams.locationRef = data.id
       this.handleQuery()
     },
     // 取消按钮
@@ -689,8 +688,8 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.queryParams.refArea = null
-      this.queryParams.areaType = null
+      this.queryParams.locationType = null
+      this.queryParams.locationRef = null
       this.resetForm('queryForm')
       this.handleQuery()
     },
@@ -841,8 +840,6 @@ export default {
                 console.error('属性添加失败:', error)
                 this.$message.error('属性添加失败')
               })
-            } else {
-              // this.$message.info('没有属性需要添加');
             }
           } else {
             addDevice(this.form).then(response => {
@@ -890,9 +887,6 @@ export default {
         ...this.queryParams
       }, `device_${new Date().getTime()}.xlsx`)
     },
-    handleAreaType(data) {
-      this.form.areaType = data.tier
-    },
     getFacsOptions() {
       const getFacsParams = {
         facsCategory: this.queryParams.deviceCategory,

+ 3 - 2
ems-ui/src/views/basecfg/meterdevc/index.vue

@@ -472,15 +472,16 @@ export default {
       this.handleQuery()
     },
     changeObjOptions(objType) {
+      this.objCode = null
+
       if (objType === 1) {
         areaTreeSelectByCode('Area', this.form.areaCode).then(response => {
           this.objCodeOptions = response.data
         })
       } else if (objType === 2) {
-        const devcCategory = 'E';
+        const devcCategory = 'Z';
         devTreeByFacs(this.form.areaCode, devcCategory).then(response => {
           this.objCodeOptions = response.data
-          console.log("计量对象",this.objCodeOptions)
         })
       }
     }

+ 13 - 9
ems-ui/src/views/devmgr/attr/index.vue

@@ -117,7 +117,7 @@
                 <p><span class="bold">设备名称:</span>{{ curRow.deviceName }}</p>
                 <p><span class="bold">设备代码:</span>{{ curRow.deviceCode }}</p>
                 <p><span class="bold">归属设施:</span>{{ curRow.refFacs }}</p>
-                <p><span class="bold">归属区域:</span>{{ curRow.refArea }}</p>
+                <p><span class="bold">归属区域:</span>{{ curRow.areaPath }}</p>
                 <p><span class="bold">子系统:</span>{{ curRow.subsystemName }}</p>
                 <p><span class="bold">设备状态:</span>{{ curRow.deviceStatus }}</p>
               </div>
@@ -267,8 +267,8 @@ export default {
         deviceSubCategory: '',
         deviceCategory: 'E',
         deviceStatus: null,
-        areaType: null,
-        refArea: null,
+        locationType: null,
+        locationRef: null,
         refFacs: null,
         subsystemCode: null
       },
@@ -316,7 +316,11 @@ export default {
     /** 查询区域树结构 */
     getAreaTree(tier) {
       areaTreeSelect(tier).then(response => {
-        this.treeAreaOptions = response.data;
+        this.treeAreaOptions =  [{
+          id: '-1',
+          label: '全部',
+          children: response.data
+        }]
       });
     },
     // 筛选节点
@@ -326,8 +330,8 @@ export default {
     },
     // 节点单击事件
     handleNodeClick(data) {
-      this.queryParams.refArea = data.id;
-      this.queryParams.areaType = data.tier;
+      this.queryParams.locationType = data.tier;
+      this.queryParams.locationRef = data.id;
       this.handleQuery();
     },
     // 取消按钮
@@ -344,7 +348,7 @@ export default {
         deviceSubCategory: null,
         deviceCategory: null,
         deviceStatus: null,
-        refArea: null,
+        locationRef: null,
         refFacs: null,
         createTime: null,
         updateTime: null
@@ -358,8 +362,8 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.queryParams.refArea = null;
-      this.queryParams.areaType = null;
+      this.queryParams.locationType = null;
+      this.queryParams.locationRef = null;
       this.resetForm('queryForm')
       this.handleQuery()
     },