diff --git a/src/api/system/department.ts b/src/api/system/department.ts index 993025d1..0a249ffe 100644 --- a/src/api/system/department.ts +++ b/src/api/system/department.ts @@ -1,10 +1,18 @@ import server from '@/utils/request'; -// 获取tree数据-第一层 +// 获取部门数据 export const getTreeData_api = (data:object) => server.post(`/organization/_all/tree`, data); // 新增部门 export const addDepartment_api = (data:object) => server.post(`/organization`, data); // 更新部门 export const updateDepartment_api = (data:object) => server.patch(`/organization`, data); // 删除部门 -export const delDepartment_api = (id:string) => server.remove(`/organization/${id}`); \ No newline at end of file +export const delDepartment_api = (id:string) => server.remove(`/organization/${id}`); + + +// 获取产品列表 +export const getDeviceOrProductList_api = (data:object) => server.post(`/device-product/_query`, data); +// 根据产品的id获取产品的权限 +export const getPermission_api = (ids:object, id:string) => server.post(`/assets/bindings/product/org/${id}/_query`, ids); +// 获取产品的权限字典 +export const getPermissionDict_api = () => server.get(`/assets/bindings/product/permissions`); \ No newline at end of file diff --git a/src/views/system/Department/components/EditDepartmentDialog.vue b/src/views/system/Department/components/EditDepartmentDialog.vue new file mode 100644 index 00000000..de11577a --- /dev/null +++ b/src/views/system/Department/components/EditDepartmentDialog.vue @@ -0,0 +1,141 @@ + + + + + + {{ name }} + + + + + + + + + + + + + + + + diff --git a/src/views/system/Department/components/LeftTree.vue b/src/views/system/Department/components/LeftTree.vue new file mode 100644 index 00000000..8493f81c --- /dev/null +++ b/src/views/system/Department/components/LeftTree.vue @@ -0,0 +1,214 @@ + + + + + + + + + 新增 + + + + {{ name }} + + + 编辑 + + + + + + 新增子组织 + + + + + + + + 删除 + + + + + + + + + + + + + + + + + diff --git a/src/views/system/Department/device/index.vue b/src/views/system/Department/device/index.vue new file mode 100644 index 00000000..257dbf8e --- /dev/null +++ b/src/views/system/Department/device/index.vue @@ -0,0 +1,13 @@ + + + 设备 + + + + + + \ No newline at end of file diff --git a/src/views/system/Department/index.vue b/src/views/system/Department/index.vue new file mode 100644 index 00000000..67982dbf --- /dev/null +++ b/src/views/system/Department/index.vue @@ -0,0 +1,52 @@ + + + + + departmentId = id" /> + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/system/Department/product/index.vue b/src/views/system/Department/product/index.vue new file mode 100644 index 00000000..3385a20f --- /dev/null +++ b/src/views/system/Department/product/index.vue @@ -0,0 +1,279 @@ + + + + + + + + 新增 + + + + + + + + + + + + + + {{ slotProps.name }} + + + + ID + {{ slotProps.deviceType?.text }} + + + + 资产权限 + + + {{ + table.permissionList.value.length && + table.getPermissLabel( + slotProps.permission, + ) + }} + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/system/Department/user/index.vue b/src/views/system/Department/user/index.vue new file mode 100644 index 00000000..540ef6e1 --- /dev/null +++ b/src/views/system/Department/user/index.vue @@ -0,0 +1,13 @@ + + + 用户 + + + + + + \ No newline at end of file