diff --git a/src/api/permiss_policy.ts b/src/api/permiss_policy.ts index d8bc4b2..b2b2baa 100644 --- a/src/api/permiss_policy.ts +++ b/src/api/permiss_policy.ts @@ -1,8 +1,20 @@ import request from '@/utils/user_center_request'; -export const GetPermissPolicyService = () =>{ +export const GetPermissPolicyService = (req) =>{ + const params = new URLSearchParams(); + for (const key in req) { + // 处理值为数组的情况(如多选参数) + if (Array.isArray(req[key])) { + req[key].forEach(value => { + params.append(key, value); // 数组参数会以 key=val1&key=val2 形式拼接 + }); + } else { + params.append(key, req[key]); // 普通键值对 + } + } + let url = `/permission/get_policy?${params.toString()}`; let token = localStorage.getItem("token") || ""; - return request.get('/permission/get_policy', + return request.get(url, { headers: { 'token': token, //token diff --git a/src/components/table-edit.vue b/src/components/table-edit.vue index 1e2c731..d975c10 100644 --- a/src/components/table-edit.vue +++ b/src/components/table-edit.vue @@ -12,6 +12,16 @@ :placeholder="item.placeholder" clearable :multiple="item.multiple?true:false" filterable :allow-create="item.allowcreate?true:false" > + + - - - 新增 - - + + + + 新增 + + + { value: modelResult.data[i].ID }) } + loading.value = true; let result = await FindFunctionService(req); + loading.value = false; page.total = result.data.length; page.index = 1; allData.value = result.data; @@ -121,6 +129,7 @@ const getData = async () => { tableData.value = result.data.slice(start, end); }; getData(); +const loading = ref(false); const changePage = (val: number) => { page.index = val; diff --git a/src/views/system/manage-permiss-policy.vue b/src/views/system/manage-permiss-policy.vue index 6a9dff9..2e8fad3 100644 --- a/src/views/system/manage-permiss-policy.vue +++ b/src/views/system/manage-permiss-policy.vue @@ -2,12 +2,19 @@ - - - 新增 - - + + + + 新增 + 权限策略检测 + + + + + + + 权限策略检测 + + + + 匹配到的权限策略:{{ permiss_policy_check_res.name }} + 描述信息:{{ permiss_policy_check_res.info }} + Redis权限:{{ permiss_policy_check_res.redis>0 ? '有' : '无' }} + + + +
匹配到的权限策略:{{ permiss_policy_check_res.name }}
描述信息:{{ permiss_policy_check_res.info }}
Redis权限:{{ permiss_policy_check_res.redis>0 ? '有' : '无' }}