@witlink/usercenter 1.2.67 → 1.2.69

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 './assets/main.820cadf1.css';var __defProp = Object.defineProperty;
1
+ import './assets/main.b000db64.css';var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => {
4
4
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
7
7
  import { useI18n } from "vue-i18n";
8
8
  import { defineStore, createPinia } from "pinia";
9
9
  import Axios from "axios";
10
- import { notification, message, App, Drawer, Button, ConfigProvider, Modal, Checkbox as Checkbox$1, Divider as Divider$1 } from "ant-design-vue";
10
+ import { notification, App, Drawer, Button, ConfigProvider, message, Modal, Checkbox as Checkbox$1, Divider as Divider$1 } from "ant-design-vue";
11
11
  import { ref, render, h, reactive, inject, computed, provide, createCommentVNode, defineComponent, watch, onMounted, nextTick, onUnmounted, TransitionGroup, Teleport, resolveComponent, onActivated, onDeactivated, onBeforeUnmount, openBlock, createElementBlock, createVNode, withCtx, unref, createBlock, createElementVNode, createTextVNode, toDisplayString, Fragment, renderList, normalizeClass, normalizeStyle, mergeProps, onBeforeMount, withDirectives, vShow, useSlots, createSlots, renderSlot, normalizeProps, guardReactiveProps, withModifiers, watchEffect, mergeModels, useModel, resolveDirective } from "vue";
12
12
  import { getUserInfo as getUserInfo$1, hasPermission } from "@witlink/components/utils";
13
13
  import en_US from "ant-design-vue/es/locale/en_US";
@@ -184,7 +184,7 @@ function handleResp(response) {
184
184
  if (result.code == -100017 || result.code == -100018 || result.code == -120042 || result.code == -120041) {
185
185
  storage.remove(ACCESS_TOKEN);
186
186
  const logoutUrl = storage.get("logoutToUrl");
187
- window.location.href = logoutUrl;
187
+ logoutUrl && (window.location.href = logoutUrl);
188
188
  } else {
189
189
  let description = $lang("err", String(result.code));
190
190
  if (!description) {
@@ -344,12 +344,7 @@ const useUserStore = defineStore(`${TOKEN_PREFIX}user`, {
344
344
  this.isWarehouseManager = isWarehouseManager;
345
345
  this.avatar = "usercenter/" + result.avatar;
346
346
  } else {
347
- const info = $lang("login", "noperssionInfo");
348
- message.error(info);
349
347
  storage.remove(ACCESS_TOKEN);
350
- setTimeout(() => {
351
- window.location.href = window.location.origin + "/#/login";
352
- }, 500);
353
348
  }
354
349
  },
355
350
  setIsLock(val) {
@@ -32242,7 +32237,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
32242
32237
  placeholder: _ctx.$t("uc_common.plsEnter"),
32243
32238
  value: formState.value.helperId,
32244
32239
  "onUpdate:value": _cache[2] || (_cache[2] = ($event) => formState.value.helperId = $event),
32245
- autocomplete: "off"
32240
+ autocomplete: "off",
32241
+ maxlength: 36
32246
32242
  }, null, 8, ["placeholder", "value"])
32247
32243
  ]),
32248
32244
  _: 1
@@ -33294,21 +33290,6 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33294
33290
  message: t2("uc_organ.branchName_msg1"),
33295
33291
  trigger: "blur"
33296
33292
  }
33297
- ],
33298
- refCode: [
33299
- {
33300
- required: false,
33301
- trigger: "change",
33302
- validator: (rule, value) => {
33303
- if (!value) {
33304
- return Promise.resolve();
33305
- }
33306
- if (!/^\d{0,4}$/.test(value)) {
33307
- return Promise.reject(t2("uc_organ.refCodePlaceholder"));
33308
- }
33309
- return Promise.resolve();
33310
- }
33311
- }
33312
33293
  ]
33313
33294
  };
33314
33295
  });
@@ -33331,8 +33312,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33331
33312
  Object.assign(form, {
33332
33313
  parentBranch: "",
33333
33314
  name: "",
33334
- remarks: "",
33335
- refCode: ""
33315
+ remarks: ""
33336
33316
  });
33337
33317
  Object.assign(params, data);
33338
33318
  if (data.opType == "2") {
@@ -33360,8 +33340,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33360
33340
  id: form.id,
33361
33341
  name: form.name,
33362
33342
  remarks: form.remarks,
33363
- type: form.type,
33364
- refCode: form.refCode
33343
+ type: form.type
33365
33344
  })
33366
33345
  );
33367
33346
  } else {
@@ -33370,8 +33349,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33370
33349
  id: form.id,
33371
33350
  name: form.name,
33372
33351
  remarks: form.remarks,
33373
- type: form.type,
33374
- refCode: form.refCode
33352
+ type: form.type
33375
33353
  })
33376
33354
  );
33377
33355
  }
@@ -33402,7 +33380,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33402
33380
  width: 620,
33403
33381
  title: _ctx.$t("uc_organ.branch_edit" + params.opType),
33404
33382
  open: visible.value,
33405
- "onUpdate:open": _cache[4] || (_cache[4] = ($event) => visible.value = $event),
33383
+ "onUpdate:open": _cache[3] || (_cache[3] = ($event) => visible.value = $event),
33406
33384
  onCancel,
33407
33385
  destroyOnClose: true
33408
33386
  }, {
@@ -33467,21 +33445,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33467
33445
  ]),
33468
33446
  _: 1
33469
33447
  }, 8, ["label"]),
33470
- createVNode(_component_a_form_item, {
33471
- label: _ctx.$t("uc_organ.refCode"),
33472
- name: "refCode"
33473
- }, {
33474
- default: withCtx(() => [
33475
- createVNode(_component_a_input, {
33476
- placeholder: _ctx.$t("uc_common.plsEnter"),
33477
- value: form.refCode,
33478
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => form.refCode = $event),
33479
- autocomplete: "off",
33480
- maxLength: 4
33481
- }, null, 8, ["placeholder", "value"])
33482
- ]),
33483
- _: 1
33484
- }, 8, ["label"]),
33448
+ createCommentVNode(` <a-form-item :label="$t('uc_organ.refCode')" name="refCode">\r
33449
+ <a-input\r
33450
+ :placeholder="$t('uc_common.plsEnter')"\r
33451
+ v-model:value="form.refCode"\r
33452
+ autocomplete="off"\r
33453
+ :maxLength="4"\r
33454
+ />\r
33455
+ </a-form-item> `),
33485
33456
  createVNode(_component_a_form_item, {
33486
33457
  label: _ctx.$t("uc_organ.remarks"),
33487
33458
  name: "remarks"
@@ -33489,7 +33460,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33489
33460
  default: withCtx(() => [
33490
33461
  createVNode(InputTextarea, {
33491
33462
  value: form.remarks,
33492
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => form.remarks = $event),
33463
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => form.remarks = $event),
33493
33464
  showCount: true,
33494
33465
  maxLength: 50,
33495
33466
  autoSize: false,
@@ -33531,7 +33502,6 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
33531
33502
  parentBranch: "",
33532
33503
  name: "",
33533
33504
  associatedFlag: "",
33534
- refCode: "",
33535
33505
  orderNo: "",
33536
33506
  remarks: "",
33537
33507
  cdate: "",
@@ -33575,24 +33545,9 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
33575
33545
  ]),
33576
33546
  _: 1
33577
33547
  }, 8, ["label"]),
33578
- createVNode(_component_a_descriptions_item, {
33579
- label: _ctx.$t("uc_organ.refCode"),
33580
- span: 1
33581
- }, {
33582
- default: withCtx(() => [
33583
- createTextVNode(toDisplayString(insertData.refCode || "-"), 1)
33584
- ]),
33585
- _: 1
33586
- }, 8, ["label"]),
33587
- createVNode(_component_a_descriptions_item, {
33588
- label: _ctx.$t("uc_organ.remarks"),
33589
- span: 1
33590
- }, {
33591
- default: withCtx(() => [
33592
- createTextVNode(toDisplayString(insertData.remarks || "-"), 1)
33593
- ]),
33594
- _: 1
33595
- }, 8, ["label"]),
33548
+ createCommentVNode(` <a-descriptions-item :label="$t('uc_organ.refCode')" :span="1">\r
33549
+ {{ insertData.refCode || '-' }}\r
33550
+ </a-descriptions-item> `),
33596
33551
  createVNode(_component_a_descriptions_item, {
33597
33552
  label: _ctx.$t("uc_organ.coperator"),
33598
33553
  span: 1
@@ -33628,6 +33583,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
33628
33583
  createTextVNode(toDisplayString(unref(formatDate)(insertData.udate) || "-"), 1)
33629
33584
  ]),
33630
33585
  _: 1
33586
+ }, 8, ["label"]),
33587
+ createVNode(_component_a_descriptions_item, {
33588
+ label: _ctx.$t("uc_organ.remarks"),
33589
+ span: 2
33590
+ }, {
33591
+ default: withCtx(() => [
33592
+ createTextVNode(toDisplayString(insertData.remarks || "-"), 1)
33593
+ ]),
33594
+ _: 1
33631
33595
  }, 8, ["label"])
33632
33596
  ]),
33633
33597
  _: 1
@@ -33674,7 +33638,6 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
33674
33638
  const insertData = reactive({
33675
33639
  parentBranch: "",
33676
33640
  name: "",
33677
- refCode: "",
33678
33641
  orderNo: "",
33679
33642
  remarks: "",
33680
33643
  cdate: "",
@@ -33902,14 +33865,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
33902
33865
  const { result } = await getRegionListAsync({});
33903
33866
  tableData.value = result.list;
33904
33867
  };
33905
- const showIF = ref(true);
33906
33868
  const hideButtonArr = ref([]);
33907
33869
  async function queryById() {
33908
- showIF.value = false;
33909
- await nextTick();
33910
- showIF.value = true;
33870
+ await init2();
33911
33871
  const params = {};
33912
- if (queryParam.value.id) {
33872
+ if (queryParam.value.id && queryParam.value.name) {
33913
33873
  params.id = queryParam.value.id;
33914
33874
  getRegionListById(params).then(async (res) => {
33915
33875
  if (res.code === 0) {
@@ -33929,10 +33889,18 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
33929
33889
  });
33930
33890
  } else {
33931
33891
  hideButtonArr.value = [];
33932
- init2();
33892
+ options.value = [];
33893
+ queryParam.value.name = "";
33933
33894
  }
33934
33895
  }
33935
33896
  const handleReset = () => {
33897
+ queryParam.value = {
33898
+ name: "",
33899
+ id: null
33900
+ };
33901
+ options.value = [];
33902
+ hideButtonArr.value = [];
33903
+ init2();
33936
33904
  };
33937
33905
  const onSwich = (key) => {
33938
33906
  size.value = key;
@@ -33975,10 +33943,16 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
33975
33943
  actionType: "add"
33976
33944
  });
33977
33945
  };
33946
+ const rowClassName = ({ row }) => {
33947
+ if (queryParam.value.id == row.id) {
33948
+ return "row-highlight";
33949
+ }
33950
+ return "";
33951
+ };
33978
33952
  const onDetail = (record) => {
33979
- if (record.type == "3") {
33980
- deptDetailRef.value.showModal({ type: record.type, id: record.id });
33981
- } else {
33953
+ if (record.type == "3")
33954
+ ;
33955
+ else {
33982
33956
  modalStore.drawerComp({
33983
33957
  title: t2("uc_organ.BranDetail"),
33984
33958
  comp: BranDetail,
@@ -34167,15 +34141,15 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
34167
34141
  })
34168
34142
  ]),
34169
34143
  createElementVNode("div", _hoisted_4$6, [
34170
- showIF.value ? (openBlock(), createBlock(unref(VxeTable), {
34171
- key: 0,
34144
+ createVNode(unref(VxeTable), {
34172
34145
  ref_key: "tableRef",
34173
34146
  ref: tableRef,
34174
34147
  "row-config": { keyField: "id" },
34175
34148
  "tree-config": treeConfig,
34176
34149
  "keep-source": "",
34177
34150
  data: tableData.value,
34178
- height: "100%"
34151
+ height: "100%",
34152
+ "row-class-name": rowClassName
34179
34153
  }, {
34180
34154
  default: withCtx(() => [
34181
34155
  createVNode(unref(VxeColumn), {
@@ -34207,7 +34181,10 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
34207
34181
  ]),
34208
34182
  _: 2
34209
34183
  }, 1032, ["onClick"]), [
34210
- [vShow, !row.operationPermissions]
34184
+ [vShow, !row.operationPermissions && row.type != "3"]
34185
+ ]),
34186
+ withDirectives(createElementVNode("span", { style: { "padding-left": "16px" } }, toDisplayString(row.name), 513), [
34187
+ [vShow, !row.operationPermissions && row.type == "3"]
34211
34188
  ]),
34212
34189
  createVNode(_component_a_tooltip, { placement: "top" }, {
34213
34190
  title: withCtx(() => [
@@ -34530,7 +34507,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
34530
34507
  }, 8, ["title"])
34531
34508
  ]),
34532
34509
  _: 1
34533
- }, 8, ["tree-config", "data"])) : createCommentVNode("v-if", true)
34510
+ }, 8, ["tree-config", "data"])
34534
34511
  ]),
34535
34512
  createVNode(BranchEdit, {
34536
34513
  ref_key: "branchEditRef",
@@ -44649,6 +44626,7 @@ function changeTheme(options) {
44649
44626
  }
44650
44627
  function setToken(token) {
44651
44628
  storage.set(ACCESS_TOKEN, token);
44629
+ token && initUserInfo();
44652
44630
  }
44653
44631
  function removeToken() {
44654
44632
  storage.remove(ACCESS_TOKEN);