diff --git a/hx-ai-intelligent/src/api/index.ts b/hx-ai-intelligent/src/api/index.ts index 0349a92..ff85a4e 100644 --- a/hx-ai-intelligent/src/api/index.ts +++ b/hx-ai-intelligent/src/api/index.ts @@ -59,4 +59,4 @@ export const getEnum = async ({ }: dictHttpConfig) => { const res = await http.get(api, params); return Promise.resolve(res); -}; +}; \ No newline at end of file diff --git a/hx-op/src/view/organizationManage/enterpriseManage/index.vue b/hx-op/src/view/organizationManage/enterpriseManage/index.vue index 68de6e3..8c5e4bf 100644 --- a/hx-op/src/view/organizationManage/enterpriseManage/index.vue +++ b/hx-op/src/view/organizationManage/enterpriseManage/index.vue @@ -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; }); };