op端服务操作权限树不选择时传值全部变成空值bug修改
This commit is contained in:
@@ -59,4 +59,4 @@ export const getEnum = async ({
|
||||
}: dictHttpConfig) => {
|
||||
const res = await http.get(api, params);
|
||||
return Promise.resolve(res);
|
||||
};
|
||||
};
|
@@ -50,6 +50,7 @@
|
||||
// import { mockData, treeData } from './mock';
|
||||
import { enterPrise } from '/@/api/origanizemanage';
|
||||
import { tableConfig as insertConfig } from './config';
|
||||
import { string } from 'vue-types';
|
||||
defineOptions({
|
||||
name: 'EnterpriseManageIndex',
|
||||
});
|
||||
@@ -84,8 +85,6 @@
|
||||
});
|
||||
// 公共请求方法,包含tablereload,drawerclose
|
||||
const fetch = (params, isReload = true) => {
|
||||
console.log(params)
|
||||
console.log(comApi.value)
|
||||
http.post(comApi.value, params).then(() => {
|
||||
NsMessage.success('操作成功');
|
||||
onClose();
|
||||
@@ -153,14 +152,20 @@
|
||||
});
|
||||
};
|
||||
|
||||
// 服务操作逻辑区域
|
||||
// 服务操作逻辑区域checkedKeys
|
||||
const serverOK = () => {
|
||||
const params = {
|
||||
orgId: currentServerRecord.value?.orgId,
|
||||
orgName: currentServerRecord.value?.orgName,
|
||||
permissionVoList: totalCheckedKeys.value,
|
||||
};
|
||||
fetch(params, false);
|
||||
let getPermissionSelected = totalCheckedKeys.value;
|
||||
if(getPermissionSelected.length==0){
|
||||
NsMessage.success('请选择相应的权限菜单分配!');
|
||||
return false;
|
||||
}else{
|
||||
const params = {
|
||||
orgId: currentServerRecord.value?.orgId,
|
||||
orgName: currentServerRecord.value?.orgName,
|
||||
permissionVoList: getPermissionSelected,
|
||||
};
|
||||
fetch(params, false);
|
||||
}
|
||||
};
|
||||
|
||||
const ServiceSelect = (selectedKeys: any, info: any) => {
|
||||
@@ -262,6 +267,13 @@
|
||||
.map((item) => {
|
||||
return item.permissionId;
|
||||
});
|
||||
const finalResult = res.data.map((items) => {
|
||||
return {
|
||||
halfCheck: items.halfCheck,
|
||||
permissionId: items.permissionId,
|
||||
};
|
||||
})
|
||||
totalCheckedKeys.value = finalResult;
|
||||
});
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user