|
@@ -162,7 +162,7 @@
|
|
|
v-model="propsData.toEquipmentTypes"
|
|
|
multiple
|
|
|
placeholder="设备类型,输入名称或代码搜索"
|
|
|
- style="width: 600px;"
|
|
|
+ style="width: 400px;"
|
|
|
filterable
|
|
|
remote
|
|
|
:remote-method="queryEquipTypes"
|
|
@@ -175,6 +175,10 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="连线另一端设备过滤">
|
|
|
+ <el-input v-model="propsData.toDataFilterStr" :disabled="true" style="width: 400px;"></el-input>
|
|
|
+ <el-button size="mini" @click.prevent="editFilter1()">过滤条件</el-button>
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
|
|
@@ -206,6 +210,7 @@
|
|
|
} from "vue-property-decorator";
|
|
|
import FilterPanel from '@/components/FilterPanel.vue';
|
|
|
import {LegendEditor} from '@/lib/LegendEditor';
|
|
|
+ import {ViewTool} from '@/lib/UIUtils';
|
|
|
|
|
|
@Component({components:{FilterPanel}})
|
|
|
export default class DiagramLegend extends Vue {
|
|
@@ -406,6 +411,8 @@
|
|
|
}
|
|
|
}
|
|
|
props.toEquipmentTypes = sel.toEquipmentTypes;
|
|
|
+ props.toDataFilter = sel.toDataFilter;
|
|
|
+ props.toDataFilterStr = ViewTool.filterToStr(props.toDataFilter);
|
|
|
|
|
|
this.propsData = props;
|
|
|
this.dlgAnchorVisible = true;
|
|
@@ -457,7 +464,7 @@
|
|
|
|
|
|
this.dlgFilterVisible = true;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//修改数据匹配过滤条件
|
|
|
modifyFilter(){
|
|
|
var filter = (this.$refs.filterPanel as FilterPanel).buildFilter();
|
|
@@ -469,13 +476,20 @@
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const legend = this.editor.getSelComp();
|
|
|
- legend.dataFilter = filter;
|
|
|
+ if(this.currentAnchor) {
|
|
|
+ //锚点另一端设备过滤
|
|
|
+ this.propsData.toDataFilter = filter;
|
|
|
+ this.propsData.toDataFilterStr = ViewTool.filterToStr(filter);
|
|
|
+ } else {
|
|
|
+ const legend = this.editor.getSelComp();
|
|
|
+ legend.dataFilter = filter;
|
|
|
+
|
|
|
+ this.editor.redraw();
|
|
|
+
|
|
|
+ this.saveLegend();
|
|
|
+ }
|
|
|
|
|
|
this.dlgFilterVisible = false;
|
|
|
- this.editor.redraw();
|
|
|
-
|
|
|
- this.saveLegend();
|
|
|
}
|
|
|
|
|
|
//编辑锚点信息
|
|
@@ -484,6 +498,13 @@
|
|
|
this.setProps('anchor');
|
|
|
}
|
|
|
|
|
|
+ //编辑锚点另一端设备的过滤条件
|
|
|
+ editFilter1(){
|
|
|
+ this.dataFilter = this.propsData.toDataFilter != null ? this.propsData.toDataFilter : {};
|
|
|
+
|
|
|
+ this.dlgFilterVisible = true;
|
|
|
+ }
|
|
|
+
|
|
|
//修改锚点信息
|
|
|
modifyAnchor(){
|
|
|
this.currentAnchor.name = this.propsData.name;
|
|
@@ -499,6 +520,8 @@
|
|
|
}
|
|
|
this.currentAnchor.toEquipmentTypes = this.propsData.toEquipmentTypes;
|
|
|
|
|
|
+ this.currentAnchor.toDataFilter = this.propsData.toDataFilter;
|
|
|
+
|
|
|
this.dlgAnchorVisible = false;
|
|
|
this.editor.redraw();
|
|
|
|