Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
attendance-performance-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
attendance-performance-platform
Commits
095b7823
Commit
095b7823
authored
Mar 13, 2024
by
姬鋆屾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推修改员工管理点击分页后再点击其他部门查询不到数据得问题;修改自定义列表功能不生效的问题
parent
896a0aef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
39 deletions
+86
-39
attendance-performance-manager-ui/admin/src/components/DataTable.vue
...performance-manager-ui/admin/src/components/DataTable.vue
+30
-28
attendance-performance-manager-ui/admin/src/views/staff/list.vue
...nce-performance-manager-ui/admin/src/views/staff/list.vue
+56
-11
No files found.
attendance-performance-manager-ui/admin/src/components/DataTable.vue
View file @
095b7823
...
@@ -16,35 +16,37 @@
...
@@ -16,35 +16,37 @@
:height=
"height"
:height=
"height"
style=
"width: 100%"
style=
"width: 100%"
>
>
<el-table-column
<template
v-for=
"column in columns"
>
v-for=
"column in columns"
:key=
"column.prop"
:type=
"column.type"
:index=
"handleIndexMethod"
:selectable=
"handleSelectableMethod"
:prop=
"column.prop"
:label=
"column.label"
:width=
"column.width"
:sortable=
"column.sortable"
:show-overflow-tooltip=
"column.tooltip"
:align=
"column.align || 'center'"
:formatter=
"column.formatter"
:reserve-selection=
"column.reserveSelection"
:subColumns=
"column.subColumns"
:fixed=
"column.fixed"
>
<el-table-column
<el-table-column
v-for=
"sunColumn in column.subColumns"
v-if=
"column.show"
:key=
"sunColumn.prop"
:key=
"column.prop"
:type=
"sunColumn.type"
:type=
"column.type"
:prop=
"sunColumn.prop"
:index=
"handleIndexMethod"
:label=
"sunColumn.label"
:selectable=
"handleSelectableMethod"
:width=
"sunColumn.width"
:prop=
"column.prop"
:sortable=
"sunColumn.sortable"
:label=
"column.label"
:align=
"sunColumn.align || 'center'"
:width=
"column.width"
:formatter=
"sunColumn.formatter"
:sortable=
"column.sortable"
/>
:show-overflow-tooltip=
"column.tooltip"
</el-table-column>
:align=
"column.align || 'center'"
:formatter=
"column.formatter"
:reserve-selection=
"column.reserveSelection"
:subColumns=
"column.subColumns"
:fixed=
"column.fixed"
>
<el-table-column
v-for=
"sunColumn in column.subColumns"
:key=
"sunColumn.prop"
:type=
"sunColumn.type"
:prop=
"sunColumn.prop"
:label=
"sunColumn.label"
:width=
"sunColumn.width"
:sortable=
"sunColumn.sortable"
:align=
"sunColumn.align || 'center'"
:formatter=
"sunColumn.formatter"
/>
</el-table-column>
</
template
>
</el-table>
</el-table>
</template>
</template>
...
...
attendance-performance-manager-ui/admin/src/views/staff/list.vue
View file @
095b7823
...
@@ -59,7 +59,13 @@
...
@@ -59,7 +59,13 @@
</el-col>
</el-col>
<el-col
:span=
"18"
:xs=
"12"
>
<el-col
:span=
"18"
:xs=
"12"
>
<el-row>
<el-row>
<LayoutTable
notDel
notAdd
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
notDel
notAdd
:data=
"tableData"
:config=
"tableConfig"
ref=
"layoutTable"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
@
click=
"doExport"
@
click=
"doExport"
...
@@ -184,8 +190,8 @@
...
@@ -184,8 +190,8 @@
</el-checkbox>
</el-checkbox>
</el-checkbox-group>
</el-checkbox-group>
<div
class=
"mt20"
style=
"text-align:right"
>
<div
class=
"mt20"
style=
"text-align:right"
>
<el-button>
取消
</el-button>
<el-button
@
click=
"() => (isdialog = falsle)"
>
取消
</el-button>
<el-button
type=
"primary"
>
确定
</el-button>
<el-button
type=
"primary"
@
click=
"handleOk"
>
确定
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -218,11 +224,30 @@ export default {
...
@@ -218,11 +224,30 @@ export default {
});
});
},
},
methods
:
{
methods
:
{
handleOk
()
{
this
.
config
.
columns
.
forEach
((
v
)
=>
{
v
.
prop
?
(
v
.
show
=
false
)
:
(
v
.
show
=
true
);
this
.
checkList
.
forEach
((
val
)
=>
{
if
(
val
==
v
.
label
)
{
v
.
show
=
true
;
}
});
});
console
.
log
(
this
.
config
.
columns
);
this
.
$forceUpdate
(
this
.
config
.
columns
);
this
.
isdialog
=
false
;
},
// 自定义字段
// 自定义字段
SelectEXport
()
{
SelectEXport
()
{
this
.
setcolum
=
this
.
config
.
columns
.
filter
(
this
.
setcolum
=
this
.
config
.
columns
.
filter
(
(
item
)
=>
item
.
label
&&
item
.
prop
(
item
)
=>
item
.
label
&&
item
.
prop
);
);
console
.
log
(
this
.
config
.
columns
);
this
.
checkList
=
this
.
setcolum
.
map
((
v
)
=>
{
if
(
v
.
show
)
{
return
v
.
label
;
}
});
this
.
isdialog
=
true
;
this
.
isdialog
=
true
;
},
},
/** 同步 */
/** 同步 */
...
@@ -268,8 +293,10 @@ export default {
...
@@ -268,8 +293,10 @@ export default {
},
},
handleNodeClick
(
node
)
{
handleNodeClick
(
node
)
{
delete
this
.
$route
.
query
.
page
;
this
.
currentNode
=
node
;
this
.
currentNode
=
node
;
this
.
query
=
Object
.
assign
({},
this
.
query
,
{
deptId
:
node
.
id
});
this
.
query
=
Object
.
assign
({},
this
.
query
,
{
deptId
:
node
.
id
});
this
.
query
.
page
=
1
;
this
.
getData
();
this
.
getData
();
},
},
doExport
()
{
doExport
()
{
...
@@ -355,27 +382,45 @@ export default {
...
@@ -355,27 +382,45 @@ export default {
},
},
],
],
columns
:
[
columns
:
[
{
type
:
"
selection
"
,
width
:
60
},
{
type
:
"
selection
"
,
width
:
60
,
show
:
true
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
width
:
50
,
show
:
true
},
{
label
:
"
员工姓名
"
,
prop
:
"
name
"
},
{
label
:
"
员工姓名
"
,
prop
:
"
name
"
,
show
:
true
},
{
label
:
"
工号
"
,
prop
:
"
workNum
"
},
{
label
:
"
工号
"
,
prop
:
"
workNum
"
,
show
:
true
},
{
label
:
"
部门
"
,
prop
:
"
deptName
"
},
{
label
:
"
部门
"
,
prop
:
"
deptName
"
,
show
:
true
},
{
label
:
"
职位
"
,
prop
:
"
positionName
"
,
formatter
:
this
.
formatters
},
{
label
:
"
职位
"
,
prop
:
"
positionName
"
,
formatter
:
this
.
formatters
,
show
:
true
,
},
{
{
label
:
"
员工类型
"
,
label
:
"
员工类型
"
,
prop
:
"
staffType
"
,
prop
:
"
staffType
"
,
formatter
:
this
.
formatterType
,
formatter
:
this
.
formatterType
,
show
:
true
,
},
{
label
:
"
员工状态
"
,
prop
:
"
status
"
,
formatter
:
this
.
formatter
,
show
:
true
,
},
},
{
label
:
"
员工状态
"
,
prop
:
"
status
"
,
formatter
:
this
.
formatter
},
{
{
label
:
"
是否在政务中心
"
,
label
:
"
是否在政务中心
"
,
prop
:
"
source
"
,
prop
:
"
source
"
,
formatter
:
this
.
formatterSource
,
formatter
:
this
.
formatterSource
,
show
:
true
,
},
//未对
},
//未对
{
label
:
"
手机号
"
,
prop
:
"
phoneNumber
"
,
formatter
:
this
.
formatters
},
{
label
:
"
手机号
"
,
prop
:
"
phoneNumber
"
,
formatter
:
this
.
formatters
,
show
:
true
,
},
{
{
label
:
"
操作
"
,
label
:
"
操作
"
,
width
:
240
,
width
:
240
,
show
:
true
,
formatter
:
(
row
)
=>
{
formatter
:
(
row
)
=>
{
return
(
return
(
//
<
table
-
buttons
//
<
table
-
buttons
...
...
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