|
@@ -458,10 +458,19 @@
|
|
|
>
|
|
|
<el-row :gutter="16">
|
|
|
<el-col :span="11">
|
|
|
- <el-card
|
|
|
- shadow="hover"
|
|
|
- header="可选人员"
|
|
|
- >
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>可选人员</span>
|
|
|
+ <span>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ @click="getUserList()"
|
|
|
+ >刷新</el-button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<div class="person-box">
|
|
|
<el-tree
|
|
|
ref="personTree"
|
|
@@ -484,10 +493,12 @@
|
|
|
/>
|
|
|
</el-col>
|
|
|
<el-col :span="11">
|
|
|
- <el-card
|
|
|
- shadow="hover"
|
|
|
- header="已选人员"
|
|
|
- >
|
|
|
+ <el-card shadow="hover">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-header">
|
|
|
+ <span>已选人员</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<div class="person-box">
|
|
|
<el-table
|
|
|
:data="detailForm.employees"
|
|
@@ -541,7 +552,8 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
- getAreaDictionary
|
|
|
+ getAreaDictionary,
|
|
|
+ getUserDictionary
|
|
|
} from 'api/dictionary'
|
|
|
import {
|
|
|
getTableListOfAttendance,
|
|
@@ -646,21 +658,27 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
- getAreaDictionary({
|
|
|
- treeLevel: 4
|
|
|
- }).then(res => {
|
|
|
- if (res.status == 10000) {
|
|
|
- this.personTree = res.data
|
|
|
- } else {
|
|
|
- ElNotification({
|
|
|
- title: '获取考勤人员失败',
|
|
|
- message: res.message,
|
|
|
- type: 'error'
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取人员数据
|
|
|
+ getUserList () {
|
|
|
+ getUserDictionary({
|
|
|
+ projectId: this.detailForm.projectId
|
|
|
+ }).then(res => {
|
|
|
+ if (res.status == 10000) {
|
|
|
+ this.personTree = [res.data]
|
|
|
+ if (this.personFormShow) {
|
|
|
+ this.selectCheckedUser()
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ElNotification({
|
|
|
+ title: '获取考勤人员失败',
|
|
|
+ message: res.message,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取表格数据
|
|
|
getTableList () {
|
|
|
this.tableLoading = true
|
|
@@ -716,6 +734,7 @@ export default {
|
|
|
groupId: type == 'copy' ? null : row.groupId,
|
|
|
workDay: res.data.workDay.split(',')
|
|
|
}
|
|
|
+ this.getUserList()
|
|
|
} else {
|
|
|
ElNotification({
|
|
|
title: '获取详情失败',
|
|
@@ -727,6 +746,7 @@ export default {
|
|
|
} else {
|
|
|
this.detailFormShow = true
|
|
|
this.detailForm.projectId = this.filterForm.projectIds[1]
|
|
|
+ this.getUserList()
|
|
|
}
|
|
|
},
|
|
|
// 提交表单
|
|
@@ -796,6 +816,10 @@ export default {
|
|
|
// 显示考勤人员
|
|
|
getPerson () {
|
|
|
this.personFormShow = true
|
|
|
+ this.selectCheckedUser()
|
|
|
+ },
|
|
|
+ // 勾选已有
|
|
|
+ selectCheckedUser () {
|
|
|
this.$nextTick(() => {
|
|
|
if (this.$refs.personTree) {
|
|
|
this.$refs.personTree.setCheckedKeys(this.detailForm.employees.length
|