Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
a77173f2
authored
Dec 02, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐛
修复 post 和 dept 在 IDEA 报错的问题
parent
d6ff66dc
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
18 additions
and
18 deletions
+18
-18
src/api/system/dept/index.ts
+1
-1
src/api/system/post/index.ts
+1
-1
src/utils/formatTime.ts
+2
-2
src/views/system/dept/DeptForm.vue
+3
-2
src/views/system/dept/index.vue
+9
-10
src/views/system/post/PostForm.vue
+1
-1
src/views/system/post/index.vue
+1
-1
No files found.
src/api/system/dept/index.ts
View file @
a77173f2
...
...
@@ -14,7 +14,7 @@ export interface DeptVO {
// 查询部门(精简)列表
export
const
getSimpleDeptList
=
async
():
Promise
<
DeptVO
[]
>
=>
{
return
await
request
.
get
({
url
:
'/system/dept/
list-all-simple
'
})
return
await
request
.
get
({
url
:
'/system/dept/
simple-list
'
})
}
// 查询部门列表
...
...
src/api/system/post/index.ts
View file @
a77173f2
...
...
@@ -17,7 +17,7 @@ export const getPostPage = async (params: PageParam) => {
// 获取岗位精简信息列表
export
const
getSimplePostList
=
async
():
Promise
<
PostVO
[]
>
=>
{
return
await
request
.
get
({
url
:
'/system/post/
list-all-simple
'
})
return
await
request
.
get
({
url
:
'/system/post/
simple-list
'
})
}
// 查询岗位详情
...
...
src/utils/formatTime.ts
View file @
a77173f2
...
...
@@ -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
)
}
...
...
src/views/system/dept/DeptForm.vue
View file @
a77173f2
...
...
@@ -44,7 +44,7 @@
<el-select
v-model=
"formData.status"
clearable
placeholder=
"请选择状态"
>
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:key=
"dict.value
as number
"
:label=
"dict.label"
:value=
"dict.value"
/>
...
...
@@ -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
<
FormRules
>
({
parentId
:
[{
required
:
true
,
message
:
'上级部门不能为空'
,
trigger
:
'blur'
}],
name
:
[{
required
:
true
,
message
:
'部门名称不能为空'
,
trigger
:
'blur'
}],
sort
:
[{
required
:
true
,
message
:
'显示排序不能为空'
,
trigger
:
'blur'
}],
...
...
src/views/system/dept/index.vue
View file @
a77173f2
...
...
@@ -25,7 +25,7 @@
>
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:key=
"dict.value
as number
"
:label=
"dict.label"
:value=
"dict.value"
/>
...
...
@@ -58,14 +58,14 @@
:default-expand-all=
"isExpandAll"
v-if=
"refreshTable"
>
<el-table-column
prop=
"name"
label=
"部门名称"
width=
"260"
/>
<el-table-column
prop=
"leader"
label=
"负责人"
width=
"120"
>
<el-table-column
prop=
"name"
label=
"部门名称"
/>
<el-table-column
prop=
"leader"
label=
"负责人"
>
<template
#
default=
"scope"
>
{{
userList
.
find
((
user
)
=>
user
.
id
===
scope
.
row
.
leaderUserId
)?.
nickname
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"sort"
label=
"排序"
width=
"200"
/>
<el-table-column
prop=
"status"
label=
"状态"
width=
"100"
>
<el-table-column
prop=
"sort"
label=
"排序"
/>
<el-table-column
prop=
"status"
label=
"状态"
>
<
template
#
default=
"scope"
>
<dict-tag
:type=
"DICT_TYPE.COMMON_STATUS"
:value=
"scope.row.status"
/>
</
template
>
...
...
@@ -77,7 +77,7 @@
width=
"180"
:formatter=
"dateFormatter"
/>
<el-table-column
label=
"操作"
align=
"center"
class-name=
"fixed-width"
>
<el-table-column
label=
"操作"
align=
"center"
>
<
template
#
default=
"scope"
>
<el-button
link
...
...
@@ -119,11 +119,10 @@ const { t } = useI18n() // 国际化
const
loading
=
ref
(
true
)
// 列表的加载中
const
list
=
ref
()
// 列表的数据
const
queryParams
=
reactive
({
title
:
''
,
name
:
undefined
,
status
:
undefined
,
pageNo
:
1
,
pageSize
:
100
pageSize
:
100
,
name
:
undefined
,
status
:
undefined
})
const
queryFormRef
=
ref
()
// 搜索的表单
const
isExpandAll
=
ref
(
true
)
// 是否展开,默认全部展开
...
...
src/views/system/post/PostForm.vue
View file @
a77173f2
...
...
@@ -20,7 +20,7 @@
<el-select
v-model=
"formData.status"
clearable
placeholder=
"请选择状态"
>
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:key=
"dict.value
as number
"
:label=
"dict.label"
:value=
"dict.value"
/>
...
...
src/views/system/post/index.vue
View file @
a77173f2
...
...
@@ -28,7 +28,7 @@
<el-select
v-model=
"queryParams.status"
placeholder=
"请选择状态"
clearable
>
<el-option
v-for=
"dict in getIntDictOptions(DICT_TYPE.COMMON_STATUS)"
:key=
"dict.value"
:key=
"dict.value
as number
"
:label=
"dict.label"
:value=
"dict.value"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment