@@ -100,7 +102,7 @@
-
+
{{ contentFormat(item) }}{{ units.get(item.field) }}
@@ -108,6 +110,9 @@
{{ shiyongzhuangtai }}
+
+ {{ openData.department ? openData.department.name : '' }}
+
@@ -128,6 +133,7 @@ import { listdept } from "@/api/system/department";
import { getparameter } from "@/api/system/dictionary";
import { listCommondepartment } from '@/api/common'
import { deepCopy } from '@/utils'
+import { show as customFormFieldShow } from '@/api/system/customFormField'
export default {
name: "mapList",
data() {
@@ -212,15 +218,7 @@ export default {
polygons: [],
markerList: [],
departments: [],
- wxAreas: [
- "宜兴市",
- "惠山区",
- "新吴区",
- "梁溪区",
- "江阴市",
- "滨湖区",
- "锡山区",
- ],
+ wxAreas: new Map(),
units: new Map([
["dengjimianji", "m²"],
["shijimianji", "m²"],
@@ -231,9 +229,27 @@ export default {
};
},
methods: {
+ async getWxAreas () {
+ try {
+ const res = await customFormFieldShow({ id: 120 })
+ let keys = Object.keys(res.select_item)
+ if (keys.length > 0) {
+ this.wxAreas = new Map(keys.map((key) => {
+ return [
+ /^\d*$/.test(res.select_item[key])
+ ? Number(res.select_item[key])
+ : res.select_item[key],
+ key
+ ]
+ }))
+ }
+ } catch (err) {
+
+ }
+ },
index,
areaPick(e) {
- this.areaBG(this.wxAreas[this.select.filter[0].value - 1]);
+ this.areaBG(this.wxAreas.get(this.select.filter[0].value));
this.getList().then((res) => {
this.setMapMarker();
});
@@ -743,12 +759,13 @@ export default {
}
},
created() {
+ this.getWxAreas();
this.getDepts();
this.getFormDetail();
},
async mounted() {
let areaId = Number(this.$route.query.area) || ''
- areaId ? (this.init(this.wxAreas[areaId - 1]),this.select.filter[0].value = areaId) : this.init();
+ areaId ? (this.init(this.wxAreas.get(areaId)),this.select.filter[0].value = areaId) : this.init();
await this.getList();
this.setMapMarker();
@@ -1008,14 +1025,14 @@ $staticsHeight: 60px;