Commit 9fd5ad5447d3ea5ab52ce9bb166b41764f270815
1 parent
ab0ff5ef
fix(src/packages): 图表地图 地图右侧配置回显省份选择城市选择
Showing
3 changed files
with
12 additions
and
5 deletions
... | ... | @@ -4,9 +4,12 @@ import { getAreaList } from '@/api/external/common/index' |
4 | 4 | import { areaEnum } from '../config' |
5 | 5 | |
6 | 6 | const props = defineProps({ |
7 | - drillingIn:{ | |
8 | - type:Boolean, | |
9 | - default:false | |
7 | + drillingIn: { | |
8 | + type: Boolean, | |
9 | + default: false | |
10 | + }, | |
11 | + optionData: { | |
12 | + type: Object | |
10 | 13 | } |
11 | 14 | }) |
12 | 15 | |
... | ... | @@ -39,6 +42,8 @@ onMounted(async () => { |
39 | 42 | label: '中国', |
40 | 43 | value: 'china' |
41 | 44 | }) |
45 | + onHandleSelectProvince(props.optionData?.mapRegion.saveSelect['provinceValue']) | |
46 | + for (let i in selectValues) Reflect.set(selectValues, i, props.optionData?.mapRegion.saveSelect[i]) | |
42 | 47 | }) |
43 | 48 | |
44 | 49 | const onHandleSelectProvince = async (value: number | string) => { | ... | ... |
... | ... | @@ -39,7 +39,7 @@ |
39 | 39 | ></n-input-number> |
40 | 40 | </SettingItem> |
41 | 41 | </SettingItemBox> |
42 | - <SelectCity :drillingIn="optionData.drillingIn" @submit="onHandleSelectValues" /> | |
42 | + <SelectCity :optionData="optionData" :drillingIn="optionData.drillingIn" @submit="onHandleSelectValues" /> | |
43 | 43 | <SettingItemBox name="区域颜色"> |
44 | 44 | <SettingItem name="0%处颜色"> |
45 | 45 | <n-color-picker |
... | ... | @@ -300,6 +300,7 @@ const mapRegion = computed(() => { |
300 | 300 | |
301 | 301 | const onHandleSelectValues = (values: any) => { |
302 | 302 | const { cityValue, countyValue, provinceValue } = values |
303 | + props.optionData.mapRegion.saveSelect = values | |
303 | 304 | props.optionData.mapRegion.adcode = countyValue |
304 | 305 | ? countyValue |
305 | 306 | : cityValue | ... | ... |