Compare commits

..

No commits in common. "3a7e3733943c9dba235e06a9d28a088a5cf762bf" and "74de4ef76c28557bac12130f5e854bc7323ad089" have entirely different histories.

9 changed files with 104 additions and 178 deletions

View File

@ -13,14 +13,12 @@
:row-key="rowKey" :row-key="rowKey"
:height="tableHeight" :height="tableHeight"
@select="selected" @select="selected"
@select-all="selectAll"
> >
<el-table-column <el-table-column
reserve-selection reserve-selection
v-if="showSelection" v-if="showSelection"
type="selection" type="selection"
width="55" width="55"
:selectable="selectable"
/> />
<el-table-column v-if="showIndex" type="index" width="50" label="序号" /> <el-table-column v-if="showIndex" type="index" width="50" label="序号" />
<template> <template>
@ -156,10 +154,6 @@ export default {
type: String, type: String,
default: "100%", default: "100%",
}, },
selectable:{
type: Function,
default: ()=>true,
}
}, },
data() { data() {
return { return {
@ -198,9 +192,6 @@ export default {
selected(arr, row) { selected(arr, row) {
this.$emit("selected", { arr, row }); this.$emit("selected", { arr, row });
}, },
selectAll(arr) {
this.$emit("selectAll", arr);
},
}, },
updated() { updated() {
if (this.$refs.elTableRef && this.$refs.elTableRef.doLayout) { if (this.$refs.elTableRef && this.$refs.elTableRef.doLayout) {

View File

@ -24,12 +24,10 @@
:show-index="true" :show-index="true"
:table-height="tableHeight" :table-height="tableHeight"
:multiSelect="multiSelect" :multiSelect="multiSelect"
:selectable="selectable"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
@selected="selectRow" @selected="selectRow"
@selectAll="selectAll"
rowKey="userId" rowKey="userId"
:rowClick=" :rowClick="
(row) => { (row) => {
@ -97,10 +95,6 @@ export default {
type: Boolean, type: Boolean,
default: true, default: true,
}, },
selectable: {
type: Function,
default: () => true,
},
}, },
data() { data() {
return { return {
@ -132,7 +126,6 @@ export default {
], ],
userData: [], userData: [],
isInternalChange: false, isInternalChange: false,
selectAllData: [],
}; };
}, },
emits: ["close", "confirm"], emits: ["close", "confirm"],
@ -158,9 +151,9 @@ export default {
else else
this.$emit( this.$emit(
"confirm", "confirm",
this.selectedUsers.map((ele, index) => ({ this.currentSelectedUser.map((ele, index) => ({
userId: ele.userId, userId: ele,
nickName: ele.nickName, nickName: this.currentSelectedUserName[index],
})) }))
); );
@ -182,37 +175,32 @@ export default {
this.isInternalChange = false; this.isInternalChange = false;
}); });
} else { } else {
// this.selectedUsers = val; this.selectedUsers = val;
} }
}, },
selectRow({ arr, row }) { selectRow({ arr, row }) {
if (!row) return;
if (this.selectedUsers.filter((ele) => ele.userId == row.userId).length) { if (
this.selectedUsers = this.selectedUsers.filter( this.currentSelectedUser.filter((ele) => ele.userId == row.userId)
(ele) => ele.userId != row.userId .length
) {
this.currentSelectedUser = this.currentSelectedUser.filter(
(ele) => ele != row.userId
); );
} else { } else {
this.selectedUsers.push({ userId: row.userId, nickName: row.nickName }); this.currentSelectedUser.push(row.userId);
} }
}, if (
selectAll(arr) { this.currentSelectedUserName.filter((ele) => ele == row.nickName).length
let filterArr = this.selectAllData.filter((ele) => ) {
!arr.some((item) => item.userId == ele.userId) this.currentSelectedUserName = this.currentSelectedUserName.filter(
); (ele) => ele != row.nickName
console.log(filterArr,11); );
} else {
this.currentSelectedUserName.push(row.nickName);
}
console.log(this.currentSelectedUserName,22);
arr.forEach((ele) => {
if (
!this.selectedUsers.filter((item) => item.userId == ele.userId).length
)
this.selectRow({ row: ele });
});
filterArr.forEach((ele) => {
this.selectRow({ row: ele});
});
}, },
fetchUserList: async function () { fetchUserList: async function () {
const response = await systemApi.getUserList({ const response = await systemApi.getUserList({
@ -239,6 +227,28 @@ export default {
}, },
}, },
watch: { watch: {
// currentSelectedUser: {
// handler(newVal) {
// this.isInternalChange = true;
// this.$nextTick(() => {
// this.selectedUsers = newVal;
// if (this.$refs.customTableRef) {
// this.$refs.customTableRef.clearSelection();
// newVal.forEach((user) => {
// const row = this.userData.find(
// (item) => item.userId === user.userId
// );
// if (row) {
// this.$refs.customTableRef.toggleRowSelection(row, true);
// }
// });
// }
// this.isInternalChange = false;
// });
// },
// immediate: true,
// deep: true,
// },
currentSelectedUser: { currentSelectedUser: {
handler(newVal) { handler(newVal) {
this.$nextTick(() => { this.$nextTick(() => {
@ -253,23 +263,16 @@ export default {
this.selectedUsers = []; this.selectedUsers = [];
this.$refs.customTableRef?.setCurrentRow(); this.$refs.customTableRef?.setCurrentRow();
} }
} else { } else {
if (!newVal.length) { if (!newVal.length) {
this.selectedUsers = []; this.selectedUsers = [];
this.$refs.customTableRef?.clearSelection(); this.$refs.customTableRef?.clearSelection();
} else { } else {
// this.$refs.customTableRef?.clearSelection(); // this.$refs.customTableRef?.clearSelection();
this.selectedUsers = []; newVal.forEach((item) => {
newVal.forEach((item, index) => {
this.selectedUsers.push({
userId: item,
nickName: this.currentSelectedUserName[index],
});
let row = this.userData.find((ele) => ele.userId == item); let row = this.userData.find((ele) => ele.userId == item);
if (row) { if (row)
this.selectAllData.push(row);
this.$refs.customTableRef?.toggleRowSelection(row, true); this.$refs.customTableRef?.toggleRowSelection(row, true);
}
}); });
} }
} }
@ -290,14 +293,9 @@ export default {
this.$refs.customTableRef?.setCurrentRow(row); this.$refs.customTableRef?.setCurrentRow(row);
} }
} else { } else {
this.selectAllData = [];
this.currentSelectedUser.forEach((item) => { this.currentSelectedUser.forEach((item) => {
let row = newVal.find((ele) => ele.userId == item); let row = newVal.find((ele) => ele.userId == item);
if (row) { if (row) this.$refs.customTableRef?.toggleRowSelection(row, true);
this.selectAllData.push(row);
this.$refs.customTableRef?.toggleRowSelection(row, true);
}
}); });
} }
}); });

View File

@ -87,21 +87,7 @@ export default {
}, },
columns: [ columns: [
{ prop: "userName", label: "考核人员" }, { prop: "userName", label: "考核人员" },
{ { prop: "manageScore", label: "考核评分", sortable: "custom" },
prop: "score",
label: "考核评分",
sortable: "custom",
type: "status",
callback: (value, row) => {
if (row.score) {
return row.score;
} else if (row.manageScore) {
return row.manageScore;
} else {
return row.selfScore;
}
},
},
{ {
prop: "examineStatus", prop: "examineStatus",
label: "状态", label: "状态",
@ -115,10 +101,8 @@ export default {
return `<span style="color: ${color}">待个人自评/组长评分</span>`; return `<span style="color: ${color}">待个人自评/组长评分</span>`;
} else if (row.examineStatusSelf == 0) { } else if (row.examineStatusSelf == 0) {
return `<span style="color: ${color}">待个人自评</span>`; return `<span style="color: ${color}">待个人自评</span>`;
} else if (row.examineStatus == 0) {
return `<span style="color: ${color}">待组长评分</span>`;
} else { } else {
return `<span style="color: ${color}">已完成</span>`; return `<span style="color: ${color}">待组长评分评</span>`;
} }
}, },
}, },
@ -155,17 +139,9 @@ export default {
this.getTaskUserList(); this.getTaskUserList();
}, },
handleEdit(row, edit) { handleEdit(row, edit) {
let score = "";
if (row.score) {
score = row.score;
} else if (row.manageScore) {
score = row.manageScore;
} else {
score = row.selfScore;
}
this.$router.push({ this.$router.push({
path: "/projectBank/userScoreDetail", path: "/projectBank/userScoreDetail",
query: { taskId: row.taskId, examineId: row.id, score }, query: { taskId: row.taskId, examineId: row.id },
}); });
}, },
getTaskUserList() { getTaskUserList() {
@ -345,7 +321,7 @@ export default {
::v-deep .el-tree-node__content { ::v-deep .el-tree-node__content {
font-weight: bold; font-weight: bold;
} }
::v-deep .is-current > .el-tree-node__content:first-child .el-tree-node__label { ::v-deep .is-current>.el-tree-node__content:first-child .el-tree-node__label {
color: #4096ff !important; color: #4096ff !important;
} }
::v-deep .el-tree-node__content { ::v-deep .el-tree-node__content {

View File

@ -45,19 +45,19 @@
</div> </div>
</div> </div>
<div class="flex-row jcsb aic userBox headerBox"> <div class="flex-row jcsb aic userBox headerBox">
<div class="flex-row aic" style="width: 200px"> <div class="flex-row aic">
<i <i
class="el-icon-user-solid" class="el-icon-user-solid"
style="color: #4096ff; font-size: 24px; margin-right: 5px" style="color: #4096ff; font-size: 24px; margin-right: 5px"
></i ></i
>{{ (userList.find((ele) => ele.id == examineId) || {}).userName }} >{{ userList.find((ele) => ele.id == examineId).userName }}
</div> </div>
<div class="totalBox aic"> <div class="totalBox aic" v-if="!isNormal">
<div>考核评分</div> <div>考核评分</div>
<div class="scoreTotal">{{ score }}</div> <div class="scoreTotal">{{ score }}</div>
</div> </div>
</div> </div>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName" type="card">
<el-tab-pane label="组长评估" name="first"> <el-tab-pane label="组长评估" name="first">
<div class="tableBox"> <div class="tableBox">
<div <div
@ -141,7 +141,7 @@
v-model="scope.row.score" v-model="scope.row.score"
:min="0" :min="0"
:max="10" :max="10"
:disabled="true" :disabled="!isEdit"
style="width: 90%" style="width: 90%"
show-stops show-stops
show-tooltip show-tooltip
@ -164,17 +164,15 @@
:autosize="{ minRows: 4 }" :autosize="{ minRows: 4 }"
placeholder="0/300" placeholder="0/300"
v-model="judgeContent" v-model="judgeContent"
:readonly="true" :readonly="!isEdit"
maxlength="300" maxlength="300"
show-word-limit show-word-limit
> >
</el-input> </el-input>
</div> </div>
<div style="margin-top: 20px;font-weight: bold;">组长{{ manageUserName }}</div>
</div> </div>
</div> </div></div
</div></el-tab-pane ></el-tab-pane>
>
<el-tab-pane label="个人自评" name="second"> <el-tab-pane label="个人自评" name="second">
<div class="tableBox"> <div class="tableBox">
<div <div
@ -259,7 +257,7 @@
:min="0" :min="0"
:max="10" :max="10"
@change="updateScore(scope.row)" @change="updateScore(scope.row)"
:disabled="true" :disabled="!isEdit"
style="width: 90%" style="width: 90%"
show-stops show-stops
show-tooltip show-tooltip
@ -271,10 +269,24 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="自评总结" prop="score" width="150"> <el-table-column label="自评总结" prop="score">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<el-button <el-button
v-if="isEdit"
@click="handleEdit(scope.row)"
type="text"
size="mini"
:class="{ hasEdit: !scope.row.remark }"
style="font-weight: 600"
>{{ scope.row.remark ? "查看" : "暂未评价" }}
<i
style="color: #4096ff; font-size: 14px"
class="el-icon-edit el-icon--right"
></i
></el-button>
<el-button
v-if="!isEdit"
@click="handleEdit(scope.row)" @click="handleEdit(scope.row)"
type="text" type="text"
size="mini" size="mini"
@ -335,7 +347,6 @@ export default {
judgeContent: "", judgeContent: "",
score: "", score: "",
activeName: "first", activeName: "first",
manageUserName: "",
}; };
}, },
methods: { methods: {
@ -344,7 +355,7 @@ export default {
this.remark = row.remark; this.remark = row.remark;
}, },
getTaskList(first) { getTaskList() {
taskApi taskApi
.getTaskList({ .getTaskList({
pageNum: 1, pageNum: 1,
@ -354,11 +365,11 @@ export default {
this.taskList = res.rows; this.taskList = res.rows;
this.$nextTick(() => { this.$nextTick(() => {
this.examineTaskId = Number(this.$route.query.taskId); this.examineTaskId = Number(this.$route.query.taskId);
this.getUserList(first); this.getUserList();
}); });
}); });
}, },
getUserList(first) { getUserList() {
if (!this.examineTaskId) return; if (!this.examineTaskId) return;
taskApi taskApi
.getTaskUserList({ .getTaskUserList({
@ -369,9 +380,7 @@ export default {
.then((res) => { .then((res) => {
this.userList = res.rows; this.userList = res.rows;
this.$nextTick(() => { this.$nextTick(() => {
if (first !== 1) this.examineId = this.userList[0].id; this.examineId = Number(this.$route.query.examineId);
else this.examineId = Number(this.$route.query.examineId);
this.getSocreDetail(0); this.getSocreDetail(0);
this.getSocreDetail(1); this.getSocreDetail(1);
}); });
@ -397,20 +406,12 @@ export default {
if (type == 0) this.tableData1 = Object.values(objData); if (type == 0) this.tableData1 = Object.values(objData);
else this.tableData2 = Object.values(objData); else this.tableData2 = Object.values(objData);
this.judgeContent = res.data.examineUser.judgeContent; this.judgeContent = res.data.examineUser.judgeContent;
this.score = res.data.examineUser.score||res.data.examineUser.manageScore;
this.manageUserName = res.data.examineUser.manageUserName;
if (res.data.examineUser.score) {
this.score = res.data.examineUser.score;
} else if (res.data.examineUser.manageScore) {
this.score = res.data.examineUser.manageScore;
} else {
this.score = res.data.examineUser.selfScore;
}
}); });
}, },
}, },
created() { created() {
this.getTaskList(1); this.getTaskList();
}, },
}; };
</script> </script>
@ -512,7 +513,7 @@ export default {
padding: 20px; padding: 20px;
background-color: #f9f9f9; background-color: #f9f9f9;
border-radius: 2px; border-radius: 2px;
font-size: 16px; font-size: 14px;
} }
.block { .block {
width: 4px; width: 4px;
@ -529,10 +530,10 @@ export default {
z-index: 100; z-index: 100;
} }
.totalBox { .totalBox {
width: 180px; width: 150px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
font-size: 16px; font-size: 14px;
color: #333333; color: #333333;
} }
.scoreTotal { .scoreTotal {
@ -549,17 +550,4 @@ export default {
::v-deep .el-table__header .el-table__cell { ::v-deep .el-table__header .el-table__cell {
padding: 14px 30px; padding: 14px 30px;
} }
::v-deep .el-tabs__item.is-active {
color: #4096ff;
}
::v-deep .el-tabs__item {
font-size: 18px;
font-weight: bold;
color: #999999;
}
::v-deep .el-tabs__active-bar {
height: 3px;
width: 32px !important;
left: 20px;
}
</style> </style>

View File

@ -15,7 +15,7 @@
</div> </div>
</div> </div>
<div class="flex-row jcsb aic userBox headerBox"> <div class="flex-row jcsb aic userBox headerBox">
<div class="flex-row aic" style="width: 200px;"> <div class="flex-row aic">
<i <i
class="el-icon-user-solid" class="el-icon-user-solid"
style="color: #4096ff; font-size: 24px; margin-right: 5px" style="color: #4096ff; font-size: 24px; margin-right: 5px"
@ -122,7 +122,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column class-name="editCell" label="自评总结" prop="score" v-if="isNormal" minWidth="140"> <el-table-column label="自评总结" prop="score" v-if="isNormal">
<template slot-scope="scope"> <template slot-scope="scope">
<div> <div>
<el-button <el-button
@ -211,11 +211,11 @@ export default {
remark: "", remark: "",
isEdit: "", isEdit: "",
headers: [ headers: [
{ label: "考核项", prop: "reviewItem", minWidth: 150 }, { label: "考核项", prop: "reviewItem", minWidth: 200 },
{ {
label: "评分标准", label: "评分标准",
prop: "remarks", prop: "remarks",
minWidth:this.$route.query.isNormal? 240:360, minWidth: 300,
}, },
], ],
// //
@ -493,7 +493,7 @@ export default {
padding: 20px; padding: 20px;
background-color: #f9f9f9; background-color: #f9f9f9;
border-radius: 2px; border-radius: 2px;
font-size: 16px; font-size: 14px;
} }
.block { .block {
width: 4px; width: 4px;
@ -510,10 +510,10 @@ export default {
z-index: 100; z-index: 100;
} }
.totalBox { .totalBox {
width: 180px; width: 150px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
font-size: 16px; font-size: 14px;
color: #333333; color: #333333;
} }
.scoreTotal { .scoreTotal {
@ -521,24 +521,13 @@ export default {
font-weight: 700; font-weight: 700;
color: #ff7d00; color: #ff7d00;
} }
::v-deep .el-table__body .sorceTableCell .cell { ::v-deep .sorceTableCell .cell {
margin-bottom: 20px; margin-bottom: 20px;
} }
::v-deep .sorceTableCell.el-table__cell{
padding-right: 10px !important;
}
::v-deep .el-table__body .el-table__cell { ::v-deep .el-table__body .el-table__cell {
padding: 20px 40px; padding: 20px 40px;
} }
::v-deep .el-table__header .el-table__cell { ::v-deep .el-table__header .el-table__cell {
padding: 14px 30px; padding: 14px 30px;
}
::v-deep .el-table__header .el-table__cell .cell{
padding-left: 20px !important;
}
::v-deep .editCell{
padding-right: 20px !important;
} }
</style> </style>

View File

@ -37,10 +37,8 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div></div
</div> ></el-tab-pane>
<el-empty v-if="!taskList['0']" description="暂无数据"></el-empty>
</el-tab-pane>
<el-tab-pane label="已过期" name="已过期"> <el-tab-pane label="已过期" name="已过期">
<div class="assessment-container flex-row"> <div class="assessment-container flex-row">
<div v-for="item in taskList['2']" :key="item.id" class="taskBox"> <div v-for="item in taskList['2']" :key="item.id" class="taskBox">
@ -77,10 +75,8 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div></div
</div> ></el-tab-pane>
<el-empty v-if="!taskList['2']" description="暂无数据"></el-empty>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
@ -221,7 +217,7 @@ export default {
::v-deep .el-tag--warning { ::v-deep .el-tag--warning {
color: #ea741e; color: #ea741e;
} }
.waitBtn { .waitBtn{
color: #999; color: #999;
} }
</style> </style>

View File

@ -37,9 +37,7 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div></div
</div>
<el-empty v-if="!taskList['0']" description="暂无数据"></el-empty
></el-tab-pane> ></el-tab-pane>
<el-tab-pane label="已过期" name="已过期"> <el-tab-pane label="已过期" name="已过期">
<div class="assessment-container flex-row"> <div class="assessment-container flex-row">
@ -77,10 +75,8 @@
</div> </div>
</div> </div>
</div> </div>
</div> </div></div
</div> ></el-tab-pane>
<el-empty v-if="!taskList['2']" description="暂无数据"></el-empty>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
@ -124,7 +120,7 @@ export default {
}, },
created() { created() {
console.log(123); console.log(123);
this.getTaks(); this.getTaks();
}, },
}; };

View File

@ -92,7 +92,6 @@
:currentSelectedUserName="currentSelectedUserName" :currentSelectedUserName="currentSelectedUserName"
:showSelection="true" :showSelection="true"
:highligt="false" :highligt="false"
:selectable="selectable"
ref="selectUserRef" ref="selectUserRef"
@confirm="handleUserConfirm" @confirm="handleUserConfirm"
@close="handleUserClose" @close="handleUserClose"
@ -682,14 +681,8 @@ export default {
); );
}); });
}); });
console.log(this.scoreList, 11);
}, },
selectable(row,index){
if(row.roles.find((ele)=>ele.roleName=='普通员工')){
return true
}else{
return false
}
}
}, },
mounted() { mounted() {
this.getTaskList(); this.getTaskList();

View File

@ -249,11 +249,10 @@ export default {
this.logData.map((item) => { this.logData.map((item) => {
var ele = document.getElementById(item.date.split(" ")[0]); var ele = document.getElementById(item.date.split(" ")[0]);
if (ele) { if (ele) {
if (item.state == -1) { if (item.state == -1) {
ele.style = "background:#ecf5ff"; ele.style = "background:#ecf5ff";
} else if (item.state == 0||item.state == 1) { } else if (item.state == 0) {
ele.style = `background:linear-gradient(to right, #409eff ${ ele.style = `background:linear-gradient(to right, #409eff ${
(item.workTime || 1) * 100 (item.workTime || 1) * 100
}% , #ecf5ff ${(item.workTime || 1) * 100}%);color:${ }% , #ecf5ff ${(item.workTime || 1) * 100}%);color:${