jmash-region 0.0.3 → 0.0.6

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.
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-DIB1Rij-.mjs";
1
+ import { _ as f } from "./edit.vue_vue_type_script_setup_true_lang-BaawD1DB.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,10 +1,10 @@
1
1
  var Tn = Object.defineProperty;
2
2
  var Dn = (n, i, g) => i in n ? Tn(n, i, { enumerable: !0, configurable: !0, writable: !0, value: g }) : n[i] = g;
3
3
  var q = (n, i, g) => Dn(n, typeof i != "symbol" ? i + "" : i, g);
4
- import { ref as D, reactive as E, defineComponent as En, mergeModels as W, useModel as Nn, resolveComponent as k, openBlock as S, createBlock as A, withCtx as j, createElementVNode as Mn, createVNode as c, createTextVNode as Y, toDisplayString as H, unref as b, createElementBlock as Q, Fragment as J, renderList as X } from "vue";
4
+ import { ref as D, reactive as E, defineComponent as En, mergeModels as W, useModel as Nn, resolveComponent as k, createBlock as A, openBlock as S, withCtx as j, createVNode as t, unref as b, createElementBlock as Y, Fragment as H, renderList as Q, createElementVNode as Mn, createTextVNode as J, toDisplayString as X } from "vue";
5
5
  import { ElMessage as nn } from "element-plus";
6
6
  import { EnumDict as gn } from "jmash-core";
7
- import { d as I, e as Rn } from "./index-C1Hml01a.mjs";
7
+ import { d as I, e as Rn } from "./index-BJooawLh.mjs";
8
8
  import { useI18n as Zn } from "vue-i18n";
9
9
  class p {
10
10
  }
@@ -21600,7 +21600,7 @@ const $ = {
21600
21600
  length: 2,
21601
21601
  priority: f.Normal,
21602
21602
  dict: Symbol("dict2")
21603
- })), tn = {
21603
+ })), cn = {
21604
21604
  为什么: "wèi shén me",
21605
21605
  实际上: "shí jì shang",
21606
21606
  检察长: "jiǎn chá zhǎng",
@@ -21926,14 +21926,14 @@ const $ = {
21926
21926
  干哪行: "gàn nǎ háng",
21927
21927
  干一行: "gàn yì háng",
21928
21928
  曲别针: "qū bié zhēn"
21929
- }, gi = Object.keys(tn).map((n) => ({
21929
+ }, gi = Object.keys(cn).map((n) => ({
21930
21930
  zh: n,
21931
- pinyin: tn[n],
21931
+ pinyin: cn[n],
21932
21932
  probability: 2e-8,
21933
21933
  length: 3,
21934
21934
  priority: f.Normal,
21935
21935
  dict: Symbol("dict3")
21936
- })), cn = {
21936
+ })), tn = {
21937
21937
  成吉思汗: "chéng jí sī hán",
21938
21938
  四通八达: "sì tōng bā dá",
21939
21939
  一模一样: "yì mú yí yàng",
@@ -23529,9 +23529,9 @@ const $ = {
23529
23529
  曲意逢迎: "qū yì féng yíng",
23530
23530
  一行不行: "yì háng bù xíng",
23531
23531
  行行不行: "háng háng bù xíng"
23532
- }, hi = Object.keys(cn).map((n) => ({
23532
+ }, hi = Object.keys(tn).map((n) => ({
23533
23533
  zh: n,
23534
- pinyin: cn[n],
23534
+ pinyin: tn[n],
23535
23535
  probability: 2e-8,
23536
23536
  length: 4,
23537
23537
  priority: f.Normal,
@@ -23622,7 +23622,7 @@ function zi(n, i) {
23622
23622
  function yi(n, i) {
23623
23623
  return !(i.index + i.length <= n.index || i.priority > n.priority || i.priority === n.priority && i.length > n.length);
23624
23624
  }
23625
- function ti(n) {
23625
+ function ci(n) {
23626
23626
  const i = [];
23627
23627
  for (let g = n.length - 1; g >= 0; ) {
23628
23628
  const { index: u } = n[g];
@@ -23642,7 +23642,7 @@ class xn {
23642
23642
  this.children = /* @__PURE__ */ new Map(), this.fail = null, this.patterns = [], this.parent = i, this.prefix = g, this.key = u;
23643
23643
  }
23644
23644
  }
23645
- class ci {
23645
+ class ti {
23646
23646
  constructor() {
23647
23647
  this.dictMap = /* @__PURE__ */ new Map(), this.queues = [], this.root = new xn(null);
23648
23648
  }
@@ -23729,7 +23729,7 @@ class ci {
23729
23729
  }
23730
23730
  search(i, g, u = 2) {
23731
23731
  const h = this.match(i, g);
23732
- return u === 1 ? ti(h) : u === 3 ? zi(h, a(i)) : oi(h, a(i));
23732
+ return u === 1 ? ci(h) : u === 3 ? zi(h, a(i)) : oi(h, a(i));
23733
23733
  }
23734
23734
  }
23735
23735
  const di = [
@@ -23739,7 +23739,7 @@ const di = [
23739
23739
  ...ii,
23740
23740
  ...Wn,
23741
23741
  ...ni
23742
- ], qn = new ci();
23742
+ ], qn = new ti();
23743
23743
  qn.build(di);
23744
23744
  const ei = new fn(), ji = () => ei, v = (n) => {
23745
23745
  const i = _.get(n);
@@ -24037,21 +24037,21 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24037
24037
  }
24038
24038
  ]
24039
24039
  }), y = n;
24040
- s.parentId = y.parentId, s.parentId && I.findById({ regionId: s.parentId }).then(({ data: t }) => {
24041
- r(t.regionCode);
24040
+ s.parentId = y.parentId, s.parentId && I.findById({ regionId: s.parentId }).then(({ data: c }) => {
24041
+ r(c.regionCode);
24042
24042
  });
24043
- const z = D([]), r = (t) => {
24044
- I.findByCode({ regionCode: t }).then(({ data: e }) => {
24043
+ const z = D([]), r = (c) => {
24044
+ I.findByCode({ regionCode: c }).then(({ data: e }) => {
24045
24045
  const x = Rn(e);
24046
24046
  z.value = x.regionIds;
24047
24047
  });
24048
24048
  }, m = Object.keys(y.entityKey), P = D(m.length >= 1), L = E({});
24049
- P.value && I.findById(y.entityKey).then(({ data: t }) => {
24050
- Object.assign(s, t), Object.assign(L, t), s.parentId === p.DEFAULT_ID && (s.parentId = ""), r(s.regionCode);
24049
+ P.value && I.findById(y.entityKey).then(({ data: c }) => {
24050
+ Object.assign(s, c), Object.assign(L, c), s.parentId === p.DEFAULT_ID && (s.parentId = ""), r(s.regionCode);
24051
24051
  });
24052
24052
  const kn = () => {
24053
- var t;
24054
- (t = u.value) == null || t.validate((e) => {
24053
+ var c;
24054
+ (c = u.value) == null || c.validate((e) => {
24055
24055
  if (e) {
24056
24056
  if (P.value) {
24057
24057
  I.update(s).then((x) => {
@@ -24066,7 +24066,7 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24066
24066
  x.status === 200 && (nn({
24067
24067
  message: g("common.submitSuccess"),
24068
24068
  type: "success"
24069
- }), h.value && (h.value = !1), o("refresh", x.status === 200, s), o("reload", x.data));
24069
+ }), h.value && (h.value = !1), o("refresh", x.status === 200), o("reload", x.data));
24070
24070
  });
24071
24071
  }
24072
24072
  });
@@ -24081,9 +24081,9 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24081
24081
  }).toUpperCase();
24082
24082
  }, B = () => {
24083
24083
  h.value && (h.value = !1);
24084
- }, _n = (t, e) => {
24084
+ }, _n = (c, e) => {
24085
24085
  I.findList({
24086
- parentId: t.data.regionId,
24086
+ parentId: c.data.regionId,
24087
24087
  excludeId: y.entityKey.regionId
24088
24088
  }).then(({ data: x }) => {
24089
24089
  e(
@@ -24091,7 +24091,7 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24091
24091
  );
24092
24092
  });
24093
24093
  };
24094
- return (t, e) => {
24094
+ return (c, e) => {
24095
24095
  const x = k("el-input"), w = k("el-form-item"), C = k("el-col"), F = k("el-radio"), G = k("el-radio-group"), Cn = k("el-tree-select"), In = k("el-row"), Sn = k("el-form"), K = k("el-button"), vn = k("el-dialog");
24096
24096
  return S(), A(vn, {
24097
24097
  modelValue: h.value,
@@ -24100,25 +24100,25 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24100
24100
  }, {
24101
24101
  footer: j(() => [
24102
24102
  Mn("div", Ci, [
24103
- c(K, { onClick: B }, {
24103
+ t(K, { onClick: B }, {
24104
24104
  default: j(() => [
24105
- Y(H(t.$t("common.cancel")), 1)
24105
+ J(X(c.$t("common.cancel")), 1)
24106
24106
  ]),
24107
24107
  _: 1
24108
24108
  }),
24109
- c(K, {
24109
+ t(K, {
24110
24110
  type: "primary",
24111
24111
  onClick: kn
24112
24112
  }, {
24113
24113
  default: j(() => [
24114
- Y(H(t.$t("common.confirm")), 1)
24114
+ J(X(c.$t("common.confirm")), 1)
24115
24115
  ]),
24116
24116
  _: 1
24117
24117
  })
24118
24118
  ])
24119
24119
  ]),
24120
24120
  default: j(() => [
24121
- c(Sn, {
24121
+ t(Sn, {
24122
24122
  ref_key: "dictRegionFormRef",
24123
24123
  ref: u,
24124
24124
  model: b(s),
@@ -24126,19 +24126,19 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24126
24126
  rules: l
24127
24127
  }, {
24128
24128
  default: j(() => [
24129
- c(In, null, {
24129
+ t(In, null, {
24130
24130
  default: j(() => [
24131
- c(C, { span: 24 }, {
24131
+ t(C, { span: 24 }, {
24132
24132
  default: j(() => [
24133
- c(w, {
24134
- label: t.$t("dictRegion.regionCode"),
24133
+ t(w, {
24134
+ label: c.$t("dictRegion.regionCode"),
24135
24135
  prop: "regionCode"
24136
24136
  }, {
24137
24137
  default: j(() => [
24138
- c(x, {
24138
+ t(x, {
24139
24139
  modelValue: b(s).regionCode,
24140
24140
  "onUpdate:modelValue": e[0] || (e[0] = (d) => b(s).regionCode = d),
24141
- placeholder: t.$t("dictRegion.regionCodePlaceholder"),
24141
+ placeholder: c.$t("dictRegion.regionCodePlaceholder"),
24142
24142
  maxlength: "15",
24143
24143
  "show-word-limit": "",
24144
24144
  clearable: ""
@@ -24149,17 +24149,17 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24149
24149
  ]),
24150
24150
  _: 1
24151
24151
  }),
24152
- c(C, { span: 24 }, {
24152
+ t(C, { span: 24 }, {
24153
24153
  default: j(() => [
24154
- c(w, {
24155
- label: t.$t("dictRegion.regionName"),
24154
+ t(w, {
24155
+ label: c.$t("dictRegion.regionName"),
24156
24156
  prop: "regionName"
24157
24157
  }, {
24158
24158
  default: j(() => [
24159
- c(x, {
24159
+ t(x, {
24160
24160
  modelValue: b(s).regionName,
24161
24161
  "onUpdate:modelValue": e[1] || (e[1] = (d) => b(s).regionName = d),
24162
- placeholder: t.$t("dictRegion.regionNamePlaceholder"),
24162
+ placeholder: c.$t("dictRegion.regionNamePlaceholder"),
24163
24163
  maxlength: "60",
24164
24164
  "show-word-limit": "",
24165
24165
  onBlur: Pn,
@@ -24171,18 +24171,18 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24171
24171
  ]),
24172
24172
  _: 1
24173
24173
  }),
24174
- c(C, { span: 24 }, {
24174
+ t(C, { span: 24 }, {
24175
24175
  default: j(() => [
24176
- c(w, {
24177
- label: t.$t("dictRegion.regionPinyin"),
24176
+ t(w, {
24177
+ label: c.$t("dictRegion.regionPinyin"),
24178
24178
  prop: "regionPinyin"
24179
24179
  }, {
24180
24180
  default: j(() => [
24181
- c(x, {
24181
+ t(x, {
24182
24182
  modelValue: b(s).regionPinyin,
24183
24183
  "onUpdate:modelValue": e[2] || (e[2] = (d) => b(s).regionPinyin = d),
24184
- placeholder: t.$t("dictRegion.regionPinyinPlaceholder"),
24185
- maxlength: "15",
24184
+ placeholder: c.$t("dictRegion.regionPinyinPlaceholder"),
24185
+ maxlength: "60",
24186
24186
  "show-word-limit": "",
24187
24187
  clearable: ""
24188
24188
  }, null, 8, ["modelValue", "placeholder"])
@@ -24192,19 +24192,19 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24192
24192
  ]),
24193
24193
  _: 1
24194
24194
  }),
24195
- c(C, { span: 24 }, {
24195
+ t(C, { span: 24 }, {
24196
24196
  default: j(() => [
24197
- c(w, {
24198
- label: t.$t("dictRegion.regionType"),
24197
+ t(w, {
24198
+ label: c.$t("dictRegion.regionType"),
24199
24199
  prop: "regionType"
24200
24200
  }, {
24201
24201
  default: j(() => [
24202
- c(G, {
24202
+ t(G, {
24203
24203
  modelValue: b(s).regionType,
24204
24204
  "onUpdate:modelValue": e[3] || (e[3] = (d) => b(s).regionType = d)
24205
24205
  }, {
24206
24206
  default: j(() => [
24207
- (S(!0), Q(J, null, X(b(T).regionTypeEnum.values, (d) => (S(), A(F, {
24207
+ (S(!0), Y(H, null, Q(b(T).regionTypeEnum.values, (d) => (S(), A(F, {
24208
24208
  key: d.key,
24209
24209
  value: d.key,
24210
24210
  label: d.value
@@ -24218,19 +24218,19 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24218
24218
  ]),
24219
24219
  _: 1
24220
24220
  }),
24221
- c(C, { span: 24 }, {
24221
+ t(C, { span: 24 }, {
24222
24222
  default: j(() => [
24223
- c(w, {
24224
- label: t.$t("dictRegion.regionCategory"),
24223
+ t(w, {
24224
+ label: c.$t("dictRegion.regionCategory"),
24225
24225
  prop: "regionCategory"
24226
24226
  }, {
24227
24227
  default: j(() => [
24228
- c(G, {
24228
+ t(G, {
24229
24229
  modelValue: b(s).regionCategory,
24230
24230
  "onUpdate:modelValue": e[4] || (e[4] = (d) => b(s).regionCategory = d)
24231
24231
  }, {
24232
24232
  default: j(() => [
24233
- (S(!0), Q(J, null, X(b(T).regionCategoryEnum.values, (d) => (S(), A(F, {
24233
+ (S(!0), Y(H, null, Q(b(T).regionCategoryEnum.values, (d) => (S(), A(F, {
24234
24234
  key: d.key,
24235
24235
  value: d.key,
24236
24236
  label: d.value
@@ -24244,22 +24244,23 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24244
24244
  ]),
24245
24245
  _: 1
24246
24246
  }),
24247
- c(C, { span: 24 }, {
24247
+ t(C, { span: 24 }, {
24248
24248
  default: j(() => [
24249
- c(w, {
24250
- label: t.$t("dictRegion.parentId"),
24249
+ t(w, {
24250
+ label: c.$t("dictRegion.parentId"),
24251
24251
  prop: "parentId"
24252
24252
  }, {
24253
24253
  default: j(() => [
24254
- c(Cn, {
24254
+ t(Cn, {
24255
24255
  "node-key": "regionId",
24256
24256
  lazy: "",
24257
24257
  modelValue: b(s).parentId,
24258
24258
  "onUpdate:modelValue": e[5] || (e[5] = (d) => b(s).parentId = d),
24259
- placeholder: t.$t("dictRegion.parentIdPlaceholder"),
24259
+ placeholder: c.$t("dictRegion.parentIdPlaceholder"),
24260
24260
  load: _n,
24261
24261
  "default-expanded-keys": z.value,
24262
24262
  "check-strictly": "",
24263
+ clearable: "",
24263
24264
  props: {
24264
24265
  value: "regionId",
24265
24266
  label: "regionName",
@@ -24273,17 +24274,17 @@ const Ci = { class: "dialog-footer" }, Ni = /* @__PURE__ */ En({
24273
24274
  ]),
24274
24275
  _: 1
24275
24276
  }),
24276
- c(C, { span: 24 }, {
24277
+ t(C, { span: 24 }, {
24277
24278
  default: j(() => [
24278
- c(w, {
24279
- label: t.$t("dictRegion.description"),
24279
+ t(w, {
24280
+ label: c.$t("dictRegion.description"),
24280
24281
  prop: "description"
24281
24282
  }, {
24282
24283
  default: j(() => [
24283
- c(x, {
24284
+ t(x, {
24284
24285
  modelValue: b(s).description,
24285
24286
  "onUpdate:modelValue": e[6] || (e[6] = (d) => b(s).description = d),
24286
- placeholder: t.$t("dictRegion.descriptionPlaceholder"),
24287
+ placeholder: c.$t("dictRegion.descriptionPlaceholder"),
24287
24288
  maxlength: "120",
24288
24289
  "show-word-limit": "",
24289
24290
  clearable: "",