diff --git a/sgzb-ui/src/api/system/dept.js b/sgzb-ui/src/api/system/dept.js
index d6a259e2..ce8a174a 100644
--- a/sgzb-ui/src/api/system/dept.js
+++ b/sgzb-ui/src/api/system/dept.js
@@ -56,10 +56,15 @@ export function apiGetPartTree() {
return request({
url: '/system/select/getPartTree',
method: 'post',
- data:{}
+ data: {}
})
}
+// 新增公司
+export const addCompanyApi = (data) => {
+ return request.post('/system/dept/addCompany', data)
+}
+
diff --git a/sgzb-ui/src/views/system/dept/index.vue b/sgzb-ui/src/views/system/dept/index.vue
index 9cf1b534..5b2b2964 100644
--- a/sgzb-ui/src/views/system/dept/index.vue
+++ b/sgzb-ui/src/views/system/dept/index.vue
@@ -1,336 +1,576 @@
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
-
-
-
- 新增
-
-
- 展开/折叠
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ parseTime(scope.row.createTime) }}
-
-
-
-
- 修改
- 新增
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
-
-
+
+
+
+
-
+
+ 搜索
+ 重置
+
+
+
+
+
+
+ 新增公司
+
+
+ 新增部门
+
+
+ 展开/折叠
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{dict.label}}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+
+
+ 修改
+ 新增
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 新增
+ 删除
+
+
+
+
+
+
diff --git a/sgzb-ui/src/views/system/user/index.vue b/sgzb-ui/src/views/system/user/index.vue
index d10bcb4a..53e50b58 100644
--- a/sgzb-ui/src/views/system/user/index.vue
+++ b/sgzb-ui/src/views/system/user/index.vue
@@ -15,7 +15,7 @@
@@ -548,6 +550,7 @@ import {
changeUserStatus,
deptTreeSelect,
} from '@/api/system/user'
+import { listDept } from '@/api/system/dept'
import { getToken } from '@/utils/auth'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
@@ -577,6 +580,8 @@ export default {
title: '',
// 部门树选项
deptOptions: undefined,
+ // 部门树选项(左侧)
+ deptOptionsTree: undefined,
// 是否显示弹出层
open: false,
// 部门名称
@@ -720,7 +725,10 @@ export default {
/** 查询部门下拉树结构 */
getDeptTree() {
deptTreeSelect().then((response) => {
- this.deptOptions = response.data
+ this.deptOptionsTree = response.data
+ })
+ listDept().then((response) => {
+ this.deptOptions = this.handleTree(response.data, 'deptId')
})
},
// 筛选节点
@@ -768,6 +776,7 @@ export default {
remark: undefined,
postIds: [],
roleIds: [],
+ companyId: undefined,
}
this.resetForm('form')
},
@@ -946,6 +955,22 @@ export default {
submitFileForm() {
this.$refs.upload.submit()
},
+ // 归属部门选择变化时
+ deptIdChange(val) {
+ console.log(val, '部门变化时')
+ // console.log(this.form, '表单数据--')
+ },
+ /** 转换部门数据结构 */
+ normalizer(node) {
+ if (node.children && !node.children.length) {
+ delete node.children
+ }
+ return {
+ id: node.deptId,
+ label: node.deptName,
+ children: node.children,
+ }
+ },
},
}