Browse Source

feat: 权限逻辑处理

main
xuziqiang 3 months ago
parent
commit
bc80a22180
  1. 32
      hx-ai-intelligent/src/config/app.config.ts
  2. 2
      hx-ai-intelligent/src/router/equipmentControl.ts
  3. 2
      hx-ai-intelligent/src/router/equipmentManage.ts
  4. 2
      hx-ai-intelligent/src/router/home.ts
  5. 16
      hx-ai-intelligent/src/view/organizationManage/departmentManage/config.ts
  6. 347
      hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue
  7. 21
      hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue
  8. 2
      hx-ai-intelligent/vite.config.ts
  9. 4
      hx-op/src/config/app.config.ts
  10. 1
      lib/component/form/form/form-item.vue
  11. 4
      lib/saas/store/modules/app-config.ts
  12. 9
      lib/saas/store/modules/route.ts
  13. 1
      lib/saas/view/system/login.vue

32
hx-ai-intelligent/src/config/app.config.ts

@ -1,9 +1,9 @@
/** @format */
import { dateUtil } from '/nerv-lib/util/date-util';
import mockResource from './resource.json';
import { userInfo, userResource } from './../../../hx-op/src/api/user';
import { http } from '/nerv-lib/saas';
import { ref } from 'vue';
import { permission } from '/@/api/origanizemanage';
import { appConfigStore } from '/nerv-lib/saas/store/modules/app-config';
import { authorizationService } from '/nerv-base/store/modules/authorization-service';
import { isEmpty } from 'lodash-es';
// const { permissionVos } = sessionStorage.getItem('userInfo');
// ? JSON.parse(sessionStorage.getItem('userInfo')!)
@ -59,7 +59,13 @@ export const appConfig = {
api: '/carbon-smart/user/login/logInInfo',
placeholder: '请选择',
autoSelectFirst: true,
onChange: (cur) => {
onChange: async (cur, record) => {
console.log(cur, record);
const configStore = appConfigStore();
const useAuthorization = authorizationService();
const res = await configStore.userResource(record);
useAuthorization.updateUserResource(res.data);
// value.value = cur;
},
resultField: 'data.linkList',
@ -73,9 +79,15 @@ export const appConfig = {
userLoginApi: (params) => {
return http.post('/carbon-smart/user/login', { ...params });
},
userResourceApi: () => {
return http.post('/carbon-smart/user/login/logInInfo').then((res) => {
return { data: res.data.permissionVos };
userResourceApi: (params) => {
console.log(params, 'userResource');
const userInfo = JSON.parse(sessionStorage.getItem('userInfo')!);
const ownOrgInfo = userInfo.linkList?.filter(({ isOwn }) => isOwn)[0];
return http
.post('/carbon-smart/user/login/logInPermission', !isEmpty(params) ? params : ownOrgInfo)
.then((res) => {
return res;
});
},
userInfoApi: () => {
@ -83,8 +95,8 @@ export const appConfig = {
const info = res.data;
const trD = transform(info, {
accountCode: 'userId',
accountName: 'realName',
accountRealName: 'realName',
accountName: 'accountNo',
accountRealName: 'accountNo',
orgId: 'orgId',
orgName: 'orgName',
projectId: 'projectId',

2
hx-ai-intelligent/src/router/equipmentControl.ts

@ -3,7 +3,7 @@ const equipmentControl = {
path: '/equipmentControl',
name: 'EquipmentControl',
meta: { title: '设备群控', icon: 'dicizhishou', index: 4 },
redirect: { name: 'homeIndex' },
redirect: { name: 'LightManage' },
children: [
{
path: 'lightManage',

2
hx-ai-intelligent/src/router/equipmentManage.ts

@ -3,7 +3,7 @@ const equipment = {
path: '/equipmentManage',
name: 'EquipmentManage',
meta: { title: '设备管理', icon: 'dicizhishou', index: 1 },
redirect: { name: 'homeIndex' },
redirect: { name: 'Ledger' },
children: [
{
path: 'ledger',

2
hx-ai-intelligent/src/router/home.ts

@ -10,7 +10,7 @@ const home = {
name: 'homeIndex',
meta: { title: '首页', hideChildren: true, icon: 'dicizhishou' },
component: () => import('/@/view/developing.vue'),
redirect: { name: 'homeIndex' },
// redirect: { name: 'homeIndex' },
// children: [
// {
// path: 'index',

16
hx-ai-intelligent/src/view/organizationManage/departmentManage/config.ts

@ -2,11 +2,6 @@ import { ref } from 'vue';
export const formConfig = (disabled: Boolean) => {
return ref([
{
field: 'field111',
component: 'NsChildForm',
componentProps: {
schemas: [
{ label: '企业名称', field: 'orgName', show: false },
{
label: '部门名称',
@ -78,19 +73,11 @@ export const formConfig = (disabled: Boolean) => {
maxLength: 300,
},
},
],
},
},
]);
};
export const formConfig2 = (disabled2: Boolean) => {
return ref([
{
field: 'field111',
component: 'NsChildForm',
componentProps: {
schemas: [
{ label: '部门名称', field: 'deptName', show: false },
{
@ -162,8 +149,5 @@ export const formConfig2 = (disabled2: Boolean) => {
maxLength: 300,
},
},
],
},
},
]);
};

347
hx-ai-intelligent/src/view/organizationManage/departmentManage/index.vue

@ -6,9 +6,13 @@
<div class="ns-table-title">部门管理</div>
<a-row>
<a-col :span="12" class="tree">
<ns-button style="margin: 10px" type="primary" @click="addApartment">新增部门</ns-button>
<ns-button type="primary" @click="addApartmentSon">新增子部门</ns-button>
<ns-button style="margin: 10px" type="primary" @click="deleteApartment">删除</ns-button>
<ns-button style="margin: 10px" type="primary" @click="pipe(addApartment)">
新增部门
</ns-button>
<ns-button type="primary" @click="pipe(addApartmentSon, true)">新增子部门</ns-button>
<ns-button style="margin: 10px" type="primary" @click="pipe(deleteDept)">
删除
</ns-button>
<a-tree
v-if="apartmentTreeData?.length"
:tree-data="apartmentTreeData"
@ -22,20 +26,16 @@
</a-col>
<a-col :span="12" class="list">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="部门信息">
<a-tab-pane :key="1" tab="部门信息">
<ns-form
ref="formRef"
:schemas="formSchema"
:wrapperCol="{ span: 18 }"
:model="formData"
formLayout="vertical"
class="form" />
<!-- <ns-button style="margin: 16px" type="primary" @click="CancelApartment"
>取消
</ns-button>
<ns-button v-show="disabled" type="primary" @click="deptEdit">编辑</ns-button>
<ns-button v-show="!disabled" type="primary" @click="ApartmentSure">确定</ns-button> -->
</a-tab-pane>
<a-tab-pane key="2" :disabled="!selectKey?.length" tab="部门权限">
<a-tab-pane :key="2" tab="部门权限">
<a-tree
:tree-data="apartmentAdminTreeData"
:fieldNames="{ children: 'menus', title: 'label', key: 'permissionId' }"
@ -43,18 +43,14 @@
checkable
:selectable="false"
defaultExpandAll
@check="deptCheck"
@select="ApartmentSelect">
@check="deptCheck">
<template #title="data"> {{ data.label }}</template>
</a-tree>
<ns-button style="margin-left: 16px" type="primary" @click="apartmentPermission"
>确定
</ns-button>
</a-tab-pane>
</a-tabs>
<ns-button style="margin: 16px" type="primary" @click="CancelApartment">取消 </ns-button>
<ns-button v-show="disabled" type="primary" @click="deptEdit">编辑</ns-button>
<ns-button v-show="!disabled" type="primary" @click="ApartmentSure">确定</ns-button>
<ns-button v-show="disabled" type="primary" @click="pipe(deptEdit)">编辑</ns-button>
<ns-button v-show="!disabled" type="primary" @click="deptSure">确定</ns-button>
</a-col>
</a-row>
</div>
@ -62,17 +58,13 @@
<div class="ns-table-title">角色管理</div>
<a-row>
<a-col :span="12" class="tree">
<ns-button
:disabled="!selectKey?.length"
style="margin: 10px"
type="primary"
@click="addUser"
>新增角色</ns-button
>
<ns-button :disabled="disabled2" type="primary" @click="addUserSon">新增子角色</ns-button>
<ns-button :disabled="disabled2" style="margin: 10px" type="primary" @click="deleteUser"
>删除</ns-button
>
<ns-button style="margin: 10px" type="primary" @click="rolePipe(addUser, true)">
新增角色
</ns-button>
<ns-button type="primary" @click="rolePipe(addUserSon)">新增子角色</ns-button>
<ns-button style="margin: 10px" type="primary" @click="rolePipe(deleteUser)">
删除
</ns-button>
<a-tree
v-if="userTreeData.length"
:tree-data="userTreeData"
@ -84,18 +76,17 @@
</a-tree>
</a-col>
<a-col :span="12" class="list">
<a-tabs v-model:activeKey="activeKey2">
<a-tab-pane key="1" tab="角色信息">
<a-tabs v-model:activeKey="roleActiveKey">
<a-tab-pane :key="1" tab="角色信息">
<ns-form
ref="formRoleRef"
:schemas="formSchema2"
:model="formData2"
:model="roleFormData"
:wrapperCol="{ span: 18 }"
formLayout="vertical"
class="form" />
<ns-button style="margin: 16px" type="primary" @click="CancelUser">取消</ns-button>
<ns-button v-show="disabled2" type="primary" @click="roleEdit"> 编辑 </ns-button>
<ns-button v-show="!disabled2" type="primary" @click="UserSure"> 确定 </ns-button>
</a-tab-pane>
<a-tab-pane key="2" :disabled="!selectKey2?.length" tab="角色权限">
<a-tab-pane :key="2" tab="角色权限">
<a-tree
:tree-data="userAdminTreeData"
v-model:checkedKeys="UsercheckedKeys"
@ -103,20 +94,19 @@
:fieldNames="{ children: 'menus', title: 'label', key: 'permissionId' }"
:selectable="false"
checkable
@check="roleCheck"
@select="UserSelect" />
<ns-button style="margin: 16px" type="primary" @click="rolePermission">
确定
</ns-button>
@check="roleCheck" />
</a-tab-pane>
</a-tabs>
<ns-button style="margin: 16px" type="primary" @click="CancelUser">取消</ns-button>
<ns-button v-show="roleDisabled" type="primary" @click="roleEdit"> 编辑 </ns-button>
<ns-button v-show="!roleDisabled" type="primary" @click="UserSure"> 确定 </ns-button>
</a-col>
</a-row>
</div>
</div>
</template>
<script lang="ts">
import { createVNode, defineComponent, reactive, ref, watch, watchEffect } from 'vue';
<script lang="ts" setup>
import { createVNode, ref, watchEffect } from 'vue';
import { Modal } from 'ant-design-vue';
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
import { http } from '/nerv-lib/util/http';
@ -126,30 +116,84 @@
import { permission } from '/@/api/origanizemanage';
import { NsMessage } from '/nerv-lib/component';
export default defineComponent({
defineOptions({
name: 'AuthorityManageIndex',
setup() {
});
const formRef = ref();
const formRoleRef = ref();
let formData = ref({});
let formData2 = ref({});
const activeKey = ref('1');
const activeKey2 = ref('1');
let roleFormData = ref({});
const activeKey = ref(1);
const roleActiveKey = ref(1);
const disabled = ref(true);
const disabled2 = ref(true);
const roleDisabled = ref(true);
const deptTreeCheckedKeys = ref(['0-0-0']);
const ApartcheckedKeys = ref<string[]>([]);
const UsercheckedKeys = ref<string[]>([]);
const currentOrgRef = ref();
const selectKey = ref();
const selectRef = ref();
const selectKey2 = ref();
const selectRef2 = ref();
const selectRoleKey = ref();
const selectRoleRef = ref();
const formSchema = formConfig(disabled as any);
const formSchema2 = formConfig2(disabled2 as any);
const formSchema2 = formConfig2(roleDisabled as any);
const { orgId, orgName, projectId } = JSON.parse(sessionStorage.getItem('userInfo'));
const userAdminTreeData = ref([]);
const apartmentTreeData = ref([]);
const apartmentAdminTreeData = ref([]);
const userTreeData = ref([]);
//
const deptTotalCheckedKeys = ref([]);
const roleTotalCheckedKeys = ref([]);
//
const disabledTree = (data, disabled = true) => {
data.map((item) => {
item['disabled'] = disabled;
if (item.menus) {
disabledTree(item.menus, disabled);
}
});
};
watchEffect(() => {
disabledTree(apartmentAdminTreeData.value, disabled.value);
disabledTree(userAdminTreeData.value, roleDisabled.value);
});
/**操作拦截 */
const pipe = (func: Function, flag = false) => {
console.log(selectRef.value);
if (flag && !selectRef.value?.hasOwnProperty('own')) {
NsMessage.error('请先选择相关部门');
return;
}
if (!flag && !selectRef.value?.deptInfo) {
NsMessage.error('请先选择相关企业');
return;
}
func && func();
};
const rolePipe = (func: Function, linkDept = false) => {
console.log(selectRoleRef.value);
//
if ((linkDept && !selectRef.value?.deptInfo) || selectRef.value?.hasOwnProperty('own')) {
NsMessage.error('请先选择相关部门');
return;
}
if (!linkDept && !selectRoleRef.value) {
NsMessage.error('请先选择相关角色');
return;
}
func && func();
};
/**操作拦截 */
const getPermissionTree = (params) => {
return http.post(permission.queryOrgPermission, params).then((res) => {
apartmentAdminTreeData.value = get(res, 'data');
@ -163,13 +207,6 @@
getPermissionTree({ projectId, orgId });
watch(ApartcheckedKeys, () => {
console.log('checkedKeys', ApartcheckedKeys.value);
});
watch(UsercheckedKeys, () => {
console.log('checkedKeys', UsercheckedKeys.value);
});
//
const getDepartList = (params) => {
return http.post(department.queryDeptTree, params).then((res) => {
@ -222,10 +259,11 @@
opMap.type = 'addDept';
formData.value = {};
let sourceOrgId = '';
if (!selectRef.value.own) {
if (!currentOrgRef.value.own) {
sourceOrgId = orgId;
}
opMap.fuc = (params) => {
return formRef.value.triggerSubmit().then(() => {
return http.post(department.deptSave, {
...params,
orgId: selectRef.value.deptInfo?.orgId,
@ -233,6 +271,7 @@
projectId,
orgName,
});
});
};
return;
};
@ -242,14 +281,11 @@
opMap.type = 'addson';
formData.value = {};
let sourceOrgId = '';
if (!selectRef.value.own) {
if (!currentOrgRef.value.own) {
sourceOrgId = orgId;
}
opMap.fuc = (params) => {
if (!selectRef.value?.deptInfo?.deptId) {
NsMessage.warn('请选择部门');
return;
}
return formRef.value.triggerSubmit().then(() => {
return http.post(department.deptSave, {
...params,
orgId,
@ -258,13 +294,14 @@
sourceOrgId,
// deptName: selectRef.value.deptInfo.deptName,
});
});
};
};
const addUser = () => {
disabled2.value = false;
roleDisabled.value = false;
opMap.type = 'addUser';
formData2.value = {};
roleFormData.value = {};
opMap.fuc = (params) => {
delete params.roleId;
return http.post(department.addRole, {
@ -278,29 +315,23 @@
};
const addUserSon = () => {
disabled.value = false;
roleDisabled.value = false;
opMap.type = 'addUserSon';
formData2.value = {};
roleFormData.value = {};
opMap.fuc = (params) => {
delete params.roleId;
return http.post(department.addRole, {
...params,
orgId,
projectId,
proleId: selectRef2.value.roleId,
proleId: selectRoleRef.value.roleId,
deptId: selectRef.value.deptInfo.deptId,
deptName: selectRef.value.deptInfo.deptName,
});
};
};
const deleteApartment = () => {
const deleteDept = () => {
//
// opMap.type = 'deptDelete';
// opMap.fuc = (params) => {
// return http.post(department.deptDel, params).then(() => {
// NsMessage.success('');
// });
// };
Modal.confirm({
title: '是否确认删除',
icon: createVNode(ExclamationCircleOutlined),
@ -308,7 +339,7 @@
onOk() {
http.post(department.deptDel, { deptId: selectRef.value.deptInfo.deptId }).then(() => {
getTree();
clearApartData();
clearDeptData();
});
},
onCancel() {
@ -323,7 +354,7 @@
icon: createVNode(ExclamationCircleOutlined),
content: createVNode('div', { style: 'color:red;' }, ''),
onOk() {
http.post(department.delRole, { roleId: selectRef2.value.roleId }).then(() => {
http.post(department.delRole, { roleId: selectRoleRef.value.roleId }).then(() => {
getUserTree({ deptId: selectRef.value.deptInfo.deptId });
});
},
@ -332,23 +363,17 @@
});
};
const clearApartData = () => {
selectRef.value = {};
const clearDeptData = () => {
formData.value = {};
opMap.type = '';
opMap.fuc = '';
selectKey.value = '';
};
const clearRoleData = () => {
selectRef2.value = {};
formData2.value = {};
roleFormData.value = {};
opMap.type = '';
opMap.fuc = '';
selectKey2.value = '';
};
const deptTotalCheckedKeys = ref([]);
const roleTotalCheckedKeys = ref([]);
//
const deptCheck = (checked, { halfCheckedKeys }) => {
console.log(checked, halfCheckedKeys);
@ -393,8 +418,8 @@
};
//
const apartmentPermission = () => {
http
const deptPermission = () => {
return http
.post(department.addPermission, {
deptId: selectRef.value?.deptInfo.deptId,
projectId,
@ -409,7 +434,7 @@
http
.post(department.addRolePermission, {
// deptId: selectRef.value?.deptInfo.deptId,
roleId: selectRef2.value?.roleId,
roleId: selectRoleRef.value?.roleId,
projectId,
permissionVoList: roleTotalCheckedKeys.value,
})
@ -435,7 +460,7 @@
//
const getRolePermission = () => {
http
.post(permission.queryRolePermission, { roleId: selectRef2.value?.roleId })
.post(permission.queryRolePermission, { roleId: selectRoleRef.value?.roleId })
.then((res) => {
UsercheckedKeys.value = res.data
?.filter((item) => !item.halfCheck)
@ -459,27 +484,32 @@
//
const deptEdit = () => {
disabledTree();
disabled.value = false;
apartmentChoose();
};
//
const SelectApartmentTree = (selectedKeys: any, info: any) => {
console.log(selectedKeys, info);
const { selected } = info;
console.log(info);
// disabled.value = !selected;
// tab
roleActiveKey.value = 1;
const { selected } = info;
if (!selectedKeys?.length) return;
selectKey.value = [info.node.key];
selectRef.value = info.node.dataRef;
ApartcheckedKeys.value.splice(0);
getDeptPermission();
formData.value = cloneDeep(info.node.dataRef.deptInfo);
// getUserTree({ deptId: selectRef.value.deptInfo.deptId });
//
if (!selectRef.value.hasOwnProperty('own')) {
formData.value = cloneDeep(info.node.dataRef.deptInfo);
} else {
currentOrgRef.value = selectRef.value;
formData.value = {};
}
getDeptPermission();
ApartcheckedKeys.value = [];
};
/**
@ -493,132 +523,77 @@
};
};
const roleEdit = () => {
disabled2.value = false;
roleDisabled.value = false;
roleChoose();
};
//
const SelectUserTree = (selectedKeys: any, info: any) => {
const { selected } = info;
// disabled2.value = !selected;
// roleDisabled.value = !selected;
if (!selectedKeys?.length) return;
selectKey2.value = selectedKeys[0];
selectRef2.value = info.node.dataRef;
formData2.value = cloneDeep(info.node.dataRef);
UsercheckedKeys.value.splice(0);
selectRoleKey.value = selectedKeys[0];
selectRoleRef.value = info.node.dataRef;
roleFormData.value = cloneDeep(info.node.dataRef);
UsercheckedKeys.value = [];
getRolePermission();
getRolePermissionTree({ deptId: selectRef.value.deptInfo.deptId });
};
const CancelApartment = () => {
disabled.value = true;
//
// clearApartData();
};
const CancelUser = () => {
disabled2.value = true;
};
const ApartmentSelect = (selectedKeys: any, info: any) => {
console.log(selectedKeys, 'selectedKeys');
console.log(info, 'info');
roleDisabled.value = true;
};
const UserSelect = (selectedKeys: any, info: any) => {
console.log(selectedKeys, 'selectedKeys');
console.log(info, 'info');
};
const ApartmentSure = () => {
console.log(opMap.type, 'ApartmentSure');
//
const deptSure = () => {
const opArr = ['addDept', 'editDpet', 'addson'];
if (activeKey.value === 1) {
if (opArr.includes(opMap.type)) {
console.log(formRef.value, formData);
opMap.fuc &&
opMap.fuc(formData.value).then(() => {
getTree();
clearApartData();
clearDeptData();
disabled.value = true;
});
}
} else {
deptPermission().then(() => {
clearDeptData();
disabled.value = true;
});
} else if (opMap.type === 'deptDelete') {
opMap.fuc && opMap.fuc({ ...formData.value, selectRef: selectRef.value });
}
};
//
const UserSure = () => {
disabled2.value = !disabled2.value;
roleDisabled.value = !roleDisabled.value;
const typeArr = ['addUserSon', 'addUser', 'editRole'];
if (roleActiveKey.value === 1) {
if (typeArr.includes(opMap.type)) {
opMap.fuc &&
opMap.fuc(formData2.value).then(() => {
opMap.fuc(roleFormData.value).then(() => {
getUserTree();
clearRoleData();
});
} else if (selectRef2.value && opMap.type === 'addson')
selectRef2.value['children'] = [
{
key: '123',
title: formData2.value.departname,
info: { ...cloneDeep(formData2.value) },
},
];
else {
console.log('ss');
}
} else {
rolePermission();
}
};
const disabledTree = (data, disabled) => {
console.log(userAdminTreeData.value, 'userAdminTreeData.value');
userAdminTreeData.value.map((item) => {
item['disabled'] = disabled;
});
};
return {
disabled,
disabled2,
formSchema,
formSchema2,
formData,
formData2,
apartmentTreeData,
userTreeData,
SelectApartmentTree,
SelectUserTree,
activeKey,
activeKey2,
ApartmentSure,
UserSure,
addApartment,
addApartmentSon,
deleteApartment,
deleteUser,
addUser,
addUserSon,
CancelApartment,
CancelUser,
apartmentAdminTreeData,
ApartmentSelect,
ApartcheckedKeys,
userAdminTreeData,
UsercheckedKeys,
UserSelect,
formRef,
apartmentPermission,
rolePermission,
deptEdit,
selectKey,
selectKey2,
deptTreeCheckedKeys,
deptCheck,
roleCheck,
roleEdit,
};
},
});
</script>
<style scoped>
<style lang="less" scoped>
:deep(.ant-tabs-tabpane) {
padding: 20px;
.form {
margin: 0 !important;
}
}
.main {
display: flex;
flex: 1;

21
hx-ai-intelligent/src/view/organizationManage/usermanage/index.vue

@ -478,7 +478,7 @@
headerActions: [
{
label: '新增',
name: 'RoleTypeAdd',
name: 'userAdd',
type: 'primary',
handle: () => {
addformvisible.value = true;
@ -504,26 +504,9 @@
columnActions: {
title: '操作',
actions: [
// {
// label: '',
// name: 'RoleTypeEdit',
// // dynamicParams: 'uuid',
// handle: (record: any) => {
// console.log(record, 'record');
// formData2.value = record;
// opMap.type = 'edit';
// opMap.fuc = (formData2: any) => {
// Object.assign(
// mockData.value.filter((item) => item.id === record.id)[0],
// formData2,
// );
// };
// addformvisible.value = true;
// },
// },
{
label: '删除',
name: 'RoleTypeEdit',
name: 'userAdd',
confirm: true,
handle: (record: any, name: any, reload: any) => {
const id = record.roleId;

2
hx-ai-intelligent/vite.config.ts

@ -12,7 +12,7 @@ const proxy = {
changeOrigin: true,
},
'/carbon-smart': {
target: 'http://123.60.103.97:8224',
target: 'http://192.168.112.144:8224',
changeOrigin: true,
rewrite: (path) => path.replace(/^\/carbon-smart/, ''),
},

4
hx-op/src/config/app.config.ts

@ -73,8 +73,8 @@ export const appConfig = {
const info = res.data;
const trD = transform(info, {
accountCode: 'userId',
accountName: 'realName',
accountRealName: 'realName',
accountName: 'accountNo',
accountRealName: 'accountNo',
orgId: 'orgId',
orgName: 'orgName',
projectId: 'projectId',

1
lib/component/form/form/form-item.vue

@ -298,7 +298,6 @@
validateRef.value = text;
},
};
console.log(on, 'checkON');
return {
...propsData,

4
lib/saas/store/modules/app-config.ts

@ -123,11 +123,11 @@ export const appConfigStore = defineStore({
return { data: {} };
}
},
userResource() {
userResource(params = {}) {
if (this.userResourceApi) {
return httpRequest({
api: this.userResourceApi,
params: {},
params,
pathParams: {},
requestConfig,
});

9
lib/saas/store/modules/route.ts

@ -90,9 +90,9 @@ export const useRouteStore = defineStore({
});
// const initPcResource = { application: {}, menus: [] };
let initPcResource = [];
this.routeModule.sort((a, b) => {
return a.route?.meta?.index - b.route?.meta?.index;
});
// this.routeModule.sort((a, b) => {
// return a.route?.meta?.index - b.route?.meta?.index;
// });
const info = JSON.parse(JSON.stringify(this.routeModule));
initRouteMouleList(info);
function initRouteMouleList(info) {
@ -116,6 +116,9 @@ export const useRouteStore = defineStore({
});
}
// initPcResource.application = appConfig.resourceInfo?.application as object;
console.log(info);
return;
initPcResource = appConfig.resourceInfo?.dealReosurceList
? appConfig.resourceInfo?.dealReosurceList(info)
: info;

1
lib/saas/view/system/login.vue

@ -105,7 +105,6 @@
loading.value = false;
if (configStore.enablePermissions) {
const res = await configStore.userResource();
console.log(res, 'cccccccccccccccccccccccccccccc');
if (configStore.customApplication) {
await useAuthorization.initMenuResource();

Loading…
Cancel
Save