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