@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
@@ -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
- let newValue = "";
12
- province = chkeProvince(oldvalue.substr(0, 2));
13
- if (province == "" && oldvalue.length > 2) {
14
- province = chkeProvince(oldvalue.substr(0, 3));
15
- }
16
- newValue = oldvalue.replace(province, "").trim();
17
- if (newValue.length < 2) {
18
- return { province, city: "", county: "" };
19
- }
20
- let cityobj = chkeCity(province, newValue.substr(0, 2));
21
- if (cityobj.c == "" && newValue.length > 2) {
22
- cityobj = chkeCity(province, newValue.substr(0, 3));
23
- if (cityobj.c != "" && province == "") {
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
- if (cityobj.p != "" && province == "") {
28
- province = cityobj.p;
29
- }
30
- newValue = oldvalue.replace(province, "").replace(cityobj.c, "").trim();
31
- let countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 2));
32
- if (countyOjb.x == "" && newValue.length > 2) {
33
- countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 3));
34
- if (countyOjb.x == "" && newValue.length > 3) {
35
- countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 4));
36
- if (countyOjb.x == "" && newValue.length > 4) {
37
- countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 5));
38
- if (countyOjb.x == "" && newValue.length > 5) {
39
- countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 6));
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
- if (province == "") {
66
- province = countyOjb.p;
67
- }
68
- if (cityobj.c == "") {
69
- cityobj.c = countyOjb.c;
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 (province != "" && cityobj.c != "" && countyOjb.x != "") {
72
- return { province, city: cityobj.c, county: countyOjb.x };
65
+ if (_Province != "" && _City != "" && _County != "") {
66
+ return { province: _Province, city: _City, county: _County };
73
67
  }
74
- newValue = oldvalue.replace(province, "").replace(cityobj.c, "").replace(countyOjb.x, "").trim();
75
- if (newValue.length < 2) {
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: province, City: cityobj.c, text: oldvalue, textnew: newValue }, "qRegionInfo");
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
- rpdata.province = streetobj.province;
74
+ _Province = streetobj.province;
83
75
  }
84
76
  if (streetobj.city != "") {
85
- rpdata.city = streetobj.city;
77
+ _City = streetobj.city;
86
78
  }
87
79
  if (streetobj.county != "") {
88
- rpdata.county = streetobj.county;
80
+ _County = streetobj.county;
89
81
  }
90
- return rpdata;
82
+ return { province: _Province, city: _City, county: _County };
91
83
  };
92
- const chkeProvince = (val) => {
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
- let province = "";
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
- province = provinceData[i].split("|")[0];
103
- break;
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 province;
143
+ return { p: "", c: "", jval: "" };
108
144
  };
109
- const chkeCity = (province, val) => {
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
- let cityobj = { p: "", c: "" };
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
- cityobj.p = cityData[i].split("|")[0];
122
- cityobj.c = cityData[i].split("|")[1];
123
- break;
157
+ findList.push(
158
+ {
159
+ p: cityData[i].split("|")[0],
160
+ c: cityData[i].split("|")[1]
161
+ }
162
+ );
124
163
  }
125
164
  } else {
126
- cityobj.p = cityData[i].split("|")[0];
127
- cityobj.c = cityData[i].split("|")[1];
128
- break;
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
- return cityobj;
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 chkeCounty = (province, city, val) => {
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
- let countyobj = { p: "", c: "", x: "" };
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
- countyobj.p = countyData[i].split("|")[0];
149
- countyobj.c = countyData[i].split("|")[1];
150
- countyobj.x = countyData[i].split("|")[2];
151
- break;
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
- countyobj.p = countyData[i].split("|")[0];
155
- countyobj.c = countyData[i].split("|")[1];
156
- countyobj.x = countyData[i].split("|")[2];
157
- break;
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
- return countyobj;
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.89",
3
+ "version": "1.0.90",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [
File without changes
File without changes