@witlink/usercenter 1.2.78 → 1.2.80

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.
@@ -38060,6 +38060,10 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
38060
38060
  const handleSubmit = async () => {
38061
38061
  if (!fileList.value.length)
38062
38062
  return;
38063
+ if (fileList.value[0].type !== "application/json") {
38064
+ message.error(t2("uc_fun.import_menu_error"));
38065
+ return;
38066
+ }
38063
38067
  const formData = new FormData();
38064
38068
  formData.append("file", fileList.value[0]);
38065
38069
  formData.append("systemId", String(props.systemId));
@@ -38679,6 +38683,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
38679
38683
  id: "",
38680
38684
  type: ""
38681
38685
  });
38686
+ const countFormatter = ({ count, maxLength }) => `${count} / ${maxLength}`;
38682
38687
  const rules = computed(() => ({
38683
38688
  name: [{ required: true, message: t2("uc_organ.deptName_msg1") }],
38684
38689
  refCode: [
@@ -38867,7 +38872,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
38867
38872
  default: withCtx(() => [
38868
38873
  createVNode(_component_a_input, {
38869
38874
  placeholder: _ctx.$t("uc_organ.deptName"),
38870
- maxLength: 100,
38875
+ maxlength: 100,
38871
38876
  value: form.name,
38872
38877
  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => form.name = $event),
38873
38878
  autocomplete: "off"
@@ -38896,7 +38901,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
38896
38901
  value: formState.refCodeSuffix,
38897
38902
  "onUpdate:value": _cache[4] || (_cache[4] = ($event) => formState.refCodeSuffix = $event),
38898
38903
  placeholder: _ctx.$t("uc_common.plsEnter"),
38899
- maxLength: 4,
38904
+ maxlength: 4,
38900
38905
  autocomplete: "off"
38901
38906
  }, null, 8, ["value", "placeholder"])
38902
38907
  ]),
@@ -38919,8 +38924,8 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
38919
38924
  createVNode(_component_a_textarea, {
38920
38925
  value: form.remarks,
38921
38926
  "onUpdate:value": _cache[6] || (_cache[6] = ($event) => form.remarks = $event),
38922
- showCount: true,
38923
- maxLength: 200,
38927
+ "show-count": countFormatter,
38928
+ maxlength: 200,
38924
38929
  placeholder: _ctx.$t("uc_organ.remarks")
38925
38930
  }, null, 8, ["value", "placeholder"])
38926
38931
  ]),
@@ -38968,6 +38973,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
38968
38973
  type: "",
38969
38974
  actionType: ""
38970
38975
  });
38976
+ const countFormatter = ({ count, maxLength }) => `${count} / ${maxLength}`;
38971
38977
  const rules = computed(() => {
38972
38978
  return {
38973
38979
  name: [
@@ -39157,7 +39163,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
39157
39163
  default: withCtx(() => [
39158
39164
  createVNode(_component_a_input, {
39159
39165
  placeholder: _ctx.$t("uc_common.plsEnter"),
39160
- maxLength: 100,
39166
+ maxlength: 100,
39161
39167
  autocomplete: "off",
39162
39168
  value: form.name,
39163
39169
  "onUpdate:value": _cache[1] || (_cache[1] = ($event) => form.name = $event)
@@ -39186,7 +39192,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
39186
39192
  value: formState.refCodeSuffix,
39187
39193
  "onUpdate:value": _cache[3] || (_cache[3] = ($event) => formState.refCodeSuffix = $event),
39188
39194
  placeholder: _ctx.$t("uc_common.plsEnter"),
39189
- maxLength: 4,
39195
+ maxlength: 4,
39190
39196
  autocomplete: "off"
39191
39197
  }, null, 8, ["value", "placeholder"])
39192
39198
  ]),
@@ -39209,8 +39215,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
39209
39215
  createVNode(_component_a_textarea, {
39210
39216
  value: form.remarks,
39211
39217
  "onUpdate:value": _cache[5] || (_cache[5] = ($event) => form.remarks = $event),
39212
- showCount: true,
39213
- maxLength: 200,
39218
+ "show-count": countFormatter,
39219
+ maxlength: 200,
39214
39220
  placeholder: _ctx.$t("uc_common.plsEnter")
39215
39221
  }, null, 8, ["value", "placeholder"])
39216
39222
  ]),
@@ -40364,7 +40370,6 @@ const _sfc_main$z = Object.assign({
40364
40370
  emits: ["refresh"],
40365
40371
  setup(__props, { expose: __expose, emit: __emit }) {
40366
40372
  const { t: t2 } = useI18n();
40367
- const emit = __emit;
40368
40373
  const props = __props;
40369
40374
  const slots = useSlots();
40370
40375
  const dataSource = ref([]);
@@ -40412,12 +40417,8 @@ const _sfc_main$z = Object.assign({
40412
40417
  }).finally(() => localLoading.value = false);
40413
40418
  }
40414
40419
  };
40415
- const refresh = (isInit = false) => {
40416
- if (isInit) {
40417
- localPagination.current = 1;
40418
- localPagination.total = 0;
40419
- emit("refresh");
40420
- }
40420
+ const refresh = () => {
40421
+ localPagination.current = 1;
40421
40422
  loadData();
40422
40423
  };
40423
40424
  onMounted(() => {
@@ -41291,7 +41292,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
41291
41292
  key: 0,
41292
41293
  onClick: ($event) => handleDetail(record),
41293
41294
  type: "link",
41294
- style: { "padding": "0", "height": "auto" }
41295
+ style: { "padding": "0", "height": "auto", "width": "100%" }
41295
41296
  }, {
41296
41297
  default: withCtx(() => [
41297
41298
  createVNode(TextEllipsis, {
@@ -41831,9 +41832,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
41831
41832
  form.value.roleIdOthers = [];
41832
41833
  };
41833
41834
  const normalizeMobile = (value = "") => value.replace(/\D/g, "").slice(0, 15);
41834
- const handleMobileInput = (e) => {
41835
- const target = e.target;
41836
- form.value.mobile = normalizeMobile((target == null ? void 0 : target.value) || "");
41835
+ const handleMobileInput = (value) => {
41836
+ form.value.mobile = normalizeMobile(value);
41837
41837
  };
41838
41838
  const handleUserCodeValidator = (rule, value) => {
41839
41839
  if (!value) {
@@ -42227,11 +42227,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
42227
42227
  createVNode(_component_a_input, {
42228
42228
  placeholder: _ctx.$t("uc_common.plsEnter"),
42229
42229
  value: form.value.mobile,
42230
- "onUpdate:value": _cache[6] || (_cache[6] = ($event) => form.value.mobile = $event),
42231
42230
  disabled: props.params.opType == "2",
42232
42231
  autocomplete: "off",
42233
42232
  maxlength: 15,
42234
- onInput: handleMobileInput
42233
+ "onUpdate:value": handleMobileInput
42235
42234
  }, null, 8, ["placeholder", "value", "disabled"])
42236
42235
  ]),
42237
42236
  _: 1
@@ -42254,7 +42253,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
42254
42253
  createVNode(_component_a_input, {
42255
42254
  placeholder: _ctx.$t("uc_common.plsEnter"),
42256
42255
  value: form.value.email,
42257
- "onUpdate:value": _cache[7] || (_cache[7] = ($event) => form.value.email = $event),
42256
+ "onUpdate:value": _cache[6] || (_cache[6] = ($event) => form.value.email = $event),
42258
42257
  disabled: props.params.opType == "2",
42259
42258
  autocomplete: "off",
42260
42259
  maxlength: 32
@@ -42280,7 +42279,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
42280
42279
  createVNode(_component_a_input, {
42281
42280
  placeholder: _ctx.$t("uc_common.plsEnter"),
42282
42281
  value: form.value.remarks,
42283
- "onUpdate:value": _cache[8] || (_cache[8] = ($event) => form.value.remarks = $event),
42282
+ "onUpdate:value": _cache[7] || (_cache[7] = ($event) => form.value.remarks = $event),
42284
42283
  autocomplete: "off",
42285
42284
  maxlength: 200
42286
42285
  }, null, 8, ["placeholder", "value"])
@@ -43227,9 +43226,8 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
43227
43226
  mobile: ""
43228
43227
  });
43229
43228
  const normalizeMobile = (value = "") => value.replace(/\D/g, "").slice(0, 15);
43230
- const handleMobileInput = (e) => {
43231
- const target = e.target;
43232
- formState.mobile = normalizeMobile((target == null ? void 0 : target.value) || "");
43229
+ const handleMobileInput = (value) => {
43230
+ formState.mobile = normalizeMobile(value);
43233
43231
  };
43234
43232
  const rules = computed(() => ({
43235
43233
  pwd: [
@@ -43295,7 +43293,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
43295
43293
  return openBlock(), createBlock(_component_a_modal, {
43296
43294
  title: isBind.value ? _ctx.$t("uc_profile.bandMobile") : _ctx.$t("uc_profile.editMobile"),
43297
43295
  open: visible.value,
43298
- "onUpdate:open": _cache[2] || (_cache[2] = ($event) => visible.value = $event),
43296
+ "onUpdate:open": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
43299
43297
  destroyOnClose: true,
43300
43298
  onCancel: handleClose
43301
43299
  }, {
@@ -43347,11 +43345,10 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
43347
43345
  default: withCtx(() => [
43348
43346
  createVNode(_component_a_input, {
43349
43347
  value: formState.mobile,
43350
- "onUpdate:value": _cache[1] || (_cache[1] = ($event) => formState.mobile = $event),
43351
43348
  placeholder: _ctx.$t("uc_common.plsEnter"),
43352
43349
  maxlength: 15,
43353
43350
  autocomplete: "off",
43354
- onInput: handleMobileInput
43351
+ "onUpdate:value": handleMobileInput
43355
43352
  }, null, 8, ["value", "placeholder"])
43356
43353
  ]),
43357
43354
  _: 1
@@ -45761,9 +45758,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
45761
45758
  return "";
45762
45759
  });
45763
45760
  const normalizeMobile = (value = "") => value.replace(/\D/g, "").slice(0, 15);
45764
- const handlePhoneInput = (e) => {
45765
- const target = e.target;
45766
- form.userMobile = normalizeMobile((target == null ? void 0 : target.value) || "");
45761
+ const handlePhoneInput = (value) => {
45762
+ form.userMobile = normalizeMobile(value);
45767
45763
  };
45768
45764
  const initData = () => {
45769
45765
  Object.assign(form, {
@@ -46187,9 +46183,8 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
46187
46183
  autocomplete: "off",
46188
46184
  placeholder: _ctx.$t("uc_common.plsEnter"),
46189
46185
  value: form.userMobile,
46190
- "onUpdate:value": _cache[10] || (_cache[10] = ($event) => form.userMobile = $event),
46191
46186
  maxlength: 15,
46192
- onInput: handlePhoneInput
46187
+ "onUpdate:value": handlePhoneInput
46193
46188
  }, null, 8, ["disabled", "placeholder", "value"])
46194
46189
  ]),
46195
46190
  _: 1
@@ -46214,7 +46209,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
46214
46209
  autocomplete: "off",
46215
46210
  placeholder: _ctx.$t("uc_common.plsEnter"),
46216
46211
  value: form.userEmail,
46217
- "onUpdate:value": _cache[11] || (_cache[11] = ($event) => form.userEmail = $event),
46212
+ "onUpdate:value": _cache[10] || (_cache[10] = ($event) => form.userEmail = $event),
46218
46213
  maxlength: 32
46219
46214
  }, null, 8, ["disabled", "placeholder", "value"])
46220
46215
  ]),
@@ -46244,7 +46239,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
46244
46239
  disabled: isEdit.value,
46245
46240
  autocomplete: "off",
46246
46241
  value: form.userCode,
46247
- "onUpdate:value": _cache[12] || (_cache[12] = ($event) => form.userCode = $event)
46242
+ "onUpdate:value": _cache[11] || (_cache[11] = ($event) => form.userCode = $event)
46248
46243
  }, null, 8, ["placeholder", "disabled", "value"])
46249
46244
  ]),
46250
46245
  _: 1