haojianlong 5 лет назад
Родитель
Сommit
786bf0391a

+ 8 - 1
src/components/config_point/dictionaryCascader.vue

@@ -65,6 +65,12 @@ export default {
       },
       rules: {
         dict: [{ required: true, message: '请选择对应数据字典', trigger: 'blur' }]
+      },
+      typeRelation: {
+        Pj: 'Project',
+        Bd: 'Building',
+        Fl: 'Floor',
+        VOTn: 'Tenant',
       }
     }
   },
@@ -121,13 +127,14 @@ export default {
     },
     //请求信息点
     getDataPoint(type) {
+      let that = this;
       let param = {
         data: {
           Filters: "InputMode='M' or InputMode='L'",
           PageNumber: 1,
           PageSize: 500
         },
-        type: type
+        type: this.typeRelation[type] || type
       }
       getDataDictionary(param, res => {
         let tempArr = res.Content.map(item => {

+ 16 - 3
src/components/point/dynamicdata/locationCascader.vue

@@ -34,18 +34,31 @@ export default {
       dynamicLocationList(param, res => {
         this.LocationList = res.Content[0].List;
         //添加未明确对象
+        this.LocationList = this.delNullItems(this.LocationList)
         this.LocationList.map(item => {
-          if (item.List && item.List.length) {
+          if (item.List) {
             item.List.map(child => {
-              child.List.unshift({ Name: "未明确业务空间" })
+              if (child.List) {
+                child.List.unshift({ Name: '未明确业务空间' })
+              }
             })
             item.List.unshift({ Name: '未明确楼层' })
           }
         })
         this.LocationList.unshift({ Name: '未明确建筑' })
-        //结束
       });
     },
+    delNullItems(arr) {
+      let tempArr = JSON.parse(JSON.stringify(arr))
+      let options = tempArr.map(item => {
+        if (item.Name == 'null') return undefined
+        if (item.List && item.List.length) {
+          item.List = this.delNullItems(item.List)
+        }
+        return item
+      }).filter(d => d)
+      return options
+    },
     changeCascader(val) {
       clearTimeout(this.timer);
       this.timer = setTimeout(() => {

+ 7 - 1
src/views/point/dynamicdata/addRelation/equipRela/index.vue

@@ -46,7 +46,13 @@
               <el-table-column label="数据源" align="right" show-overflow-tooltip>
                 <template slot-scope="scope">{{ scope.row.Datasource }}</template>
               </el-table-column>
-              <el-table-column prop="LocationFlag" label="位置标签" align="right" show-overflow-tooltip></el-table-column>
+              <el-table-column label="位置标签" align="right">
+                <template slot-scope="scope">
+                  <el-tooltip :content="scope.row.LocationFlag.toString()" placement="top">
+                    <span>{{scope.row.LocationFlag.toString()}}</span>
+                  </el-tooltip>
+                </template>
+              </el-table-column>
               <el-table-column prop="SubTypeName" label="设备类型关键字" align="right" show-overflow-tooltip></el-table-column>
               <el-table-column prop="EquipmentMark" label="设备标识" show-overflow-tooltip align="right" width="200" class-name="bgf5"></el-table-column>
               <el-table-column type="selection" width="35" class-name="bgf5"></el-table-column>

+ 2 - 1
src/views/point/dynamicdata/index.vue

@@ -17,7 +17,7 @@
           <i class="el-icon-right"></i>
         </span>
         <el-tooltip class="item" effect="dark" :content="'按对应规则自动设定实例动态参数信息点'" placement="left">
-          <el-badge :is-dot="tipsType>1" class="item">
+          <el-badge :is-dot="ruleDialogShow||tipsType>1" class="item">
             <el-button size="small" type="primary" @click="apply" icon="el-icon-refresh" style="float:right;">配置</el-button>
           </el-badge>
         </el-tooltip>
@@ -128,6 +128,7 @@ export default {
     },
     //执行对应结果
     apply() {
+      this.ruleDialogShow = false;
       this.$refs.apply.showDialog();
     },
     //规则执行弹窗