浏览代码

修改关系数量

zhangyu 3 年之前
父节点
当前提交
7f9cd1b203
共有 1 个文件被更改,包括 24 次插入13 次删除
  1. 24 13
      src/components/relation/overview/Modal/RelationMaintain.vue

+ 24 - 13
src/components/relation/overview/Modal/RelationMaintain.vue

@@ -87,19 +87,28 @@
       <el-row :gutter="20">
         <el-col :span="12">
           <p>源端设备类:</p>
-          <el-select
-            v-model="value"
-            placeholder="请选择"
-            multiple
-            @change="changeVal"
-          >
-            <el-option
-              v-for="item in oraginOption"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            />
-          </el-select>
+          <el-tooltip placement="top" :disabled="!sourceSideList.length">
+						<div slot="content">
+							<ul>
+								<li  v-for="item in sourceSideList" :key="item.sourceType">
+									{{`${oraginOption.find(e => e.value === item.sourceType)? oraginOption.find(e => e.value === item.sourceType).label : ""}:${item.sourceCount}个`}}
+								</li>
+							</ul>
+						</div>
+            <el-select
+                v-model="value"
+                placeholder="请选择"
+                multiple
+                @change="changeVal"
+            >
+                <el-option
+                v-for="item in oraginOption"
+                :key="item.value"
+                :label="item.label"
+                :value="item.value"
+                />
+            </el-select>
+        	</el-tooltip>
         </el-col>
         <el-col :span="12">
           <p>末端设备类:</p>
@@ -300,6 +309,7 @@ export default {
       setOriginOption: [],
       setEndValue: [],
       setEndOptions: [],
+			sourceSideList: [],
       disabled: false
     }
   },
@@ -347,6 +357,7 @@ export default {
       sourceQuery(param, res => {
         this.value = []
         this.setValue = []
+				this.sourceSideList = res.content ? res.content : [];
         res.content && res.content.forEach(({sourceType}) => sourceType && this.value.push(sourceType))
         //启动计算
         res.content && res.content.forEach(({sourceType}) => sourceType && this.setValue.push(sourceType))