@witlink/usercenter 1.2.67 → 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.
package/dist/usercenter.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './assets/main.
|
|
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,
|
|
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) {
|
|
@@ -33294,21 +33289,6 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
33294
33289
|
message: t2("uc_organ.branchName_msg1"),
|
|
33295
33290
|
trigger: "blur"
|
|
33296
33291
|
}
|
|
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
33292
|
]
|
|
33313
33293
|
};
|
|
33314
33294
|
});
|
|
@@ -33331,8 +33311,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
33331
33311
|
Object.assign(form, {
|
|
33332
33312
|
parentBranch: "",
|
|
33333
33313
|
name: "",
|
|
33334
|
-
remarks: ""
|
|
33335
|
-
refCode: ""
|
|
33314
|
+
remarks: ""
|
|
33336
33315
|
});
|
|
33337
33316
|
Object.assign(params, data);
|
|
33338
33317
|
if (data.opType == "2") {
|
|
@@ -33360,8 +33339,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
33360
33339
|
id: form.id,
|
|
33361
33340
|
name: form.name,
|
|
33362
33341
|
remarks: form.remarks,
|
|
33363
|
-
type: form.type
|
|
33364
|
-
refCode: form.refCode
|
|
33342
|
+
type: form.type
|
|
33365
33343
|
})
|
|
33366
33344
|
);
|
|
33367
33345
|
} else {
|
|
@@ -33370,8 +33348,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
33370
33348
|
id: form.id,
|
|
33371
33349
|
name: form.name,
|
|
33372
33350
|
remarks: form.remarks,
|
|
33373
|
-
type: form.type
|
|
33374
|
-
refCode: form.refCode
|
|
33351
|
+
type: form.type
|
|
33375
33352
|
})
|
|
33376
33353
|
);
|
|
33377
33354
|
}
|
|
@@ -33402,7 +33379,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
33402
33379
|
width: 620,
|
|
33403
33380
|
title: _ctx.$t("uc_organ.branch_edit" + params.opType),
|
|
33404
33381
|
open: visible.value,
|
|
33405
|
-
"onUpdate:open": _cache[
|
|
33382
|
+
"onUpdate:open": _cache[3] || (_cache[3] = ($event) => visible.value = $event),
|
|
33406
33383
|
onCancel,
|
|
33407
33384
|
destroyOnClose: true
|
|
33408
33385
|
}, {
|
|
@@ -33467,21 +33444,14 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
33467
33444
|
]),
|
|
33468
33445
|
_: 1
|
|
33469
33446
|
}, 8, ["label"]),
|
|
33470
|
-
|
|
33471
|
-
|
|
33472
|
-
|
|
33473
|
-
|
|
33474
|
-
|
|
33475
|
-
|
|
33476
|
-
|
|
33477
|
-
|
|
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"]),
|
|
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> `),
|
|
33485
33455
|
createVNode(_component_a_form_item, {
|
|
33486
33456
|
label: _ctx.$t("uc_organ.remarks"),
|
|
33487
33457
|
name: "remarks"
|
|
@@ -33489,7 +33459,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
33489
33459
|
default: withCtx(() => [
|
|
33490
33460
|
createVNode(InputTextarea, {
|
|
33491
33461
|
value: form.remarks,
|
|
33492
|
-
"onUpdate:value": _cache[
|
|
33462
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => form.remarks = $event),
|
|
33493
33463
|
showCount: true,
|
|
33494
33464
|
maxLength: 50,
|
|
33495
33465
|
autoSize: false,
|
|
@@ -33531,7 +33501,6 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
33531
33501
|
parentBranch: "",
|
|
33532
33502
|
name: "",
|
|
33533
33503
|
associatedFlag: "",
|
|
33534
|
-
refCode: "",
|
|
33535
33504
|
orderNo: "",
|
|
33536
33505
|
remarks: "",
|
|
33537
33506
|
cdate: "",
|
|
@@ -33575,24 +33544,9 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
33575
33544
|
]),
|
|
33576
33545
|
_: 1
|
|
33577
33546
|
}, 8, ["label"]),
|
|
33578
|
-
|
|
33579
|
-
|
|
33580
|
-
|
|
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"]),
|
|
33547
|
+
createCommentVNode(` <a-descriptions-item :label="$t('uc_organ.refCode')" :span="1">\r
|
|
33548
|
+
{{ insertData.refCode || '-' }}\r
|
|
33549
|
+
</a-descriptions-item> `),
|
|
33596
33550
|
createVNode(_component_a_descriptions_item, {
|
|
33597
33551
|
label: _ctx.$t("uc_organ.coperator"),
|
|
33598
33552
|
span: 1
|
|
@@ -33628,6 +33582,15 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
33628
33582
|
createTextVNode(toDisplayString(unref(formatDate)(insertData.udate) || "-"), 1)
|
|
33629
33583
|
]),
|
|
33630
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
|
|
33631
33594
|
}, 8, ["label"])
|
|
33632
33595
|
]),
|
|
33633
33596
|
_: 1
|
|
@@ -33674,7 +33637,6 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
33674
33637
|
const insertData = reactive({
|
|
33675
33638
|
parentBranch: "",
|
|
33676
33639
|
name: "",
|
|
33677
|
-
refCode: "",
|
|
33678
33640
|
orderNo: "",
|
|
33679
33641
|
remarks: "",
|
|
33680
33642
|
cdate: "",
|
|
@@ -33902,14 +33864,11 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
33902
33864
|
const { result } = await getRegionListAsync({});
|
|
33903
33865
|
tableData.value = result.list;
|
|
33904
33866
|
};
|
|
33905
|
-
const showIF = ref(true);
|
|
33906
33867
|
const hideButtonArr = ref([]);
|
|
33907
33868
|
async function queryById() {
|
|
33908
|
-
|
|
33909
|
-
await nextTick();
|
|
33910
|
-
showIF.value = true;
|
|
33869
|
+
await init2();
|
|
33911
33870
|
const params = {};
|
|
33912
|
-
if (queryParam.value.id) {
|
|
33871
|
+
if (queryParam.value.id && queryParam.value.name) {
|
|
33913
33872
|
params.id = queryParam.value.id;
|
|
33914
33873
|
getRegionListById(params).then(async (res) => {
|
|
33915
33874
|
if (res.code === 0) {
|
|
@@ -33929,10 +33888,18 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
33929
33888
|
});
|
|
33930
33889
|
} else {
|
|
33931
33890
|
hideButtonArr.value = [];
|
|
33932
|
-
|
|
33891
|
+
options.value = [];
|
|
33892
|
+
queryParam.value.name = "";
|
|
33933
33893
|
}
|
|
33934
33894
|
}
|
|
33935
33895
|
const handleReset = () => {
|
|
33896
|
+
queryParam.value = {
|
|
33897
|
+
name: "",
|
|
33898
|
+
id: null
|
|
33899
|
+
};
|
|
33900
|
+
options.value = [];
|
|
33901
|
+
hideButtonArr.value = [];
|
|
33902
|
+
init2();
|
|
33936
33903
|
};
|
|
33937
33904
|
const onSwich = (key) => {
|
|
33938
33905
|
size.value = key;
|
|
@@ -33975,10 +33942,16 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
33975
33942
|
actionType: "add"
|
|
33976
33943
|
});
|
|
33977
33944
|
};
|
|
33945
|
+
const rowClassName = ({ row }) => {
|
|
33946
|
+
if (queryParam.value.id == row.id) {
|
|
33947
|
+
return "row-highlight";
|
|
33948
|
+
}
|
|
33949
|
+
return "";
|
|
33950
|
+
};
|
|
33978
33951
|
const onDetail = (record) => {
|
|
33979
|
-
if (record.type == "3")
|
|
33980
|
-
|
|
33981
|
-
|
|
33952
|
+
if (record.type == "3")
|
|
33953
|
+
;
|
|
33954
|
+
else {
|
|
33982
33955
|
modalStore.drawerComp({
|
|
33983
33956
|
title: t2("uc_organ.BranDetail"),
|
|
33984
33957
|
comp: BranDetail,
|
|
@@ -34167,15 +34140,15 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
34167
34140
|
})
|
|
34168
34141
|
]),
|
|
34169
34142
|
createElementVNode("div", _hoisted_4$6, [
|
|
34170
|
-
|
|
34171
|
-
key: 0,
|
|
34143
|
+
createVNode(unref(VxeTable), {
|
|
34172
34144
|
ref_key: "tableRef",
|
|
34173
34145
|
ref: tableRef,
|
|
34174
34146
|
"row-config": { keyField: "id" },
|
|
34175
34147
|
"tree-config": treeConfig,
|
|
34176
34148
|
"keep-source": "",
|
|
34177
34149
|
data: tableData.value,
|
|
34178
|
-
height: "100%"
|
|
34150
|
+
height: "100%",
|
|
34151
|
+
"row-class-name": rowClassName
|
|
34179
34152
|
}, {
|
|
34180
34153
|
default: withCtx(() => [
|
|
34181
34154
|
createVNode(unref(VxeColumn), {
|
|
@@ -34207,7 +34180,10 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
34207
34180
|
]),
|
|
34208
34181
|
_: 2
|
|
34209
34182
|
}, 1032, ["onClick"]), [
|
|
34210
|
-
[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"]
|
|
34211
34187
|
]),
|
|
34212
34188
|
createVNode(_component_a_tooltip, { placement: "top" }, {
|
|
34213
34189
|
title: withCtx(() => [
|
|
@@ -34530,7 +34506,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
34530
34506
|
}, 8, ["title"])
|
|
34531
34507
|
]),
|
|
34532
34508
|
_: 1
|
|
34533
|
-
}, 8, ["tree-config", "data"])
|
|
34509
|
+
}, 8, ["tree-config", "data"])
|
|
34534
34510
|
]),
|
|
34535
34511
|
createVNode(BranchEdit, {
|
|
34536
34512
|
ref_key: "branchEditRef",
|
|
@@ -44649,6 +44625,7 @@ function changeTheme(options) {
|
|
|
44649
44625
|
}
|
|
44650
44626
|
function setToken(token) {
|
|
44651
44627
|
storage.set(ACCESS_TOKEN, token);
|
|
44628
|
+
token && initUserInfo();
|
|
44652
44629
|
}
|
|
44653
44630
|
function removeToken() {
|
|
44654
44631
|
storage.remove(ACCESS_TOKEN);
|