diff --git a/src/api/system/dept/index.ts b/src/api/system/dept/index.ts index d995f13d..04d5c880 100644 --- a/src/api/system/dept/index.ts +++ b/src/api/system/dept/index.ts @@ -14,7 +14,7 @@ export interface DeptVO { // 查询部门(精简)列表 export const getSimpleDeptList = async (): Promise => { - return await request.get({ url: '/system/dept/list-all-simple' }) + return await request.get({ url: '/system/dept/simple-list' }) } // 查询部门列表 diff --git a/src/api/system/post/index.ts b/src/api/system/post/index.ts index 405db387..0e6f2ca1 100644 --- a/src/api/system/post/index.ts +++ b/src/api/system/post/index.ts @@ -17,7 +17,7 @@ export const getPostPage = async (params: PageParam) => { // 获取岗位精简信息列表 export const getSimplePostList = async (): Promise => { - return await request.get({ url: '/system/post/list-all-simple' }) + return await request.get({ url: '/system/post/simple-list' }) } // 查询岗位详情 diff --git a/src/utils/formatTime.ts b/src/utils/formatTime.ts index 466f1e1f..e4f82a4a 100644 --- a/src/utils/formatTime.ts +++ b/src/utils/formatTime.ts @@ -200,9 +200,9 @@ export function formatPast2(ms) { * @param cellValue 字段值 */ // @ts-ignore -export const dateFormatter = (row, column, cellValue) => { +export const dateFormatter = (row, column, cellValue): string => { if (!cellValue) { - return + return '' } return formatDate(cellValue) } diff --git a/src/views/system/dept/DeptForm.vue b/src/views/system/dept/DeptForm.vue index e76d9f9e..cc3b6773 100644 --- a/src/views/system/dept/DeptForm.vue +++ b/src/views/system/dept/DeptForm.vue @@ -44,7 +44,7 @@ @@ -63,6 +63,7 @@ import { defaultProps, handleTree } from '@/utils/tree' import * as DeptApi from '@/api/system/dept' import * as UserApi from '@/api/system/user' import { CommonStatusEnum } from '@/utils/constants' +import { FormRules } from 'element-plus' defineOptions({ name: 'SystemDeptForm' }) @@ -84,7 +85,7 @@ const formData = ref({ email: undefined, status: CommonStatusEnum.ENABLE }) -const formRules = reactive({ +const formRules = reactive({ parentId: [{ required: true, message: '上级部门不能为空', trigger: 'blur' }], name: [{ required: true, message: '部门名称不能为空', trigger: 'blur' }], sort: [{ required: true, message: '显示排序不能为空', trigger: 'blur' }], diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 2eefe49f..1e2c522c 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -25,7 +25,7 @@ > @@ -58,14 +58,14 @@ :default-expand-all="isExpandAll" v-if="refreshTable" > - - + + - - + + @@ -77,7 +77,7 @@ width="180" :formatter="dateFormatter" /> - +