|
@@ -312,27 +312,27 @@ export default {
|
|
|
});
|
|
|
items.isChoice = true;
|
|
|
this.$emit("setCmdType", items.type);
|
|
|
- if (items.name == "画多边形"){
|
|
|
- bus.$emit('changeDrawType','draw')
|
|
|
+ if (items.name == "画多边形") {
|
|
|
+ bus.$emit("changeDrawType", "draw");
|
|
|
const item = {
|
|
|
- "Color":"#57C5FC",
|
|
|
- "Deleted":false,
|
|
|
- "FillColor":"#57c5fc0F",
|
|
|
- "Id":"-10",
|
|
|
- "InfoLocal":[],
|
|
|
- "InfoTypeId":[],
|
|
|
- "LineDash":"solid",
|
|
|
- "LineWidth":2,
|
|
|
- "Name":"",
|
|
|
- "SubType":"CUSTOM",
|
|
|
- "Type":"Zone",
|
|
|
- "Unit":"",
|
|
|
- "Url":"137ee878925448a699ec10c33e67fc95"
|
|
|
- }
|
|
|
+ Color: "#57C5FC",
|
|
|
+ Deleted: false,
|
|
|
+ FillColor: "#57c5fc0F",
|
|
|
+ Id: "-10",
|
|
|
+ InfoLocal: [],
|
|
|
+ InfoTypeId: [],
|
|
|
+ LineDash: "solid",
|
|
|
+ LineWidth: 2,
|
|
|
+ Name: "",
|
|
|
+ SubType: "CUSTOM",
|
|
|
+ Type: "Zone",
|
|
|
+ Unit: "",
|
|
|
+ Url: "137ee878925448a699ec10c33e67fc95"
|
|
|
+ };
|
|
|
this.$emit("toolActionClick", item);
|
|
|
}
|
|
|
},
|
|
|
- async showDrawer(item) {
|
|
|
+ async showDrawer(item) {
|
|
|
this.showDrawerItem = item;
|
|
|
this.isExtract = false;
|
|
|
if (item.isChoice) {
|
|
@@ -351,23 +351,24 @@ export default {
|
|
|
// 接口请求
|
|
|
this.itemList = [];
|
|
|
this.spinning = true;
|
|
|
- // const data = {
|
|
|
- // GraphCategoryIds: this.categoryId,
|
|
|
- // Type: item.type
|
|
|
- // };
|
|
|
- // await queryGroup(data).then(res => {
|
|
|
- // this.itemList = res.Data;
|
|
|
- // });
|
|
|
+ // const data = {
|
|
|
+ // GraphCategoryIds: this.categoryId,
|
|
|
+ // Type: item.type
|
|
|
+ // };
|
|
|
+ // await queryGroup(data).then(res => {
|
|
|
+ // this.itemList = res.Data;
|
|
|
+ // });
|
|
|
const arr = {
|
|
|
InfoSystems: this.categoryIdS,
|
|
|
Type: item.type,
|
|
|
- categoryId:this.categoryId
|
|
|
+ categoryId: this.categoryId
|
|
|
};
|
|
|
- await graphElementGroup(arr).then(res => {
|
|
|
+ await graphElementGroup(arr).then(res => {
|
|
|
this.spinning = false;
|
|
|
res.Data.map(item => {
|
|
|
this.itemList.push(item);
|
|
|
});
|
|
|
+ itemList;
|
|
|
});
|
|
|
}
|
|
|
if (this.visible) {
|
|
@@ -442,7 +443,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getBus() {
|
|
|
- bus2.$off('exportItem');
|
|
|
+ bus2.$off("exportItem");
|
|
|
bus2.$on("exportItem", data => {
|
|
|
this.data = [];
|
|
|
if (data.length) {
|
|
@@ -451,8 +452,8 @@ export default {
|
|
|
for (let i = 0; i < this.GraphElement.length; i++) {
|
|
|
const t = this.GraphElement[i];
|
|
|
for (let j = 0; j < data.length; j++) {
|
|
|
- if(t.Type == data[j].type){
|
|
|
- if (t.InfoTypeId.indexOf(data[j].key) > -1){
|
|
|
+ if (t.Type == data[j].type) {
|
|
|
+ if (t.InfoTypeId.indexOf(data[j].key) > -1) {
|
|
|
const obj = {
|
|
|
key: data[j].key,
|
|
|
name: t.Name,
|
|
@@ -461,20 +462,20 @@ export default {
|
|
|
type: data[j].type,
|
|
|
address: data[j].address,
|
|
|
id: t.Id
|
|
|
- }
|
|
|
+ };
|
|
|
if (!map[t.Id]) {
|
|
|
- map[t.Id] = obj
|
|
|
+ map[t.Id] = obj;
|
|
|
} else {
|
|
|
- map[t.Id].number += obj.number
|
|
|
- map[t.Id].key += obj.key
|
|
|
+ map[t.Id].number += obj.number;
|
|
|
+ map[t.Id].key += obj.key;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
- for(const k in map) {
|
|
|
- this.data.push(map[k])
|
|
|
+ for (const k in map) {
|
|
|
+ this.data.push(map[k]);
|
|
|
}
|
|
|
} catch (err) {
|
|
|
console.log(err);
|
|
@@ -502,6 +503,21 @@ export default {
|
|
|
changeDrawType(v) {
|
|
|
// bus.$emit("changeDrawType", v.target.value);
|
|
|
bus.$emit("changeDrawType", v);
|
|
|
+ },
|
|
|
+ // 获取左侧图例数据(无交互)
|
|
|
+ xxx(types = "Zone") {
|
|
|
+ const arr = {
|
|
|
+ InfoSystems: this.categoryIdS,
|
|
|
+ Type: types,
|
|
|
+ categoryId: this.categoryId
|
|
|
+ };
|
|
|
+ await graphElementGroup(arr).then(res => {
|
|
|
+ this.spinning = false;
|
|
|
+ res.Data.map(item => {
|
|
|
+ this.itemList.push(item);
|
|
|
+ });
|
|
|
+ // itemList
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -518,6 +534,7 @@ export default {
|
|
|
},
|
|
|
drawerVisible(val) {
|
|
|
if (this.visible) {
|
|
|
+ console.log("this.showDrawerItem", this.showDrawerItem);
|
|
|
this.showDrawer(this.showDrawerItem);
|
|
|
}
|
|
|
},
|