|
@@ -372,10 +372,18 @@ const getDictData = async (dictTypeName) => {
|
|
item.items = data
|
|
item.items = data
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+let timeCount = 0
|
|
let workAreaId = ''
|
|
let workAreaId = ''
|
|
const deal = async () => {
|
|
const deal = async () => {
|
|
if (workAreaId) { // 省份回显
|
|
if (workAreaId) { // 省份回显
|
|
const province = items.value.options.find(pv => pv.key === 'workAreaProvinceId')
|
|
const province = items.value.options.find(pv => pv.key === 'workAreaProvinceId')
|
|
|
|
+ if (!province?.items.length) { // 字典数据未获取
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ timeCount++
|
|
|
|
+ if (timeCount < 6) deal()
|
|
|
|
+ }, 2000)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if (province) {
|
|
if (province) {
|
|
const dealReturnObj = await cityToProvince(workAreaId, {}, province.items || [])
|
|
const dealReturnObj = await cityToProvince(workAreaId, {}, province.items || [])
|
|
const city = items.value.options.find(pv => pv.key === 'areaId')
|
|
const city = items.value.options.find(pv => pv.key === 'areaId')
|