@witlink/usercenter 1.2.86 → 1.2.87
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 +100 -52
- package/dist/usercenter.umd.js +1 -1
- package/package.json +1 -1
package/dist/usercenter.es.js
CHANGED
|
@@ -13,7 +13,7 @@ import { getUserInfo as getUserInfo$2, hasPermission } from "@witlink/components
|
|
|
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";
|
|
15
15
|
import fr_FR from "ant-design-vue/es/locale/fr_FR";
|
|
16
|
-
import { InputPassword, FormItem, Form, Button as Button$1, Modal, Tooltip, DescriptionsItem, Descriptions, Space, Upload, ConfigProvider as ConfigProvider$1, Textarea, Input, InputGroup, AutoComplete, Alert, Divider, MenuItem, Menu, Dropdown, Table, Col, Row, Spin, Checkbox, Cascader, Select, Avatar, Tag,
|
|
16
|
+
import { InputPassword, FormItem, Form, Button as Button$1, Modal, Tooltip, DescriptionsItem, Descriptions, Space, Upload, ConfigProvider as ConfigProvider$1, Textarea, Input, InputGroup, AutoComplete, Alert, Divider, MenuItem, Menu, Dropdown, Table, Col, Row, Spin, Checkbox, Cascader, Select, InputNumber, Avatar, Tag, Switch, SelectOption, Radio, RadioGroup, InputSearch, DatePicker } from "ant-design-vue/es";
|
|
17
17
|
import Icon, { ImportOutlined, RedoOutlined, ExclamationCircleOutlined, DownOutlined, LeftOutlined, UploadOutlined, PlusOutlined, MinusOutlined, EditOutlined, InfoCircleOutlined, DeleteOutlined, DownloadOutlined } from "@ant-design/icons-vue";
|
|
18
18
|
import dayjs from "dayjs";
|
|
19
19
|
import { cloneDeep } from "lodash-es";
|
|
@@ -38262,6 +38262,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
38262
38262
|
content: row.checked ? t2("uc_fun.disable_parent_content") : t2("uc_fun.enable_parent_content"),
|
|
38263
38263
|
icon: h(ExclamationCircleOutlined),
|
|
38264
38264
|
onOk: async () => {
|
|
38265
|
+
var _a;
|
|
38265
38266
|
const res = await setFunctionsSwitch({
|
|
38266
38267
|
id: row.id,
|
|
38267
38268
|
status: row.checked ? 1 : 0
|
|
@@ -38272,7 +38273,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
38272
38273
|
);
|
|
38273
38274
|
row.checked = !row.checked;
|
|
38274
38275
|
row.status = row.checked ? 0 : 1;
|
|
38275
|
-
row.children.forEach((item) => {
|
|
38276
|
+
(_a = row.children) == null ? void 0 : _a.forEach((item) => {
|
|
38276
38277
|
item.checked = row.checked;
|
|
38277
38278
|
item.status = row.status;
|
|
38278
38279
|
});
|
|
@@ -38297,9 +38298,10 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
38297
38298
|
});
|
|
38298
38299
|
};
|
|
38299
38300
|
const init2 = async () => {
|
|
38301
|
+
var _a;
|
|
38300
38302
|
const { result } = await getSysList({});
|
|
38301
38303
|
sysList.value = result;
|
|
38302
|
-
selectedSys.value = sysList.value[0].systemId;
|
|
38304
|
+
selectedSys.value = (_a = sysList.value[0]) == null ? void 0 : _a.systemId;
|
|
38303
38305
|
await initTable();
|
|
38304
38306
|
};
|
|
38305
38307
|
function flattenTreeIterative(tree) {
|
|
@@ -41647,21 +41649,45 @@ function getRoleListByUser$1(params) {
|
|
|
41647
41649
|
params
|
|
41648
41650
|
});
|
|
41649
41651
|
}
|
|
41652
|
+
function getRoleListByUserAll(params) {
|
|
41653
|
+
return handleRespPost({
|
|
41654
|
+
url: "/api/sys/role/search-list-by-user-all",
|
|
41655
|
+
method: "get",
|
|
41656
|
+
params
|
|
41657
|
+
});
|
|
41658
|
+
}
|
|
41650
41659
|
const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
41651
41660
|
__name: "RoleSelect",
|
|
41661
|
+
props: {
|
|
41662
|
+
urlType: {
|
|
41663
|
+
type: String,
|
|
41664
|
+
default: "1"
|
|
41665
|
+
}
|
|
41666
|
+
},
|
|
41652
41667
|
setup(__props) {
|
|
41668
|
+
const props = __props;
|
|
41653
41669
|
const options = ref([]);
|
|
41654
41670
|
const filterOption = (input, option) => {
|
|
41655
41671
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
41656
41672
|
};
|
|
41657
41673
|
const init2 = async () => {
|
|
41658
|
-
var _a;
|
|
41659
|
-
|
|
41660
|
-
|
|
41661
|
-
|
|
41662
|
-
|
|
41663
|
-
|
|
41664
|
-
|
|
41674
|
+
var _a, _b;
|
|
41675
|
+
if (props.urlType == "1") {
|
|
41676
|
+
const res = await getRoleListByUser$1({});
|
|
41677
|
+
if (res.code == 0) {
|
|
41678
|
+
options.value = (_a = res.result) == null ? void 0 : _a.map((item) => ({
|
|
41679
|
+
label: item.name,
|
|
41680
|
+
value: item.id
|
|
41681
|
+
}));
|
|
41682
|
+
}
|
|
41683
|
+
} else {
|
|
41684
|
+
const res = await getRoleListByUserAll({});
|
|
41685
|
+
if (res.code == 0) {
|
|
41686
|
+
options.value = (_b = res.result) == null ? void 0 : _b.map((item) => ({
|
|
41687
|
+
label: item.name,
|
|
41688
|
+
value: item.id
|
|
41689
|
+
}));
|
|
41690
|
+
}
|
|
41665
41691
|
}
|
|
41666
41692
|
};
|
|
41667
41693
|
onMounted(() => {
|
|
@@ -41845,10 +41871,6 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
41845
41871
|
roleId.value = val;
|
|
41846
41872
|
form.value.roleIdOthers = [];
|
|
41847
41873
|
};
|
|
41848
|
-
const normalizeMobile = (value = "") => value.replace(/\D/g, "").slice(0, 15);
|
|
41849
|
-
const handleMobileInput = (value) => {
|
|
41850
|
-
form.value.mobile = normalizeMobile(value);
|
|
41851
|
-
};
|
|
41852
41874
|
const handleUserCodeValidator = (rule, value) => {
|
|
41853
41875
|
if (!value) {
|
|
41854
41876
|
return Promise.reject(t2("uc_user.user_code_msg1"));
|
|
@@ -42036,6 +42058,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
42036
42058
|
const _component_a_row = Row;
|
|
42037
42059
|
const _component_a_checkbox = Checkbox;
|
|
42038
42060
|
const _component_a_select = Select;
|
|
42061
|
+
const _component_a_input_number = InputNumber;
|
|
42039
42062
|
const _component_a_form = Form;
|
|
42040
42063
|
const _component_a_button = Button$1;
|
|
42041
42064
|
const _component_a_space = Space;
|
|
@@ -42238,13 +42261,17 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
42238
42261
|
name: "mobile"
|
|
42239
42262
|
}, {
|
|
42240
42263
|
default: withCtx(() => [
|
|
42241
|
-
createVNode(
|
|
42264
|
+
createVNode(_component_a_input_number, {
|
|
42242
42265
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
42243
42266
|
value: form.value.mobile,
|
|
42267
|
+
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => form.value.mobile = $event),
|
|
42244
42268
|
disabled: props.params.opType == "2",
|
|
42245
42269
|
autocomplete: "off",
|
|
42246
42270
|
maxlength: 15,
|
|
42247
|
-
|
|
42271
|
+
controls: false,
|
|
42272
|
+
min: 0,
|
|
42273
|
+
precision: 0,
|
|
42274
|
+
style: { "width": "100%" }
|
|
42248
42275
|
}, null, 8, ["placeholder", "value", "disabled"])
|
|
42249
42276
|
]),
|
|
42250
42277
|
_: 1
|
|
@@ -42267,7 +42294,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
42267
42294
|
createVNode(_component_a_input, {
|
|
42268
42295
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
42269
42296
|
value: form.value.email,
|
|
42270
|
-
"onUpdate:value": _cache[
|
|
42297
|
+
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => form.value.email = $event),
|
|
42271
42298
|
disabled: props.params.opType == "2",
|
|
42272
42299
|
autocomplete: "off",
|
|
42273
42300
|
maxlength: 32
|
|
@@ -42293,7 +42320,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
42293
42320
|
createVNode(_component_a_input, {
|
|
42294
42321
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
42295
42322
|
value: form.value.remarks,
|
|
42296
|
-
"onUpdate:value": _cache[
|
|
42323
|
+
"onUpdate:value": _cache[8] || (_cache[8] = ($event) => form.value.remarks = $event),
|
|
42297
42324
|
autocomplete: "off",
|
|
42298
42325
|
maxlength: 200
|
|
42299
42326
|
}, null, 8, ["placeholder", "value"])
|
|
@@ -42815,7 +42842,6 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
42815
42842
|
id: record.id,
|
|
42816
42843
|
status: checked ? 0 : 1
|
|
42817
42844
|
});
|
|
42818
|
-
record.status = checked ? 0 : 1;
|
|
42819
42845
|
if (result) {
|
|
42820
42846
|
record.status = checked ? 0 : 1;
|
|
42821
42847
|
if (!checked) {
|
|
@@ -42983,7 +43009,8 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
42983
43009
|
default: withCtx(() => [
|
|
42984
43010
|
createVNode(RoleSelect, {
|
|
42985
43011
|
value: queryParam.value.roleId,
|
|
42986
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => queryParam.value.roleId = $event)
|
|
43012
|
+
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => queryParam.value.roleId = $event),
|
|
43013
|
+
urlType: "2"
|
|
42987
43014
|
}, null, 8, ["value"])
|
|
42988
43015
|
]),
|
|
42989
43016
|
_: 1
|
|
@@ -43252,10 +43279,6 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
43252
43279
|
pwd: "",
|
|
43253
43280
|
mobile: ""
|
|
43254
43281
|
});
|
|
43255
|
-
const normalizeMobile = (value = "") => value.replace(/\D/g, "").slice(0, 15);
|
|
43256
|
-
const handleMobileInput = (value) => {
|
|
43257
|
-
formState.mobile = normalizeMobile(value);
|
|
43258
|
-
};
|
|
43259
43282
|
const rules = computed(() => ({
|
|
43260
43283
|
pwd: [
|
|
43261
43284
|
{
|
|
@@ -43314,13 +43337,13 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
43314
43337
|
const _component_a_button = Button$1;
|
|
43315
43338
|
const _component_a_input_password = InputPassword;
|
|
43316
43339
|
const _component_a_form_item = FormItem;
|
|
43317
|
-
const
|
|
43340
|
+
const _component_a_input_number = InputNumber;
|
|
43318
43341
|
const _component_a_form = Form;
|
|
43319
43342
|
const _component_a_modal = Modal;
|
|
43320
43343
|
return openBlock(), createBlock(_component_a_modal, {
|
|
43321
43344
|
title: isBind.value ? _ctx.$t("uc_profile.bandMobile") : _ctx.$t("uc_profile.editMobile"),
|
|
43322
43345
|
open: visible.value,
|
|
43323
|
-
"onUpdate:open": _cache[
|
|
43346
|
+
"onUpdate:open": _cache[2] || (_cache[2] = ($event) => visible.value = $event),
|
|
43324
43347
|
destroyOnClose: true,
|
|
43325
43348
|
onCancel: handleClose
|
|
43326
43349
|
}, {
|
|
@@ -43370,12 +43393,16 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
43370
43393
|
name: "mobile"
|
|
43371
43394
|
}, {
|
|
43372
43395
|
default: withCtx(() => [
|
|
43373
|
-
createVNode(
|
|
43396
|
+
createVNode(_component_a_input_number, {
|
|
43374
43397
|
value: formState.mobile,
|
|
43398
|
+
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => formState.mobile = $event),
|
|
43375
43399
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
43376
43400
|
maxlength: 15,
|
|
43377
43401
|
autocomplete: "off",
|
|
43378
|
-
|
|
43402
|
+
controls: false,
|
|
43403
|
+
min: 0,
|
|
43404
|
+
precision: 0,
|
|
43405
|
+
style: { "width": "100%" }
|
|
43379
43406
|
}, null, 8, ["value", "placeholder"])
|
|
43380
43407
|
]),
|
|
43381
43408
|
_: 1
|
|
@@ -43599,7 +43626,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
43599
43626
|
default: withCtx(() => [
|
|
43600
43627
|
createVNode(_component_a_button, {
|
|
43601
43628
|
type: "primary",
|
|
43602
|
-
disabled: countdown.value
|
|
43629
|
+
disabled: countdown.value !== null && countdown.value > 0,
|
|
43603
43630
|
onClick: handleSendCode,
|
|
43604
43631
|
style: { "width": "100%" }
|
|
43605
43632
|
}, {
|
|
@@ -44697,15 +44724,30 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
44697
44724
|
};
|
|
44698
44725
|
return false;
|
|
44699
44726
|
};
|
|
44727
|
+
const getCroppedFile = () => new Promise((resolve, reject) => {
|
|
44728
|
+
var _a;
|
|
44729
|
+
(_a = cropperRef.value) == null ? void 0 : _a.getCropBlob((blob) => {
|
|
44730
|
+
var _a2;
|
|
44731
|
+
if (!blob) {
|
|
44732
|
+
return;
|
|
44733
|
+
}
|
|
44734
|
+
const originalName = ((_a2 = fileList.value[0]) == null ? void 0 : _a2.name) || "avatar.png";
|
|
44735
|
+
const croppedFile = new File([blob], originalName, {
|
|
44736
|
+
type: blob.type || "image/png"
|
|
44737
|
+
});
|
|
44738
|
+
resolve(croppedFile);
|
|
44739
|
+
});
|
|
44740
|
+
});
|
|
44700
44741
|
const handleFinish = async () => {
|
|
44701
|
-
if (!
|
|
44742
|
+
if (!cropperOptions.img) {
|
|
44702
44743
|
message.info(t2("uc_personal_center.tips5"));
|
|
44703
44744
|
return;
|
|
44704
44745
|
}
|
|
44705
44746
|
loading.value = true;
|
|
44706
44747
|
try {
|
|
44748
|
+
const croppedFile = await getCroppedFile();
|
|
44707
44749
|
const formData = new FormData();
|
|
44708
|
-
formData.append("fileName",
|
|
44750
|
+
formData.append("fileName", croppedFile);
|
|
44709
44751
|
const res = await userInfoUpdateHead(formData);
|
|
44710
44752
|
if (res.code === 0) {
|
|
44711
44753
|
message.success(t2("uc_personal_center.tips1"));
|
|
@@ -44714,6 +44756,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
44714
44756
|
} else {
|
|
44715
44757
|
message.error(t2("uc_personal_center.tips2"));
|
|
44716
44758
|
}
|
|
44759
|
+
} catch {
|
|
44760
|
+
message.error(t2("uc_personal_center.tips2"));
|
|
44717
44761
|
} finally {
|
|
44718
44762
|
loading.value = false;
|
|
44719
44763
|
}
|
|
@@ -45556,11 +45600,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
45556
45600
|
default: withCtx(() => [
|
|
45557
45601
|
createVNode(_component_a_form_item, mergeProps(formItemLayout, {
|
|
45558
45602
|
style: { "margin-bottom": "0" },
|
|
45559
|
-
name: "userPwd"
|
|
45603
|
+
name: "userPwd",
|
|
45604
|
+
label: _ctx.$t("uc_org.orgNewPwd")
|
|
45560
45605
|
}), {
|
|
45561
|
-
label: withCtx(() => [
|
|
45562
|
-
createTextVNode(toDisplayString(_ctx.$t("uc_org.orgNewPwd")), 1)
|
|
45563
|
-
]),
|
|
45564
45606
|
default: withCtx(() => [
|
|
45565
45607
|
createVNode(_component_a_input, {
|
|
45566
45608
|
type: "password",
|
|
@@ -45571,7 +45613,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
45571
45613
|
}, null, 8, ["placeholder", "value"])
|
|
45572
45614
|
]),
|
|
45573
45615
|
_: 1
|
|
45574
|
-
}, 16),
|
|
45616
|
+
}, 16, ["label"]),
|
|
45575
45617
|
createElementVNode("div", _hoisted_2$3, toDisplayString(unref(passwordStrengthTip)), 1),
|
|
45576
45618
|
createVNode(_component_a_form_item, mergeProps({
|
|
45577
45619
|
label: _ctx.$t("uc_org.newPwd1")
|
|
@@ -45789,10 +45831,6 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
45789
45831
|
}
|
|
45790
45832
|
return "";
|
|
45791
45833
|
});
|
|
45792
|
-
const normalizeMobile = (value = "") => value.replace(/\D/g, "").slice(0, 15);
|
|
45793
|
-
const handlePhoneInput = (value) => {
|
|
45794
|
-
form.userMobile = normalizeMobile(value);
|
|
45795
|
-
};
|
|
45796
45834
|
const initData = () => {
|
|
45797
45835
|
Object.assign(form, {
|
|
45798
45836
|
organType: props.params.organType,
|
|
@@ -45836,7 +45874,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
45836
45874
|
emit("cancel");
|
|
45837
45875
|
};
|
|
45838
45876
|
const onSubmit = () => {
|
|
45839
|
-
formRef.value && formRef.value.validate().then(
|
|
45877
|
+
formRef.value && formRef.value.validate().then(() => {
|
|
45840
45878
|
var _a;
|
|
45841
45879
|
const paramsData = {
|
|
45842
45880
|
id: props.params.opType == "1" ? void 0 : (_a = props.params) == null ? void 0 : _a.id,
|
|
@@ -45854,15 +45892,21 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
45854
45892
|
};
|
|
45855
45893
|
loading.value = true;
|
|
45856
45894
|
if (props.params.opType == "1") {
|
|
45857
|
-
|
|
45858
|
-
|
|
45895
|
+
orgInsert(paramsData).then((res) => {
|
|
45896
|
+
if (res.code == 0) {
|
|
45897
|
+
emit("ok", res.result);
|
|
45898
|
+
}
|
|
45899
|
+
}).finally(() => {
|
|
45859
45900
|
loading.value = false;
|
|
45860
|
-
|
|
45861
|
-
}
|
|
45901
|
+
});
|
|
45862
45902
|
} else if (props.params.opType == "2") {
|
|
45863
|
-
|
|
45864
|
-
|
|
45865
|
-
|
|
45903
|
+
orgUpdate(paramsData).then((res) => {
|
|
45904
|
+
if (res.code == 0) {
|
|
45905
|
+
emit("ok", res.result);
|
|
45906
|
+
}
|
|
45907
|
+
}).finally(() => {
|
|
45908
|
+
loading.value = false;
|
|
45909
|
+
});
|
|
45866
45910
|
}
|
|
45867
45911
|
});
|
|
45868
45912
|
};
|
|
@@ -46210,13 +46254,17 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
46210
46254
|
name: "userMobile"
|
|
46211
46255
|
}, {
|
|
46212
46256
|
default: withCtx(() => [
|
|
46213
|
-
createVNode(
|
|
46257
|
+
createVNode(_component_a_input_number, {
|
|
46214
46258
|
disabled: isEdit.value,
|
|
46215
46259
|
autocomplete: "off",
|
|
46216
46260
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
46217
46261
|
value: form.userMobile,
|
|
46262
|
+
"onUpdate:value": _cache[10] || (_cache[10] = ($event) => form.userMobile = $event),
|
|
46218
46263
|
maxlength: 15,
|
|
46219
|
-
|
|
46264
|
+
controls: false,
|
|
46265
|
+
min: 0,
|
|
46266
|
+
precision: 0,
|
|
46267
|
+
style: { "width": "100%" }
|
|
46220
46268
|
}, null, 8, ["disabled", "placeholder", "value"])
|
|
46221
46269
|
]),
|
|
46222
46270
|
_: 1
|
|
@@ -46241,7 +46289,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
46241
46289
|
autocomplete: "off",
|
|
46242
46290
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
46243
46291
|
value: form.userEmail,
|
|
46244
|
-
"onUpdate:value": _cache[
|
|
46292
|
+
"onUpdate:value": _cache[11] || (_cache[11] = ($event) => form.userEmail = $event),
|
|
46245
46293
|
maxlength: 32
|
|
46246
46294
|
}, null, 8, ["disabled", "placeholder", "value"])
|
|
46247
46295
|
]),
|
|
@@ -46271,7 +46319,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
46271
46319
|
disabled: isEdit.value,
|
|
46272
46320
|
autocomplete: "off",
|
|
46273
46321
|
value: form.userCode,
|
|
46274
|
-
"onUpdate:value": _cache[
|
|
46322
|
+
"onUpdate:value": _cache[12] || (_cache[12] = ($event) => form.userCode = $event)
|
|
46275
46323
|
}, null, 8, ["placeholder", "disabled", "value"])
|
|
46276
46324
|
]),
|
|
46277
46325
|
_: 1
|