@fmdevui/fm-dev 1.0.89 → 1.0.90
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/es/_virtual/de-DE.mjs +1 -1
- package/es/_virtual/en-US.mjs +1 -1
- package/es/_virtual/es-ES.mjs +1 -1
- package/es/_virtual/fr-FR.mjs +1 -1
- package/es/_virtual/it-IT.mjs +1 -1
- package/es/_virtual/ja-JP.mjs +1 -1
- package/es/_virtual/ko-KR.mjs +1 -1
- package/es/_virtual/nb-NO.mjs +1 -1
- package/es/_virtual/pt-BR.mjs +1 -1
- package/es/_virtual/ru-RU.mjs +1 -1
- package/es/_virtual/th-TH.mjs +1 -1
- package/es/_virtual/vi-VN.mjs +1 -1
- package/es/_virtual/zh-CN.mjs +1 -1
- package/es/_virtual/zh-HK.mjs +1 -1
- package/es/_virtual/zh-TW.mjs +1 -1
- package/es/core/utils/cityparess/index.d.ts +2 -2
- package/es/packages/core/ui/components/fmaddressparsing/index.vue2.mjs +174 -104
- package/es/packages/core/utils/cityparess/index.mjs +169 -94
- package/index.js +345 -200
- package/index.min.js +27 -27
- package/index.min.mjs +26 -26
- package/index.mjs +345 -200
- package/lib/_virtual/de-DE.js +1 -1
- package/lib/_virtual/en-US.js +1 -1
- package/lib/_virtual/es-ES.js +1 -1
- package/lib/_virtual/fr-FR.js +1 -1
- package/lib/_virtual/it-IT.js +1 -1
- package/lib/_virtual/ja-JP.js +1 -1
- package/lib/_virtual/ko-KR.js +1 -1
- package/lib/_virtual/nb-NO.js +1 -1
- package/lib/_virtual/pt-BR.js +1 -1
- package/lib/_virtual/ru-RU.js +1 -1
- package/lib/_virtual/th-TH.js +1 -1
- package/lib/_virtual/vi-VN.js +1 -1
- package/lib/_virtual/zh-CN.js +1 -1
- package/lib/_virtual/zh-HK.js +1 -1
- package/lib/_virtual/zh-TW.js +1 -1
- package/lib/core/utils/cityparess/index.d.ts +2 -2
- package/lib/packages/core/ui/components/fmaddressparsing/index.vue2.js +174 -104
- package/lib/packages/core/utils/cityparess/index.js +169 -94
- package/package.json +1 -1
- /package/es/{defaults.css → component.css} +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/de-DE.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/en-US.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/es-ES.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/fr-FR.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/it-IT.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/ja-JP.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/ko-KR.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/nb-NO.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/pt-BR.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/ru-RU.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/th-TH.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/vi-VN.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/zh-CHT.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/zh-CN.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/zh-HK.mjs +0 -0
- /package/es/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/zh-TW.mjs +0 -0
- /package/lib/{defaults.css → index.css} +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/de-DE.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/en-US.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/es-ES.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/fr-FR.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/it-IT.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/ja-JP.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/ko-KR.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/nb-NO.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/pt-BR.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/ru-RU.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/th-TH.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/vi-VN.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/zh-CHT.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/zh-CN.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/zh-HK.js +0 -0
- /package/lib/node_modules/.pnpm/{vxe-table@4.16.4_vue@3.5.20_typescript@5.8.3_ → vxe-table@4.16.6_vue@3.5.20_typescript@5.8.3_}/node_modules/vxe-table/lib/locale/lang/zh-TW.js +0 -0
|
@@ -3,114 +3,150 @@
|
|
|
3
3
|
var index = require('../../api/base/index.js');
|
|
4
4
|
|
|
5
5
|
const addressparsing = async (val) => {
|
|
6
|
-
let province = "";
|
|
7
6
|
if (val == null || val == void 0 || val == "" || val.trim() == "" || val.trim().length < 2) {
|
|
8
7
|
return { province: "", city: "", county: "" };
|
|
9
8
|
}
|
|
9
|
+
let _Province = "";
|
|
10
|
+
let _City = "";
|
|
11
|
+
let _County = "";
|
|
10
12
|
const oldvalue = val.trim();
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
province = cityobj.p;
|
|
13
|
+
const oldValueLen = val.trim().length;
|
|
14
|
+
const oneObje = getProvince(oldvalue);
|
|
15
|
+
let nextValue = oldvalue;
|
|
16
|
+
if (oneObje.p != "") {
|
|
17
|
+
_Province = oneObje.p;
|
|
18
|
+
nextValue = oldvalue.replace(oneObje.p, "").trim();
|
|
19
|
+
if (nextValue.length == oldValueLen) {
|
|
20
|
+
for (let i = _Province.length - 1; i >= 1; i--) {
|
|
21
|
+
nextValue = oldvalue.replace(oneObje.p.substr(0, i), "").trim();
|
|
22
|
+
if (nextValue.length < oldValueLen) {
|
|
23
|
+
break;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
if (countyOjb.x == "" && newValue.length > 6) {
|
|
41
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 7));
|
|
42
|
-
if (countyOjb.x == "" && newValue.length > 7) {
|
|
43
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 8));
|
|
44
|
-
if (countyOjb.x == "" && newValue.length > 8) {
|
|
45
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 9));
|
|
46
|
-
if (countyOjb.x == "" && newValue.length > 9) {
|
|
47
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 10));
|
|
48
|
-
if (countyOjb.x == "" && newValue.length > 10) {
|
|
49
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 11));
|
|
50
|
-
if (countyOjb.x == "" && newValue.length > 11) {
|
|
51
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 12));
|
|
52
|
-
if (countyOjb.x == "" && newValue.length > 12) {
|
|
53
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 13));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
28
|
+
const oldValueLen2 = nextValue.length;
|
|
29
|
+
const twoObje = getCity(nextValue, _Province);
|
|
30
|
+
if (twoObje.c != "") {
|
|
31
|
+
_City = twoObje.c;
|
|
32
|
+
if (_Province == "") {
|
|
33
|
+
_Province = twoObje.p;
|
|
34
|
+
}
|
|
35
|
+
nextValue = nextValue.replace(twoObje.c, "").trim();
|
|
36
|
+
if (nextValue.length == oldValueLen2) {
|
|
37
|
+
for (let i = _City.length - 1; i >= 1; i--) {
|
|
38
|
+
nextValue = nextValue.replace(twoObje.c.substr(0, i), "").trim();
|
|
39
|
+
if (nextValue.length < oldValueLen2) {
|
|
40
|
+
break;
|
|
61
41
|
}
|
|
62
42
|
}
|
|
63
43
|
}
|
|
64
44
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
45
|
+
const oldValueLen3 = nextValue.length;
|
|
46
|
+
const threeObje = getCounty(nextValue, _City, _Province);
|
|
47
|
+
if (threeObje.x != "") {
|
|
48
|
+
_County = threeObje.x;
|
|
49
|
+
if (_Province == "") {
|
|
50
|
+
_Province = threeObje.p;
|
|
51
|
+
}
|
|
52
|
+
if (_City == "") {
|
|
53
|
+
_City = threeObje.c;
|
|
54
|
+
}
|
|
55
|
+
nextValue = nextValue.replace(threeObje.x, "").trim();
|
|
56
|
+
if (nextValue.length == oldValueLen3) {
|
|
57
|
+
for (let i = _City.length - 1; i >= 1; i--) {
|
|
58
|
+
nextValue = nextValue.replace(threeObje.x.substr(0, i), "").trim();
|
|
59
|
+
if (nextValue.length < oldValueLen3) {
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
70
64
|
}
|
|
71
|
-
if (
|
|
72
|
-
return { province, city:
|
|
65
|
+
if (_Province != "" && _City != "" && _County != "") {
|
|
66
|
+
return { province: _Province, city: _City, county: _County };
|
|
73
67
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return { province, city: cityobj.c, county: countyOjb.x };
|
|
68
|
+
if (nextValue.length < 2) {
|
|
69
|
+
return { province: _Province, city: _City, county: _County };
|
|
77
70
|
}
|
|
78
|
-
const res = await index.useBaseApi("sysRegion").post({ Province:
|
|
71
|
+
const res = await index.useBaseApi("sysRegion").post({ Province: _Province, City: _City, text: oldvalue, textnew: nextValue }, "qRegionInfo");
|
|
79
72
|
const streetobj = res.data.result;
|
|
80
|
-
const rpdata = { province, city: cityobj.c, county: countyOjb.x };
|
|
81
73
|
if (streetobj.province != "") {
|
|
82
|
-
|
|
74
|
+
_Province = streetobj.province;
|
|
83
75
|
}
|
|
84
76
|
if (streetobj.city != "") {
|
|
85
|
-
|
|
77
|
+
_City = streetobj.city;
|
|
86
78
|
}
|
|
87
79
|
if (streetobj.county != "") {
|
|
88
|
-
|
|
80
|
+
_County = streetobj.county;
|
|
89
81
|
}
|
|
90
|
-
return
|
|
82
|
+
return { province: _Province, city: _City, county: _County };
|
|
91
83
|
};
|
|
92
|
-
const
|
|
84
|
+
const getProvince = (val) => {
|
|
85
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
86
|
+
return { p: "", jval: "" };
|
|
87
|
+
}
|
|
88
|
+
const jval = val.substr(0, 2);
|
|
89
|
+
const objectOne = splitProvince(jval);
|
|
90
|
+
if (objectOne.list.length == 1) {
|
|
91
|
+
return { p: objectOne.list[0], jval };
|
|
92
|
+
} else if (objectOne.list.length > 1) {
|
|
93
|
+
const jval3 = val.substr(0, 3);
|
|
94
|
+
const objectThreed = splitProvince(jval3);
|
|
95
|
+
if (objectThreed.list.length == 1) {
|
|
96
|
+
return { p: objectThreed.list[0], jval: jval3 };
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return { p: "", jval: "" };
|
|
100
|
+
};
|
|
101
|
+
const splitProvince = (val) => {
|
|
93
102
|
if (val == null || val == void 0 || val == "") {
|
|
94
|
-
return "";
|
|
103
|
+
return { p: "", list: [], count: 0 };
|
|
95
104
|
}
|
|
96
|
-
|
|
105
|
+
const findList = [];
|
|
97
106
|
for (let i = 0; i < provinceData.length; i++) {
|
|
98
107
|
if (provinceData[i].indexOf(val) > -1) {
|
|
99
108
|
const arrTemp = provinceData[i].split("|");
|
|
100
109
|
const arr = arrTemp.filter((item) => item == val);
|
|
101
110
|
if (arr && arr.length > 0) {
|
|
102
|
-
|
|
103
|
-
|
|
111
|
+
findList.push(provinceData[i].split("|")[0]);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const firstOne = findList.length > 0 ? findList[0] : "";
|
|
116
|
+
return { p: firstOne, list: findList, count: findList.length };
|
|
117
|
+
};
|
|
118
|
+
const getCity = (val, province) => {
|
|
119
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
120
|
+
return { p: "", c: "", jval: "" };
|
|
121
|
+
}
|
|
122
|
+
const jval = val.substr(0, 2);
|
|
123
|
+
const objectOne = splitCity(jval, province);
|
|
124
|
+
if (objectOne.list.length == 1) {
|
|
125
|
+
return { p: objectOne.p, c: objectOne.c, jval };
|
|
126
|
+
} else if (objectOne.list.length > 1) {
|
|
127
|
+
const jval3 = val.substr(0, 3);
|
|
128
|
+
const objectThreed = splitCity(jval3, province);
|
|
129
|
+
if (objectThreed.list.length == 1) {
|
|
130
|
+
return { p: objectThreed.p, c: objectThreed.c, jval: jval3 };
|
|
131
|
+
} else if (objectThreed.list.length == 0) {
|
|
132
|
+
return { p: objectOne.p, c: objectOne.c, jval: val };
|
|
133
|
+
} else if (objectThreed.list.length > 0) {
|
|
134
|
+
const jval4 = val.substr(0, 4);
|
|
135
|
+
const objectFoure = splitCity(jval4, province);
|
|
136
|
+
if (objectFoure.list.length > 0) {
|
|
137
|
+
return { p: objectFoure.p, c: objectFoure.c, jval: jval4 };
|
|
138
|
+
} else if (objectFoure.list.length == 0) {
|
|
139
|
+
return { p: objectThreed.p, c: objectThreed.c, jval: jval3 };
|
|
104
140
|
}
|
|
105
141
|
}
|
|
106
142
|
}
|
|
107
|
-
return
|
|
143
|
+
return { p: "", c: "", jval: "" };
|
|
108
144
|
};
|
|
109
|
-
const
|
|
145
|
+
const splitCity = (val, province) => {
|
|
110
146
|
if (val == null || val == void 0 || val == "") {
|
|
111
|
-
return { p: "", c: "" };
|
|
147
|
+
return { p: "", c: "", list: [] };
|
|
112
148
|
}
|
|
113
|
-
|
|
149
|
+
const findList = [];
|
|
114
150
|
for (let i = 0; i < cityData.length; i++) {
|
|
115
151
|
if (cityData[i].indexOf(val) > -1) {
|
|
116
152
|
const arrTemp = cityData[i].split("|");
|
|
@@ -118,26 +154,60 @@ const chkeCity = (province, val) => {
|
|
|
118
154
|
if (arr && arr.length > 0) {
|
|
119
155
|
if (province != "") {
|
|
120
156
|
if (cityData[i].split("|")[0] == province) {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
157
|
+
findList.push(
|
|
158
|
+
{
|
|
159
|
+
p: cityData[i].split("|")[0],
|
|
160
|
+
c: cityData[i].split("|")[1]
|
|
161
|
+
}
|
|
162
|
+
);
|
|
124
163
|
}
|
|
125
164
|
} else {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
165
|
+
findList.push(
|
|
166
|
+
{
|
|
167
|
+
p: cityData[i].split("|")[0],
|
|
168
|
+
c: cityData[i].split("|")[1]
|
|
169
|
+
}
|
|
170
|
+
);
|
|
129
171
|
}
|
|
130
|
-
break;
|
|
131
172
|
}
|
|
132
173
|
}
|
|
133
174
|
}
|
|
134
|
-
|
|
175
|
+
const _p = findList.length > 0 ? findList[0].p : "";
|
|
176
|
+
const _c = findList.length > 0 ? findList[0].c : "";
|
|
177
|
+
return { p: _p, c: _c, list: findList };
|
|
135
178
|
};
|
|
136
|
-
const
|
|
179
|
+
const getCounty = (val, city, province) => {
|
|
180
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
181
|
+
return { p: "", c: "", x: "", jval: "" };
|
|
182
|
+
}
|
|
183
|
+
const jval = val.substr(0, 2);
|
|
184
|
+
const objectOne = splitCounty(jval, city, province);
|
|
185
|
+
if (objectOne.list.length == 1) {
|
|
186
|
+
return { p: objectOne.p, c: objectOne.c, x: objectOne.x, jval };
|
|
187
|
+
} else if (objectOne.list.length > 1) {
|
|
188
|
+
const jval3 = val.substr(0, 3);
|
|
189
|
+
const objectThreed = splitCounty(jval3, city, province);
|
|
190
|
+
if (objectThreed.list.length == 1) {
|
|
191
|
+
return { p: objectThreed.p, c: objectThreed.c, x: objectThreed.x, jval: jval3 };
|
|
192
|
+
} else if (objectThreed.list.length == 0) {
|
|
193
|
+
return { p: objectOne.p, c: objectOne.c, x: objectOne.x, jval: val };
|
|
194
|
+
} else if (objectThreed.list.length > 0) {
|
|
195
|
+
const jval4 = val.substr(0, 4);
|
|
196
|
+
const objectFoure = splitCounty(jval3, city, province);
|
|
197
|
+
if (objectFoure.list.length > 0) {
|
|
198
|
+
return { p: objectFoure.p, c: objectFoure.c, x: objectFoure.x, jval: jval4 };
|
|
199
|
+
} else if (objectFoure.list.length == 0) {
|
|
200
|
+
return { p: objectThreed.p, c: objectThreed.c, x: objectThreed.x, jval: jval3 };
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
return { p: "", c: "", x: "", jval: "" };
|
|
205
|
+
};
|
|
206
|
+
const splitCounty = (val, city, province) => {
|
|
137
207
|
if (val == null || val == void 0 || val == "") {
|
|
138
|
-
return { p: "", c: "", x: "" };
|
|
208
|
+
return { p: "", c: "", x: "", list: [] };
|
|
139
209
|
}
|
|
140
|
-
|
|
210
|
+
const findList = [];
|
|
141
211
|
for (let i = 0; i < countyData.length; i++) {
|
|
142
212
|
if (countyData[i].indexOf(val) > -1) {
|
|
143
213
|
const arrTemp = countyData[i].split("|");
|
|
@@ -145,21 +215,26 @@ const chkeCounty = (province, city, val) => {
|
|
|
145
215
|
if (arr && arr.length > 0) {
|
|
146
216
|
if (province != "" && city != "") {
|
|
147
217
|
if (countyData[i].split("|")[0] == province && countyData[i].split("|")[1] == city) {
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
218
|
+
findList.push({
|
|
219
|
+
p: countyData[i].split("|")[0],
|
|
220
|
+
c: countyData[i].split("|")[1],
|
|
221
|
+
x: countyData[i].split("|")[2]
|
|
222
|
+
});
|
|
152
223
|
}
|
|
153
224
|
} else {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
225
|
+
findList.push({
|
|
226
|
+
p: countyData[i].split("|")[0],
|
|
227
|
+
c: countyData[i].split("|")[1],
|
|
228
|
+
x: countyData[i].split("|")[2]
|
|
229
|
+
});
|
|
158
230
|
}
|
|
159
231
|
}
|
|
160
232
|
}
|
|
161
233
|
}
|
|
162
|
-
|
|
234
|
+
const _p = findList.length > 0 ? findList[0].p : "";
|
|
235
|
+
const _c = findList.length > 0 ? findList[0].c : "";
|
|
236
|
+
const _x = findList.length > 0 ? findList[0].x : "";
|
|
237
|
+
return { p: _p, c: _c, x: _x, list: findList };
|
|
163
238
|
};
|
|
164
239
|
const provinceData = [
|
|
165
240
|
"\u5317\u4EAC\u5E02|\u5317\u4EAC",
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|