|
@@ -320,22 +320,16 @@
|
|
|
<!-- 修改图例 -->
|
|
|
<div class="row-tit">图例名称</div>
|
|
|
<div>
|
|
|
- <a-dropdown :trigger="['click']">
|
|
|
- <a class="ant-dropdown-link" @click="e => e.preventDefault()" >
|
|
|
- afdaf<a-icon type="down" />
|
|
|
- </a>
|
|
|
- <a-menu slot="overlay">
|
|
|
- <a-menu-item>
|
|
|
- <a href="javascript:;">1st menu item</a>
|
|
|
- </a-menu-item>
|
|
|
- <a-menu-item>
|
|
|
- <a href="javascript:;">2nd menu item</a>
|
|
|
- </a-menu-item>
|
|
|
- <a-menu-item>
|
|
|
- <a href="javascript:;">3rd menu item</a>
|
|
|
- </a-menu-item>
|
|
|
- </a-menu>
|
|
|
- </a-dropdown>
|
|
|
+ <a-spin :spinning="isGetLengend">
|
|
|
+ <a-dropdown :trigger="['click']">
|
|
|
+ <a class="ant-dropdown-link" @click="changeLengend">{{lengendName}}</a>
|
|
|
+ <a-menu slot="overlay">
|
|
|
+ <a-menu-item v-for="(item,key) in lengendArr" :key="key">
|
|
|
+ <a href="javascript:;">{{item.Name}}</a>
|
|
|
+ </a-menu-item>
|
|
|
+ </a-menu>
|
|
|
+ </a-dropdown>
|
|
|
+ </a-spin>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
@@ -447,6 +441,7 @@
|
|
|
import editDialog from "./edit-dialog";
|
|
|
import Swatches from "vue-swatches";
|
|
|
import bus from "@/bus";
|
|
|
+import bus2 from "@/bus2";
|
|
|
import "vue-swatches/dist/vue-swatches.css";
|
|
|
import { SLineStyle } from "@saga-web/graph/lib";
|
|
|
import { SItemStatus } from "@saga-web/big";
|
|
@@ -459,6 +454,7 @@ import { getUrlMsg } from "@/components/urlMsg.js";
|
|
|
// mapclass里边的没有透明度
|
|
|
import { hexify } from "@/utils/rgbaUtil";
|
|
|
import { SCustomLegendItem } from "@/lib/items/SCustomLegendItem";
|
|
|
+import { graphElementGroup } from "@/api/editer.js";
|
|
|
export default {
|
|
|
name: "attr_select",
|
|
|
props: ["type", "focusItemList"],
|
|
@@ -564,12 +560,12 @@ export default {
|
|
|
CUSTOMbgColor: "rgba(0,0,0,0.15)", // 自定义多边形背景色
|
|
|
CUSTOMbdColor: "rgba(0,0,0,1)", // 自定义多边形线条色
|
|
|
keys: new Date().getTime(),
|
|
|
- dataSelect: [
|
|
|
- { id: "totalEnergy", name: "总量" },
|
|
|
- { id: "singleParty", name: "单平米" }
|
|
|
- ],
|
|
|
- selVal: "totalEnergy",
|
|
|
- selText: "总量"
|
|
|
+ getCategroyIdS: [], //选择原件的数据
|
|
|
+ categoryId: "", //类型ide
|
|
|
+ lengendName: "", //lengend图例Id
|
|
|
+ isGetLengend: false,
|
|
|
+ isOpenGend: false,
|
|
|
+ lengendArr: [] //图例数组
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -695,14 +691,42 @@ export default {
|
|
|
changeAttachObjectIds(arr) {
|
|
|
bus.$emit("changeAttachObjectIds", arr);
|
|
|
},
|
|
|
- xxx(val){
|
|
|
- alert(val)
|
|
|
+ // 下拉框获取图例数据
|
|
|
+ changeLengend(val) {
|
|
|
+ this.isGetLengend = true;
|
|
|
+ this.lengendArr = [];
|
|
|
+ const obj = {
|
|
|
+ InfoSystems: this.getCategroyIdS,
|
|
|
+ Type: "Zone",
|
|
|
+ categoryId: this.categoryId
|
|
|
+ };
|
|
|
+ return graphElementGroup(obj)
|
|
|
+ .then(res => {
|
|
|
+ const arr = [];
|
|
|
+ res.Data.forEach(res => {
|
|
|
+ if (res.GraphElements && res.GraphElements.length) {
|
|
|
+ res.GraphElements.forEach(item => {
|
|
|
+ if (
|
|
|
+ !(item.SubType && item.SubType == "FHFQ") &&
|
|
|
+ !(item.SubType && item.SubType == "SCPZ")
|
|
|
+ ) {
|
|
|
+ arr.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.isGetLengend = false;
|
|
|
+ this.lengendArr = arr;
|
|
|
+ console.log("arrarrarr", this.lengendArr);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.isGetLengend = false;
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
focusItemList: function(newval) {
|
|
|
console.log("------------");
|
|
|
- console.log(FENGMAP);
|
|
|
console.log("newval", newval);
|
|
|
const Item = newval.itemList[0];
|
|
|
this.GraphElementId = Item.data.GraphElementId;
|
|
@@ -787,6 +811,9 @@ export default {
|
|
|
this.borderColor = Item.strokeColor ? Item.strokeColor.value : "";
|
|
|
this.fillColor = Item.fillColor ? Item.fillColor.value : "";
|
|
|
this.itemExplain = "";
|
|
|
+ this.lengendName = Item.data.Properties.lengendName
|
|
|
+ ? Item.data.Properties.lengendName
|
|
|
+ : Item.name; //图例名称
|
|
|
if (Item.data.Properties.ItemExplain) {
|
|
|
this.itemExplain = Item.data.Properties.ItemExplain
|
|
|
? Item.data.Properties.ItemExplain
|
|
@@ -877,12 +904,14 @@ export default {
|
|
|
});
|
|
|
// }
|
|
|
console.log(this.attrCards);
|
|
|
- },
|
|
|
-
|
|
|
- selVal(n, o) {
|
|
|
- if (n === o) return;
|
|
|
- this.selText = this.dataSelect.find(d => d.id === n).name;
|
|
|
}
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ // 获取原件id
|
|
|
+ bus2.$on("getCategroyIdS", data => {
|
|
|
+ this.getCategroyIdS = data;
|
|
|
+ });
|
|
|
+ this.categoryId = getUrlMsg().categoryId;
|
|
|
}
|
|
|
};
|
|
|
</script>
|