南宁市显示增加

This commit is contained in:
art_station
2021-12-27 19:39:50 +08:00
parent 9dffc3ac70
commit 0a2fcfcac5

View File

@@ -24,13 +24,13 @@
</a-col>
<a-col :lg="4" :md="8" :sm="24" :xs="24">
<a-form-item label="城区:">
<a-select mode="multiple" :options="areaOptions" @change="handleAreaChange" placeholder="城区">
<a-select mode="multiple" :default-value="['南宁']" v-model:value="queryParams.areaList" :options="areaOptions" placeholder="城区">
</a-select>
</a-form-item>
</a-col>
<a-col :lg="4" :md="8" :sm="24" :xs="24">
<a-form-item label="测点名称:">
<a-select mode="multiple" :options="placeOptions" @change="handlePlaceChange" placeholder="测点名称">
<a-select mode="multiple" v-model:value="queryParams.placeList" :options="placeOptions" placeholder="测点名称">
</a-select>
</a-form-item>
</a-col>
@@ -63,7 +63,7 @@
queryParams: {
startYear: 2020,
endYear: 2021,
areaList: ['兴宁区','西乡塘区'],
areaList: [],
placeList: []
},
trendData: [],
@@ -78,12 +78,6 @@
this.drawTrend()
},
methods: {
handleAreaChange(value) {
this.queryParams.areaList = Object.values(value)
},
handlePlaceChange(value) {
this.queryParams.placeList = Object.values(value)
},
// 下拉列表
loadOptionData() {
getColumnOptions("place").then((res) => {
@@ -101,6 +95,7 @@
value: item,
};
});
this.areaOptions.unshift({ label: '南宁市', value: '南宁'})
});
getColumnOptions("monitor_year").then((res) => {
this.yearOptions = res.data.data.map((item) => {