diff --git a/admin/.prettierrc b/admin/.prettierrc
deleted file mode 100644
index 59cd6f20..00000000
--- a/admin/.prettierrc
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "tabWidth": 4,
- "semi": false,
- "singleQuote": true,
- "printWidth": 100,
- "trailingComma": "none",
- "arrowParens": "avoid",
- "bracketSpacing": true
-}
\ No newline at end of file
diff --git a/admin/src/api/app.ts b/admin/src/api/app.ts
index bdc63b90..a9f57691 100644
--- a/admin/src/api/app.ts
+++ b/admin/src/api/app.ts
@@ -40,5 +40,5 @@ export function apiFileRename(params: { id: number; name: string }) {
// 配置
export function apiConfig() {
- return request.get('/index/config')
+ return request.get('/common/index/config')
}
diff --git a/admin/src/api/organize.ts b/admin/src/api/organize.ts
index 9b43488e..1a2a62bc 100644
--- a/admin/src/api/organize.ts
+++ b/admin/src/api/organize.ts
@@ -1,4 +1,36 @@
import request from '@/utils/request'
+/** 部门 S **/
+// 部门列表
+export function apiDeptLists(params: any) {
+ return request.get('/system/dept/list', { params })
+}
+
+// 添加部门
+export function apiDeptAdd(params: any) {
+ return request.post('/system/dept/add', params)
+}
+
+// 编辑部门
+export function apiDeptEdit(params: any) {
+ return request.post('/system/dept/edit', params)
+}
+
+// 删除部门
+export function apiDeptDelete(params: any) {
+ return request.post('/system/dept/del', params)
+}
+
+// 部门详情
+export function apiDeptDetail(params: any) {
+ return request.get('/system/dept/detail', { params })
+}
+
+// 所有部门
+export function apiDeptAll(params: any) {
+ return request.get('/system/dept/all', { params })
+}
+/** 部门 E **/
+
/** 岗位 S **/
// 岗位列表
export function apiPostLists(params: any) {
diff --git a/admin/src/api/setting.ts b/admin/src/api/setting.ts
index 755338bf..72c9496d 100644
--- a/admin/src/api/setting.ts
+++ b/admin/src/api/setting.ts
@@ -2,20 +2,20 @@ import request from '@/utils/request'
// 获取备案信息
export function apiGetCopyright() {
- return request.get('/setting/getCopyright')
+ return request.get('/setting/basics/getCopyright')
}
// 设置备案信息
export function apiSetCopyright(params: any) {
- return request.post('/setting/setCopyright', { ...params })
+ return request.post('/setting/basics/setCopyright', { ...params })
}
// 获取网站信息
export function apiGetWebsite() {
- return request.get('/setting/getWebsite')
+ return request.get('/setting/basics/getWebsite')
}
// 设置网站信息
export function apiSetWebsite(params: any) {
- return request.post('/setting/setWebsite', { ...params })
+ return request.post('/setting/basics/setWebsite', { ...params })
}
// 获取政策协议
diff --git a/admin/src/api/workbench.ts b/admin/src/api/workbench.ts
index ad886eb2..90b84dfe 100644
--- a/admin/src/api/workbench.ts
+++ b/admin/src/api/workbench.ts
@@ -2,5 +2,5 @@ import request from '@/utils/request'
// 工作台主页
export function apiWorkbench() {
- return request.get('/index/console')
+ return request.get('/common/index/console')
}
diff --git a/admin/src/utils/util.ts b/admin/src/utils/util.ts
index d40facef..2cf97782 100644
--- a/admin/src/utils/util.ts
+++ b/admin/src/utils/util.ts
@@ -38,7 +38,7 @@ export function deepClone(target: any) {
*/
export function filterObject(target: any, filters: any[]) {
const _target = deepClone(target)
- filters.map(key => delete _target[key])
+ filters.map((key) => delete _target[key])
return _target
}
@@ -125,15 +125,12 @@ export const timeFormat = (dateTime: number, fmt = 'yyyy-mm-dd') => {
'd+': date.getDate().toString(), // 日
'h+': date.getHours().toString(), // 时
'M+': date.getMinutes().toString(), // 分
- 's+': date.getSeconds().toString() // 秒
+ 's+': date.getSeconds().toString(), // 秒
}
for (const k in opt) {
ret = new RegExp('(' + k + ')').exec(fmt)
if (ret) {
- fmt = fmt.replace(
- ret[1],
- ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
- )
+ fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0'))
}
}
return fmt
@@ -162,9 +159,10 @@ export const timeFormat = (dateTime: number, fmt = 'yyyy-mm-dd') => {
* @return { Array } 扁平化后的数组
*/
export function flatten(tree = [], arr = [], childrenKey = 'children') {
- tree.forEach(item => {
+ tree.forEach((item) => {
const children = item[childrenKey]
- children ? flatten(children, arr, childrenKey) : arr.push(item)
+ arr.push(item)
+ if (children) flatten(children, arr, childrenKey)
})
return arr
}
diff --git a/admin/src/views/organize/department/edit.vue b/admin/src/views/organize/department/edit.vue
index e19c94ef..eaec9b8e 100644
--- a/admin/src/views/organize/department/edit.vue
+++ b/admin/src/views/organize/department/edit.vue
@@ -20,39 +20,41 @@
-->
-
+
-
-
+
+
-
+
-
+
默认为0, 数值越大越排前
-
+
@@ -64,7 +66,117 @@
diff --git a/admin/src/views/organize/department/index.vue b/admin/src/views/organize/department/index.vue
index 9a0688bc..db664f11 100644
--- a/admin/src/views/organize/department/index.vue
+++ b/admin/src/views/organize/department/index.vue
@@ -3,24 +3,20 @@
-
+
-
-
-
+
+
+
+
- 查询
+ 查询
重置
@@ -35,24 +31,20 @@
全部展开/折叠
-
+
-
+
- {{ row.status_desc }}
+
+ {{ row.isStop == 0 ? '正常' : '停用' }}
-
+
@@ -61,18 +53,14 @@
:to="{
path: '/organize/department/edit',
query: {
- id: row.id
- }
+ id: row.id,
+ },
}"
>
编辑
-
+
删除
@@ -84,6 +72,61 @@
-
+
diff --git a/admin/src/views/organize/post/edit.vue b/admin/src/views/organize/post/edit.vue
index b8af7458..2ddd0d25 100644
--- a/admin/src/views/organize/post/edit.vue
+++ b/admin/src/views/organize/post/edit.vue
@@ -4,7 +4,7 @@
-
+
+
-
+
+
-
+
+
-
+
默认为0, 数值越大越排前
-
+
+
+
-
+
@@ -47,13 +53,85 @@
diff --git a/admin/src/views/organize/post/index.vue b/admin/src/views/organize/post/index.vue
index f0437b8c..514b44f2 100644
--- a/admin/src/views/organize/post/index.vue
+++ b/admin/src/views/organize/post/index.vue
@@ -3,22 +3,18 @@
-
+
-
+
-
-
-
+
+
+
+
@@ -33,27 +29,26 @@
-
- 新增岗位
-
+ 新增岗位
-
+
+
-
+
+
-
- {{ row.status_desc }}
+
+ {{ row.isStop == 0 ? '正常' : '停用' }}
+
-
+
+
+
编辑
+
删除
@@ -79,6 +75,37 @@
-
+