Browse Source

no message

linwenxin 5 tháng trước cách đây
mục cha
commit
78a5149383

+ 7 - 13
src/views/workOrder/workOrderPool/detailModule/workOrderInfo/mixins/basicInfo.js

@@ -319,7 +319,7 @@ export default {
               // 获取省名称
               this.orderInfo.province =
                 [...this.provinceList.map((v, i) => ({ value: v.id, label: v.name })), ...this.provinceList_cp].find(
-                  item => item.id === val
+                  item => item.value === val
                 )?.name || ''
               // 清除市区街道以及详细地址数据
               this.delDataK(1)
@@ -357,10 +357,8 @@ export default {
               // 获取市名称
               this.orderInfo.city = [
                 ...this.cityList.map((v, i) => ({ value: v.id, label: v.name })),
-                ...this.cityList_cp.filter(_ => {
-                  return this.provinceList_cp.find(item => item.value === this.orderInfo.provinceId)
-                })
-              ].find(item => item.id === val).name
+                ...this.cityList_cp
+              ].find(item => item.value === val).name
               // 清除区街道以及详细地址数据
               this.delDataK(2)
               lbsAmapRegion({ pid: val }).then(res => {
@@ -398,10 +396,8 @@ export default {
               // 获取区名称
               this.orderInfo.area = [
                 ...this.areaList.map((v, i) => ({ value: v.id, label: v.name })),
-                ...this.areaList_cp.filter(_ => {
-                  return this.cityList_cp.find(item => item.value === this.orderInfo.cityId)
-                })
-              ].find(item => item.id === val).name
+                ...this.areaList_cp
+              ].find(item => item.value === val).name
               // 清除街道以及详细地址数据
               this.delDataK(3)
               lbsAmapRegion({ pid: val }).then(res => {
@@ -438,10 +434,8 @@ export default {
               // 获取街道名称
               this.orderInfo.street = [
                 ...this.streetList.map((v, i) => ({ value: v.id, label: v.name })),
-                ...this.streetList_cp.filter(_ => {
-                  return this.areaList_cp.find(item => item.value === this.orderInfo.areaId)
-                })
-              ].find(item => item.id === val).name
+                ...this.streetList_cp
+              ].find(item => item.value === val).name
               // 清除详细地址数据
               this.delDataK(4)
             }