diff --git a/.env.develop b/.env.develop index c8349cd4..8ace0858 100644 --- a/.env.develop +++ b/.env.develop @@ -1,2 +1,3 @@ ENV=develop -VITE_APP_BASE_API=/api \ No newline at end of file +VITE_APP_BASE_API=/api +VITE_TOKEN_KEY = X-Access-Token diff --git a/.env.production b/.env.production index 990e0635..73450e9f 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,3 @@ ENV=production -VITE_APP_BASE_API=/api \ No newline at end of file +VITE_APP_BASE_API=/api +VITE_TOKEN_KEY = X-Access-Token diff --git a/package.json b/package.json index 6976a7c2..c8700605 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "event-source-polyfill": "^1.0.31", "global": "^4.4.0", "jetlinks-store": "^0.0.3", - "jetlinks-ui-components": "^1.0.34-4", + "jetlinks-ui-components": "^1.0.34-7", "js-cookie": "^3.0.1", "jsencrypt": "^3.3.2", "less": "^4.1.3", diff --git a/public/images/DataCollect/gateway.png b/public/images/DataCollect/gateway.png new file mode 100644 index 00000000..50fc4f63 Binary files /dev/null and b/public/images/DataCollect/gateway.png differ diff --git a/public/images/DataCollect/s7.png b/public/images/DataCollect/s7.png new file mode 100644 index 00000000..5707d4ec Binary files /dev/null and b/public/images/DataCollect/s7.png differ diff --git a/src/api/account/notificationRecord.ts b/src/api/account/notificationRecord.ts index 4d69c13f..7279b831 100644 --- a/src/api/account/notificationRecord.ts +++ b/src/api/account/notificationRecord.ts @@ -8,7 +8,8 @@ export const getList_api = (data: any): any => server.post(`/notifications/_quer export const changeStatus_api = (type: '_read' | '_unread', data: string[]): any => server.post(`/notifications/${type}`, data) export const changeAllStatus = (type: '_read' | '_unread', data: string[]): any => server.post(`/notifications/${type}/provider`, data) - +//查看工作流通知详情 +export const getWorkflowNotice = (data:any) => server.post('/process/runtime/processes/_query/no-paging',data) // 查询告警记录详情 export const getDetail = (id: string): any => server.get(`/alarm/record/${id}`) diff --git a/src/api/comm.ts b/src/api/comm.ts index 42384c5e..312d52ce 100644 --- a/src/api/comm.ts +++ b/src/api/comm.ts @@ -36,4 +36,6 @@ export const systemVersion = () => server.get<{edition?: string}>('/system/versi */ export const queryDashboard = (data: Record) => server.post(`/dashboard/_multi`, data) -export const fileUpload = (data: any) => server.post('/file/static', data) \ No newline at end of file +export const fileUpload = (data: any) => server.post('/file/static', data) + +export const lowCodeUrl = () => server.get('/system/config/low-code') \ No newline at end of file diff --git a/src/api/data-collect/collector.ts b/src/api/data-collect/collector.ts index 8ab956f5..b90fe629 100644 --- a/src/api/data-collect/collector.ts +++ b/src/api/data-collect/collector.ts @@ -54,8 +54,7 @@ export const queryPointNoPaging = (data: any) => export const scanOpcUAList = (data: any) => server.get( - `/data-collect/opc/channel/${data.id}/nodes?nodeId=${ - data?.nodeId || '' + `/data-collect/opc/channel/${data.id}/nodes?nodeId=${data?.nodeId || '' }`, ); @@ -63,4 +62,10 @@ export const queryTypeList = () => server.get(`/data-collect/opc/data-types`); export const getProviders = () => server.get('/data-collect/channel/gateway/codec/providers') -export const getStates = () => server.get('/dictionary/running-state/items') \ No newline at end of file +export const getStates = () => server.get('/dictionary/running-state/items') + +export const getSnapTypes = () => server.get('/s7/client/s7codecs/list') + +export const getArea = () => server.get('/s7/client/s7area/list') + +export const exportTemplate = (provider: string, format: string) =>server.get(`/data-collect/point/${provider}/template.${format}`, {}, {responseType: 'blob'}) \ No newline at end of file diff --git a/src/api/initHome.ts b/src/api/initHome.ts index 3b339a74..9359b8d2 100644 --- a/src/api/initHome.ts +++ b/src/api/initHome.ts @@ -4,7 +4,8 @@ import server from '@/utils/request'; export const updateMenus = (data: any) => server.patch(`/menu/iot/_all`, data) // 添加角色 export const addRole = (data: any) => server.post(`/role`, data) - +//添加角色分组 +export const addRoleGroup = (data:any) => server.patch('/role/group',data) //更新权限菜单 export const getRoleMenu = (id: string) => server.get(`/menu/role/${id}/_grant/tree`) diff --git a/src/api/system/dictionary.ts b/src/api/system/dictionary.ts new file mode 100644 index 00000000..1cf9ab26 --- /dev/null +++ b/src/api/system/dictionary.ts @@ -0,0 +1,56 @@ +import server, { request } from '@/utils/request'; + +/** + * 查询字典列表 + */ +export const getDicList = (data:any) => request.post('/dictionary/_query/no-paging',data) + +/** + * 查询字典分页 + */ +export const getDic_page = (data:any) => request.post('/dictionary/_query',data) +/** + * 查询字典ID是否重复 + */ +export const verifyId = (id:string) => request.post(`/dictionary/_exists`,{where:`id is ${id}`}) + +/** + * 保存字典 + */ +export const addDictionary = (data:any) => request.patch('/dictionary',data) + +/** + * 删除字典 + */ +export const deleteDictionary =(id:string) => request.delete(`/dictionary/${id}`) + +/** + * 查询字典项 + */ +export const queryDicItem = (data:any)=>request.post('/dictionary-item/_query',data) + +/** + * 查询字典项不分页 + */ +export const queryDicItemNoPage = (data:any) => request.post('/dictionary-item/_query/no-paging',data) + + +/** + * 保存字典项 + */ +export const saveDicItem = (data:any) => request.patch('/dictionary-item',data) + +/** + * 删除字典项 + */ +export const deleteDicItem = (id:string) => request.delete(`/dictionary-item/${id}`) + +/** + * 校验字典项value唯一 + */ +export const verifyValue = (data:any) => request.post('/dictionary-item/_exists',data) + +/** + * 下载字典 + */ +export const downDic = (data:any) => request.post('/dictionary/detail/_query',data) \ No newline at end of file diff --git a/src/api/system/menu.ts b/src/api/system/menu.ts index 93be944c..30165eb7 100644 --- a/src/api/system/menu.ts +++ b/src/api/system/menu.ts @@ -20,4 +20,6 @@ export const saveMenuInfo_api = (data: object) => server.patch(`/menu`, data); // 新增菜单信息 export const addMenuInfo_api = (data: object) => server.post(`/menu`, data); // 删除菜单信息 -export const delMenuInfo_api = (id: string) => server.remove(`/menu/${id}`); \ No newline at end of file +export const delMenuInfo_api = (id: string) => server.remove(`/menu/${id}`); +//查询集成菜单 +export const queryApp = (data:any) => server.post('/application/_query/no-paging',data) \ No newline at end of file diff --git a/src/api/system/region.ts b/src/api/system/region.ts new file mode 100644 index 00000000..80f5d217 --- /dev/null +++ b/src/api/system/region.ts @@ -0,0 +1,22 @@ +import server from '@/utils/request'; + +// 获取全部地区(树结构) +export const getRegionTree = (): Promise => server.post(`/area/_all/tree`); + +// 校验名称是否存在 +export const validateName = (name: string, id?: string): Promise => server.get(`/area/name/_validate?name=${name}${id ? `&id=${id}` : ''}`); + +//校验行政区划代码是否存在 +export const validateCode = (code: string, id?: string): Promise => server.get(`/area/code/_validate?code=${code}${id ? `&id=${id}` : ''}`); + +// 删除 +export const delRegion = (id: string): Promise => server.remove(`/area/${id}`); + +// 保存 +export const saveRegion = (data: any): Promise => server.post(`/area`, data); + +// 更新 +export const updateRegion = (data: any): Promise => server.patch(`/area`, data); + +// 获取全部内置地区(树结构) +export const getBuiltinRegionTree = (data: any): Promise => server.post(`/area/builtin/_all/tree`, data); diff --git a/src/api/system/role.ts b/src/api/system/role.ts index 9198a5e3..bb9a2670 100644 --- a/src/api/system/role.ts +++ b/src/api/system/role.ts @@ -1,3 +1,4 @@ +import request from '@/utils/request'; import server from '@/utils/request'; // 获取角色列表 @@ -25,4 +26,10 @@ export const getUserByRole_api = (data: any): Promise => server.post(`/user // 将用户与角色绑定 export const bindUser_api = (roleId:string, data: string[]): Promise => server.post(`/role/${roleId}/users/_bind`, data); // 将用户与角色解绑 -export const unbindUser_api = (roleId:string, data: string[]): Promise => server.post(`/role/${roleId}/users/_unbind`, data); \ No newline at end of file +export const unbindUser_api = (roleId:string, data: string[]): Promise => server.post(`/role/${roleId}/users/_unbind`, data); +//查询分组 +export const queryRoleGroup = (data:any) => request.post('/role/group/_query/no-paging',data) +//保存分组 +export const saveRoleGroup = (data:any) => request.patch('/role/group',data) +//删除分组 +export const deleteRoleGroup = (id:string) => request.remove(`/role/group/${id}`) \ No newline at end of file diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 9b6a01c3..4a36c5d3 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -15,8 +15,11 @@ export const validateField_api = (type: 'username' | 'password', name: string) = // 获取角色列表 export const getRoleList_api = () => server.get(`/role/_query/no-paging?paging=false`); + +//获取角色列表 +export const getRoleList = (data:any) => server.post('/role/group/detail/_query/tree',data) // 获取组织列表 -export const getDepartmentList_api = () => server.get(`/organization/_all/tree?paging=false`); +export const getDepartmentList_api = (data:any) => server.post(`/organization/_all/tree`,data); // 获取用户信息 export const getUser_api = (id: string) => server.get(`/user/detail/${id}`); @@ -33,4 +36,6 @@ export const updatePassword_api = (data: { id: string, password: string }) => se // 修改用户状态 export const changeUserStatus_api = (data: object) => server.patch(`/user`,data); // 删除用户 -export const deleteUser_api = (id: string) => server.remove(`/user/${id}`); \ No newline at end of file +export const deleteUser_api = (id: string) => server.remove(`/user/${id}`); +// 查询角色不分页 +export const queryRole_api = (data: any): Promise => server.post(`/role/_query/no-paging`, data) \ No newline at end of file diff --git a/src/components/AMapComponent/index.vue b/src/components/AMapComponent/index.vue index 6dec0ed4..8de55a2e 100644 --- a/src/components/AMapComponent/index.vue +++ b/src/components/AMapComponent/index.vue @@ -22,6 +22,8 @@ import '@vuemap/vue-amap/dist/style.css'; import { getAMapUiPromise } from './utils'; import { useSystem } from '@/store/system'; +const emit = defineEmits('init') + const system = useSystem(); interface AMapProps { style?: CSSProperties; @@ -65,8 +67,9 @@ const initMap = (e: any) => { if (isOpenUi.value) { getAMapUI(); } + emit('init', e) }; \ No newline at end of file + diff --git a/src/components/Layout/SinglePage.vue b/src/components/Layout/SinglePage.vue new file mode 100644 index 00000000..c2f0fd49 --- /dev/null +++ b/src/components/Layout/SinglePage.vue @@ -0,0 +1,129 @@ + - diff --git a/src/views/init-home/Menu/index.vue b/src/views/init-home/Menu/index.vue index d4270dde..6ce235ff 100644 --- a/src/views/init-home/Menu/index.vue +++ b/src/views/init-home/Menu/index.vue @@ -96,12 +96,26 @@ const menuCount = (menus: any[]) => { return pre + _count; }, 0); }; +/** + * 添加options show用于控制菜单是否显示函数 + */ +const dealMenu = (data:any) =>{ + data.forEach((item:any)=>{ + item.options = Object.assign({ + show: true + }, item?.options || {}) + if(item.children){ + dealMenu(item.children) + } + }) +} /** * 初始化菜单 */ const initMenu = async () => { return new Promise(async (resolve) => { // 用户中心 + dealMenu(menuDatas.current) console.log([...menuDatas.current!, USER_CENTER_MENU_DATA]); const res = await updateMenus([...menuDatas.current!, USER_CENTER_MENU_DATA]); if (res.status === 200) { @@ -125,4 +139,4 @@ defineExpose({ margin-right: 16px; } } - \ No newline at end of file + diff --git a/src/views/init-home/Role/index.vue b/src/views/init-home/Role/index.vue index de2505b8..a1701027 100644 --- a/src/views/init-home/Role/index.vue +++ b/src/views/init-home/Role/index.vue @@ -1,15 +1,31 @@ \ No newline at end of file +} \ No newline at end of file diff --git a/src/views/init-home/data/RoleData.ts b/src/views/init-home/data/RoleData.ts index 098e5a41..ae6f81f8 100644 --- a/src/views/init-home/data/RoleData.ts +++ b/src/views/init-home/data/RoleData.ts @@ -13,15 +13,18 @@ export const RoleData = { [ROLEKEYS.device]: { name: '设备接入岗', description: '该角色负责设备接入模块的维护管理', + groupId:'default_group', state: { text: '正常', value: 'enabled' }, }, [ROLEKEYS.link]: { name: '运维管理岗', + groupId:'default_group', description: '该角色负责系统运维模块的维护管理', state: { text: '正常', value: 'enabled' }, }, [ROLEKEYS.complex]: { name: '综合管理岗', + groupId:'default_group', description: '该角色负责系统运维和设备接入模块的维护管理', state: { text: '正常', value: 'enabled' }, }, diff --git a/src/views/init-home/data/baseMenu.ts b/src/views/init-home/data/baseMenu.ts index a8211b1b..0547d948 100644 --- a/src/views/init-home/data/baseMenu.ts +++ b/src/views/init-home/data/baseMenu.ts @@ -13,6 +13,9 @@ export const USER_CENTER_MENU_DATA = { sortIndex: 9999, granted: true, owner: 'iot', + options: { + isShow: false, + }, permissions: [ { permission: 'system_config', @@ -1413,7 +1416,7 @@ export default [ }, ], }, - + ], accessSupport: { text: "间接支持", value: "indirect" }, supportDataAccess: false, @@ -1672,119 +1675,199 @@ export default [ permissions: [], buttons: [ { - id: 'view', - name: '查看', - permissions: [ + "id": "view", + "name": "查看", + "permissions": [ { - permission: 'data-collect-channel', - actions: ['query'], + "permission": "data-collect-channel", + "actions": [ + "query" + ] }, { - permission: 'data-collector', - actions: ['query'], + "permission": "data-collector", + "actions": [ + "query" + ] }, { - permission: 'data-collect-opc', - actions: ['query'], + "permission": "data-collect-opc", + "actions": [ + "query" + ] }, { - permission: 'things-collector', - actions: ['query'], + "permission": "things-collector", + "actions": [ + "query" + ] }, - ], + { + "permission": "s7-client", + "actions": [ + "query" + ] + } + ] }, { - id: 'add', - name: '新增', - permissions: [ + "id": "add", + "name": "新增", + "permissions": [ { - permission: 'data-collect-channel', - actions: ['save', 'query'], + "permission": "data-collect-channel", + "actions": [ + "query", + "save" + ] }, { - permission: 'data-collector', - actions: ['save', 'query'], + "permission": "data-collector", + "actions": [ + "query", + "save" + ] }, { - permission: 'data-collect-opc', - actions: ['save', 'query'], + "permission": "data-collect-opc", + "actions": [ + "query", + "save" + ] }, { - permission: 'things-collector', - actions: ['save', 'query'], + "permission": "things-collector", + "actions": [ + "query", + "save" + ] }, - ], + { + "permission": "s7-client", + "actions": [ + "query" + ] + } + ] }, { - id: 'update', - name: '编辑', - permissions: [ + "id": "update", + "name": "编辑", + "permissions": [ { - permission: 'data-collect-channel', - actions: ['save', 'query'], + "permission": "data-collect-channel", + "actions": [ + "query", + "save" + ] }, { - permission: 'data-collector', - actions: ['save', 'query'], + "permission": "data-collector", + "actions": [ + "query", + "save" + ] }, { - permission: 'data-collect-opc', - actions: ['save', 'query'], + "permission": "data-collect-opc", + "actions": [ + "query", + "save" + ] }, { - permission: 'things-collector', - actions: ['save', 'query'], + "permission": "things-collector", + "actions": [ + "query", + "save" + ] }, { - permission: 'certificate', - actions: ['query'], + "permission": "certificate", + "actions": [ + "query" + ] }, - ], + { + "permission": "s7-client", + "actions": [ + "query" + ] + } + ] }, { - id: 'action', - name: '禁用/启用', - permissions: [ + "id": "action", + "name": "禁用/启用", + "permissions": [ { - permission: 'data-collect-channel', - actions: ['save', 'query'], + "permission": "data-collect-channel", + "actions": [ + "query", + "save" + ] }, { - permission: 'data-collector', - actions: ['save', 'query'], + "permission": "data-collector", + "actions": [ + "query", + "save" + ] }, { - permission: 'data-collect-opc', - actions: ['save', 'query'], + "permission": "data-collect-opc", + "actions": [ + "query", + "save" + ] }, { - permission: 'things-collector', - actions: ['save', 'query'], + "permission": "things-collector", + "actions": [ + "query", + "save" + ] }, - ], + { + "permission": "s7-client", + "actions": [] + } + ] }, { - id: 'delete', - name: '删除', - permissions: [ + "id": "delete", + "name": "删除", + "permissions": [ { - permission: 'data-collect-channel', - actions: ['delete', 'query'], + "permission": "data-collect-channel", + "actions": [ + "query", + "delete" + ] }, { - permission: 'data-collector', - actions: ['delete', 'query'], + "permission": "data-collector", + "actions": [ + "query", + "delete" + ] }, { - permission: 'data-collect-opc', - actions: ['delete', 'query'], + "permission": "data-collect-opc", + "actions": [ + "query", + "delete" + ] }, { - permission: 'things-collector', - actions: ['delete', 'query'], - }, - ], - }, + "permission": "things-collector", + "actions": [ + "query", + "delete" + ] + } + ] + } ], accessSupport: { text: "支持", value: "support" }, supportDataAccess: true, @@ -3445,6 +3528,30 @@ export default [ permission: 'role', actions: ['query'], }, + { + permission: 'role-group', + actions: ['query'] + } + ], + }, + { + id: 'groupUpdate', + name: '角色组编辑', + permissions: [ + { + permission: 'role-group', + actions: ['query','save'] + } + ], + }, + { + id: 'groupDelete', + name: '角色组删除', + permissions: [ + { + permission: 'role-group', + actions: ['query','delete'] + } ], }, ], @@ -4013,6 +4120,144 @@ export default [ accessSupport: { text: "不支持", value: "unsupported" }, supportDataAccess: false }, + { + code: 'system/Dictionary', + name: '数据字典', + owner: 'iot', + id: 'b69782873cc24be8165c6ad292359092', + sortIndex: 12, + url: '/system/Dictionary', + icon: 'FormOutlined', + showPage: ['dictionary'], + permissions: [], + buttons: [ + { + id: "add", + name: "新增", + permissions: [ + { + permission: "dictionary", + actions: [ + "save" + ] + } + ] + }, + { + id: "delete", + name: "删除", + permissions: [ + { + permission: "dictionary", + actions: [ + "delete" + ] + } + ] + }, + { + id: "update", + name: "编辑", + permissions: [ + { + permission: "dictionary", + actions: [ + "save" + ] + } + ] + }, + { + id: "import", + name: "导入", + permissions: [ + { + permission: "dictionary", + actions: [ + "save" + ] + } + ] + }, + { + id: "down", + name: "下载", + permissions: [ + { + permission: "dictionary", + actions: [ + "query" + ] + } + ] + }, + { + id: "action", + name: "启用/禁用", + permissions: [ + { + permission: "dictionary", + actions: [ + "save" + ] + } + ] + } + ], + accessSupport: { text: "不支持", value: "unsupported" }, + supportDataAccess: false + }, + { + code: 'system/Region', + name: '地区管理', + owner: 'iot', + id: 'b69782873cc24be8165c6ad29233333', + sortIndex: 12, + url: '/system/region', + icon: 'FormOutlined', + showPage: ['area'], + permissions: [], + buttons: [ + { + id: "add", + name: "新增", + permissions: [ + { + permission: "area", + actions: [ + "save" + ] + } + ] + }, + { + id: "delete", + name: "删除", + permissions: [ + { + permission: "area", + actions: [ + "delete" + ] + } + ] + }, + { + id: "update", + name: "编辑", + permissions: [ + { + permission: "area", + actions: [ + "save" + ] + } + ] + }, + ], + accessSupport: { text: "不支持", value: "unsupported" }, + supportDataAccess: false + }, // { // code: 'system/License', // name: 'License管理', @@ -4426,5 +4671,1387 @@ export default [ supportDataAccess: false }, ], + }, + { + "path": "3n23", + "sortIndex": 5, + "level": 1, + "owner": "iot", + "name": "WEB IDE", + "code": "web_ide", + "url": "/web_ide", + "icon": "MenuUnfoldOutlined", + showPage: ["low-code-info", "low-code-editor"], + "options": { + isShow: false, + }, + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + permissions: [ + { + "permission": "low-code-info", + "actions": [ + "add", "query", "save", "delete" + ] + }, + { + "permission": "low-code-editor", + "actions": [ + "query", "deploy" + ] + } + ], + "creatorId": "1199596756811550720", + "createTime": 1698735482730, + "supportDataAccess": false + }, + { + "path": "3nkE", + "sortIndex": 6, + "level": 1, + "owner": "iot", + "name": "流程引擎", + "code": "process", + "url": "/workflow", + "icon": "MenuUnfoldOutlined", + showPage: ["process-form","process-deployment", "process-runtime"], + "options": { + "show": true, + "isShow": false + }, + "permissions": [ + { + "permission": "low-code-info", + "actions": [ + "query" + ] + }, + { + "permission": "process-runtime", + "actions": [ + "transfer", + "reject", + "query", + "start", + "save", + "self", + "claim", + "delete-ready", + "complete", + "createAndStart", + "repeal" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "children": [ + // { + // "path": "3nkE-n7lJ", + // "sortIndex": 1, + // "level": 2, + // "name": "工作流", + // "code": "process/home", + // "describe": "", + // "url": "/workflow/home", + // "icon": "UpCircleOutlined", + // showPage: ["process-form"], + // "permissions": [ + // { + // "permission": "process-form", + // "actions": [ + // "query" + // ] + // }, + // { + // "permission": "low-code-info", + // "actions": [ + // "query" + // ] + // }, + // ], + // "accessSupport": { + // "text": "不支持", + // "value": "unsupported" + // }, + // "indirectMenus": [], + // "buttons": [], + // "options": { + // "show": true + // }, + // "creatorId": "1199596756811550720", + // "createTime": 1699263818795, + // "supportDataAccess": false + // }, + { + "path": "3nkE-n7lJ", + "sortIndex": 2, + "level": 2, + "name": "表单", + "code": "process/form", + "describe": "", + "owner": "iot", + "url": "/workflow/form", + "icon": "UpCircleOutlined", + showPage: ["process-form"], + "permissions": [ + { + "permission": "process-form", + "actions": [ + "query" + ] + }, + { + "permission": "role", + "actions": [ + "query" + ] + }, + { + "permission": "role-group", + "actions": [ + "query" + ] + }, + { + "permission": "user", + "actions": [ + "query" + ] + }, + { + "permission": "user-third-party-manager", + "actions": [ + "query" + ] + }, + { + "permission": "user-token", + "actions": [ + "query" + ] + }, + { + "permission": "device-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-category", + "actions": [ + "query" + ] + }, + { + "permission": "edge-product", + "actions": [ + "query" + ] + }, + { + "permission": "dueros-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-gateway", + "actions": [ + "query" + ] + }, + { + "permission": "device-msg-task", + "actions": [ + "query" + ] + }, + { + "permission": "device-group", + "actions": [ + "query" + ] + }, + { + "permission": "opc-point", + "actions": [ + "query" + ] + }, + { + "permission": "device-mapping", + "actions": [ + "query" + ] + }, + { + "permission": "dictionary", + "actions": [ + "query" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "buttons": [ + { + "id": "add", + "name": "新增", + "permissions": [ + { + "permission": "process-form", + "actions": [ + "save" + ] + } + ] + }, + { + "id": "save", + "name": "保存", + "permissions": [ + { + "permission": "process-form", + "actions": [ + "save" + ] + } + ] + }, + { + "id": "update", + "name": "编辑", + "permissions": [ + { + "permission": "process-form", + "actions": [ + "save" + ] + } + ] + }, + { + "id": "delete", + "name": "删除", + "permissions": [ + { + "permission": "process-form", + "actions": [ + "delete" + ] + } + ] + } + ], + "options": { + "show": true + }, + "creatorId": "1199596756811550720", + "createTime": 1699263818795, + "supportDataAccess": false + }, + { + "path": "3nkE-ysKb", + "sortIndex": 3, + "level": 2, + "name": "流程模型", + "code": "process/model", + "describe": "", + "owner": "iot", + "url": "/workflow/model", + "icon": "UpCircleOutlined", + showPage: ["process-definition"], + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "query" + ] + }, + { + "permission": "role", + "actions": [ + "query" + ] + }, + { + "permission": "role-group", + "actions": [ + "query" + ] + }, + { + "permission": "user", + "actions": [ + "query" + ] + }, + { + "permission": "user-third-party-manager", + "actions": [ + "query" + ] + }, + { + "permission": "user-token", + "actions": [ + "query" + ] + }, + { + "permission": "device-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-category", + "actions": [ + "query" + ] + }, + { + "permission": "edge-product", + "actions": [ + "query" + ] + }, + { + "permission": "dueros-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-gateway", + "actions": [ + "query" + ] + }, + { + "permission": "device-msg-task", + "actions": [ + "query" + ] + }, + { + "permission": "device-group", + "actions": [ + "query" + ] + }, + { + "permission": "opc-point", + "actions": [ + "query" + ] + }, + { + "permission": "device-mapping", + "actions": [ + "query" + ] + }, + { + "permission": "dictionary", + "actions": [ + "query" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "buttons": [ + { + "id": "add", + "name": "新增", + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "save" + ] + } + ] + }, + { + "id": "delete", + "name": "删除", + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "delete" + ] + } + ] + }, + { + "id": "update", + "name": "编辑", + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "save" + ] + } + ] + }, + { + "id": "save", + "name": "保存", + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "save" + ] + } + ] + }, + { + "id": "deploy", + "name": "部署", + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "save" + ] + } + ] + } + ], + "options": { + "show": true + }, + "creatorId": "1199596756811550720", + "createTime": 1699264341009, + "supportDataAccess": false + }, + { + "path": "3nkE-fJkR", + "sortIndex": 4, + "level": 2, + "name": "流程实例", + "code": "process/instance", + "describe": "", + "owner": "iot", + showPage: ["process-deployment"], + "url": "/workflow/instance", + "icon": "UpCircleOutlined", + "status": 1, + "permissions": [ + { + "permission": "process-deployment", + "actions": [ + "query" + ] + }, + { + "permission": "role", + "actions": [ + "query" + ] + }, + { + "permission": "role-group", + "actions": [ + "query" + ] + }, + { + "permission": "user", + "actions": [ + "query" + ] + }, + { + "permission": "user-third-party-manager", + "actions": [ + "query" + ] + }, + { + "permission": "user-token", + "actions": [ + "query" + ] + }, + { + "permission": "device-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-category", + "actions": [ + "query" + ] + }, + { + "permission": "edge-product", + "actions": [ + "query" + ] + }, + { + "permission": "dueros-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-gateway", + "actions": [ + "query" + ] + }, + { + "permission": "device-msg-task", + "actions": [ + "query" + ] + }, + { + "permission": "device-group", + "actions": [ + "query" + ] + }, + { + "permission": "opc-point", + "actions": [ + "query" + ] + }, + { + "permission": "device-mapping", + "actions": [ + "query" + ] + }, + { + "permission": "dictionary", + "actions": [ + "query" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "buttons": [ + { + "id": "action", + "name": "启/禁用", + "permissions": [ + { + "permission": "process-deployment", + "actions": [ + "save" + ] + } + ] + }, + { + "id": "auth", + "name": "权限控制", + "permissions": [ + { + "permission": "process-deployment", + "actions": [ + "save" + ] + } + ] + }, + { + "id": "delete", + "name": "删除", + "permissions": [ + { + "permission": "process-deployment", + "actions": [ + "delete" + ] + } + ] + } + ], + "options": { + "show": true + }, + "creatorId": "1199596756811550720", + "createTime": 1699264485954, + "supportDataAccess": false + }, + { + "path": "3nkE-i2nG", + "sortIndex": 5, + "level": 2, + "name": "发起流程", + "code": "process/initiate", + "describe": "", + "owner": "iot", + "url": "/workflow/initiate", + "icon": "UpOutlined", + showPage: ["process-runtime"], + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "query" + ] + }, + { + "permission": "process-deployment", + "actions": [ + "query" + ] + }, + { + "permission": "process-form", + "actions": [ + "query" + ] + }, + { + "permission": "process-runtime", + "actions": [ + "transfer", + "reject", + "query", + "start", + "save", + "self", + "claim", + "delete-ready", + "complete", + "createAndStart", + "repeal" + ] + }, + { + "permission": "role", + "actions": [ + "query" + ] + }, + { + "permission": "role-group", + "actions": [ + "query" + ] + }, + { + "permission": "user", + "actions": [ + "query" + ] + }, + { + "permission": "user-third-party-manager", + "actions": [ + "query" + ] + }, + { + "permission": "user-token", + "actions": [ + "query" + ] + }, + { + "permission": "device-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-category", + "actions": [ + "query" + ] + }, + { + "permission": "edge-product", + "actions": [ + "query" + ] + }, + { + "permission": "dueros-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-gateway", + "actions": [ + "query" + ] + }, + { + "permission": "device-msg-task", + "actions": [ + "query" + ] + }, + { + "permission": "device-group", + "actions": [ + "query" + ] + }, + { + "permission": "opc-point", + "actions": [ + "query" + ] + }, + { + "permission": "device-mapping", + "actions": [ + "query" + ] + }, + { + "permission": "dictionary", + "actions": [ + "query" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "options": { + "show": true + }, + "creatorId": "1199596756811550720", + "createTime": 1699269393605, + "supportDataAccess": false + }, + { + "path": "3nkE-4T1D", + "sortIndex": 6, + "level": 2, + "name": "待办事项", + "code": "process/me/todo", + "describe": "", + "owner": "iot", + "url": "/workflow/me/todo", + "icon": "UpCircleOutlined", + showPage: ["process-runtime"], + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "query" + ] + }, + { + "permission": "process-deployment", + "actions": [ + "query" + ] + }, + { + "permission": "process-form", + "actions": [ + "query" + ] + }, + { + "permission": "process-runtime", + "actions": [ + "transfer", + "reject", + "query", + "start", + "save", + "self", + "claim", + "delete-ready", + "complete", + "createAndStart", + "repeal" + ] + }, + { + "permission": "role", + "actions": [ + "query" + ] + }, + { + "permission": "role-group", + "actions": [ + "query" + ] + }, + { + "permission": "user", + "actions": [ + "query" + ] + }, + { + "permission": "user-third-party-manager", + "actions": [ + "query" + ] + }, + { + "permission": "user-token", + "actions": [ + "query" + ] + }, + { + "permission": "device-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-category", + "actions": [ + "query" + ] + }, + { + "permission": "edge-product", + "actions": [ + "query" + ] + }, + { + "permission": "dueros-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-gateway", + "actions": [ + "query" + ] + }, + { + "permission": "device-msg-task", + "actions": [ + "query" + ] + }, + { + "permission": "device-group", + "actions": [ + "query" + ] + }, + { + "permission": "opc-point", + "actions": [ + "query" + ] + }, + { + "permission": "device-mapping", + "actions": [ + "query" + ] + }, + { + "permission": "dictionary", + "actions": [ + "query" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "options": { + "show": true + }, + "creatorId": "1199596756811550720", + "createTime": 1699269425041, + "supportDataAccess": false + }, + { + "path": "3nkE-RXP3", + "sortIndex": 7, + "level": 2, + "name": "已办事项", + "code": "process/me/finished", + "describe": "", + "owner": "iot", + "url": "/workflow/me/finished", + "icon": "UpCircleOutlined", + showPage: ["process-runtime"], + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "query" + ] + }, + { + "permission": "process-deployment", + "actions": [ + "query" + ] + }, + { + "permission": "process-form", + "actions": [ + "query" + ] + }, + { + "permission": "process-runtime", + "actions": [ + "transfer", + "reject", + "query", + "start", + "save", + "self", + "claim", + "delete-ready", + "complete", + "createAndStart", + "repeal" + ] + }, + { + "permission": "role", + "actions": [ + "query" + ] + }, + { + "permission": "role-group", + "actions": [ + "query" + ] + }, + { + "permission": "user", + "actions": [ + "query" + ] + }, + { + "permission": "user-third-party-manager", + "actions": [ + "query" + ] + }, + { + "permission": "user-token", + "actions": [ + "query" + ] + }, + { + "permission": "device-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-category", + "actions": [ + "query" + ] + }, + { + "permission": "edge-product", + "actions": [ + "query" + ] + }, + { + "permission": "dueros-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-gateway", + "actions": [ + "query" + ] + }, + { + "permission": "device-msg-task", + "actions": [ + "query" + ] + }, + { + "permission": "device-group", + "actions": [ + "query" + ] + }, + { + "permission": "opc-point", + "actions": [ + "query" + ] + }, + { + "permission": "device-mapping", + "actions": [ + "query" + ] + }, + { + "permission": "dictionary", + "actions": [ + "query" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "options": { + "show": true + }, + "creatorId": "1199596756811550720", + "createTime": 1699269455412, + "supportDataAccess": false + }, + { + "path": "3nkE-ibau", + "sortIndex": 8, + "level": 2, + "name": "我发起的", + "code": "process/me/initiate", + "describe": "", + "owner": "iot", + "url": "/workflow/me/initiate", + "icon": "UpCircleOutlined", + showPage: ["process-runtime"], + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "query" + ] + }, + { + "permission": "process-deployment", + "actions": [ + "query" + ] + }, + { + "permission": "process-form", + "actions": [ + "query" + ] + }, + { + "permission": "process-runtime", + "actions": [ + "transfer", + "reject", + "query", + "start", + "save", + "self", + "claim", + "delete-ready", + "complete", + "createAndStart", + "repeal" + ] + }, + { + "permission": "role", + "actions": [ + "query" + ] + }, + { + "permission": "role-group", + "actions": [ + "query" + ] + }, + { + "permission": "user", + "actions": [ + "query" + ] + }, + { + "permission": "user-third-party-manager", + "actions": [ + "query" + ] + }, + { + "permission": "user-token", + "actions": [ + "query" + ] + }, + { + "permission": "device-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-category", + "actions": [ + "query" + ] + }, + { + "permission": "edge-product", + "actions": [ + "query" + ] + }, + { + "permission": "dueros-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-gateway", + "actions": [ + "query" + ] + }, + { + "permission": "device-msg-task", + "actions": [ + "query" + ] + }, + { + "permission": "device-group", + "actions": [ + "query" + ] + }, + { + "permission": "opc-point", + "actions": [ + "query" + ] + }, + { + "permission": "device-mapping", + "actions": [ + "query" + ] + }, + { + "permission": "dictionary", + "actions": [ + "query" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "options": { + "show": true + }, + "creatorId": "1199596756811550720", + "createTime": 1699269488928, + "supportDataAccess": false + }, + { + "path": "3nkE-vCQb", + "sortIndex": 9, + "level": 2, + "name": "抄送给我", + "code": "process/me/cc", + "describe": "", + "owner": "iot", + "url": "/workflow/me/cc", + "icon": "BorderInnerOutlined", + "status": 1, + showPage: ["process-runtime"], + "permissions": [ + { + "permission": "process-definition", + "actions": [ + "query" + ] + }, + { + "permission": "process-runtime", + "actions": [ + "transfer", + "reject", + "query", + "start", + "save", + "self", + "claim", + "delete-ready", + "complete", + "createAndStart", + "repeal" + ] + }, + { + "permission": "process-deployment", + "actions": [ + "query" + ] + }, + { + "permission": "process-form", + "actions": [ + "query" + ] + }, + { + "permission": "role", + "actions": [ + "query" + ] + }, + { + "permission": "role-group", + "actions": [ + "query" + ] + }, + { + "permission": "user", + "actions": [ + "query" + ] + }, + { + "permission": "user-third-party-manager", + "actions": [ + "query" + ] + }, + { + "permission": "user-token", + "actions": [ + "query" + ] + }, + { + "permission": "device-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-category", + "actions": [ + "query" + ] + }, + { + "permission": "edge-product", + "actions": [ + "query" + ] + }, + { + "permission": "dueros-product", + "actions": [ + "query" + ] + }, + { + "permission": "device-gateway", + "actions": [ + "query" + ] + }, + { + "permission": "device-msg-task", + "actions": [ + "query" + ] + }, + { + "permission": "device-group", + "actions": [ + "query" + ] + }, + { + "permission": "opc-point", + "actions": [ + "query" + ] + }, + { + "permission": "device-mapping", + "actions": [ + "query" + ] + }, + { + "permission": "dictionary", + "actions": [ + "query" + ] + } + ], + "accessSupport": { + "text": "不支持", + "value": "unsupported" + }, + "indirectMenus": [], + "options": { + "show": true + }, + "creatorId": "1199596756811550720", + "createTime": 1699348851779, + "supportDataAccess": false + } + ], + "creatorId": "8004214f8141f29cb951befdca3615f0", + "createTime": 1699262480040, + "supportDataAccess": false } ]; diff --git a/src/views/init-home/index.vue b/src/views/init-home/index.vue index f8becc64..3e48d85c 100644 --- a/src/views/init-home/index.vue +++ b/src/views/init-home/index.vue @@ -112,6 +112,11 @@ const submitData = async () => { loading.value = false; return; } + const roleGroupRes = await roleRef.value.submitRoleGroup(); + if (!roleGroupRes) { + loading.value = false; + return; + } const initDataRes = await initDataRef.value.save(); if (!initDataRes) { loading.value = false; @@ -119,7 +124,7 @@ const submitData = async () => { } loading.value = false; // 当前数据是否成功提交 - if (basicRes && menuRes && roleRes && initDataRes) { + if (basicRes && menuRes && roleRes && roleGroupRes && initDataRes) { onlyMessage('保存成功'); // // 记录初始化数据,跳转首页 const res = await saveInit(); diff --git a/src/views/rule-engine/Scene/Save/action/ListItem/FilterCondition.vue b/src/views/rule-engine/Scene/Save/action/ListItem/FilterCondition.vue index 5469d1d2..08a81d47 100644 --- a/src/views/rule-engine/Scene/Save/action/ListItem/FilterCondition.vue +++ b/src/views/rule-engine/Scene/Save/action/ListItem/FilterCondition.vue @@ -203,6 +203,17 @@ const handOptionByColumn = (option: any) => { valueOptions.value = [] valueColumnOptions.value = [] } + if(paramsValue.termType){ + if (columnType.value ==='date') { + if (timeTypeKeys.includes(paramsValue.termType)) { + if (tabsOptions.value[0].component !== 'int') { + } + tabsOptions.value[0].component = 'int' + } else if (!timeTypeKeys.includes(paramsValue.termType) && tabsOptions.value[0].component == 'int') { + tabsOptions.value[0].component = 'date' + } + } + } } watch(() => [columnOptions.value, paramsValue.column], () => { @@ -367,4 +378,4 @@ nextTick(() => { \ No newline at end of file + diff --git a/src/views/system/Apply/componenets/MenuDialog.vue b/src/views/system/Apply/componenets/MenuDialog.vue index c5f13f13..ce351e2c 100644 --- a/src/views/system/Apply/componenets/MenuDialog.vue +++ b/src/views/system/Apply/componenets/MenuDialog.vue @@ -127,7 +127,16 @@ function getMenus(id: string) { { column: 'appId', value: id, - }, + }, + { + terms:[ + { + value:"%show\":true%", + termType:"like", + column:"options" + } + ] + } ], }; getMenuTree_api(params).then((resp: any) => { diff --git a/src/views/system/Apply/index.vue b/src/views/system/Apply/index.vue index 486a395c..10589b6a 100644 --- a/src/views/system/Apply/index.vue +++ b/src/views/system/Apply/index.vue @@ -221,6 +221,7 @@ const permission = 'system/Apply'; const typeOptions = ref([]) const visible = ref(false) +const addMenuVisible = ref(false) onMounted(() => { queryType().then((resp: any) => { diff --git a/src/views/system/Basis/index.vue b/src/views/system/Basis/index.vue index 8fddcbb4..7424577b 100644 --- a/src/views/system/Basis/index.vue +++ b/src/views/system/Basis/index.vue @@ -332,7 +332,6 @@ import { save_api } from '@/api/system/basis'; import { usePermissionStore } from '@/store/permission'; import { useSystem } from '@/store/system'; import { settingDetail } from '@/api/login'; - const action = `${BASE_API_PATH}/file/static`; const headers = { [TOKEN_KEY]: LocalStore.get(TOKEN_KEY) }; const formRef = ref(); diff --git a/src/views/system/Dictionary/components/Left/Export/index.vue b/src/views/system/Dictionary/components/Left/Export/index.vue new file mode 100644 index 00000000..ebf5f3ec --- /dev/null +++ b/src/views/system/Dictionary/components/Left/Export/index.vue @@ -0,0 +1,98 @@ + + + + \ No newline at end of file diff --git a/src/views/system/Dictionary/components/Left/index.vue b/src/views/system/Dictionary/components/Left/index.vue new file mode 100644 index 00000000..f6ad60f6 --- /dev/null +++ b/src/views/system/Dictionary/components/Left/index.vue @@ -0,0 +1,218 @@ + + + + \ No newline at end of file diff --git a/src/views/system/Dictionary/components/Left/save/index.vue b/src/views/system/Dictionary/components/Left/save/index.vue new file mode 100644 index 00000000..17306c29 --- /dev/null +++ b/src/views/system/Dictionary/components/Left/save/index.vue @@ -0,0 +1,125 @@ + + + + \ No newline at end of file diff --git a/src/views/system/Dictionary/components/Right/Save/index.vue b/src/views/system/Dictionary/components/Right/Save/index.vue new file mode 100644 index 00000000..66cf6bb7 --- /dev/null +++ b/src/views/system/Dictionary/components/Right/Save/index.vue @@ -0,0 +1,143 @@ + + + + \ No newline at end of file diff --git a/src/views/system/Dictionary/components/Right/index.vue b/src/views/system/Dictionary/components/Right/index.vue new file mode 100644 index 00000000..49723fce --- /dev/null +++ b/src/views/system/Dictionary/components/Right/index.vue @@ -0,0 +1,229 @@ + + + + \ No newline at end of file diff --git a/src/views/system/Dictionary/index.vue b/src/views/system/Dictionary/index.vue new file mode 100644 index 00000000..f7a5cf78 --- /dev/null +++ b/src/views/system/Dictionary/index.vue @@ -0,0 +1,45 @@ + + + + \ No newline at end of file diff --git a/src/views/system/Menu/Detail/BasicInfo.vue b/src/views/system/Menu/Detail/BasicInfo.vue index 656295cf..74797a06 100644 --- a/src/views/system/Menu/Detail/BasicInfo.vue +++ b/src/views/system/Menu/Detail/BasicInfo.vue @@ -4,209 +4,125 @@

基本信息

- +
- - 点击修改 + + 点击修改
-
+
- +

点击选择图标

- - + + - - + + - - + + - - + + + + + + + - - - - -
- +
-
+

权限配置

- + - + 不支持 支持 间接控制 - - + + - - + + - +
@@ -285,10 +172,12 @@ import { saveMenuInfo_api, addMenuInfo_api, validCode_api, + queryApp } from '@/api/system/menu'; import { Rule } from 'ant-design-vue/lib/form'; import { isNoCommunity } from '@/utils/utils'; import { onlyMessage } from '@/utils/comm'; +import { applicationInfo } from '@/api/bind'; const permission = 'system/Menu'; // 路由 @@ -300,11 +189,13 @@ const routeParams = { url: route.query.basePath, parentId: route.query.pid, }; - +const isChildren = route.query?.isChildren // 表单 const basicFormRef = ref(); const permissFormRef = ref(); const uploadIcon = ref(); +//菜单应用选项 +const appOptions = ref([]) const form = reactive({ data: { name: '', @@ -316,6 +207,8 @@ const form = reactive({ accessSupport: 'unsupported', assetType: undefined, indirectMenus: [], + appId: '', + application:'', ...routeParams, } as formType, treeData: [], // 关联菜单 @@ -329,6 +222,7 @@ const form = reactive({ getMenuInfo_api(routeParams.id).then((resp: any) => { form.data = { ...(resp.result as formType), + permissions: resp.result?.permissions ? resp.result.permissions : [], accessSupport: resp.result?.accessSupport?.value || 'unsupported', }; @@ -337,7 +231,15 @@ const form = reactive({ if (isNoCommunity) { // 获取关联菜单 - getMenuTree_api({ paging: false }).then((resp: any) => { + getMenuTree_api({ paging: false,terms:[{terms:[{ + terms:[ + { + value:"%show\":true%", + termType:"like", + column:"options" + } + ] + }]}]}).then((resp: any) => { form.treeData = resp.result; }); // 获取资产类型 @@ -374,9 +276,9 @@ const form = reactive({ const api = routeParams.id ? saveMenuInfo_api : addMenuInfo_api; form.saveLoading = true; const accessSupportValue = form.data.accessSupport; - const params = { + const params:any = { ...form.data, - owner: form.data?.owner ?? null, + owner: 'iot', options: { show: true }, accessSupport: { value: accessSupportValue, @@ -384,10 +286,13 @@ const form = reactive({ accessSupportValue === 'unsupported' ? '不支持' : accessSupportValue === 'support' - ? '支持' - : '间接控制', + ? '支持' + : '间接控制', }, }; + if(params?.isChildren){ + delete params.isChildren + } api(params) .then((resp: any) => { if (resp.status === 200) { @@ -406,18 +311,41 @@ const form = reactive({ }) .finally(() => (form.saveLoading = false)); }) - .catch((err) => {}); + .catch((err) => { }); }, }); form.init(); -const choseIcon = (typeStr:string) =>{ +const choseIcon = (typeStr: string) => { form.data.icon = typeStr; uploadIcon.value?.clearValidate(); } + +const selectApp = (value:string,options:any) =>{ + form.data.application = options?.label +} // 弹窗 const dialogVisible = ref(false); +onMounted(() => { + queryApp({ + terms: [ + { + "column": "integrationModes", + "termType": "in$any", + "value": "page" + } + ], + paging: false + }).then((res:any)=>{ + appOptions.value = res.result?.map((i:any)=>{ + return { + label:i.name, + value:i.id + } + }) + }) +}) type formType = { id?: string; name: string; @@ -431,6 +359,8 @@ type formType = { assetType: string | undefined; indirectMenus: any[]; parentId?: string; + appId:string, + application:string }; type assetType = { @@ -441,11 +371,11 @@ type assetType = { + + \ No newline at end of file diff --git a/src/views/system/Region/MapTool/index.ts b/src/views/system/Region/MapTool/index.ts new file mode 100644 index 00000000..e69de29b diff --git a/src/views/system/Region/MapTool/map.vue b/src/views/system/Region/MapTool/map.vue new file mode 100644 index 00000000..86f53450 --- /dev/null +++ b/src/views/system/Region/MapTool/map.vue @@ -0,0 +1,304 @@ + + + + + diff --git a/src/views/system/Region/Save/BuildIn.vue b/src/views/system/Region/Save/BuildIn.vue new file mode 100644 index 00000000..b822a9bd --- /dev/null +++ b/src/views/system/Region/Save/BuildIn.vue @@ -0,0 +1,124 @@ + + + \ No newline at end of file diff --git a/src/views/system/Region/Save/TracePoint.vue b/src/views/system/Region/Save/TracePoint.vue new file mode 100644 index 00000000..7281fc21 --- /dev/null +++ b/src/views/system/Region/Save/TracePoint.vue @@ -0,0 +1,45 @@ + + + \ No newline at end of file diff --git a/src/views/system/Region/Save/index.vue b/src/views/system/Region/Save/index.vue new file mode 100644 index 00000000..af122b86 --- /dev/null +++ b/src/views/system/Region/Save/index.vue @@ -0,0 +1,234 @@ + + + \ No newline at end of file diff --git a/src/views/system/Region/index.vue b/src/views/system/Region/index.vue new file mode 100644 index 00000000..80eeafdd --- /dev/null +++ b/src/views/system/Region/index.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/src/views/system/Relationship/components/EditDialog.vue b/src/views/system/Relationship/components/EditDialog.vue index 76a59000..8d733421 100644 --- a/src/views/system/Relationship/components/EditDialog.vue +++ b/src/views/system/Relationship/components/EditDialog.vue @@ -10,22 +10,9 @@ class="edit-dialog-container" > - - - + + 正向关系示例:用户张三是001号视频设备的管理员 + + + + + 反向关系示例:001号视频设备是用户张三的管辖设备 + (); // 弹窗相关 const loading = ref(false); +const targetList = ref([]) const dialogTitle = computed(() => (props.data.id ? '编辑' : '新增')); const confirm = () => { loading.value = true; @@ -180,6 +199,7 @@ const form = reactive({ getObjectList: () => { getObjectList_api().then((resp: any) => { form.objectList = resp.result; + targetList.value = resp.result }); }, submit: () => { @@ -187,7 +207,7 @@ const form = reactive({ ...form.data, objectTypeName: form.objectList.find( (item) => item.id === form.data.objectType, - ).name, + )?.name, targetTypeName: targetList.value.find( (item: dictItemType) => item.id === form.data.targetType, )?.name, @@ -196,13 +216,17 @@ const form = reactive({ return api(params); }, }); -const targetList = computed(() => - form.data.objectType === 'device' ? [{ id: 'user', name: '用户' }] : [], -); +const validateName = async(_:any,value:any)=>{ + if(!value){ + return Promise.resolve() + } + return form.data.reverseName === form.data.name ? Promise.reject('不能使用相同的关系名称') : Promise.resolve() +} form.getObjectList(); type formType = { name: string; + reverseName: string; relation: string; objectType: string | undefined; targetType: string | undefined; @@ -210,3 +234,9 @@ type formType = { id?: string; }; + diff --git a/src/views/system/Relationship/index.vue b/src/views/system/Relationship/index.vue index 4dbbf215..78d5de64 100644 --- a/src/views/system/Relationship/index.vue +++ b/src/views/system/Relationship/index.vue @@ -72,6 +72,7 @@ import PermissionButton from '@/components/PermissionButton/index.vue'; import { getRelationshipList_api, delRelation_api, + getObjectList_api } from '@/api/system/relationship'; import EditDialog from './components/EditDialog.vue'; import { onlyMessage } from '@/utils/comm'; @@ -80,7 +81,7 @@ const permission = 'system/Relationship'; const columns = [ { - title: '名称', + title: '正向关系名称', dataIndex: 'name', key: 'name', ellipsis: true, @@ -89,6 +90,16 @@ const columns = [ type: 'string', }, }, + { + title: '反向关系名称', + dataIndex: 'reverseName', + key: 'reverseName', + ellipsis: true, + fixed: 'left', + search: { + type: 'string', + }, + }, { title: '关联方', dataIndex: 'objectTypeName', @@ -97,17 +108,16 @@ const columns = [ fixed: 'left', search: { type: 'select', - options: [ - { - label: '用户', - value: '用户', - }, - { - label: '设备', - value: '设备', - }, - ], - }, + options: async () =>{ + const res:any = await getObjectList_api() + return res.result?.map((i:any)=>{ + return { + label:i.name, + value:i.id + } + }) + } + } }, { title: '被关联方', @@ -118,12 +128,15 @@ const columns = [ search: { rename: 'targetType', type: 'select', - options: [ - { - label: '用户', - value: 'user', - }, - ], + options: async () =>{ + const res:any = await getObjectList_api() + return res.result?.map((i:any)=>{ + return { + label:i.name, + value:i.id + } + }) + } }, }, { @@ -174,6 +187,7 @@ const dialog = reactive({ selectRow: {} as any, visible: false, }); + \ No newline at end of file diff --git a/src/views/system/Role/RoleRight/components/AddDialog.vue b/src/views/system/Role/RoleRight/components/AddDialog.vue new file mode 100644 index 00000000..9cfcadfc --- /dev/null +++ b/src/views/system/Role/RoleRight/components/AddDialog.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/src/views/system/Role/RoleRight/index.vue b/src/views/system/Role/RoleRight/index.vue new file mode 100644 index 00000000..857a0b18 --- /dev/null +++ b/src/views/system/Role/RoleRight/index.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/src/views/system/Role/components/AddDialog.vue b/src/views/system/Role/components/AddDialog.vue deleted file mode 100644 index 0154f3e9..00000000 --- a/src/views/system/Role/components/AddDialog.vue +++ /dev/null @@ -1,79 +0,0 @@ - - - - - diff --git a/src/views/system/Role/index.vue b/src/views/system/Role/index.vue index d104a40b..c435d41c 100644 --- a/src/views/system/Role/index.vue +++ b/src/views/system/Role/index.vue @@ -1,142 +1,40 @@ - - - - + + + + \ No newline at end of file diff --git a/src/views/system/User/components/EditUserDialog.vue b/src/views/system/User/components/EditUserDialog.vue index be2119eb..2154f31e 100644 --- a/src/views/system/User/components/EditUserDialog.vue +++ b/src/views/system/User/components/EditUserDialog.vue @@ -12,8 +12,9 @@ okText="确定" > +
基础信息
- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
账号信息
+ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -200,6 +214,7 @@ import { updateUser_api, updatePassword_api, getUser_api, + getRoleList } from '@/api/system/user'; import { Rule } from 'ant-design-vue/es/form'; import { DefaultOptionType } from 'ant-design-vue/es/vc-tree-select/TreeSelect'; @@ -207,10 +222,7 @@ import { AxiosResponse } from 'axios'; import { passwordRegEx } from '@/utils/validate'; import { filterSelectNode, onlyMessage } from '@/utils/comm'; import { uniqBy } from 'lodash-es'; - -const admin = computed(() => { - return userInfos.value?.username === 'admin'; -}) +import { storeToRefs } from 'pinia'; const deptPermission = 'system/Department'; const rolePermission = 'system/Role'; @@ -282,10 +294,9 @@ const form = reactive({ }, }, - roleOptions: [] as optionType[], + roleOptions: [], departmentOptions: [] as DefaultOptionType[], - _roleOptions: [] as optionType[], _departmentOptions: [] as DefaultOptionType[], init: () => { @@ -309,8 +320,8 @@ const form = reactive({ (item: dictType) => item.id, ), }; - form._roleOptions = resp.result?.roleList?.map((i: any) => { - return {label: i.name, value: i.id} + form.data.roleIdList = resp.result?.roleList?.map((i: any) => { + return i.id }); form._departmentOptions = resp.result?.orgList nextTick(() => { @@ -348,16 +359,22 @@ const form = reactive({ return api(params); }, getRoleList: () => { - getRoleList_api().then((resp: any) => { - form.roleOptions = resp.result.map((item: dictType) => ({ - label: item.name, - value: item.id, - })); + getRoleList({ sorts: [{ name: 'createTime', order: 'desc' }] }).then((resp: any) => { + if(resp.status === 200){ + form.roleOptions = dealRoleList(resp.result) + } }); }, getDepartmentList: () => { - getDepartmentList_api().then((resp: any) => { - form.departmentOptions = resp.result; + getDepartmentList_api({ + paging: false, + sorts: [{ name: 'sortIndex', order: 'asc' }], + }).then((resp: any) => { + form.departmentOptions = resp.result.sort((a: any, b: any) => + a.sortIndex === b.sortIndex + ? b.createTime - a.createTime + : a.sortIndex - b.sortIndex, + ); // 报存源数据; }); }, IsShow: (...typeList: modalType[]) => typeList.includes(props.type), @@ -371,13 +388,25 @@ const form = reactive({ }, }); -const _roleOptions = computed(() => { - return uniqBy([...form.roleOptions, ...form._roleOptions], 'value') -}) - -const _departmentOptions = computed(() => { - return uniqBy([...form.departmentOptions, ...form._departmentOptions], 'id') -}) +const dealRoleList = (data:any) =>{ + return data.map((item:any)=>{ + return { + name: item.groupName, + id: item.groupId, + disabled: true, + children: item?.roles ? item.roles.map((i:any)=>{ + return { + name:i.name, + id:i.id + } + }) : [] + } + }) +} +// 组织已删除在仍显示在列表中 +// const _departmentOptions = computed(() => { +// return uniqBy([...form.departmentOptions, ...form._departmentOptions], 'id') +// }) form.init(); @@ -442,4 +471,16 @@ type optionType = { } } } +.formName{ + margin-bottom: 10px; + font-size: 16px; + &::before{ + width: 2px; + background-color: rgb(184, 184, 184); + display: inline-block; + height: 13px; + margin-right: 3px; + content:'' + } +} diff --git a/src/views/system/User/index.vue b/src/views/system/User/index.vue index 71c6b654..28542da6 100644 --- a/src/views/system/User/index.vue +++ b/src/views/system/User/index.vue @@ -29,6 +29,13 @@ +