Przeglądaj źródła

修改关系数量

zhangyu 3 lat temu
rodzic
commit
7f9cd1b203

+ 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))