From a77173f2ae7b613a3a20b076ecce7473357a46b5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 2 Dec 2023 10:20:09 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8D=20post=20?= =?UTF-8?q?=E5=92=8C=20dept=20=E5=9C=A8=20IDEA=20=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/dept/index.ts | 2 +- src/api/system/post/index.ts | 2 +- src/utils/formatTime.ts | 4 ++-- src/views/system/dept/DeptForm.vue | 5 +++-- src/views/system/dept/index.vue | 19 +++++++++---------- src/views/system/post/PostForm.vue | 2 +- src/views/system/post/index.vue | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) 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" /> - +