|
@@ -35,10 +35,11 @@
|
|
|
<!-- 图例 -->
|
|
|
|
|
|
<Legend
|
|
|
+ v-show="legendShow"
|
|
|
class="comprehensive-analysis-legendbox"
|
|
|
:legendData="{
|
|
|
- boxWidth: '250',
|
|
|
- boxHeight: '350',
|
|
|
+ boxWidth: '230',
|
|
|
+ boxHeight: legendHeight,
|
|
|
menuIndex: '3',
|
|
|
legendIcon: legendIcon,
|
|
|
legendTitle: legendTitle,
|
|
@@ -187,7 +188,9 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ legendShow: false,
|
|
|
tableType: "normal",
|
|
|
+ legendHeight: "0",
|
|
|
boxWidth: "600",
|
|
|
boxHeight: "600",
|
|
|
attrTableShow: false,
|
|
@@ -250,11 +253,22 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
watch: {
|
|
|
+ legendTitle(val) {
|
|
|
+ console.log(val, "监听当前图例item数量");
|
|
|
+ if (val.length === 0) {
|
|
|
+ this.legendShow = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (val.length > 0 && val.length <= 10) {
|
|
|
+ this.legendShow = true;
|
|
|
+ this.legendHeight = 50 * val.length + 50 + "";
|
|
|
+ }
|
|
|
+ },
|
|
|
filterText(val) {
|
|
|
this.$refs.tree.filter(val);
|
|
|
},
|
|
|
myModel(val) {
|
|
|
- console.log(val, "监听综合分析中的我的模型");
|
|
|
+ // console.log(val, "监听综合分析中的我的模型");
|
|
|
},
|
|
|
getCustomModel: {
|
|
|
handler(val) {
|
|
@@ -596,8 +610,8 @@ export default {
|
|
|
}
|
|
|
&-legendbox {
|
|
|
position: absolute;
|
|
|
- right: 30px;
|
|
|
- bottom: 30px;
|
|
|
+ right: 410px;
|
|
|
+ top: 30px;
|
|
|
z-index: 1;
|
|
|
}
|
|
|
/* 弹窗 */
|