|
|
@ -23,7 +23,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item> |
|
|
|
<el-input |
|
|
|
<el-input |
|
|
|
v-model.trim="searchForm.name" |
|
|
|
v-model.trim="searchForm.examinedUserName" |
|
|
|
placeholder="员工姓名" |
|
|
|
placeholder="员工姓名" |
|
|
|
clearable |
|
|
|
clearable |
|
|
|
@keyup.enter="handleSearch" |
|
|
|
@keyup.enter="handleSearch" |
|
|
@ -40,17 +40,17 @@ |
|
|
|
stripe |
|
|
|
stripe |
|
|
|
:default-expand-all="false" |
|
|
|
:default-expand-all="false" |
|
|
|
row-key="id" |
|
|
|
row-key="id" |
|
|
|
:tree-props="{ children: 'userDingAttendanceRespVOList', hasChildren: 'hasChildren' }" |
|
|
|
:tree-props="{ children: 'examineResultRespVOList', hasChildren: 'hasChildren' }" |
|
|
|
:span-method="spanMethod" |
|
|
|
:span-method="spanMethod" |
|
|
|
> |
|
|
|
> |
|
|
|
<el-table-column label="姓名" min-width="90px"> |
|
|
|
<el-table-column label="姓名" min-width="90px"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<span v-if="row.userDingAttendanceRespVOList && row.userDingAttendanceRespVOList.length"> |
|
|
|
<span v-if="row.examineResultRespVOList && row.examineResultRespVOList.length"> |
|
|
|
<span>{{ row.period }}</span> |
|
|
|
<span>{{ row.period }}</span> |
|
|
|
<span class="ml-20px">考核人数:{{ row.attendanceUserCount }}人</span> |
|
|
|
<span class="ml-20px">考核人数:{{ row.examineNum }}人</span> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span v-else> |
|
|
|
<span v-else> |
|
|
|
{{ row.employeeName }} |
|
|
|
{{ row.examinedUserName }} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
@ -59,19 +59,9 @@ |
|
|
|
<el-table-column label="考核总分" prop="" align="center" /> |
|
|
|
<el-table-column label="考核总分" prop="" align="center" /> |
|
|
|
<el-table-column label="操作" fixed="right" width="200"> |
|
|
|
<el-table-column label="操作" fixed="right" width="200"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<template #default="{ row }"> |
|
|
|
<el-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
text |
|
|
|
|
|
|
|
v-if="!row.id" |
|
|
|
|
|
|
|
style="padding: 0" |
|
|
|
|
|
|
|
v-hasPermi="['kpi:record:detail']" |
|
|
|
|
|
|
|
@click="handleDetail(row)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
详情 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-button |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
type="danger" |
|
|
|
v-if="row.id" |
|
|
|
v-if="!row.examinedUser" |
|
|
|
:disabled="row.status == 1" |
|
|
|
:disabled="row.status == 1" |
|
|
|
style="padding: 0" |
|
|
|
style="padding: 0" |
|
|
|
text |
|
|
|
text |
|
|
@ -81,6 +71,16 @@ |
|
|
|
<span v-if="row.status == 0">封存</span> |
|
|
|
<span v-if="row.status == 0">封存</span> |
|
|
|
<span v-else-if="row.status == 1">已封存</span> |
|
|
|
<span v-else-if="row.status == 1">已封存</span> |
|
|
|
</el-button> |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
text |
|
|
|
|
|
|
|
v-if="row.examinedUser" |
|
|
|
|
|
|
|
style="padding: 0" |
|
|
|
|
|
|
|
v-hasPermi="['kpi:record:detail']" |
|
|
|
|
|
|
|
@click="handleDetail(row)" |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
详情 |
|
|
|
|
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
@ -91,17 +91,20 @@ |
|
|
|
v-model:limit="searchForm.pageSize" |
|
|
|
v-model:limit="searchForm.pageSize" |
|
|
|
@pagination="getList" |
|
|
|
@pagination="getList" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<DialogScoreDetail ref="detailDialogRef" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script setup name="KpiRecord"> |
|
|
|
<script setup name="KpiRecord"> |
|
|
|
import { removeNullField } from '@/utils' |
|
|
|
import { removeNullField } from '@/utils' |
|
|
|
import * as KpiApi from '@/api/kpi/score.js' |
|
|
|
import * as KpiApi from '@/api/kpi/score.js' |
|
|
|
|
|
|
|
import DialogScoreDetail from './DialogScoreDetail.vue' |
|
|
|
|
|
|
|
|
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
const message = useMessage() // 消息弹窗 |
|
|
|
|
|
|
|
|
|
|
|
const searchForm = ref({ |
|
|
|
const searchForm = ref({ |
|
|
|
name: undefined, |
|
|
|
examinedUserName: undefined, |
|
|
|
period: undefined, |
|
|
|
period: undefined, |
|
|
|
dept: undefined, |
|
|
|
dept: undefined, |
|
|
|
pageNo: 1, |
|
|
|
pageNo: 1, |
|
|
@ -133,17 +136,15 @@ async function getList() { |
|
|
|
month: new Date(params.period).getMonth() + 1 |
|
|
|
month: new Date(params.period).getMonth() + 1 |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
const data = await KpiApi.getScorePage(removeNullField(params)) |
|
|
|
const data = await KpiApi.getScoreRecord(removeNullField(params)) |
|
|
|
if (searchForm.value.name) { |
|
|
|
if (searchForm.value.examinedUserName) { |
|
|
|
tableList.value = data.list.reduce((pre, cur) => { |
|
|
|
tableList.value = data.list.reduce((pre, cur) => { |
|
|
|
return pre.concat(cur.userDingAttendanceRespVOList) |
|
|
|
return pre.concat(cur.examineResultRespVOList) |
|
|
|
}, []) |
|
|
|
}, []) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
tableList.value = data.list.map((it, index) => ({ |
|
|
|
tableList.value = data.list.map((it, index) => ({ |
|
|
|
...it, |
|
|
|
...it, |
|
|
|
userDingAttendanceRespVOList: it.userDingAttendanceRespVOList.sort((pre, cur) => |
|
|
|
examineResultRespVOList: it.examineResultRespVOList, |
|
|
|
pre.employeeName.localeCompare(cur.employeeName) |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
id: index + 1 |
|
|
|
id: index + 1 |
|
|
|
})) |
|
|
|
})) |
|
|
|
} |
|
|
|
} |
|
|
@ -156,7 +157,7 @@ async function getList() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function spanMethod({ row, columnIndex }) { |
|
|
|
function spanMethod({ row, columnIndex }) { |
|
|
|
if (row.userDingAttendanceRespVOList && row.userDingAttendanceRespVOList.length > 0) { |
|
|
|
if (row.examineResultRespVOList && row.examineResultRespVOList.length > 0) { |
|
|
|
if (columnIndex === 0) { |
|
|
|
if (columnIndex === 0) { |
|
|
|
return [1, 4] |
|
|
|
return [1, 4] |
|
|
|
} else if (columnIndex == 4 && row.id) { |
|
|
|
} else if (columnIndex == 4 && row.id) { |
|
|
@ -167,16 +168,17 @@ function spanMethod({ row, columnIndex }) { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const detailDialogRef = ref() |
|
|
|
function handleDetail(row) { |
|
|
|
function handleDetail(row) { |
|
|
|
console.log(row) |
|
|
|
detailDialogRef.value.open(row.id) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
async function handleSealup(row) { |
|
|
|
async function handleSealup(row) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
// 二次确认 |
|
|
|
// 二次确认 |
|
|
|
await message.confirm('确认要封存"' + row.period + '"假勤吗?') |
|
|
|
await message.confirm('确认要封存"' + row.period + '"考核记录吗?') |
|
|
|
// 发起修改状态 |
|
|
|
// 发起修改状态 |
|
|
|
await KpiApi.saveFalseDiligence({ |
|
|
|
await KpiApi.saveScoreRecord({ |
|
|
|
period: row.period |
|
|
|
period: row.period |
|
|
|
}) |
|
|
|
}) |
|
|
|
message.success('封存成功!') |
|
|
|
message.success('封存成功!') |
|
|
|