@witlink/usercenter 1.2.66 → 1.2.68

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,8 +7,8 @@ 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";
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, createElementVNode, createTextVNode, toDisplayString, createBlock, Fragment, renderList, normalizeClass, normalizeStyle, mergeProps, onBeforeMount, withDirectives, vShow, useSlots, createSlots, renderSlot, normalizeProps, guardReactiveProps, withModifiers, watchEffect, mergeModels, useModel, resolveDirective } from "vue";
10
+ import { notification, App, Drawer, Button, ConfigProvider, message, Modal, Checkbox as Checkbox$1, Divider as Divider$1 } from "ant-design-vue";
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";
14
14
  import zh_CN from "ant-design-vue/es/locale/zh_CN";
@@ -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) {
@@ -32137,7 +32132,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
32137
32132
  url: "",
32138
32133
  parentId: null,
32139
32134
  selects: [],
32140
- options: []
32135
+ options: [],
32136
+ helperId: null
32141
32137
  });
32142
32138
  const parentMenuOptions = ref([]);
32143
32139
  const handleCancel = () => {
@@ -32162,6 +32158,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
32162
32158
  })) || [];
32163
32159
  };
32164
32160
  onMounted(() => {
32161
+ var _a;
32165
32162
  init2();
32166
32163
  formState.value = {
32167
32164
  funName: props.data.funName,
@@ -32169,7 +32166,8 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
32169
32166
  url: props.data.url,
32170
32167
  parentId: props.data.parentId,
32171
32168
  selects: props.data.selects,
32172
- options: props.data.options
32169
+ options: props.data.options,
32170
+ helperId: ((_a = props.data) == null ? void 0 : _a.helperId) || null
32173
32171
  };
32174
32172
  });
32175
32173
  return (_ctx, _cache) => {
@@ -32228,6 +32226,22 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
32228
32226
  ]),
32229
32227
  _: 1
32230
32228
  }, 8, ["label", "rules"]),
32229
+ createCommentVNode(" \u5E2E\u52A9\u4E2D\u5FC3\u5173\u8054id "),
32230
+ __props.systemId == "cis" ? (openBlock(), createBlock(_component_a_form_item, {
32231
+ key: 0,
32232
+ label: _ctx.$t("uc_fun.ucHelpLinkID"),
32233
+ name: "helperId"
32234
+ }, {
32235
+ default: withCtx(() => [
32236
+ createVNode(_component_a_input, {
32237
+ placeholder: _ctx.$t("uc_common.plsEnter"),
32238
+ value: formState.value.helperId,
32239
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => formState.value.helperId = $event),
32240
+ autocomplete: "off"
32241
+ }, null, 8, ["placeholder", "value"])
32242
+ ]),
32243
+ _: 1
32244
+ }, 8, ["label"])) : createCommentVNode("v-if", true),
32231
32245
  createVNode(_component_a_form_item, {
32232
32246
  label: _ctx.$t("uc_fun.image"),
32233
32247
  name: "image"
@@ -32236,7 +32250,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
32236
32250
  createVNode(_component_a_input, {
32237
32251
  placeholder: _ctx.$t("uc_common.plsEnter"),
32238
32252
  value: formState.value.image,
32239
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => formState.value.image = $event),
32253
+ "onUpdate:value": _cache[3] || (_cache[3] = ($event) => formState.value.image = $event),
32240
32254
  autocomplete: "off"
32241
32255
  }, null, 8, ["placeholder", "value"])
32242
32256
  ]),
@@ -32253,7 +32267,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
32253
32267
  disabled: props.isEdit,
32254
32268
  options: parentMenuOptions.value,
32255
32269
  value: formState.value.parentId,
32256
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => formState.value.parentId = $event)
32270
+ "onUpdate:value": _cache[4] || (_cache[4] = ($event) => formState.value.parentId = $event)
32257
32271
  }, null, 8, ["placeholder", "disabled", "options", "value"])
32258
32272
  ]),
32259
32273
  _: 1
@@ -32266,7 +32280,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
32266
32280
  createVNode(_component_a_checkbox_group, {
32267
32281
  options: formState.value.options,
32268
32282
  value: formState.value.selects,
32269
- "onUpdate:value": _cache[4] || (_cache[4] = ($event) => formState.value.selects = $event)
32283
+ "onUpdate:value": _cache[5] || (_cache[5] = ($event) => formState.value.selects = $event)
32270
32284
  }, null, 8, ["options", "value"])
32271
32285
  ])
32272
32286
  ]),
@@ -32484,6 +32498,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
32484
32498
  modalStore.drawerDestroy();
32485
32499
  },
32486
32500
  onSubmit: async (data) => {
32501
+ var _a2, _b;
32487
32502
  if (!row) {
32488
32503
  const { result } = await setFunctionsInsert({
32489
32504
  funName: data.funName,
@@ -32491,7 +32506,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
32491
32506
  url: data.url,
32492
32507
  systemId: selectedSys.value,
32493
32508
  parentId: data.parentId ? data.parentId : rowData.parentId,
32494
- actions: data.selects.join(",")
32509
+ actions: data.selects.join(","),
32510
+ helperId: (_a2 = data.helperId) != null ? _a2 : void 0
32495
32511
  });
32496
32512
  if (result) {
32497
32513
  message.success(t2("uc_fun.create_success"));
@@ -32506,7 +32522,8 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
32506
32522
  code: rowData.code,
32507
32523
  systemId: selectedSys.value,
32508
32524
  parentId: data.parentId ? data.parentId : rowData.parentId,
32509
- actions: data.selects.join(",")
32525
+ actions: data.selects.join(","),
32526
+ helperId: (_b = data.helperId) != null ? _b : void 0
32510
32527
  });
32511
32528
  if (result) {
32512
32529
  message.success(t2("uc_fun.edit_success"));
@@ -33272,21 +33289,6 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33272
33289
  message: t2("uc_organ.branchName_msg1"),
33273
33290
  trigger: "blur"
33274
33291
  }
33275
- ],
33276
- refCode: [
33277
- {
33278
- required: false,
33279
- trigger: "change",
33280
- validator: (rule, value) => {
33281
- if (!value) {
33282
- return Promise.resolve();
33283
- }
33284
- if (!/^\d{0,4}$/.test(value)) {
33285
- return Promise.reject(t2("uc_organ.refCodePlaceholder"));
33286
- }
33287
- return Promise.resolve();
33288
- }
33289
- }
33290
33292
  ]
33291
33293
  };
33292
33294
  });
@@ -33309,8 +33311,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33309
33311
  Object.assign(form, {
33310
33312
  parentBranch: "",
33311
33313
  name: "",
33312
- remarks: "",
33313
- refCode: ""
33314
+ remarks: ""
33314
33315
  });
33315
33316
  Object.assign(params, data);
33316
33317
  if (data.opType == "2") {
@@ -33338,8 +33339,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33338
33339
  id: form.id,
33339
33340
  name: form.name,
33340
33341
  remarks: form.remarks,
33341
- type: form.type,
33342
- refCode: form.refCode
33342
+ type: form.type
33343
33343
  })
33344
33344
  );
33345
33345
  } else {
@@ -33348,8 +33348,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33348
33348
  id: form.id,
33349
33349
  name: form.name,
33350
33350
  remarks: form.remarks,
33351
- type: form.type,
33352
- refCode: form.refCode
33351
+ type: form.type
33353
33352
  })
33354
33353
  );
33355
33354
  }
@@ -33380,7 +33379,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33380
33379
  width: 620,
33381
33380
  title: _ctx.$t("uc_organ.branch_edit" + params.opType),
33382
33381
  open: visible.value,
33383
- "onUpdate:open": _cache[4] || (_cache[4] = ($event) => visible.value = $event),
33382
+ "onUpdate:open": _cache[3] || (_cache[3] = ($event) => visible.value = $event),
33384
33383
  onCancel,
33385
33384
  destroyOnClose: true
33386
33385
  }, {
@@ -33445,21 +33444,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33445
33444
  ]),
33446
33445
  _: 1
33447
33446
  }, 8, ["label"]),
33448
- createVNode(_component_a_form_item, {
33449
- label: _ctx.$t("uc_organ.refCode"),
33450
- name: "refCode"
33451
- }, {
33452
- default: withCtx(() => [
33453
- createVNode(_component_a_input, {
33454
- placeholder: _ctx.$t("uc_common.plsEnter"),
33455
- value: form.refCode,
33456
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => form.refCode = $event),
33457
- autocomplete: "off",
33458
- maxLength: 4
33459
- }, null, 8, ["placeholder", "value"])
33460
- ]),
33461
- _: 1
33462
- }, 8, ["label"]),
33447
+ createCommentVNode(` <a-form-item :label="$t('uc_organ.refCode')" name="refCode">\r
33448
+ <a-input\r
33449
+ :placeholder="$t('uc_common.plsEnter')"\r
33450
+ v-model:value="form.refCode"\r
33451
+ autocomplete="off"\r
33452
+ :maxLength="4"\r
33453
+ />\r
33454
+ </a-form-item> `),
33463
33455
  createVNode(_component_a_form_item, {
33464
33456
  label: _ctx.$t("uc_organ.remarks"),
33465
33457
  name: "remarks"
@@ -33467,7 +33459,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
33467
33459
  default: withCtx(() => [
33468
33460
  createVNode(InputTextarea, {
33469
33461
  value: form.remarks,
33470
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => form.remarks = $event),
33462
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => form.remarks = $event),
33471
33463
  showCount: true,
33472
33464
  maxLength: 50,
33473
33465
  autoSize: false,
@@ -33509,7 +33501,6 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
33509
33501
  parentBranch: "",
33510
33502
  name: "",
33511
33503
  associatedFlag: "",
33512
- refCode: "",
33513
33504
  orderNo: "",
33514
33505
  remarks: "",
33515
33506
  cdate: "",
@@ -33553,24 +33544,9 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
33553
33544
  ]),
33554
33545
  _: 1
33555
33546
  }, 8, ["label"]),
33556
- createVNode(_component_a_descriptions_item, {
33557
- label: _ctx.$t("uc_organ.refCode"),
33558
- span: 1
33559
- }, {
33560
- default: withCtx(() => [
33561
- createTextVNode(toDisplayString(insertData.refCode || "-"), 1)
33562
- ]),
33563
- _: 1
33564
- }, 8, ["label"]),
33565
- createVNode(_component_a_descriptions_item, {
33566
- label: _ctx.$t("uc_organ.remarks"),
33567
- span: 1
33568
- }, {
33569
- default: withCtx(() => [
33570
- createTextVNode(toDisplayString(insertData.remarks || "-"), 1)
33571
- ]),
33572
- _: 1
33573
- }, 8, ["label"]),
33547
+ createCommentVNode(` <a-descriptions-item :label="$t('uc_organ.refCode')" :span="1">\r
33548
+ {{ insertData.refCode || '-' }}\r
33549
+ </a-descriptions-item> `),
33574
33550
  createVNode(_component_a_descriptions_item, {
33575
33551
  label: _ctx.$t("uc_organ.coperator"),
33576
33552
  span: 1
@@ -33606,6 +33582,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
33606
33582
  createTextVNode(toDisplayString(unref(formatDate)(insertData.udate) || "-"), 1)
33607
33583
  ]),
33608
33584
  _: 1
33585
+ }, 8, ["label"]),
33586
+ createVNode(_component_a_descriptions_item, {
33587
+ label: _ctx.$t("uc_organ.remarks"),
33588
+ span: 2
33589
+ }, {
33590
+ default: withCtx(() => [
33591
+ createTextVNode(toDisplayString(insertData.remarks || "-"), 1)
33592
+ ]),
33593
+ _: 1
33609
33594
  }, 8, ["label"])
33610
33595
  ]),
33611
33596
  _: 1
@@ -33652,7 +33637,6 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
33652
33637
  const insertData = reactive({
33653
33638
  parentBranch: "",
33654
33639
  name: "",
33655
- refCode: "",
33656
33640
  orderNo: "",
33657
33641
  remarks: "",
33658
33642
  cdate: "",
@@ -33880,14 +33864,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
33880
33864
  const { result } = await getRegionListAsync({});
33881
33865
  tableData.value = result.list;
33882
33866
  };
33883
- const showIF = ref(true);
33884
33867
  const hideButtonArr = ref([]);
33885
33868
  async function queryById() {
33886
- showIF.value = false;
33887
- await nextTick();
33888
- showIF.value = true;
33869
+ await init2();
33889
33870
  const params = {};
33890
- if (queryParam.value.id) {
33871
+ if (queryParam.value.id && queryParam.value.name) {
33891
33872
  params.id = queryParam.value.id;
33892
33873
  getRegionListById(params).then(async (res) => {
33893
33874
  if (res.code === 0) {
@@ -33907,10 +33888,18 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
33907
33888
  });
33908
33889
  } else {
33909
33890
  hideButtonArr.value = [];
33910
- init2();
33891
+ options.value = [];
33892
+ queryParam.value.name = "";
33911
33893
  }
33912
33894
  }
33913
33895
  const handleReset = () => {
33896
+ queryParam.value = {
33897
+ name: "",
33898
+ id: null
33899
+ };
33900
+ options.value = [];
33901
+ hideButtonArr.value = [];
33902
+ init2();
33914
33903
  };
33915
33904
  const onSwich = (key) => {
33916
33905
  size.value = key;
@@ -33953,10 +33942,16 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
33953
33942
  actionType: "add"
33954
33943
  });
33955
33944
  };
33945
+ const rowClassName = ({ row }) => {
33946
+ if (queryParam.value.id == row.id) {
33947
+ return "row-highlight";
33948
+ }
33949
+ return "";
33950
+ };
33956
33951
  const onDetail = (record) => {
33957
- if (record.type == "3") {
33958
- deptDetailRef.value.showModal({ type: record.type, id: record.id });
33959
- } else {
33952
+ if (record.type == "3")
33953
+ ;
33954
+ else {
33960
33955
  modalStore.drawerComp({
33961
33956
  title: t2("uc_organ.BranDetail"),
33962
33957
  comp: BranDetail,
@@ -34145,15 +34140,15 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
34145
34140
  })
34146
34141
  ]),
34147
34142
  createElementVNode("div", _hoisted_4$6, [
34148
- showIF.value ? (openBlock(), createBlock(unref(VxeTable), {
34149
- key: 0,
34143
+ createVNode(unref(VxeTable), {
34150
34144
  ref_key: "tableRef",
34151
34145
  ref: tableRef,
34152
34146
  "row-config": { keyField: "id" },
34153
34147
  "tree-config": treeConfig,
34154
34148
  "keep-source": "",
34155
34149
  data: tableData.value,
34156
- height: "100%"
34150
+ height: "100%",
34151
+ "row-class-name": rowClassName
34157
34152
  }, {
34158
34153
  default: withCtx(() => [
34159
34154
  createVNode(unref(VxeColumn), {
@@ -34185,7 +34180,10 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
34185
34180
  ]),
34186
34181
  _: 2
34187
34182
  }, 1032, ["onClick"]), [
34188
- [vShow, !row.operationPermissions]
34183
+ [vShow, !row.operationPermissions && row.type != "3"]
34184
+ ]),
34185
+ withDirectives(createElementVNode("span", { style: { "padding-left": "16px" } }, toDisplayString(row.name), 513), [
34186
+ [vShow, !row.operationPermissions && row.type == "3"]
34189
34187
  ]),
34190
34188
  createVNode(_component_a_tooltip, { placement: "top" }, {
34191
34189
  title: withCtx(() => [
@@ -34508,7 +34506,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
34508
34506
  }, 8, ["title"])
34509
34507
  ]),
34510
34508
  _: 1
34511
- }, 8, ["tree-config", "data"])) : createCommentVNode("v-if", true)
34509
+ }, 8, ["tree-config", "data"])
34512
34510
  ]),
34513
34511
  createVNode(BranchEdit, {
34514
34512
  ref_key: "branchEditRef",
@@ -44627,6 +44625,7 @@ function changeTheme(options) {
44627
44625
  }
44628
44626
  function setToken(token) {
44629
44627
  storage.set(ACCESS_TOKEN, token);
44628
+ token && initUserInfo();
44630
44629
  }
44631
44630
  function removeToken() {
44632
44631
  storage.remove(ACCESS_TOKEN);