@witlink/usercenter 1.2.82 → 1.2.84
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.2404021a.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);
|
|
@@ -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, Checkbox, Cascader, Select, Avatar, Tag, InputNumber, Switch, SelectOption, Radio, RadioGroup, InputSearch, DatePicker } from "ant-design-vue/es";
|
|
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, InputNumber, 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";
|
|
@@ -39193,8 +39193,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
39193
39193
|
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => formState.refCodeSuffix = $event),
|
|
39194
39194
|
placeholder: _ctx.$t("uc_common.plsEnter"),
|
|
39195
39195
|
maxlength: 4,
|
|
39196
|
-
autocomplete: "off"
|
|
39197
|
-
|
|
39196
|
+
autocomplete: "off",
|
|
39197
|
+
disabled: form.type == "0"
|
|
39198
|
+
}, null, 8, ["value", "placeholder", "disabled"])
|
|
39198
39199
|
]),
|
|
39199
39200
|
_: 1
|
|
39200
39201
|
})) : (openBlock(), createBlock(_component_a_input, {
|
|
@@ -40627,26 +40628,34 @@ const _hoisted_13$2 = {
|
|
|
40627
40628
|
key: 2,
|
|
40628
40629
|
class: "permission-layout"
|
|
40629
40630
|
};
|
|
40630
|
-
const _hoisted_14$2 = {
|
|
40631
|
-
|
|
40632
|
-
|
|
40633
|
-
|
|
40634
|
-
const
|
|
40635
|
-
const
|
|
40636
|
-
const
|
|
40637
|
-
const
|
|
40638
|
-
const
|
|
40639
|
-
const
|
|
40631
|
+
const _hoisted_14$2 = {
|
|
40632
|
+
key: 0,
|
|
40633
|
+
class: "permission-loading-mask"
|
|
40634
|
+
};
|
|
40635
|
+
const _hoisted_15$2 = { class: "layout-left" };
|
|
40636
|
+
const _hoisted_16$2 = { class: "category-nav" };
|
|
40637
|
+
const _hoisted_17$2 = ["onClick"];
|
|
40638
|
+
const _hoisted_18$2 = { class: "layout-right" };
|
|
40639
|
+
const _hoisted_19$2 = { class: "permission-header" };
|
|
40640
|
+
const _hoisted_20$2 = { class: "perm-menu-col" };
|
|
40641
|
+
const _hoisted_21$2 = { class: "perm-btn-col" };
|
|
40642
|
+
const _hoisted_22$2 = { class: "permission-body" };
|
|
40643
|
+
const _hoisted_23$2 = ["id"];
|
|
40644
|
+
const _hoisted_24$2 = {
|
|
40640
40645
|
key: 0,
|
|
40641
40646
|
class: "permission-row"
|
|
40642
40647
|
};
|
|
40643
|
-
const
|
|
40644
|
-
const
|
|
40645
|
-
const
|
|
40646
|
-
const
|
|
40647
|
-
const
|
|
40648
|
-
const
|
|
40649
|
-
const
|
|
40648
|
+
const _hoisted_25$2 = { class: "perm-menu-col perm-menu-col--directory" };
|
|
40649
|
+
const _hoisted_26$2 = { class: "perm-btn-col" };
|
|
40650
|
+
const _hoisted_27$2 = { class: "permission-row" };
|
|
40651
|
+
const _hoisted_28$2 = { class: "perm-menu-col perm-menu-col--directory" };
|
|
40652
|
+
const _hoisted_29$2 = { class: "perm-menu-col perm-menu-col--page" };
|
|
40653
|
+
const _hoisted_30$2 = { class: "perm-btn-col" };
|
|
40654
|
+
const _hoisted_31$2 = {
|
|
40655
|
+
key: 2,
|
|
40656
|
+
class: "permission-loading-placeholder"
|
|
40657
|
+
};
|
|
40658
|
+
const _hoisted_32$1 = {
|
|
40650
40659
|
key: 3,
|
|
40651
40660
|
class: "no-auth-permission"
|
|
40652
40661
|
};
|
|
@@ -40734,35 +40743,38 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
40734
40743
|
const handleAddRole = async () => {
|
|
40735
40744
|
showTable.value = false;
|
|
40736
40745
|
isCreate.value = true;
|
|
40746
|
+
resetPermissionPanelState(true);
|
|
40737
40747
|
formState.value = {
|
|
40738
40748
|
name: null,
|
|
40739
40749
|
remarks: ""
|
|
40740
40750
|
};
|
|
40741
40751
|
await getCurrentSysAuth();
|
|
40742
|
-
initAuth();
|
|
40752
|
+
await initAuth();
|
|
40743
40753
|
};
|
|
40744
40754
|
const handleEdit = async (record) => {
|
|
40745
40755
|
showTable.value = false;
|
|
40746
40756
|
isCreate.value = false;
|
|
40757
|
+
resetPermissionPanelState(true);
|
|
40747
40758
|
formState.value = {
|
|
40748
40759
|
name: record.name,
|
|
40749
40760
|
remarks: record.remarks || ""
|
|
40750
40761
|
};
|
|
40751
40762
|
currentRow.value = record;
|
|
40752
40763
|
await getCurrentSysAuth();
|
|
40753
|
-
initAuth();
|
|
40764
|
+
await initAuth();
|
|
40754
40765
|
};
|
|
40755
40766
|
const handleDetail = async (record) => {
|
|
40756
40767
|
showTable.value = false;
|
|
40757
40768
|
isDetail.value = true;
|
|
40758
40769
|
isCreate.value = false;
|
|
40770
|
+
resetPermissionPanelState(true);
|
|
40759
40771
|
formState.value = {
|
|
40760
40772
|
name: record.name,
|
|
40761
40773
|
remarks: record.remarks || "-"
|
|
40762
40774
|
};
|
|
40763
40775
|
currentRow.value = record;
|
|
40764
40776
|
await handleSysMenuDetail(record);
|
|
40765
|
-
initAuth();
|
|
40777
|
+
await initAuth();
|
|
40766
40778
|
};
|
|
40767
40779
|
const handleSwitch = async (checked, record) => {
|
|
40768
40780
|
if (!checked) {
|
|
@@ -40827,6 +40839,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
40827
40839
|
currentRow.value = {};
|
|
40828
40840
|
sysMenuAuthMap.value = {};
|
|
40829
40841
|
sysMenuParentMap.value = {};
|
|
40842
|
+
resetPermissionPanelState();
|
|
40830
40843
|
formState.value = {
|
|
40831
40844
|
name: null,
|
|
40832
40845
|
remarks: ""
|
|
@@ -40905,9 +40918,30 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
40905
40918
|
const menuAuthList = ref([]);
|
|
40906
40919
|
const menuModules = ref([]);
|
|
40907
40920
|
const menuTreeRef = ref(null);
|
|
40921
|
+
const permissionLoading = ref(false);
|
|
40908
40922
|
const allPermissionsSelected = ref(false);
|
|
40909
40923
|
const isIndeterminate = ref(false);
|
|
40910
40924
|
const activeCategoryId = ref("");
|
|
40925
|
+
const showPermissionLayout = computed(
|
|
40926
|
+
() => permissionLoading.value || menuModules.value.length > 0
|
|
40927
|
+
);
|
|
40928
|
+
let permissionRequestId = 0;
|
|
40929
|
+
const resetPermissionPanelState = (keepLoading = false) => {
|
|
40930
|
+
permissionRequestId += 1;
|
|
40931
|
+
permissionLoading.value = keepLoading;
|
|
40932
|
+
parentMenuList.value = [];
|
|
40933
|
+
menuAuthList.value = [];
|
|
40934
|
+
menuModules.value = [];
|
|
40935
|
+
activeCategoryId.value = "";
|
|
40936
|
+
allPermissionsSelected.value = false;
|
|
40937
|
+
isIndeterminate.value = false;
|
|
40938
|
+
};
|
|
40939
|
+
const setCurrentParentMenuList = (sysId, sourceData = []) => {
|
|
40940
|
+
var _a;
|
|
40941
|
+
parentMenuList.value = sourceData || [];
|
|
40942
|
+
sysMenuParentMap.value[sysId] = parentMenuList.value;
|
|
40943
|
+
activeCategoryId.value = ((_a = parentMenuList.value[0]) == null ? void 0 : _a.id) || "";
|
|
40944
|
+
};
|
|
40911
40945
|
const updateGlobalPermissionState = () => {
|
|
40912
40946
|
const totalModules = menuModules.value.length;
|
|
40913
40947
|
let selectedModules = 0;
|
|
@@ -41067,33 +41101,6 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
41067
41101
|
sysMenuAuthMap.value[sysId] = tempData;
|
|
41068
41102
|
updateGlobalPermissionState();
|
|
41069
41103
|
};
|
|
41070
|
-
const getCurrentMenuAuthList = async (sysId, isC = false) => {
|
|
41071
|
-
if (sysMenuAuthMap.value[sysId]) {
|
|
41072
|
-
menuModules.value = sysMenuAuthMap.value[sysId];
|
|
41073
|
-
updateGlobalPermissionState();
|
|
41074
|
-
return;
|
|
41075
|
-
}
|
|
41076
|
-
const { result } = await getMenuAuthList({
|
|
41077
|
-
systemId: sysId,
|
|
41078
|
-
roleId: isC ? void 0 : currentRow.value.id
|
|
41079
|
-
});
|
|
41080
|
-
menuAuthList.value = result || [];
|
|
41081
|
-
initCurrentMenuAuth(menuAuthList.value, sysId);
|
|
41082
|
-
};
|
|
41083
|
-
const getCurrentSysMenuList = async (sysId) => {
|
|
41084
|
-
var _a, _b;
|
|
41085
|
-
if (sysMenuParentMap.value[sysId]) {
|
|
41086
|
-
parentMenuList.value = sysMenuParentMap.value[sysId];
|
|
41087
|
-
activeCategoryId.value = ((_a = parentMenuList.value[0]) == null ? void 0 : _a.id) || "";
|
|
41088
|
-
return;
|
|
41089
|
-
}
|
|
41090
|
-
const { result } = await getMenuParentList({
|
|
41091
|
-
systemId: sysId
|
|
41092
|
-
});
|
|
41093
|
-
parentMenuList.value = result || [];
|
|
41094
|
-
sysMenuParentMap.value[sysId] = parentMenuList.value;
|
|
41095
|
-
activeCategoryId.value = ((_b = parentMenuList.value[0]) == null ? void 0 : _b.id) || "";
|
|
41096
|
-
};
|
|
41097
41104
|
async function getCurrentSysAuth() {
|
|
41098
41105
|
var _a;
|
|
41099
41106
|
const { result } = await getAuthList({});
|
|
@@ -41105,29 +41112,90 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
41105
41112
|
activeAuthId.value = ((_a = tabList.value[0]) == null ? void 0 : _a.systemId) || "";
|
|
41106
41113
|
return activeAuthId.value;
|
|
41107
41114
|
}
|
|
41108
|
-
const
|
|
41109
|
-
|
|
41110
|
-
if (
|
|
41111
|
-
|
|
41112
|
-
} else {
|
|
41113
|
-
getCurrentSysMenuList(item.systemId);
|
|
41115
|
+
const fetchPermissionParentMenu = async (sysId) => {
|
|
41116
|
+
const cachedParentMenu = sysMenuParentMap.value[sysId];
|
|
41117
|
+
if (cachedParentMenu) {
|
|
41118
|
+
return cachedParentMenu;
|
|
41114
41119
|
}
|
|
41115
41120
|
if (isDetail.value) {
|
|
41116
|
-
|
|
41117
|
-
|
|
41118
|
-
|
|
41119
|
-
|
|
41120
|
-
|
|
41121
|
+
const { result: result2 } = await getMenuParentDetialList({
|
|
41122
|
+
systemId: sysId,
|
|
41123
|
+
roleId: currentRow.value.id
|
|
41124
|
+
});
|
|
41125
|
+
return result2 || [];
|
|
41121
41126
|
}
|
|
41127
|
+
const { result } = await getMenuParentList({
|
|
41128
|
+
systemId: sysId
|
|
41129
|
+
});
|
|
41130
|
+
return result || [];
|
|
41122
41131
|
};
|
|
41123
|
-
async
|
|
41124
|
-
const
|
|
41132
|
+
const fetchPermissionMenuAuth = async (sysId) => {
|
|
41133
|
+
const cachedMenuAuth = sysMenuAuthMap.value[sysId];
|
|
41134
|
+
if (cachedMenuAuth) {
|
|
41135
|
+
return cachedMenuAuth;
|
|
41136
|
+
}
|
|
41137
|
+
if (isDetail.value) {
|
|
41138
|
+
const { result: result2 } = await getMenuAuthDetailList({
|
|
41139
|
+
systemId: sysId,
|
|
41140
|
+
roleId: currentRow.value.id
|
|
41141
|
+
});
|
|
41142
|
+
return result2 || [];
|
|
41143
|
+
}
|
|
41144
|
+
const { result } = await getMenuAuthList({
|
|
41125
41145
|
systemId: sysId,
|
|
41126
|
-
roleId: currentRow.value.id
|
|
41146
|
+
roleId: isCreate.value ? void 0 : currentRow.value.id
|
|
41127
41147
|
});
|
|
41128
|
-
|
|
41129
|
-
|
|
41130
|
-
|
|
41148
|
+
return result || [];
|
|
41149
|
+
};
|
|
41150
|
+
const loadPermissionPanel = async (sysId) => {
|
|
41151
|
+
if (!sysId) {
|
|
41152
|
+
resetPermissionPanelState();
|
|
41153
|
+
return;
|
|
41154
|
+
}
|
|
41155
|
+
const currentRequestId = ++permissionRequestId;
|
|
41156
|
+
const cachedParentMenu = sysMenuParentMap.value[sysId];
|
|
41157
|
+
const cachedMenuAuth = sysMenuAuthMap.value[sysId];
|
|
41158
|
+
if (cachedParentMenu) {
|
|
41159
|
+
setCurrentParentMenuList(sysId, cachedParentMenu);
|
|
41160
|
+
} else {
|
|
41161
|
+
parentMenuList.value = [];
|
|
41162
|
+
activeCategoryId.value = "";
|
|
41163
|
+
}
|
|
41164
|
+
if (cachedMenuAuth) {
|
|
41165
|
+
menuModules.value = cachedMenuAuth;
|
|
41166
|
+
updateGlobalPermissionState();
|
|
41167
|
+
} else {
|
|
41168
|
+
menuAuthList.value = [];
|
|
41169
|
+
menuModules.value = [];
|
|
41170
|
+
allPermissionsSelected.value = false;
|
|
41171
|
+
isIndeterminate.value = false;
|
|
41172
|
+
}
|
|
41173
|
+
if (cachedParentMenu && cachedMenuAuth) {
|
|
41174
|
+
permissionLoading.value = false;
|
|
41175
|
+
return;
|
|
41176
|
+
}
|
|
41177
|
+
permissionLoading.value = true;
|
|
41178
|
+
try {
|
|
41179
|
+
const [parentList, authList] = await Promise.all([
|
|
41180
|
+
fetchPermissionParentMenu(sysId),
|
|
41181
|
+
fetchPermissionMenuAuth(sysId)
|
|
41182
|
+
]);
|
|
41183
|
+
if (currentRequestId !== permissionRequestId) {
|
|
41184
|
+
return;
|
|
41185
|
+
}
|
|
41186
|
+
setCurrentParentMenuList(sysId, parentList || []);
|
|
41187
|
+
menuAuthList.value = authList || [];
|
|
41188
|
+
initCurrentMenuAuth(menuAuthList.value, sysId);
|
|
41189
|
+
} finally {
|
|
41190
|
+
if (currentRequestId === permissionRequestId) {
|
|
41191
|
+
permissionLoading.value = false;
|
|
41192
|
+
}
|
|
41193
|
+
}
|
|
41194
|
+
};
|
|
41195
|
+
const handleTabClick = async (item) => {
|
|
41196
|
+
activeAuthId.value = item.systemId;
|
|
41197
|
+
await loadPermissionPanel(item.systemId);
|
|
41198
|
+
};
|
|
41131
41199
|
async function handleSysMenuDetail(row) {
|
|
41132
41200
|
var _a;
|
|
41133
41201
|
const { result } = await getAuthDetailList({
|
|
@@ -41146,35 +41214,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
41146
41214
|
return activeAuthId.value;
|
|
41147
41215
|
}
|
|
41148
41216
|
}
|
|
41149
|
-
async function handleCurrentSysMenuDetailList(sysId) {
|
|
41150
|
-
var _a;
|
|
41151
|
-
const { result } = await getMenuParentDetialList({
|
|
41152
|
-
systemId: sysId,
|
|
41153
|
-
roleId: currentRow.value.id
|
|
41154
|
-
});
|
|
41155
|
-
parentMenuList.value = result || [];
|
|
41156
|
-
sysMenuParentMap.value[sysId] = parentMenuList.value;
|
|
41157
|
-
activeCategoryId.value = ((_a = parentMenuList.value[0]) == null ? void 0 : _a.id) || "";
|
|
41158
|
-
}
|
|
41159
41217
|
async function initAuth() {
|
|
41160
41218
|
if (!activeAuthId.value) {
|
|
41161
41219
|
sysMenuAuthMap.value = {};
|
|
41162
41220
|
sysMenuParentMap.value = {};
|
|
41163
|
-
|
|
41221
|
+
resetPermissionPanelState();
|
|
41164
41222
|
return;
|
|
41165
41223
|
}
|
|
41166
|
-
|
|
41167
|
-
handleCurrentSysMenuDetailList(activeAuthId.value);
|
|
41168
|
-
} else {
|
|
41169
|
-
getCurrentSysMenuList(activeAuthId.value);
|
|
41170
|
-
}
|
|
41171
|
-
if (isDetail.value) {
|
|
41172
|
-
handleMenuAuthDetail(activeAuthId.value);
|
|
41173
|
-
} else if (isCreate.value) {
|
|
41174
|
-
getCurrentMenuAuthList(activeAuthId.value, true);
|
|
41175
|
-
} else {
|
|
41176
|
-
getCurrentMenuAuthList(activeAuthId.value);
|
|
41177
|
-
}
|
|
41224
|
+
await loadPermissionPanel(activeAuthId.value);
|
|
41178
41225
|
}
|
|
41179
41226
|
watch(
|
|
41180
41227
|
() => userStore.userLanguage,
|
|
@@ -41185,6 +41232,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
41185
41232
|
currentRow.value = {};
|
|
41186
41233
|
sysMenuAuthMap.value = {};
|
|
41187
41234
|
sysMenuParentMap.value = {};
|
|
41235
|
+
resetPermissionPanelState();
|
|
41188
41236
|
showTable.value = true;
|
|
41189
41237
|
formState.value = {
|
|
41190
41238
|
name: null,
|
|
@@ -41207,6 +41255,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
41207
41255
|
const _component_uc_btn_edit = resolveComponent("uc-btn-edit");
|
|
41208
41256
|
const _component_a_col = Col;
|
|
41209
41257
|
const _component_a_row = Row;
|
|
41258
|
+
const _component_a_spin = Spin;
|
|
41210
41259
|
const _component_a_checkbox = Checkbox;
|
|
41211
41260
|
const _component_a_config_provider = ConfigProvider$1;
|
|
41212
41261
|
return openBlock(), createBlock(_component_a_config_provider, {
|
|
@@ -41433,98 +41482,61 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
41433
41482
|
}), 128))
|
|
41434
41483
|
])) : createCommentVNode("v-if", true),
|
|
41435
41484
|
unref(systemId) !== 1 ? (openBlock(), createElementBlock("div", _hoisted_12$2, toDisplayString(_ctx.$t("uc_role.permission_config")), 1)) : createCommentVNode("v-if", true),
|
|
41436
|
-
|
|
41437
|
-
|
|
41438
|
-
|
|
41485
|
+
showPermissionLayout.value ? (openBlock(), createElementBlock("div", _hoisted_13$2, [
|
|
41486
|
+
permissionLoading.value ? (openBlock(), createElementBlock("div", _hoisted_14$2, [
|
|
41487
|
+
createVNode(_component_a_spin)
|
|
41488
|
+
])) : createCommentVNode("v-if", true),
|
|
41489
|
+
menuModules.value.length ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
41439
41490
|
createElementVNode("div", _hoisted_15$2, [
|
|
41440
|
-
(
|
|
41441
|
-
|
|
41442
|
-
|
|
41443
|
-
|
|
41444
|
-
|
|
41445
|
-
|
|
41446
|
-
|
|
41447
|
-
|
|
41448
|
-
|
|
41449
|
-
|
|
41450
|
-
|
|
41491
|
+
createCommentVNode(" \u5DE6\u4FA7\u5206\u7C7B\u5BFC\u822A "),
|
|
41492
|
+
createElementVNode("div", _hoisted_16$2, [
|
|
41493
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(parentMenuList.value, (item) => {
|
|
41494
|
+
return openBlock(), createElementBlock("div", {
|
|
41495
|
+
class: normalizeClass(["category-item", { active: item.id === activeCategoryId.value }]),
|
|
41496
|
+
key: item.id,
|
|
41497
|
+
onClick: ($event) => handleCategoryClick(item)
|
|
41498
|
+
}, toDisplayString(item.name), 11, _hoisted_17$2);
|
|
41499
|
+
}), 128))
|
|
41500
|
+
])
|
|
41501
|
+
]),
|
|
41451
41502
|
createElementVNode("div", _hoisted_18$2, [
|
|
41503
|
+
createCommentVNode(" \u9876\u90E8\u8868\u5934\u884C "),
|
|
41452
41504
|
createElementVNode("div", _hoisted_19$2, [
|
|
41453
|
-
|
|
41454
|
-
|
|
41455
|
-
|
|
41456
|
-
|
|
41457
|
-
|
|
41458
|
-
|
|
41459
|
-
|
|
41460
|
-
|
|
41461
|
-
|
|
41462
|
-
|
|
41463
|
-
|
|
41464
|
-
|
|
41505
|
+
createElementVNode("div", _hoisted_20$2, [
|
|
41506
|
+
createVNode(_component_a_checkbox, {
|
|
41507
|
+
checked: allPermissionsSelected.value,
|
|
41508
|
+
"onUpdate:checked": _cache[5] || (_cache[5] = ($event) => allPermissionsSelected.value = $event),
|
|
41509
|
+
indeterminate: isIndeterminate.value,
|
|
41510
|
+
onChange: handleGlobalPermissionChange,
|
|
41511
|
+
disabled: isDetail.value
|
|
41512
|
+
}, {
|
|
41513
|
+
default: withCtx(() => [
|
|
41514
|
+
createTextVNode(toDisplayString(_ctx.$t("uc_role.menu_permission")), 1)
|
|
41515
|
+
]),
|
|
41516
|
+
_: 1
|
|
41517
|
+
}, 8, ["checked", "indeterminate", "disabled"])
|
|
41518
|
+
]),
|
|
41519
|
+
createElementVNode("div", _hoisted_21$2, [
|
|
41520
|
+
createElementVNode("span", null, toDisplayString(_ctx.$t("uc_role.button_permission")), 1)
|
|
41521
|
+
])
|
|
41465
41522
|
]),
|
|
41466
|
-
|
|
41467
|
-
|
|
41468
|
-
|
|
41469
|
-
|
|
41470
|
-
|
|
41471
|
-
|
|
41472
|
-
|
|
41473
|
-
|
|
41474
|
-
|
|
41475
|
-
|
|
41476
|
-
|
|
41477
|
-
|
|
41478
|
-
|
|
41479
|
-
|
|
41480
|
-
|
|
41481
|
-
|
|
41482
|
-
|
|
41483
|
-
}, [
|
|
41484
|
-
createCommentVNode(" type=1 \u9876\u7EA7\u9875\u9762\uFF1A\u4E00\u884C\uFF0C\u5DE6\u4FA7checkbox + \u53F3\u4FA7\u6309\u94AE "),
|
|
41485
|
-
directory.type === 1 ? (openBlock(), createElementBlock("div", _hoisted_23$2, [
|
|
41486
|
-
createElementVNode("div", _hoisted_24$2, [
|
|
41487
|
-
createVNode(_component_a_checkbox, {
|
|
41488
|
-
checked: directory.selected,
|
|
41489
|
-
"onUpdate:checked": ($event) => directory.selected = $event,
|
|
41490
|
-
indeterminate: directory.indeterminate,
|
|
41491
|
-
onChange: (e) => handleDirectoryChange(directory, e),
|
|
41492
|
-
disabled: isDetail.value
|
|
41493
|
-
}, {
|
|
41494
|
-
default: withCtx(() => [
|
|
41495
|
-
createTextVNode(toDisplayString(directory.name), 1)
|
|
41496
|
-
]),
|
|
41497
|
-
_: 2
|
|
41498
|
-
}, 1032, ["checked", "onUpdate:checked", "indeterminate", "onChange", "disabled"])
|
|
41499
|
-
]),
|
|
41500
|
-
createElementVNode("div", _hoisted_25$2, [
|
|
41501
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(directory.actionList, (button) => {
|
|
41502
|
-
return openBlock(), createElementBlock("div", {
|
|
41503
|
-
key: button.btnId,
|
|
41504
|
-
class: "button-item"
|
|
41505
|
-
}, [
|
|
41506
|
-
createVNode(_component_a_checkbox, {
|
|
41507
|
-
checked: button.checked,
|
|
41508
|
-
"onUpdate:checked": ($event) => button.checked = $event,
|
|
41509
|
-
onChange: () => handleButtonChange(
|
|
41510
|
-
directory,
|
|
41511
|
-
directory
|
|
41512
|
-
),
|
|
41513
|
-
disabled: isDetail.value
|
|
41514
|
-
}, {
|
|
41515
|
-
default: withCtx(() => [
|
|
41516
|
-
createTextVNode(toDisplayString(button.name), 1)
|
|
41517
|
-
]),
|
|
41518
|
-
_: 2
|
|
41519
|
-
}, 1032, ["checked", "onUpdate:checked", "onChange", "disabled"])
|
|
41520
|
-
]);
|
|
41521
|
-
}), 128))
|
|
41522
|
-
])
|
|
41523
|
-
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
41524
|
-
createCommentVNode(" type=0 \u76EE\u5F55\uFF1A\u76EE\u5F55\u6807\u9898\u884C\uFF08\u65E0\u6309\u94AE\uFF09+ \u6BCF\u4E2A\u5B50\u9875\u9762\u4E00\u884C "),
|
|
41525
|
-
createCommentVNode(" \u76EE\u5F55\u6807\u9898\u884C "),
|
|
41526
|
-
createElementVNode("div", _hoisted_26$2, [
|
|
41527
|
-
createElementVNode("div", _hoisted_27$2, [
|
|
41523
|
+
createCommentVNode(" \u5185\u5BB9\u533A\uFF1A\u6743\u9650\u884C\u5217\u8868 "),
|
|
41524
|
+
createElementVNode("div", _hoisted_22$2, [
|
|
41525
|
+
createCommentVNode(" \u6743\u9650\u884C\u5217\u8868 "),
|
|
41526
|
+
createElementVNode("div", {
|
|
41527
|
+
class: "permission-rows",
|
|
41528
|
+
ref_key: "menuTreeRef",
|
|
41529
|
+
ref: menuTreeRef
|
|
41530
|
+
}, [
|
|
41531
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(menuModules.value, (directory) => {
|
|
41532
|
+
return openBlock(), createElementBlock("div", {
|
|
41533
|
+
key: directory.id,
|
|
41534
|
+
class: "directory-block",
|
|
41535
|
+
id: `category-${directory.id}`
|
|
41536
|
+
}, [
|
|
41537
|
+
createCommentVNode(" type=1 \u9876\u7EA7\u9875\u9762\uFF1A\u4E00\u884C\uFF0C\u5DE6\u4FA7checkbox + \u53F3\u4FA7\u6309\u94AE "),
|
|
41538
|
+
directory.type === 1 ? (openBlock(), createElementBlock("div", _hoisted_24$2, [
|
|
41539
|
+
createElementVNode("div", _hoisted_25$2, [
|
|
41528
41540
|
createVNode(_component_a_checkbox, {
|
|
41529
41541
|
checked: directory.selected,
|
|
41530
41542
|
"onUpdate:checked": ($event) => directory.selected = $event,
|
|
@@ -41538,57 +41550,99 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
41538
41550
|
_: 2
|
|
41539
41551
|
}, 1032, ["checked", "onUpdate:checked", "indeterminate", "onChange", "disabled"])
|
|
41540
41552
|
]),
|
|
41541
|
-
|
|
41542
|
-
|
|
41543
|
-
|
|
41544
|
-
|
|
41545
|
-
|
|
41546
|
-
|
|
41547
|
-
|
|
41548
|
-
|
|
41553
|
+
createElementVNode("div", _hoisted_26$2, [
|
|
41554
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(directory.actionList, (button) => {
|
|
41555
|
+
return openBlock(), createElementBlock("div", {
|
|
41556
|
+
key: button.btnId,
|
|
41557
|
+
class: "button-item"
|
|
41558
|
+
}, [
|
|
41559
|
+
createVNode(_component_a_checkbox, {
|
|
41560
|
+
checked: button.checked,
|
|
41561
|
+
"onUpdate:checked": ($event) => button.checked = $event,
|
|
41562
|
+
onChange: () => handleButtonChange(
|
|
41563
|
+
directory,
|
|
41564
|
+
directory
|
|
41565
|
+
),
|
|
41566
|
+
disabled: isDetail.value
|
|
41567
|
+
}, {
|
|
41568
|
+
default: withCtx(() => [
|
|
41569
|
+
createTextVNode(toDisplayString(button.name), 1)
|
|
41570
|
+
]),
|
|
41571
|
+
_: 2
|
|
41572
|
+
}, 1032, ["checked", "onUpdate:checked", "onChange", "disabled"])
|
|
41573
|
+
]);
|
|
41574
|
+
}), 128))
|
|
41575
|
+
])
|
|
41576
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
41577
|
+
createCommentVNode(" type=0 \u76EE\u5F55\uFF1A\u76EE\u5F55\u6807\u9898\u884C\uFF08\u65E0\u6309\u94AE\uFF09+ \u6BCF\u4E2A\u5B50\u9875\u9762\u4E00\u884C "),
|
|
41578
|
+
createCommentVNode(" \u76EE\u5F55\u6807\u9898\u884C "),
|
|
41579
|
+
createElementVNode("div", _hoisted_27$2, [
|
|
41549
41580
|
createElementVNode("div", _hoisted_28$2, [
|
|
41550
41581
|
createVNode(_component_a_checkbox, {
|
|
41551
|
-
checked:
|
|
41552
|
-
"onUpdate:checked": ($event) =>
|
|
41553
|
-
indeterminate:
|
|
41554
|
-
onChange: (e) =>
|
|
41582
|
+
checked: directory.selected,
|
|
41583
|
+
"onUpdate:checked": ($event) => directory.selected = $event,
|
|
41584
|
+
indeterminate: directory.indeterminate,
|
|
41585
|
+
onChange: (e) => handleDirectoryChange(directory, e),
|
|
41555
41586
|
disabled: isDetail.value
|
|
41556
41587
|
}, {
|
|
41557
41588
|
default: withCtx(() => [
|
|
41558
|
-
createTextVNode(toDisplayString(
|
|
41589
|
+
createTextVNode(toDisplayString(directory.name), 1)
|
|
41559
41590
|
]),
|
|
41560
41591
|
_: 2
|
|
41561
41592
|
}, 1032, ["checked", "onUpdate:checked", "indeterminate", "onChange", "disabled"])
|
|
41562
41593
|
]),
|
|
41563
|
-
createElementVNode("div",
|
|
41564
|
-
|
|
41565
|
-
|
|
41566
|
-
|
|
41567
|
-
|
|
41568
|
-
|
|
41569
|
-
|
|
41570
|
-
|
|
41571
|
-
|
|
41572
|
-
|
|
41573
|
-
|
|
41574
|
-
|
|
41575
|
-
|
|
41576
|
-
|
|
41577
|
-
|
|
41578
|
-
|
|
41579
|
-
|
|
41580
|
-
|
|
41581
|
-
|
|
41582
|
-
|
|
41583
|
-
|
|
41584
|
-
|
|
41585
|
-
|
|
41586
|
-
|
|
41587
|
-
|
|
41588
|
-
|
|
41594
|
+
_cache[6] || (_cache[6] = createElementVNode("div", { class: "perm-btn-col perm-btn-col--empty" }, null, -1))
|
|
41595
|
+
]),
|
|
41596
|
+
createCommentVNode(" \u5B50\u9875\u9762\u884C "),
|
|
41597
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(directory.permissionsList, (page) => {
|
|
41598
|
+
return openBlock(), createElementBlock("div", {
|
|
41599
|
+
key: page.id,
|
|
41600
|
+
class: "permission-row"
|
|
41601
|
+
}, [
|
|
41602
|
+
createElementVNode("div", _hoisted_29$2, [
|
|
41603
|
+
createVNode(_component_a_checkbox, {
|
|
41604
|
+
checked: page.selected,
|
|
41605
|
+
"onUpdate:checked": ($event) => page.selected = $event,
|
|
41606
|
+
indeterminate: page.indeterminate,
|
|
41607
|
+
onChange: (e) => handlePageChange(directory, page, e),
|
|
41608
|
+
disabled: isDetail.value
|
|
41609
|
+
}, {
|
|
41610
|
+
default: withCtx(() => [
|
|
41611
|
+
createTextVNode(toDisplayString(page.name), 1)
|
|
41612
|
+
]),
|
|
41613
|
+
_: 2
|
|
41614
|
+
}, 1032, ["checked", "onUpdate:checked", "indeterminate", "onChange", "disabled"])
|
|
41615
|
+
]),
|
|
41616
|
+
createElementVNode("div", _hoisted_30$2, [
|
|
41617
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(page.actionList, (button) => {
|
|
41618
|
+
return openBlock(), createElementBlock("div", {
|
|
41619
|
+
key: button.btnId,
|
|
41620
|
+
class: "button-item"
|
|
41621
|
+
}, [
|
|
41622
|
+
createVNode(_component_a_checkbox, {
|
|
41623
|
+
checked: button.checked,
|
|
41624
|
+
"onUpdate:checked": ($event) => button.checked = $event,
|
|
41625
|
+
onChange: () => handleButtonChange(directory, page),
|
|
41626
|
+
disabled: isDetail.value
|
|
41627
|
+
}, {
|
|
41628
|
+
default: withCtx(() => [
|
|
41629
|
+
createTextVNode(toDisplayString(button.name), 1)
|
|
41630
|
+
]),
|
|
41631
|
+
_: 2
|
|
41632
|
+
}, 1032, ["checked", "onUpdate:checked", "onChange", "disabled"])
|
|
41633
|
+
]);
|
|
41634
|
+
}), 128))
|
|
41635
|
+
])
|
|
41636
|
+
]);
|
|
41637
|
+
}), 128))
|
|
41638
|
+
], 64))
|
|
41639
|
+
], 8, _hoisted_23$2);
|
|
41640
|
+
}), 128))
|
|
41641
|
+
], 512)
|
|
41642
|
+
])
|
|
41589
41643
|
])
|
|
41590
|
-
])
|
|
41591
|
-
])) : (openBlock(), createElementBlock("div",
|
|
41644
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_31$2))
|
|
41645
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_32$1, toDisplayString(_ctx.$t("uc_role.no_auth_permission")), 1))
|
|
41592
41646
|
])
|
|
41593
41647
|
])
|
|
41594
41648
|
]))
|