@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
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.90 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
|
|
@@ -37781,145 +37781,176 @@
|
|
|
37781
37781
|
emit("changeparsing", { province: "", city: "", county: "" });
|
|
37782
37782
|
return;
|
|
37783
37783
|
}
|
|
37784
|
-
let
|
|
37784
|
+
let _Province = "";
|
|
37785
|
+
let _City = "";
|
|
37786
|
+
let _County = "";
|
|
37785
37787
|
const oldvalue = val.trim();
|
|
37786
|
-
|
|
37787
|
-
|
|
37788
|
-
|
|
37789
|
-
|
|
37790
|
-
|
|
37791
|
-
|
|
37792
|
-
|
|
37793
|
-
|
|
37794
|
-
|
|
37795
|
-
|
|
37796
|
-
|
|
37797
|
-
|
|
37798
|
-
|
|
37799
|
-
province = cityobj.p;
|
|
37788
|
+
const oldValueLen = val.trim().length;
|
|
37789
|
+
const oneObje = getProvince(oldvalue);
|
|
37790
|
+
let nextValue = oldvalue;
|
|
37791
|
+
if (oneObje.p != "") {
|
|
37792
|
+
_Province = oneObje.p;
|
|
37793
|
+
nextValue = oldvalue.replace(oneObje.p, "").trim();
|
|
37794
|
+
if (nextValue.length == oldValueLen) {
|
|
37795
|
+
for (let i = _Province.length - 1; i >= 1; i--) {
|
|
37796
|
+
nextValue = oldvalue.replace(oneObje.p.substr(0, i), "").trim();
|
|
37797
|
+
if (nextValue.length < oldValueLen) {
|
|
37798
|
+
break;
|
|
37799
|
+
}
|
|
37800
|
+
}
|
|
37800
37801
|
}
|
|
37801
37802
|
}
|
|
37802
|
-
|
|
37803
|
-
|
|
37804
|
-
|
|
37805
|
-
|
|
37806
|
-
|
|
37807
|
-
|
|
37808
|
-
|
|
37809
|
-
|
|
37810
|
-
|
|
37811
|
-
|
|
37812
|
-
|
|
37813
|
-
if (
|
|
37814
|
-
|
|
37815
|
-
if (countyOjb.x == "" && newValue.length > 6) {
|
|
37816
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 7));
|
|
37817
|
-
if (countyOjb.x == "" && newValue.length > 7) {
|
|
37818
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 8));
|
|
37819
|
-
if (countyOjb.x == "" && newValue.length > 8) {
|
|
37820
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 9));
|
|
37821
|
-
if (countyOjb.x == "" && newValue.length > 9) {
|
|
37822
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 10));
|
|
37823
|
-
if (countyOjb.x == "" && newValue.length > 10) {
|
|
37824
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 11));
|
|
37825
|
-
if (countyOjb.x == "" && newValue.length > 11) {
|
|
37826
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 12));
|
|
37827
|
-
if (countyOjb.x == "" && newValue.length > 12) {
|
|
37828
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 13));
|
|
37829
|
-
}
|
|
37830
|
-
}
|
|
37831
|
-
}
|
|
37832
|
-
}
|
|
37833
|
-
}
|
|
37834
|
-
}
|
|
37835
|
-
}
|
|
37803
|
+
const oldValueLen2 = nextValue.length;
|
|
37804
|
+
const twoObje = getCity(nextValue, _Province);
|
|
37805
|
+
if (twoObje.c != "") {
|
|
37806
|
+
_City = twoObje.c;
|
|
37807
|
+
if (_Province == "") {
|
|
37808
|
+
_Province = twoObje.p;
|
|
37809
|
+
}
|
|
37810
|
+
nextValue = nextValue.replace(twoObje.c, "").trim();
|
|
37811
|
+
if (nextValue.length == oldValueLen2) {
|
|
37812
|
+
for (let i = _City.length - 1; i >= 1; i--) {
|
|
37813
|
+
nextValue = nextValue.replace(twoObje.c.substr(0, i), "").trim();
|
|
37814
|
+
if (nextValue.length < oldValueLen2) {
|
|
37815
|
+
break;
|
|
37836
37816
|
}
|
|
37837
37817
|
}
|
|
37838
37818
|
}
|
|
37839
37819
|
}
|
|
37840
|
-
|
|
37841
|
-
|
|
37842
|
-
|
|
37843
|
-
|
|
37844
|
-
|
|
37845
|
-
|
|
37846
|
-
|
|
37847
|
-
if (
|
|
37848
|
-
|
|
37820
|
+
const oldValueLen3 = nextValue.length;
|
|
37821
|
+
const threeObje = getCounty(nextValue, _City, _Province);
|
|
37822
|
+
if (threeObje.x != "") {
|
|
37823
|
+
_County = threeObje.x;
|
|
37824
|
+
if (_Province == "") {
|
|
37825
|
+
_Province = threeObje.p;
|
|
37826
|
+
}
|
|
37827
|
+
if (_City == "") {
|
|
37828
|
+
_City = threeObje.c;
|
|
37829
|
+
}
|
|
37830
|
+
nextValue = nextValue.replace(threeObje.x, "").trim();
|
|
37831
|
+
if (nextValue.length == oldValueLen3) {
|
|
37832
|
+
for (let i = _City.length - 1; i >= 1; i--) {
|
|
37833
|
+
nextValue = nextValue.replace(threeObje.x.substr(0, i), "").trim();
|
|
37834
|
+
if (nextValue.length < oldValueLen3) {
|
|
37835
|
+
break;
|
|
37836
|
+
}
|
|
37837
|
+
}
|
|
37849
37838
|
}
|
|
37850
37839
|
}
|
|
37851
|
-
if (
|
|
37840
|
+
if (_Province != "") {
|
|
37852
37841
|
if (hasOwn(modelValue.value, props.fprovince)) {
|
|
37853
|
-
modelValue.value[props.fprovince] =
|
|
37842
|
+
modelValue.value[props.fprovince] = _Province;
|
|
37854
37843
|
}
|
|
37855
37844
|
}
|
|
37856
|
-
if (
|
|
37845
|
+
if (_City != "") {
|
|
37857
37846
|
if (hasOwn(modelValue.value, props.fcity)) {
|
|
37858
|
-
modelValue.value[props.fcity] =
|
|
37847
|
+
modelValue.value[props.fcity] = _City;
|
|
37859
37848
|
}
|
|
37860
37849
|
}
|
|
37861
|
-
if (
|
|
37850
|
+
if (_County != "") {
|
|
37862
37851
|
if (hasOwn(modelValue.value, props.fcounty)) {
|
|
37863
|
-
modelValue.value[props.fcounty] =
|
|
37852
|
+
modelValue.value[props.fcounty] = _County;
|
|
37864
37853
|
}
|
|
37865
37854
|
}
|
|
37866
|
-
if (
|
|
37867
|
-
emit("changeparsing", { province, city:
|
|
37855
|
+
if (_Province != "" && _City != "" && _County != "") {
|
|
37856
|
+
emit("changeparsing", { province: _Province, city: _City, county: _County });
|
|
37868
37857
|
return;
|
|
37869
37858
|
}
|
|
37870
|
-
|
|
37871
|
-
|
|
37872
|
-
emit("changeparsing", { province, city: cityobj.c, county: countyOjb.x });
|
|
37859
|
+
if (nextValue.length < 2) {
|
|
37860
|
+
emit("changeparsing", { province: _Province, city: _City, county: _County });
|
|
37873
37861
|
return;
|
|
37874
37862
|
}
|
|
37875
|
-
const res = await useBaseApi("sysRegion").post({ Province:
|
|
37863
|
+
const res = await useBaseApi("sysRegion").post({ Province: _Province, City: _City, text: oldvalue, textnew: nextValue }, "qRegionInfo");
|
|
37876
37864
|
const streetobj = res.data.result;
|
|
37877
|
-
const rpdata = { province, city: cityobj.c, county: countyOjb.x };
|
|
37878
37865
|
if (streetobj.province != "") {
|
|
37879
37866
|
if (hasOwn(modelValue.value, props.fprovince)) {
|
|
37880
37867
|
modelValue.value[props.fprovince] = streetobj.province;
|
|
37881
37868
|
}
|
|
37882
|
-
|
|
37869
|
+
_Province = streetobj.province;
|
|
37883
37870
|
}
|
|
37884
37871
|
if (streetobj.city != "") {
|
|
37885
37872
|
if (hasOwn(modelValue.value, props.fcity)) {
|
|
37886
37873
|
modelValue.value[props.fcity] = streetobj.city;
|
|
37887
37874
|
}
|
|
37888
|
-
|
|
37875
|
+
_City = streetobj.city;
|
|
37889
37876
|
}
|
|
37890
37877
|
if (streetobj.county != "") {
|
|
37891
37878
|
if (hasOwn(modelValue.value, props.fcounty)) {
|
|
37892
37879
|
modelValue.value[props.fcounty] = streetobj.county;
|
|
37893
37880
|
}
|
|
37894
|
-
|
|
37881
|
+
_County = streetobj.county;
|
|
37895
37882
|
}
|
|
37896
|
-
emit("changeparsing",
|
|
37883
|
+
emit("changeparsing", { province: _Province, city: _City, county: _County });
|
|
37897
37884
|
};
|
|
37898
37885
|
function hasOwn(obj, key) {
|
|
37899
37886
|
return Object.prototype.hasOwnProperty.call(obj, key);
|
|
37900
37887
|
}
|
|
37901
|
-
const
|
|
37888
|
+
const getProvince = (val) => {
|
|
37889
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
37890
|
+
return { p: "", jval: "" };
|
|
37891
|
+
}
|
|
37892
|
+
const jval = val.substr(0, 2);
|
|
37893
|
+
const objectOne = splitProvince(jval);
|
|
37894
|
+
if (objectOne.list.length == 1) {
|
|
37895
|
+
return { p: objectOne.list[0], jval };
|
|
37896
|
+
} else if (objectOne.list.length > 1) {
|
|
37897
|
+
const jval3 = val.substr(0, 3);
|
|
37898
|
+
const objectThreed = splitProvince(jval3);
|
|
37899
|
+
if (objectThreed.list.length == 1) {
|
|
37900
|
+
return { p: objectThreed.list[0], jval: jval3 };
|
|
37901
|
+
}
|
|
37902
|
+
}
|
|
37903
|
+
return { p: "", jval: "" };
|
|
37904
|
+
};
|
|
37905
|
+
const splitProvince = (val) => {
|
|
37902
37906
|
if (val == null || val == void 0 || val == "") {
|
|
37903
|
-
return "";
|
|
37907
|
+
return { p: "", list: [], count: 0 };
|
|
37904
37908
|
}
|
|
37905
|
-
|
|
37909
|
+
const findList = [];
|
|
37906
37910
|
for (let i = 0; i < provinceData.length; i++) {
|
|
37907
37911
|
if (provinceData[i].indexOf(val) > -1) {
|
|
37908
37912
|
const arrTemp = provinceData[i].split("|");
|
|
37909
37913
|
const arr = arrTemp.filter((item) => item == val);
|
|
37910
37914
|
if (arr && arr.length > 0) {
|
|
37911
|
-
|
|
37912
|
-
|
|
37915
|
+
findList.push(provinceData[i].split("|")[0]);
|
|
37916
|
+
}
|
|
37917
|
+
}
|
|
37918
|
+
}
|
|
37919
|
+
const firstOne = findList.length > 0 ? findList[0] : "";
|
|
37920
|
+
return { p: firstOne, list: findList, count: findList.length };
|
|
37921
|
+
};
|
|
37922
|
+
const getCity = (val, province) => {
|
|
37923
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
37924
|
+
return { p: "", c: "", jval: "" };
|
|
37925
|
+
}
|
|
37926
|
+
const jval = val.substr(0, 2);
|
|
37927
|
+
const objectOne = splitCity(jval, province);
|
|
37928
|
+
if (objectOne.list.length == 1) {
|
|
37929
|
+
return { p: objectOne.p, c: objectOne.c, jval };
|
|
37930
|
+
} else if (objectOne.list.length > 1) {
|
|
37931
|
+
const jval3 = val.substr(0, 3);
|
|
37932
|
+
const objectThreed = splitCity(jval3, province);
|
|
37933
|
+
if (objectThreed.list.length == 1) {
|
|
37934
|
+
return { p: objectThreed.p, c: objectThreed.c, jval: jval3 };
|
|
37935
|
+
} else if (objectThreed.list.length == 0) {
|
|
37936
|
+
return { p: objectOne.p, c: objectOne.c, jval: val };
|
|
37937
|
+
} else if (objectThreed.list.length > 0) {
|
|
37938
|
+
const jval4 = val.substr(0, 4);
|
|
37939
|
+
const objectFoure = splitCity(jval4, province);
|
|
37940
|
+
if (objectFoure.list.length > 0) {
|
|
37941
|
+
return { p: objectFoure.p, c: objectFoure.c, jval: jval4 };
|
|
37942
|
+
} else if (objectFoure.list.length == 0) {
|
|
37943
|
+
return { p: objectThreed.p, c: objectThreed.c, jval: jval3 };
|
|
37913
37944
|
}
|
|
37914
37945
|
}
|
|
37915
37946
|
}
|
|
37916
|
-
return
|
|
37947
|
+
return { p: "", c: "", jval: "" };
|
|
37917
37948
|
};
|
|
37918
|
-
const
|
|
37949
|
+
const splitCity = (val, province) => {
|
|
37919
37950
|
if (val == null || val == void 0 || val == "") {
|
|
37920
|
-
return { p: "", c: "" };
|
|
37951
|
+
return { p: "", c: "", list: [] };
|
|
37921
37952
|
}
|
|
37922
|
-
|
|
37953
|
+
const findList = [];
|
|
37923
37954
|
for (let i = 0; i < cityData.length; i++) {
|
|
37924
37955
|
if (cityData[i].indexOf(val) > -1) {
|
|
37925
37956
|
const arrTemp = cityData[i].split("|");
|
|
@@ -37927,26 +37958,60 @@
|
|
|
37927
37958
|
if (arr && arr.length > 0) {
|
|
37928
37959
|
if (province != "") {
|
|
37929
37960
|
if (cityData[i].split("|")[0] == province) {
|
|
37930
|
-
|
|
37931
|
-
|
|
37932
|
-
|
|
37961
|
+
findList.push(
|
|
37962
|
+
{
|
|
37963
|
+
p: cityData[i].split("|")[0],
|
|
37964
|
+
c: cityData[i].split("|")[1]
|
|
37965
|
+
}
|
|
37966
|
+
);
|
|
37933
37967
|
}
|
|
37934
37968
|
} else {
|
|
37935
|
-
|
|
37936
|
-
|
|
37937
|
-
|
|
37969
|
+
findList.push(
|
|
37970
|
+
{
|
|
37971
|
+
p: cityData[i].split("|")[0],
|
|
37972
|
+
c: cityData[i].split("|")[1]
|
|
37973
|
+
}
|
|
37974
|
+
);
|
|
37938
37975
|
}
|
|
37939
|
-
break;
|
|
37940
37976
|
}
|
|
37941
37977
|
}
|
|
37942
37978
|
}
|
|
37943
|
-
|
|
37979
|
+
const _p = findList.length > 0 ? findList[0].p : "";
|
|
37980
|
+
const _c = findList.length > 0 ? findList[0].c : "";
|
|
37981
|
+
return { p: _p, c: _c, list: findList };
|
|
37982
|
+
};
|
|
37983
|
+
const getCounty = (val, city, province) => {
|
|
37984
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
37985
|
+
return { p: "", c: "", x: "", jval: "" };
|
|
37986
|
+
}
|
|
37987
|
+
const jval = val.substr(0, 2);
|
|
37988
|
+
const objectOne = splitCounty(jval, city, province);
|
|
37989
|
+
if (objectOne.list.length == 1) {
|
|
37990
|
+
return { p: objectOne.p, c: objectOne.c, x: objectOne.x, jval };
|
|
37991
|
+
} else if (objectOne.list.length > 1) {
|
|
37992
|
+
const jval3 = val.substr(0, 3);
|
|
37993
|
+
const objectThreed = splitCounty(jval3, city, province);
|
|
37994
|
+
if (objectThreed.list.length == 1) {
|
|
37995
|
+
return { p: objectThreed.p, c: objectThreed.c, x: objectThreed.x, jval: jval3 };
|
|
37996
|
+
} else if (objectThreed.list.length == 0) {
|
|
37997
|
+
return { p: objectOne.p, c: objectOne.c, x: objectOne.x, jval: val };
|
|
37998
|
+
} else if (objectThreed.list.length > 0) {
|
|
37999
|
+
const jval4 = val.substr(0, 4);
|
|
38000
|
+
const objectFoure = splitCounty(jval3, city, province);
|
|
38001
|
+
if (objectFoure.list.length > 0) {
|
|
38002
|
+
return { p: objectFoure.p, c: objectFoure.c, x: objectFoure.x, jval: jval4 };
|
|
38003
|
+
} else if (objectFoure.list.length == 0) {
|
|
38004
|
+
return { p: objectThreed.p, c: objectThreed.c, x: objectThreed.x, jval: jval3 };
|
|
38005
|
+
}
|
|
38006
|
+
}
|
|
38007
|
+
}
|
|
38008
|
+
return { p: "", c: "", x: "", jval: "" };
|
|
37944
38009
|
};
|
|
37945
|
-
const
|
|
38010
|
+
const splitCounty = (val, city, province) => {
|
|
37946
38011
|
if (val == null || val == void 0 || val == "") {
|
|
37947
|
-
return { p: "", c: "", x: "" };
|
|
38012
|
+
return { p: "", c: "", x: "", list: [] };
|
|
37948
38013
|
}
|
|
37949
|
-
|
|
38014
|
+
const findList = [];
|
|
37950
38015
|
for (let i = 0; i < countyData.length; i++) {
|
|
37951
38016
|
if (countyData[i].indexOf(val) > -1) {
|
|
37952
38017
|
const arrTemp = countyData[i].split("|");
|
|
@@ -37954,21 +38019,26 @@
|
|
|
37954
38019
|
if (arr && arr.length > 0) {
|
|
37955
38020
|
if (province != "" && city != "") {
|
|
37956
38021
|
if (countyData[i].split("|")[0] == province && countyData[i].split("|")[1] == city) {
|
|
37957
|
-
|
|
37958
|
-
|
|
37959
|
-
|
|
37960
|
-
|
|
38022
|
+
findList.push({
|
|
38023
|
+
p: countyData[i].split("|")[0],
|
|
38024
|
+
c: countyData[i].split("|")[1],
|
|
38025
|
+
x: countyData[i].split("|")[2]
|
|
38026
|
+
});
|
|
37961
38027
|
}
|
|
37962
38028
|
} else {
|
|
37963
|
-
|
|
37964
|
-
|
|
37965
|
-
|
|
37966
|
-
|
|
38029
|
+
findList.push({
|
|
38030
|
+
p: countyData[i].split("|")[0],
|
|
38031
|
+
c: countyData[i].split("|")[1],
|
|
38032
|
+
x: countyData[i].split("|")[2]
|
|
38033
|
+
});
|
|
37967
38034
|
}
|
|
37968
38035
|
}
|
|
37969
38036
|
}
|
|
37970
38037
|
}
|
|
37971
|
-
|
|
38038
|
+
const _p = findList.length > 0 ? findList[0].p : "";
|
|
38039
|
+
const _c = findList.length > 0 ? findList[0].c : "";
|
|
38040
|
+
const _x = findList.length > 0 ? findList[0].x : "";
|
|
38041
|
+
return { p: _p, c: _c, x: _x, list: findList };
|
|
37972
38042
|
};
|
|
37973
38043
|
const provinceData = [
|
|
37974
38044
|
"\u5317\u4EAC\u5E02|\u5317\u4EAC",
|
|
@@ -58818,114 +58888,150 @@
|
|
|
58818
58888
|
};
|
|
58819
58889
|
|
|
58820
58890
|
const addressparsing = async (val) => {
|
|
58821
|
-
let province = "";
|
|
58822
58891
|
if (val == null || val == void 0 || val == "" || val.trim() == "" || val.trim().length < 2) {
|
|
58823
58892
|
return { province: "", city: "", county: "" };
|
|
58824
58893
|
}
|
|
58894
|
+
let _Province = "";
|
|
58895
|
+
let _City = "";
|
|
58896
|
+
let _County = "";
|
|
58825
58897
|
const oldvalue = val.trim();
|
|
58826
|
-
|
|
58827
|
-
|
|
58828
|
-
|
|
58829
|
-
|
|
58830
|
-
|
|
58831
|
-
|
|
58832
|
-
|
|
58833
|
-
|
|
58834
|
-
|
|
58835
|
-
|
|
58836
|
-
|
|
58837
|
-
cityobj = chkeCity(province, newValue.substr(0, 3));
|
|
58838
|
-
if (cityobj.c != "" && province == "") {
|
|
58839
|
-
province = cityobj.p;
|
|
58840
|
-
}
|
|
58841
|
-
}
|
|
58842
|
-
if (cityobj.p != "" && province == "") {
|
|
58843
|
-
province = cityobj.p;
|
|
58844
|
-
}
|
|
58845
|
-
newValue = oldvalue.replace(province, "").replace(cityobj.c, "").trim();
|
|
58846
|
-
let countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 2));
|
|
58847
|
-
if (countyOjb.x == "" && newValue.length > 2) {
|
|
58848
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 3));
|
|
58849
|
-
if (countyOjb.x == "" && newValue.length > 3) {
|
|
58850
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 4));
|
|
58851
|
-
if (countyOjb.x == "" && newValue.length > 4) {
|
|
58852
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 5));
|
|
58853
|
-
if (countyOjb.x == "" && newValue.length > 5) {
|
|
58854
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 6));
|
|
58855
|
-
if (countyOjb.x == "" && newValue.length > 6) {
|
|
58856
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 7));
|
|
58857
|
-
if (countyOjb.x == "" && newValue.length > 7) {
|
|
58858
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 8));
|
|
58859
|
-
if (countyOjb.x == "" && newValue.length > 8) {
|
|
58860
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 9));
|
|
58861
|
-
if (countyOjb.x == "" && newValue.length > 9) {
|
|
58862
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 10));
|
|
58863
|
-
if (countyOjb.x == "" && newValue.length > 10) {
|
|
58864
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 11));
|
|
58865
|
-
if (countyOjb.x == "" && newValue.length > 11) {
|
|
58866
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 12));
|
|
58867
|
-
if (countyOjb.x == "" && newValue.length > 12) {
|
|
58868
|
-
countyOjb = chkeCounty(province, cityobj.c, newValue.substr(0, 13));
|
|
58869
|
-
}
|
|
58870
|
-
}
|
|
58871
|
-
}
|
|
58872
|
-
}
|
|
58873
|
-
}
|
|
58874
|
-
}
|
|
58875
|
-
}
|
|
58898
|
+
const oldValueLen = val.trim().length;
|
|
58899
|
+
const oneObje = getProvince(oldvalue);
|
|
58900
|
+
let nextValue = oldvalue;
|
|
58901
|
+
if (oneObje.p != "") {
|
|
58902
|
+
_Province = oneObje.p;
|
|
58903
|
+
nextValue = oldvalue.replace(oneObje.p, "").trim();
|
|
58904
|
+
if (nextValue.length == oldValueLen) {
|
|
58905
|
+
for (let i = _Province.length - 1; i >= 1; i--) {
|
|
58906
|
+
nextValue = oldvalue.replace(oneObje.p.substr(0, i), "").trim();
|
|
58907
|
+
if (nextValue.length < oldValueLen) {
|
|
58908
|
+
break;
|
|
58876
58909
|
}
|
|
58877
58910
|
}
|
|
58878
58911
|
}
|
|
58879
58912
|
}
|
|
58880
|
-
|
|
58881
|
-
|
|
58913
|
+
const oldValueLen2 = nextValue.length;
|
|
58914
|
+
const twoObje = getCity(nextValue, _Province);
|
|
58915
|
+
if (twoObje.c != "") {
|
|
58916
|
+
_City = twoObje.c;
|
|
58917
|
+
if (_Province == "") {
|
|
58918
|
+
_Province = twoObje.p;
|
|
58919
|
+
}
|
|
58920
|
+
nextValue = nextValue.replace(twoObje.c, "").trim();
|
|
58921
|
+
if (nextValue.length == oldValueLen2) {
|
|
58922
|
+
for (let i = _City.length - 1; i >= 1; i--) {
|
|
58923
|
+
nextValue = nextValue.replace(twoObje.c.substr(0, i), "").trim();
|
|
58924
|
+
if (nextValue.length < oldValueLen2) {
|
|
58925
|
+
break;
|
|
58926
|
+
}
|
|
58927
|
+
}
|
|
58928
|
+
}
|
|
58882
58929
|
}
|
|
58883
|
-
|
|
58884
|
-
|
|
58930
|
+
const oldValueLen3 = nextValue.length;
|
|
58931
|
+
const threeObje = getCounty(nextValue, _City, _Province);
|
|
58932
|
+
if (threeObje.x != "") {
|
|
58933
|
+
_County = threeObje.x;
|
|
58934
|
+
if (_Province == "") {
|
|
58935
|
+
_Province = threeObje.p;
|
|
58936
|
+
}
|
|
58937
|
+
if (_City == "") {
|
|
58938
|
+
_City = threeObje.c;
|
|
58939
|
+
}
|
|
58940
|
+
nextValue = nextValue.replace(threeObje.x, "").trim();
|
|
58941
|
+
if (nextValue.length == oldValueLen3) {
|
|
58942
|
+
for (let i = _City.length - 1; i >= 1; i--) {
|
|
58943
|
+
nextValue = nextValue.replace(threeObje.x.substr(0, i), "").trim();
|
|
58944
|
+
if (nextValue.length < oldValueLen3) {
|
|
58945
|
+
break;
|
|
58946
|
+
}
|
|
58947
|
+
}
|
|
58948
|
+
}
|
|
58885
58949
|
}
|
|
58886
|
-
if (
|
|
58887
|
-
return { province, city:
|
|
58950
|
+
if (_Province != "" && _City != "" && _County != "") {
|
|
58951
|
+
return { province: _Province, city: _City, county: _County };
|
|
58888
58952
|
}
|
|
58889
|
-
|
|
58890
|
-
|
|
58891
|
-
return { province, city: cityobj.c, county: countyOjb.x };
|
|
58953
|
+
if (nextValue.length < 2) {
|
|
58954
|
+
return { province: _Province, city: _City, county: _County };
|
|
58892
58955
|
}
|
|
58893
|
-
const res = await useBaseApi("sysRegion").post({ Province:
|
|
58956
|
+
const res = await useBaseApi("sysRegion").post({ Province: _Province, City: _City, text: oldvalue, textnew: nextValue }, "qRegionInfo");
|
|
58894
58957
|
const streetobj = res.data.result;
|
|
58895
|
-
const rpdata = { province, city: cityobj.c, county: countyOjb.x };
|
|
58896
58958
|
if (streetobj.province != "") {
|
|
58897
|
-
|
|
58959
|
+
_Province = streetobj.province;
|
|
58898
58960
|
}
|
|
58899
58961
|
if (streetobj.city != "") {
|
|
58900
|
-
|
|
58962
|
+
_City = streetobj.city;
|
|
58901
58963
|
}
|
|
58902
58964
|
if (streetobj.county != "") {
|
|
58903
|
-
|
|
58965
|
+
_County = streetobj.county;
|
|
58904
58966
|
}
|
|
58905
|
-
return
|
|
58967
|
+
return { province: _Province, city: _City, county: _County };
|
|
58968
|
+
};
|
|
58969
|
+
const getProvince = (val) => {
|
|
58970
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
58971
|
+
return { p: "", jval: "" };
|
|
58972
|
+
}
|
|
58973
|
+
const jval = val.substr(0, 2);
|
|
58974
|
+
const objectOne = splitProvince(jval);
|
|
58975
|
+
if (objectOne.list.length == 1) {
|
|
58976
|
+
return { p: objectOne.list[0], jval };
|
|
58977
|
+
} else if (objectOne.list.length > 1) {
|
|
58978
|
+
const jval3 = val.substr(0, 3);
|
|
58979
|
+
const objectThreed = splitProvince(jval3);
|
|
58980
|
+
if (objectThreed.list.length == 1) {
|
|
58981
|
+
return { p: objectThreed.list[0], jval: jval3 };
|
|
58982
|
+
}
|
|
58983
|
+
}
|
|
58984
|
+
return { p: "", jval: "" };
|
|
58906
58985
|
};
|
|
58907
|
-
const
|
|
58986
|
+
const splitProvince = (val) => {
|
|
58908
58987
|
if (val == null || val == void 0 || val == "") {
|
|
58909
|
-
return "";
|
|
58988
|
+
return { p: "", list: [], count: 0 };
|
|
58910
58989
|
}
|
|
58911
|
-
|
|
58990
|
+
const findList = [];
|
|
58912
58991
|
for (let i = 0; i < provinceData.length; i++) {
|
|
58913
58992
|
if (provinceData[i].indexOf(val) > -1) {
|
|
58914
58993
|
const arrTemp = provinceData[i].split("|");
|
|
58915
58994
|
const arr = arrTemp.filter((item) => item == val);
|
|
58916
58995
|
if (arr && arr.length > 0) {
|
|
58917
|
-
|
|
58918
|
-
break;
|
|
58996
|
+
findList.push(provinceData[i].split("|")[0]);
|
|
58919
58997
|
}
|
|
58920
58998
|
}
|
|
58921
58999
|
}
|
|
58922
|
-
|
|
59000
|
+
const firstOne = findList.length > 0 ? findList[0] : "";
|
|
59001
|
+
return { p: firstOne, list: findList, count: findList.length };
|
|
58923
59002
|
};
|
|
58924
|
-
const
|
|
59003
|
+
const getCity = (val, province) => {
|
|
59004
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
59005
|
+
return { p: "", c: "", jval: "" };
|
|
59006
|
+
}
|
|
59007
|
+
const jval = val.substr(0, 2);
|
|
59008
|
+
const objectOne = splitCity(jval, province);
|
|
59009
|
+
if (objectOne.list.length == 1) {
|
|
59010
|
+
return { p: objectOne.p, c: objectOne.c, jval };
|
|
59011
|
+
} else if (objectOne.list.length > 1) {
|
|
59012
|
+
const jval3 = val.substr(0, 3);
|
|
59013
|
+
const objectThreed = splitCity(jval3, province);
|
|
59014
|
+
if (objectThreed.list.length == 1) {
|
|
59015
|
+
return { p: objectThreed.p, c: objectThreed.c, jval: jval3 };
|
|
59016
|
+
} else if (objectThreed.list.length == 0) {
|
|
59017
|
+
return { p: objectOne.p, c: objectOne.c, jval: val };
|
|
59018
|
+
} else if (objectThreed.list.length > 0) {
|
|
59019
|
+
const jval4 = val.substr(0, 4);
|
|
59020
|
+
const objectFoure = splitCity(jval4, province);
|
|
59021
|
+
if (objectFoure.list.length > 0) {
|
|
59022
|
+
return { p: objectFoure.p, c: objectFoure.c, jval: jval4 };
|
|
59023
|
+
} else if (objectFoure.list.length == 0) {
|
|
59024
|
+
return { p: objectThreed.p, c: objectThreed.c, jval: jval3 };
|
|
59025
|
+
}
|
|
59026
|
+
}
|
|
59027
|
+
}
|
|
59028
|
+
return { p: "", c: "", jval: "" };
|
|
59029
|
+
};
|
|
59030
|
+
const splitCity = (val, province) => {
|
|
58925
59031
|
if (val == null || val == void 0 || val == "") {
|
|
58926
|
-
return { p: "", c: "" };
|
|
59032
|
+
return { p: "", c: "", list: [] };
|
|
58927
59033
|
}
|
|
58928
|
-
|
|
59034
|
+
const findList = [];
|
|
58929
59035
|
for (let i = 0; i < cityData.length; i++) {
|
|
58930
59036
|
if (cityData[i].indexOf(val) > -1) {
|
|
58931
59037
|
const arrTemp = cityData[i].split("|");
|
|
@@ -58933,26 +59039,60 @@
|
|
|
58933
59039
|
if (arr && arr.length > 0) {
|
|
58934
59040
|
if (province != "") {
|
|
58935
59041
|
if (cityData[i].split("|")[0] == province) {
|
|
58936
|
-
|
|
58937
|
-
|
|
58938
|
-
|
|
59042
|
+
findList.push(
|
|
59043
|
+
{
|
|
59044
|
+
p: cityData[i].split("|")[0],
|
|
59045
|
+
c: cityData[i].split("|")[1]
|
|
59046
|
+
}
|
|
59047
|
+
);
|
|
58939
59048
|
}
|
|
58940
59049
|
} else {
|
|
58941
|
-
|
|
58942
|
-
|
|
58943
|
-
|
|
59050
|
+
findList.push(
|
|
59051
|
+
{
|
|
59052
|
+
p: cityData[i].split("|")[0],
|
|
59053
|
+
c: cityData[i].split("|")[1]
|
|
59054
|
+
}
|
|
59055
|
+
);
|
|
58944
59056
|
}
|
|
58945
|
-
break;
|
|
58946
59057
|
}
|
|
58947
59058
|
}
|
|
58948
59059
|
}
|
|
58949
|
-
|
|
59060
|
+
const _p = findList.length > 0 ? findList[0].p : "";
|
|
59061
|
+
const _c = findList.length > 0 ? findList[0].c : "";
|
|
59062
|
+
return { p: _p, c: _c, list: findList };
|
|
58950
59063
|
};
|
|
58951
|
-
const
|
|
59064
|
+
const getCounty = (val, city, province) => {
|
|
59065
|
+
if (val == null || val == void 0 || val == "" || val.length < 2) {
|
|
59066
|
+
return { p: "", c: "", x: "", jval: "" };
|
|
59067
|
+
}
|
|
59068
|
+
const jval = val.substr(0, 2);
|
|
59069
|
+
const objectOne = splitCounty(jval, city, province);
|
|
59070
|
+
if (objectOne.list.length == 1) {
|
|
59071
|
+
return { p: objectOne.p, c: objectOne.c, x: objectOne.x, jval };
|
|
59072
|
+
} else if (objectOne.list.length > 1) {
|
|
59073
|
+
const jval3 = val.substr(0, 3);
|
|
59074
|
+
const objectThreed = splitCounty(jval3, city, province);
|
|
59075
|
+
if (objectThreed.list.length == 1) {
|
|
59076
|
+
return { p: objectThreed.p, c: objectThreed.c, x: objectThreed.x, jval: jval3 };
|
|
59077
|
+
} else if (objectThreed.list.length == 0) {
|
|
59078
|
+
return { p: objectOne.p, c: objectOne.c, x: objectOne.x, jval: val };
|
|
59079
|
+
} else if (objectThreed.list.length > 0) {
|
|
59080
|
+
const jval4 = val.substr(0, 4);
|
|
59081
|
+
const objectFoure = splitCounty(jval3, city, province);
|
|
59082
|
+
if (objectFoure.list.length > 0) {
|
|
59083
|
+
return { p: objectFoure.p, c: objectFoure.c, x: objectFoure.x, jval: jval4 };
|
|
59084
|
+
} else if (objectFoure.list.length == 0) {
|
|
59085
|
+
return { p: objectThreed.p, c: objectThreed.c, x: objectThreed.x, jval: jval3 };
|
|
59086
|
+
}
|
|
59087
|
+
}
|
|
59088
|
+
}
|
|
59089
|
+
return { p: "", c: "", x: "", jval: "" };
|
|
59090
|
+
};
|
|
59091
|
+
const splitCounty = (val, city, province) => {
|
|
58952
59092
|
if (val == null || val == void 0 || val == "") {
|
|
58953
|
-
return { p: "", c: "", x: "" };
|
|
59093
|
+
return { p: "", c: "", x: "", list: [] };
|
|
58954
59094
|
}
|
|
58955
|
-
|
|
59095
|
+
const findList = [];
|
|
58956
59096
|
for (let i = 0; i < countyData.length; i++) {
|
|
58957
59097
|
if (countyData[i].indexOf(val) > -1) {
|
|
58958
59098
|
const arrTemp = countyData[i].split("|");
|
|
@@ -58960,21 +59100,26 @@
|
|
|
58960
59100
|
if (arr && arr.length > 0) {
|
|
58961
59101
|
if (province != "" && city != "") {
|
|
58962
59102
|
if (countyData[i].split("|")[0] == province && countyData[i].split("|")[1] == city) {
|
|
58963
|
-
|
|
58964
|
-
|
|
58965
|
-
|
|
58966
|
-
|
|
59103
|
+
findList.push({
|
|
59104
|
+
p: countyData[i].split("|")[0],
|
|
59105
|
+
c: countyData[i].split("|")[1],
|
|
59106
|
+
x: countyData[i].split("|")[2]
|
|
59107
|
+
});
|
|
58967
59108
|
}
|
|
58968
59109
|
} else {
|
|
58969
|
-
|
|
58970
|
-
|
|
58971
|
-
|
|
58972
|
-
|
|
59110
|
+
findList.push({
|
|
59111
|
+
p: countyData[i].split("|")[0],
|
|
59112
|
+
c: countyData[i].split("|")[1],
|
|
59113
|
+
x: countyData[i].split("|")[2]
|
|
59114
|
+
});
|
|
58973
59115
|
}
|
|
58974
59116
|
}
|
|
58975
59117
|
}
|
|
58976
59118
|
}
|
|
58977
|
-
|
|
59119
|
+
const _p = findList.length > 0 ? findList[0].p : "";
|
|
59120
|
+
const _c = findList.length > 0 ? findList[0].c : "";
|
|
59121
|
+
const _x = findList.length > 0 ? findList[0].x : "";
|
|
59122
|
+
return { p: _p, c: _c, x: _x, list: findList };
|
|
58978
59123
|
};
|
|
58979
59124
|
const provinceData = [
|
|
58980
59125
|
"\u5317\u4EAC\u5E02|\u5317\u4EAC",
|