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