|
@@ -145,10 +145,17 @@ const props = defineProps({
|
|
|
const regionUseManage = ref(false);
|
|
|
|
|
|
const regionUseManageChange = () => {
|
|
|
+ let allData = JSON.parse(JSON.stringify(roleConfigInfoAllData.value));
|
|
|
+
|
|
|
if (regionUseManage.value) {
|
|
|
- formData.roleConfigInfo = formData.roleConfigInfo.filter(
|
|
|
+ // formData.roleConfigInfo = formData.roleConfigInfo.filter(
|
|
|
+ // (item) => item.roleType !== 'REGION_COORDINATOR'
|
|
|
+ // );
|
|
|
+ formData.roleConfigInfo = allData.filter(
|
|
|
(item) => item.roleType !== 'REGION_COORDINATOR'
|
|
|
);
|
|
|
+ } else {
|
|
|
+ formData.roleConfigInfo = allData;
|
|
|
}
|
|
|
selectedRoleId.value = null;
|
|
|
selectedRole.value = null;
|
|
@@ -170,6 +177,7 @@ let selectedRoleId = ref(null);
|
|
|
const { roleList, getRoleList } = useAuthenRole();
|
|
|
|
|
|
const getDetail = async () => {
|
|
|
+ regionUseManage.value = false;
|
|
|
for (let key in formData) {
|
|
|
formData[key] = props.curRow[key];
|
|
|
}
|
|
@@ -216,6 +224,9 @@ const getDetail = async () => {
|
|
|
};
|
|
|
});
|
|
|
}
|
|
|
+ roleConfigInfoAllData.value = JSON.parse(
|
|
|
+ JSON.stringify(formData.roleConfigInfo)
|
|
|
+ );
|
|
|
const regionUserInfo = formData.roleConfigInfo.find(
|
|
|
(item) => item.roleType === 'REGION_COORDINATOR'
|
|
|
);
|
|
@@ -228,6 +239,8 @@ const getDetail = async () => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+const roleConfigInfoAllData = ref([]);
|
|
|
+
|
|
|
const { formData } = useClearDialog(
|
|
|
{
|
|
|
id: null,
|
|
@@ -301,6 +314,9 @@ const handleDelete = (row) => {
|
|
|
formData.roleConfigInfo = formData.roleConfigInfo.filter(
|
|
|
(item) => item.roleId !== row.roleId
|
|
|
);
|
|
|
+ roleConfigInfoAllData.value = roleConfigInfoAllData.value.filter(
|
|
|
+ (item) => item.roleId !== row.roleId
|
|
|
+ );
|
|
|
};
|
|
|
|
|
|
const checkRoleList = () => {
|