From ef6f59a1c6bc10d5a05919902fba06abecc02122 Mon Sep 17 00:00:00 2001 From: duyufeng Date: Wed, 28 Aug 2024 17:04:21 +0800 Subject: [PATCH] =?UTF-8?q?op=E7=AB=AF=E6=9C=8D=E5=8A=A1=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=A0=91=E4=B8=8D=E9=80=89=E6=8B=A9=E6=97=B6?= =?UTF-8?q?=E4=BC=A0=E5=80=BC=E5=85=A8=E9=83=A8=E5=8F=98=E6=88=90=E7=A9=BA?= =?UTF-8?q?=E5=80=BCbug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hx-ai-intelligent/src/api/index.ts | 2 +- .../organizationManage/enterpriseManage/index.vue | 30 +++++++++++++++------- 2 files changed, 22 insertions(+), 10 deletions(-) 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; }); };