haojianlong пре 5 година
родитељ
комит
e0295143f5

+ 1 - 1
src/components/point/dynamicdata/equipRules.vue

@@ -233,7 +233,7 @@ export default {
     },
     //自动对应实例
     autoGroupRela() {
-      this.$emit('autoGroupRela','equip');
+      this.$emit('autoGroupRela', 'equip');
     }
   },
   watch: {

+ 19 - 11
src/components/point/dynamicdata/projectRules.vue

@@ -57,9 +57,11 @@
         <el-table-column prop="ObjectLocalName" :label="`${typeName}实例`" show-overflow-tooltip min-width="100" class-name="td-bl"></el-table-column>
         <el-table-column label="所在建筑楼层" min-width="300">
           <template slot-scope="scope">
-            <el-tooltip :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
+            <el-tooltip
+              :content="scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''"
               placement="top">
-              <div class="tool-tip">{{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
+              <div class="tool-tip">
+                {{scope.row.BuildLocalName?scope.row.FloorLocalName?scope.row.BuildLocalName+'-'+scope.row.FloorLocalName:scope.row.BuildLocalName:''}}
               </div>
             </el-tooltip>
           </template>
@@ -68,9 +70,11 @@
         <el-table-column prop="CascadeEquipLocalName" label="所属设备实例" show-overflow-tooltip min-width="100"></el-table-column> -->
         <el-table-column prop="action" label="操作" min-width="100">
           <template slot-scope="scope">
-            <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left">
-              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain :disabled="isPending||scope.row.Related=='False'"
-                icon="el-icon-delete"></el-button>
+            <el-tooltip class="item" effect="dark" content="添加关系" placement="left" v-if="!(isPending||scope.row.Related=='True')">
+              <el-button size="mini" @click="handleAdd(scope.$index, scope.row)" type="primary" plain icon="el-icon-plus"></el-button>
+            </el-tooltip>
+            <el-tooltip class="item" effect="dark" content="清除对应规则" placement="left" v-if="!(isPending||scope.row.Related=='False')">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
             </el-tooltip>
           </template>
         </el-table-column>
@@ -157,6 +161,10 @@ export default {
     handleDelete(index, row) {
       this.$refs.del.showDialog(row);
     },
+    //添加关系
+    handleAdd(index, row) {
+      this.$message('开发中');
+    },
     //改变pagesize
     handleSizeChange(pageSize) {
       this.page.pageSize = pageSize;
@@ -168,9 +176,9 @@ export default {
       this.getTableData();
     },
     //跳转至填充对应规则
-    toAddRelation() {
-      this.$router.push({ path: "spaceRela", query: { typeName: this.typeName } });
-    },
+    // toAddRelation() {
+    //   this.$router.push({ path: "spaceRela", query: { typeName: this.typeName } });
+    // },
     //获取表格数据
     getTableData() {
       let param = {
@@ -229,9 +237,9 @@ export default {
       this.getTableData();
     },
     //自动对应实例
-    autoGroupRela() {
-      this.$emit('autoGroupRela','project');
-    }
+    // autoGroupRela() {
+    //   this.$emit('autoGroupRela','project');
+    // }
   },
   watch: {
     projectId() {

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

@@ -106,7 +106,7 @@
               <el-table-column prop="ObjectLocalCode" :label="`${typeName}本地编码`" show-overflow-tooltip></el-table-column>
               <el-table-column prop="SubTypeName" :label="`${typeName}类型`" show-overflow-tooltip></el-table-column>
               <!-- <el-table-column prop="CascadeEquipLocalName" label="所属设备实例" show-overflow-tooltip></el-table-column> -->
-              <el-table-column label="所在建筑楼层">
+              <el-table-column label="所在建筑">
                 <template slot-scope="scope">
                   <el-tooltip
                     :content="(scope.row.BuildLocalName?scope.row.BuildLocalName+'-':'')+(scope.row.FloorLocalName?scope.row.FloorLocalName:'')"