vue2-client 1.5.19 → 1.5.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -70,7 +70,7 @@ export default {
|
|
|
70
70
|
return {
|
|
71
71
|
open: false,
|
|
72
72
|
tagData: {
|
|
73
|
-
divisionsForTree:
|
|
73
|
+
divisionsForTree: [],
|
|
74
74
|
// 市
|
|
75
75
|
cityData: [],
|
|
76
76
|
// 区
|
|
@@ -99,7 +99,9 @@ export default {
|
|
|
99
99
|
}
|
|
100
100
|
},
|
|
101
101
|
mounted () {
|
|
102
|
-
|
|
102
|
+
this.$appdata.getDivisionsOhChinaForTree().then(res => {
|
|
103
|
+
this.tagData.divisionsForTree = res
|
|
104
|
+
})
|
|
103
105
|
},
|
|
104
106
|
model: {
|
|
105
107
|
prop: 'value',
|
|
@@ -30,13 +30,18 @@ const GetAppDataService = {
|
|
|
30
30
|
localStorage.setItem(process.env.VUE_APP_DICTIONARY_KEY, JSON.stringify(params))
|
|
31
31
|
localStorage.setItem(process.env.VUE_APP_BADGE_KEY, JSON.stringify(badgeItemArray))
|
|
32
32
|
})
|
|
33
|
-
// 获取省市区数据
|
|
34
|
-
localStorage.setItem(process.env.VUE_APP_DIVISIONSOHCHINA, JSON.stringify([]))
|
|
35
33
|
},
|
|
36
34
|
// 返回树形省市区
|
|
37
|
-
getDivisionsOhChinaForTree () {
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
async getDivisionsOhChinaForTree () {
|
|
36
|
+
let list = this.getDivisionsOhChinaForList()
|
|
37
|
+
// 获取省市区数据
|
|
38
|
+
if (!list) {
|
|
39
|
+
await post(manageApi.getDivisionsOhChina, {}).then((res) => {
|
|
40
|
+
list = res
|
|
41
|
+
localStorage.setItem(process.env.VUE_APP_DIVISIONSOHCHINA, JSON.stringify(res))
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
return handleTree(list, 'code', 'parentcode')
|
|
40
45
|
},
|
|
41
46
|
// 返回列表省市区
|
|
42
47
|
getDivisionsOhChinaForList () {
|