除指标配置,调试基本完成

v1.2.0
‘wangjiuyun 2025-01-06 12:35:35 +08:00
parent 43492eb5d2
commit 434a20f0a6
7 changed files with 251 additions and 116 deletions

View File

@ -120,7 +120,6 @@ export default {
},
],
userData: [],
customTableRef: null,
isInternalChange: false,
};
},
@ -231,8 +230,11 @@ export default {
this.selectedUsers = [];
this.$refs.customTableRef?.clearSelection();
} else {
newVal.forEach((ele) => {
this.$refs.customTableRef?.toggleRowSelection(ele, true);
this.$refs.customTableRef?.clearSelection();
newVal.forEach((item) => {
let row = this.userData.find((ele) => ele.userId == item);
if (row)
this.$refs.customTableRef?.toggleRowSelection(row, true);
});
}
}
@ -252,6 +254,11 @@ export default {
this.selectedUsers = [row];
this.$refs.customTableRef?.setCurrentRow(row);
}
} else {
this.currentSelectedUser.forEach((item) => {
let row = newVal.find((ele) => ele.userId == item);
if (row) this.$refs.customTableRef?.toggleRowSelection(row, true);
});
}
});
},

View File

@ -59,6 +59,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
tableHeight="495px"
ref="customTableRef"
>
<template slot="operation" slot-scope="{ row }">
<div class="operation-buttons">
@ -193,6 +194,7 @@ export default {
this.searchForm[key] = "";
});
this.currentSelectedUser = [];
this.$refs.customTableRef.handleCurrentChange(1);
this.fetchProjectList();
},
addProject() {

View File

@ -4,10 +4,8 @@
<div style="margin-bottom: 20px">人员绩效表</div>
<el-tree
:data="deptOptions"
:props="defaultProps"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
ref="treeRef"
node-key="id"
default-expand-all
highlight-current
@ -22,7 +20,23 @@
class="demo-form-inline"
size="small"
>
<el-form-item label="统计任务" class="form-item"> </el-form-item>
<el-form-item label="统计任务" class="form-item">
<el-select
v-model="taskId"
placeholder="选择任务"
@change="getTaskUserList"
>
<el-option
v-for="item in taskList"
:key="item.id"
:label="item.taskName"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item class="search-buttons">
<el-button @click="onReset"></el-button>
</el-form-item>
</el-form>
</div>
<div class="f1 df">
@ -35,6 +49,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
tableHeight="495px"
@sortChange="sortChange"
>
<template slot="operation" slot-scope="{ row }">
<div class="operation-buttons">
@ -56,7 +71,7 @@
<script>
import CustomTable from "@/components/CustomTable.vue";
import SelectUser from "@/components/SelectUser.vue";
import { projectApi, systemApi } from "@/utils/api";
import { taskApi } from "@/utils/api";
import { deptTreeSelect } from "@/api/system/user";
export default {
@ -67,21 +82,26 @@ export default {
data() {
return {
deptOptions: undefined,
taskId: "",
searchForm: {
projectName: "",
userIdList: [],
userName: "",
isAsc: "",
},
columns: [
{ prop: "projectName", label: "考核人员" },
{ prop: "projectCode", label: "考核评分", sortable: true },
{ prop: "userName", label: "考核人员" },
{ prop: "manageScore", label: "考核评分", sortable: "custom" },
{
prop: "projectState",
prop: "examineStatus",
label: "状态",
type: "status",
callback: (value) => {
if (value == 1) var color = "#333";
if (value == 0) var color = "#333";
else var color = "#1686d68";
return `<span style="color: ${color}">${value}</span>`;
return `<span style="color: ${color}">${
value == 0 ? "待评分" : "已完成"
}</span>`;
},
},
{
@ -96,33 +116,39 @@ export default {
currentSelectedUser: [],
pageNum: 1, //
pageSize: 10, //
statusList: [
{ label: "全部", value: "" },
{ label: "待评分", value: "0" },
{ label: "已完成", value: "1" },
],
taskList: [],
};
},
methods: {
onSearch() {
this.fetchProjectList();
this.getTaskUserList();
},
onReset() {
Object.keys(this.searchForm).forEach((key) => {
this.searchForm[key] = "";
});
this.fetchProjectList();
this.$refs.treeRef.setCurrentKey(null);
// this.searchForm.taskId = this.taskList[0]?.id;
this.getTaskUserList();
},
handleNodeClick(data) {
this.searchForm.deptId = data.id;
this.getTaskUserList();
},
handleEdit(row, edit) {
this.$router.push({
path: "/projectBank/userScoreDetail",
query: { id: row.id, edit },
query: { taskId: row.taskId, examineId:row.id },
});
},
fetchProjectList() {
projectApi
.listProject({
getTaskUserList() {
if (!this.taskId) return;
taskApi
.getTaskUserList({
...this.searchForm,
taskId: this.taskId,
pageNum: this.pageNum,
pageSize: this.pageSize,
})
@ -131,25 +157,41 @@ export default {
this.total = res.total;
});
},
getTaskList() {
taskApi
.getTaskList({
pageNum: 1,
pageSize: 100000,
})
.then((res) => {
this.taskList = res.rows;
this.taskId = res.rows[0]?.id;
this.getTaskUserList();
});
},
handleSizeChange(size) {
this.pageSize = size;
this.pageNum = 1; //
this.fetchProjectList();
this.getTaskUserList();
},
handleCurrentChange(page) {
this.pageNum = page;
this.fetchProjectList();
this.getTaskUserList();
},
getDeptTree() {
deptTreeSelect().then((response) => {
this.deptOptions = response.data;
});
},
sortChange({ order }) {
this.searchForm.isAsc =
order == "descending" ? "desc" : order == "ascending" ? "asc" : "";
this.getTaskUserList();
},
},
mounted() {
this.getDeptTree();
this.fetchProjectList();
this.getTaskList();
},
};
</script>

View File

@ -2,44 +2,49 @@
<div class="conetentBox">
<div class="flex-row jcsb aic userBox">
<div>
<el-form
:inline="true"
:model="searchForm"
class="demo-form-inline"
size="small"
>
<el-form :inline="true" class="demo-form-inline" size="small">
<el-form-item label="考核人员" class="form-item">
<el-input
v-model="searchForm.userName"
placeholder="考核人员"
readonly
@click.native="openUserSelectDialog"
><el-button slot="append" icon="el-icon-s-custom"></el-button
></el-input>
<el-select
v-model="examineId"
placeholder="请选择"
@change="userChange"
>
<el-option
v-for="item in userList"
:key="item.id"
:label="item.userName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="考核任务" class="form-item">
<el-select v-model="searchForm.taskId" placeholder="请选择">
<el-select
v-model="examineTaskId"
placeholder="请选择"
@change="getUserList"
>
<el-option
v-for="item in taskList"
:key="item.value"
:label="item.label"
:value="item.value"
:key="item.id"
:label="item.taskName"
:value="item.id"
>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div>考核评分</div>
<div>考核评分{{ score }}</div>
</div>
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tabs v-model="activeName" type="card">
<el-tab-pane label="组长评估" name="first">
<div
v-for="(table, index) in tableData"
v-for="(table, index) in tableData1"
:key="index"
style="margin-bottom: 20px"
>
<div class="userBox">表格 {{ index + 1 }}</div>
<div class="userBox">{{ table[0].reviewCategory }}</div>
<el-table :data="table" style="width: 100%">
<el-table-column
v-for="(header, hIndex) in headers"
@ -57,10 +62,12 @@
v-model="scope.row.score"
:min="0"
:max="10"
@change="updateScore(scope.row)"
disabled
></el-slider>
</div>
<div class="statusText">未打分</div>
<div class="statusText" v-show="scope.row.score == 0">
未打分
</div>
<div class="flex-row jcsb" style="margin-left: 10px">
<div>0</div>
@ -80,7 +87,7 @@
type="textarea"
:autosize="{ minRows: 4 }"
placeholder="0/300"
v-model="managerText"
v-model="judgeContent"
readonly
>
</el-input>
@ -89,11 +96,11 @@
></el-tab-pane>
<el-tab-pane label="个人自评" name="second">
<div
v-for="(table, index) in tableData"
v-for="(table, index) in tableData2"
:key="index"
style="margin-bottom: 20px"
>
<div class="userBox">表格 {{ index + 1 }}</div>
<div class="userBox">表格 {{ table[0].reviewCategory }}</div>
<el-table :data="table" style="width: 100%">
<el-table-column
v-for="(header, hIndex) in headers"
@ -111,10 +118,12 @@
v-model="scope.row.score"
:min="0"
:max="10"
@change="updateScore(scope.row)"
disabled
></el-slider>
</div>
<div class="statusText">未打分</div>
<div class="statusText" v-show="scope.row.score == 0">
未打分
</div>
<div class="flex-row jcsb" style="margin-left: 10px">
<div>0</div>
@ -128,11 +137,20 @@
<template slot-scope="scope">
<div>
<el-button
v-if="scope.row.remark"
@click="handleEdit(scope.row)"
type="text"
size="mini"
icon="el-icon-view"
:class="{ hasEdit: !scope.row.remark }"
>{{ scope.row.remark ? "查看" : "未填写" }}</el-button
>查看</el-button
>
<el-button
v-if="!scope.row.remark"
type="text"
size="mini"
:class="{ hasEdit: !scope.row.remark }"
>未填写</el-button
>
</div>
</template>
@ -158,80 +176,96 @@
<el-button @click="dialogVisible = false">关闭</el-button>
</span>
</el-dialog>
<SelectUser
:dialogVisible="userSelectDialogVisible"
:currentSelectedUser="currentSelectedUser"
:showSelection="true"
:highligt="false"
@confirm="handleUserConfirm"
@close="handleUserClose"
/>
</div>
</template>
<script>
import SelectUser from "@/components/SelectUser.vue";
import { taskApi } from "@/utils/api";
export default {
components: {
SelectUser,
},
data() {
return {
taskId: "",
isNormal: false,
examineTaskId: "",
examineId: "",
userList: [],
dialogVisible: false,
saveStatus: "",
remark: "",
headers: [
{ label: "考核项", prop: "name", width: 300 },
{ label: "评分标准", prop: "description" },
{ label: "考核项", prop: "reviewItem", width: 300 },
{ label: "评分标准", prop: "remarks" },
],
//
tableData: [
[
{ name: "项目1", description: "描述1", score: 0, remark: "ss" },
{ name: "项目2", description: "描述2", score: 0, remark: "" },
],
[
{ name: "项目3", description: "描述3", score: 0, remark: "" },
{ name: "项目4", description: "描述4", score: 0, remark: "ss" },
],
//
],
taskList: [{ label: "任务1", value: 1 }],
managerText: "",
searchForm: {
userName: "",
userId: "",
taskId: "",
},
tableData1: [],
tableData2: [],
taskList: [],
judgeContent: "",
score: "",
activeName: "first",
userSelectDialogVisible: false,
currentSelectedUser: [],
};
},
methods: {
updateScore(row) {
//
console.log(`项目: ${row.name}, 评分: ${row.score}`);
},
handleEdit(row) {
this.dialogVisible = true;
this.remark = row.remark;
},
openUserSelectDialog() {
this.userSelectDialogVisible = true;
getTaskList() {
taskApi
.getTaskList({
pageNum: 1,
pageSize: 100000,
})
.then((res) => {
this.taskList = res.rows;
this.$nextTick(() => {
this.examineTaskId = Number(this.$route.query.taskId);
this.getUserList();
});
});
},
handleUserConfirm(data) {
this.searchForm.userName = data.map((ele) => ele.nickName);
this.searchForm.userId = data.map((ele) => ele.userId);
getUserList() {
if (!this.examineTaskId) return;
taskApi
.getTaskUserList({
taskId: this.examineTaskId,
pageNum: 1,
pageSize: 100000,
})
.then((res) => {
this.userList = res.rows;
this.$nextTick(() => {
this.examineId = Number(this.$route.query.examineId);
this.getSocreDetail(0);
this.getSocreDetail(1);
});
});
},
handleUserClose() {
this.userSelectDialogVisible = false;
userChange() {
this.getSocreDetail(0);
this.getSocreDetail(1);
},
//
getSocreDetail(type) {
let param = {
examineTaskId: this.examineTaskId,
reviewType: type,
examineId: this.examineId,
};
taskApi.getTaskScoreDetail(param).then((res) => {
let objData = {};
res.data.examineConfigDetailVoList.forEach((ele) => {
if (!objData[ele.reviewCategory]) objData[ele.reviewCategory] = [];
objData[ele.reviewCategory].push(ele);
});
if (type == 0) this.tableData1 = Object.values(objData);
else this.tableData2 = Object.values(objData);
this.judgeContent = res.data.examineUser.judgeContent;
this.score = res.data.examineUser.score;
});
},
},
created() {},
created() {
this.getTaskList();
},
};
</script>
@ -261,6 +295,14 @@ export default {
border-radius: 20px;
background-color: #ff5722;
}
::v-deep .el-slider__runway.disabled .el-slider__bar {
background-color: #ff5722;
}
::v-deep .el-slider__bar {
height: 20px;
border-radius: 20px;
background-color: #ff5722;
}
::v-deep .el-slider__button {
display: none;
}
@ -286,4 +328,9 @@ export default {
::v-deep .el-dialog {
margin-top: 15% !important;
}
::v-deep .el-tab-pane {
height: 600px;
overflow: auto;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="appraisal-manager">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName">
<el-tab-pane label="进行中" name="进行中">
<div class="assessment-container flex-row">
<div v-for="item in taskList['0']" :key="item.id" class="taskBox">

View File

@ -1,6 +1,6 @@
<template>
<div class="appraisal-manager">
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tabs v-model="activeName">
<el-tab-pane label="进行中" name="进行中">
<div class="assessment-container flex-row">
<div v-for="item in taskList['0']" :key="item.id" class="taskBox">

View File

@ -81,6 +81,7 @@
:currentSelectedUser="currentSelectedUser"
:showSelection="true"
:highligt="false"
ref="selectUserRef"
@confirm="handleUserConfirm"
@close="handleUserClose"
/>
@ -125,6 +126,9 @@
style="width: 90%"
placeholder="选择日期"
value-format="yyyy-MM-dd 23:59:59"
:picker-options="{
disabledDate: disabledDate,
}"
>
</el-date-picker>
</el-form-item>
@ -142,7 +146,7 @@
<el-collapse
v-model="letfValue"
:accordion="true"
style="height: 300px;overflow: auto;"
style="height: 300px; overflow: auto"
>
<el-collapse-item
v-for="(item, index) in scoreList"
@ -212,7 +216,7 @@
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible2 = false">取消</el-button>
<el-button type="primary" @click="save"></el-button>
<el-button type="primary" @click="saveSet"></el-button>
</span>
</el-dialog>
</div>
@ -310,6 +314,7 @@ export default {
dialogVisible2: false,
letfValue: "",
scoreList: [],
selectRow: {},
};
},
watch: {
@ -324,6 +329,13 @@ export default {
},
deep: true,
},
dialogVisible1(newVal) {
console.log(newVal, 111);
if (newVal) {
this.$refs.selectUserRef?.$refs.customTableRef.handleCurrentChange(1);
}
},
},
methods: {
onSearch() {
@ -335,6 +347,11 @@ export default {
});
this.getTaskList();
},
disabledDate(date) {
const startDate = new Date().getTime(); //
return new Date(date).getTime() + 60 * 60 * 24 * 1000 < startDate; //
},
getTaskList() {
taskApi
.getTaskList({
@ -358,6 +375,13 @@ export default {
},
openUserSelectDialog() {
this.userSelectDialogVisible = true;
this.$nextTick(() => {
this.$refs.selectUserRef?.$refs.customTableRef?.clearSelection();
this.currentSelectedUser = [];
(this.selectRow.userIdList || []).forEach((ele) => {
this.currentSelectedUser.push(ele);
});
});
},
handleUserConfirm(data) {
this.taskData.peopleNumberDetail = data
@ -365,6 +389,7 @@ export default {
.join(",");
this.taskData.userIdList = data.map((ele) => ele.userId);
this.taskData.peopleNumber = data.length;
this.selectRow.userIdList = data.map((ele) => ele.userId);
},
handleUserClose() {
this.userSelectDialogVisible = false;
@ -372,6 +397,19 @@ export default {
addTask() {
this.isEdit = false;
this.dialogVisible1 = true;
this.taskData = {
id: "",
taskName: "",
peopleNumberDetail: "",
userIdList: [],
endTime: "",
peopleNumber: 0,
};
this.$nextTick(() => {
this.$refs.selectUserRef?.$refs.customTableRef?.clearSelection();
this.$refs.selectUserRef?.$refs.customTableRef.handleCurrentChange(1);
this.currentSelectedUser = [];
});
},
editTask(row) {
this.isEdit = true;
@ -381,10 +419,8 @@ export default {
this.taskData.peopleNumber = row.peopleNumber;
this.taskData.peopleNumberDetail = row.peopleNumberDetail;
this.taskData.userIdList = row.userIdList;
this.currentSelectedUser = [];
(row.userIdList || []).forEach((ele) => {
this.currentSelectedUser.push(ele);
});
this.taskData.endTime = row.endTime;
this.selectRow = row;
},
setTask(row) {
taskApi.getTaskSet(row.id).then((res) => {
@ -402,6 +438,7 @@ export default {
this.dialogVisible2 = true;
});
},
saveSet() {},
delTask(row) {
this.$confirm(
"删除任务及绩效数据,该操作不可逆,请谨慎操作",