Browse Source

优化指挥调度

feature/dev_worklog2
dai 3 years ago
parent
commit
66a286c385
  1. 57
      src/views/modules/visual/command/cpts/map.vue
  2. 2
      src/views/modules/visual/command/cpts/popup.vue
  3. 8
      src/views/modules/visual/command/cpts/sidemenu-left.vue
  4. 1
      src/views/modules/visual/command/cpts/sidemenu.vue
  5. 10
      src/views/modules/visual/command/index.vue

57
src/views/modules/visual/command/cpts/map.vue

@ -201,32 +201,35 @@ export default {
const polygon = [
...srcGridData.children
.filter((item) => item.coordinates.length > 0)
.map((item) => ({
type: "Feature",
properties: {
// id: item.id,
// name: item.name,
// level: item.level,
center: [item.longitude, item.latitude],
...item,
dotCount: gridCountData.find((item2) => item2.orgId == item.id)
? gridCountData.find((item2) => item2.orgId == item.id).total
: "",
},
geometry: {
type: "Polygon",
coordinates: [
item.latitude
? [[item.longitude, item.latitude]]
: spliceIntoChunks(
item.coordinates
.split(",")
.map((item) => parseFloat(item)),
2
).filter((item) => item.length == 2),
],
},
})),
.map((item) => {
let countItem = gridCountData.find(
(item2) => item2.orgId == item.id
);
console.log("countItem", countItem);
return {
type: "Feature",
properties: {
...item,
center: [item.longitude, item.latitude],
dotCount: countItem
? countItem.categoryName + ":" + countItem.total
: "",
},
geometry: {
type: "Polygon",
coordinates: [
item.latitude
? [[item.longitude, item.latitude]]
: spliceIntoChunks(
item.coordinates
.split(",")
.map((item) => parseFloat(item)),
2
).filter((item) => item.length == 2),
],
},
};
}),
];
return { type: "FeatureCollection", features: polygon };
},
@ -496,7 +499,7 @@ export default {
.source(polygonDotData)
.color("name", styleConfig.textColor)
.shape("dotCount", "text")
.size(16)
.size(14)
.style({
textAnchor: "center", // center|left|right|top|bottom|top-left
textOffset: [0, -80], // [, ]

2
src/views/modules/visual/command/cpts/popup.vue

@ -393,7 +393,7 @@
</div>
<div class="item">
联系人
<span>{{ info.manageDistrict || "--" }}</span>
<span>{{ info.contacts || "--" }}</span>
</div>
<div class="item">
联系人电话

8
src/views/modules/visual/command/cpts/sidemenu-left.vue

@ -131,12 +131,6 @@ export default {
mounted() {
// this.requestList();
this.currentKey = "event_tdnd";
this.currentItem = {
categoryKey: "event_tdnd",
coverageType: "csgl",
placeType: "event",
};
},
methods: {
@ -155,6 +149,7 @@ export default {
this.currentKey = "";
this.currentItem = {
categoryKey: "",
categoryName: "",
coverageType: "",
placeType: "",
};
@ -185,6 +180,7 @@ export default {
});
return item;
});
this.handleClickItem(this.menuList[0]);
} else {
this.$message.error(msg);
}

1
src/views/modules/visual/command/cpts/sidemenu.vue

@ -247,6 +247,7 @@ export default {
color: #ffffff;
background-color: #041267;
font-weight: bold;
box-shadow: 0 0 30px 5px inset #22f;
}
.info {

10
src/views/modules/visual/command/index.vue

@ -392,6 +392,7 @@ export default {
dotList2: [],
categoryKeys2: [],
coverageTypes2: [],
categoryNames2: [],
dotIcoList2: {
event_tdnd: require("@/assets/img/shuju/command/ico3/event_tdnd.png"),
enterprise_patrol_unqualified: require("@/assets/img/shuju/command/ico3/enterprise_patrol_unqualified.png"),
@ -548,6 +549,8 @@ export default {
this.coverageTypes2 = [obj.coverageType];
this.categoryKeys2 = [obj.categoryKey];
this.placeType2 = obj.placeType;
this.categoryNames2 = [obj.categoryName];
console.log(obj)
},
handleChangeMenu(list) {
@ -639,7 +642,12 @@ export default {
const { data, code, msg } = await requestPost(url, params);
if (code === 0) {
this.gridCountData = [...data];
this.gridCountData = [
...data.map((item) => ({
...item,
categoryName: this.categoryNames2[0],
})),
];
} else {
this.$message.error(msg);
}

Loading…
Cancel
Save