优化绩效详情

This commit is contained in:
熊成强 2020-11-02 15:13:31 +08:00
parent 57f13b9459
commit be16d3a02b
10 changed files with 433 additions and 75 deletions

View File

@ -8,6 +8,15 @@ export function getWorkList (query) {
})
}
// 校验是否有跨组人员
export function apiCheckStaff (query) {
return request({
url: '/lz_management/evaluationGroup/checkStaff',
method: 'POST',
data: query
})
}
// 保存基础设置
export function saveBaseSet (query) {
return request({

View File

@ -107,7 +107,7 @@ export default {
},
beforeMount () {},
mounted () {
this.tags = this.showDataList.list || []
this.tags = this.showDataList.list.concat([]) || []
this.showData = this.data.length > -1 ? this.data : []
},
methods: {
@ -195,10 +195,7 @@ export default {
},
handleCancel () {
this.$emit('update:isShow', false)
},
xcq1 () {
console.log(this.a)
// this.$refs.tree.setChecked(100)
this.$forceUpdate()
}
},
watch: {}
@ -293,7 +290,7 @@ export default {
border-top: 1px solid @borderColor;
}
.el-dialog__title{
font-size: 16px;
font-size: 14px;
}
.dialog-footer{
display: flex;

View File

@ -257,11 +257,6 @@ export default {
handleCancel () {
this.$emit('update:isShow', false)
this.$forceUpdate()
console.log('isShow: ', this.isShow)
},
xcq1 () {
console.log(this.a)
// this.$refs.tree.setChecked(100)
}
},
watch: {}
@ -382,7 +377,7 @@ export default {
border-top: 1px solid @borderColor;
}
.el-dialog__title{
font-size: 16px;
font-size: 14px;
}
.dialog-footer{
display: flex;

View File

@ -9,7 +9,7 @@
}
.commonFont {
font-size: 16px;
font-size: 14px;
color: #52575b;
}

View File

@ -0,0 +1,234 @@
<template>
<div class='table'>
<table
cellspacing="0"
border="1">
<!-- 顶部title -->
<tr>
<th style="width: 90px;">维度</th>
<th>名称</th>
<th>考核标准</th>
<th v-if="tableInfo.result">结果值</th>
<th>权重({{obj.weight*100}}%)</th>
<th v-if="tableInfo.score">上级评分</th>
<th v-if="tableInfo.score">评分说明</th>
</tr>
<!-- 暂无数据时显示 -->
<tr v-if="obj.recortModelDtos.length === 0">
<td :colspan="6">
暂无数据
</td>
</tr>
<!-- template不会被渲染 -->
<template v-for="(item,index) in obj.recortModelDtos" >
<!-- 左侧跨行区域 -->
<tr :key="index+'-only'">
<td :rowspan="item.detailDtos.length+1">
<!-- <div v-for="(i,index) in item.name">
{{i}}
</div> -->
{{item.name}}
</td>
<td v-if="item.detailDtos.length===0"></td>
<td v-if="item.detailDtos.length===0"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.score"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.score"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.result"></td>
<td v-if="item.detailDtos.length===0"></td>
</tr>
<!-- 右侧数据 -->
<tr v-for="(child) in item.detailDtos" :key="child.id">
<td>
<span> {{child.target || ''}}</span>
</td>
<td>
{{child.keyResult || ''}}
</td>
<td v-if="tableInfo.result">
<!-- <span>{{child.checkResult || '--'}}</span> -->
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input>
</td>
<td>
{{(child.checkWeight)*100}}%
</td>
<td v-if="tableInfo.score">
<!-- gradeGroupId=== 1 下拉 -->
<el-select style="width:100px;" size="mini" v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore">
<el-option
v-for="item in scoreList"
:key="item.id"
:label="item.name"
:value="item.score">
</el-option>
</el-select>
<!-- <span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || 0}}</span> -->
<!-- <el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.superScore" clearable></el-input> -->
</td>
<td style="padding:10px;" v-if="tableInfo.score">
<!-- <span>{{child.scoreComment || '--'}}</span> -->
<el-input style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
</td>
</tr>
</template>
</table>
<div v-if="tableInfo.result || tableInfo.score" class="table-bottom">
<div class="table-bottom-content">
<el-button size='small' @click="handleCancelResult" plain>取消</el-button>
<el-button size='small' @click="handleSaveDetail()" plain>暂存</el-button>
<el-button size='small' type="primary" >{{tableInfo.result?'提交结果值':'提交评分'}}</el-button>
</div>
</div>
<!-- <div v-else class="table-bottoms">
<div class="table-bottoms-contenct">
<div class="table-bottoms-contenct-left"><i class="el-icon-arrow-left"></i>朱吉达</div>
<div class="table-bottoms-contenct-center commonFont">参与考核7/8</div>
<div class="table-bottoms-contenct-right">熊成强<i class="el-icon-arrow-right"></i></div>
</div>
</div> -->
</div>
</template>
<script>
import { apiSaveDetail, apiGet375 } from '@/api/assessment'
export default {
name: 'columnsTbale',
props: {
obj: {
type: Object,
default: () => {
return {
recortModelDtos: []
}
}
},
tableInfo: {
type: Object,
default: () => {
return {
result: false,
score: false
}
}
}
},
data () {
return {
input: '',
scoreList: []
}
},
mounted () {
console.log('list', this.obj)
this.handleGrt375()
},
methods: {
handleCancelResult () {
this.$emit('update:tableInfo', Object.assign({}, this.tableInfo, {result: false, score: false}))
},
async handleGrt375 () {
let res = await apiGet375()
if (res.code !== 200) return
this.scoreList = res.data
console.log('resssss: ', res)
},
async handleSaveDetail (params = this.obj) {
let res = await apiSaveDetail(params)
if (res.code !== 200) {
this.$message.error(res.msg)
}
this.$message({
message: res.msg,
type: 'success'
})
}
}
}
</script>
<style lang='less' scoped>
.table{
position: relative;
&-bottoms{
width: 100%;
height: 60px;
z-index: 1000000;
bottom: 0;
left: 0;
background:transparent;
position: fixed;
display: flex;
// align-items: center;
justify-content: center;
&-contenct{
height: 40px;
display: flex;
background: #fff;
justify-content: space-between;
border-radius: 40px;
box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.12), 0 1px 6px 0 rgba(0, 0, 0, 0.12);
&-left{
line-height: 40px;
font-size: 14px;
padding: 0 16px;
i{
margin:0 6px;
font-weight: 800;
}
cursor: pointer;
color: @fontBlue;
}
&-center{
.center();
font-size: 14px;
padding: 0 10px;
}
&-right{
line-height: 40px;
font-size: 14px;
padding: 0 16px;
i{
margin:0 6px;
font-weight: 800;
}
cursor: pointer;
color: @fontBlue;
}
}
}
}
.table-bottom {
height: 60px;
position: fixed;
padding: 0 80px;
width: 100%;
background: #fff;
border-top: 1px solid @borderColor;
bottom: 0;
left: 0;
&-content{
width: 1360px;
margin: 0 auto;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
}
table{
margin-top: 15px;
width: 100%;
border:1px solid #e9eaec;
border-collapse:collapse
}
th{
background-color: #f8f8f9;
}
th,td{
padding: 5px;
border: 1px solid #e9eaec;
text-align: center;
vertical-align: top;
line-height: 30px;
}
td{
}
</style>

View File

@ -1,59 +1,46 @@
<template>
<div class='table'>
<table
cellspacing="0"
border="1">
<!-- 顶部title -->
<tr>
<th style="width: 90px;">维度</th>
<th>名称</th>
<th>考核标准</th>
<th v-if="tableInfo.result">结果值</th>
<th>权重({{obj.weight*100}}%)</th>
<th v-if="tableInfo.score">上级评分</th>
<th v-if="tableInfo.score">评分说明</th>
</tr>
<!-- 暂无数据时显示 -->
<tr v-if="obj.recortModelDtos.length === 0">
<td :colspan="6">
<div class="table-list">
<div class="table-header">
<div class="table-left">维度</div>
<div class="table-header-flex name">名称</div>
<div class="table-header-flex">考核标准</div>
<div class="table-header-flex" v-if="tableInfo.result">结果值</div>
<div class="table-header-flex quanzhomng">权重({{obj.weight*100}}%)</div>
<div class="table-header-flex" v-if="tableInfo.score">上级评分</div>
<div class="table-header-flex" v-if="tableInfo.score">评分说明</div>
</div>
<div v-if="obj.recortModelDtos.length === 0" class='listNone'>
<!-- -->
<div>
暂无数据
</td>
</tr>
<!-- template不会被渲染 -->
<template v-for="(item,index) in obj.recortModelDtos" >
<!-- 左侧跨行区域 -->
<tr :key="index+'-only'">
<td :rowspan="item.detailDtos.length+1">
<!-- <div v-for="(i,index) in item.name">
</div>
</div>
<div v-for="(item,index) in obj.recortModelDtos" :key="index" class="table-content">
<div class="table-content-left table-left">
<!-- {{item.name}} -->
<div v-for="(i,indexs) in item.name" :key="indexs">
{{i}}
</div> -->
{{item.name}}
</td>
<td v-if="item.detailDtos.length===0"></td>
<td v-if="item.detailDtos.length===0"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.score"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.score"></td>
<td v-if="item.detailDtos.length===0 && tableInfo.result"></td>
<td v-if="item.detailDtos.length===0"></td>
</tr>
<!-- 右侧数据 -->
<tr v-for="(child) in item.detailDtos" :key="child.id">
<td>
</div>
</div>
<div class="table-content-right">
<div v-for="(child) in item.detailDtos" :key="child.id" class="table-content-right-item">
<div class="name">
<span> {{child.target || ''}}</span>
</td>
<td>
</div>
<div>
{{child.keyResult || ''}}
</td>
<td v-if="tableInfo.result">
</div>
<div v-if="tableInfo.result">
<!-- <span>{{child.checkResult || '--'}}</span> -->
<el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input>
</td>
<td>
</div>
<div class="quanzhomng">
{{(child.checkWeight)*100}}%
</td>
<td v-if="tableInfo.score">
</div>
<div v-if="tableInfo.score">
<!-- gradeGroupId=== 1 下拉 -->
<el-select style="width:100px;" size="mini" v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore">
<el-select style="width:140px;" size="mini" v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore">
<el-option
v-for="item in scoreList"
:key="item.id"
@ -63,14 +50,16 @@
</el-select>
<!-- <span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || 0}}</span> -->
<!-- <el-input style="width:120px;" size="mini" placeholder="请输入内容" v-model="child.superScore" clearable></el-input> -->
</td>
<td style="padding:10px;" v-if="tableInfo.score">
</div>
<div style="padding:10px;" v-if="tableInfo.score">
<!-- <span>{{child.scoreComment || '--'}}</span> -->
<el-input style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
</td>
</tr>
</template>
</table>
</div>
</div>
</div>
</div>
</div>
<div v-if="tableInfo.result || tableInfo.score" class="table-bottom">
<div class="table-bottom-content">
<el-button size='small' @click="handleCancelResult" plain>取消</el-button>
@ -144,6 +133,95 @@ export default {
}
</script>
<style lang='less' scoped>
.listNone{
height: 100px;
text-align: center;
line-height: 100px;
border-bottom: 1px solid @borderColor;
}
.table-list{
border: 1px solid @borderColor;
border-bottom: none;
.quanzhomng{
flex: 0.5 !important;
}
}
.table-header{
display: flex;
background: #f5f5f5;
justify-content: space-between;
border-bottom: 1px solid @borderColor;;
// border: 1px solid @borderColor;
>div{
padding: 10px;
border-right: 1px solid @borderColor;;
}
>div:last-child{
border-right: none;
}
&-flex{
flex: 1;
.center();
}
}
.table-content{
display: flex;
justify-content: space-between;
>div{
padding: 10px;
border-right: 1px solid @borderColor;
}
>div:last-child{
border-right: none;
padding: 0px;
}
&-left{
border-bottom: 1px solid @borderColor;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
>div{
.center();
}
}
&-right{
flex:1;
display: flex;
flex-direction: column;
// justify-content: space-between;
// align-items: center;
>div{
flex: 1;
border-bottom: 1px solid @borderColor;;
}
>div:last-child{
// border-bottom: none;
}
&-item:hover{
background: #f5f5f5;
}
&-item{
>div{
border-right: 1px solid @borderColor;
padding: 10px;
}
>div:last-child{
border-right: none;
}
// flex: 1;
display: flex;
>div{
flex: 1;
.center();
}
}
}
}
.table-left{
width: 60px;
}
.table{
position: relative;
&-bottoms{

View File

@ -253,7 +253,7 @@ export default {
text-align: center;
padding: 10px 60px;
margin: 4px 0;
font-size: 16px;
font-size: 14px;
position: relative;
background: #f5f5f5;
position: relative;

View File

@ -108,7 +108,7 @@ export default {
margin-bottom: 20px;
}
.title_bar>:nth-child(1){
font-size: 16px;
font-size: 14px;
color: #b4b4b4;
margin-right: 10px;
}
@ -118,7 +118,7 @@ export default {
background: #333;
}
.title_bar>:nth-child(3){
font-size: 16px;
font-size: 14px;
color: #333;
margin-left: 10px;
}

View File

@ -34,7 +34,7 @@
size="mini"
placeholder="请选择考评组管理员"
readonly
:value="Ground.title+ ' 等'+ Ground.list.length + '人'">
:value="Ground.title?(Ground.title+ ' 等'+ Ground.list.length + '人'):''">
<i slot="suffix" class="el-input__icon el-icon-edit"></i>
</el-input>
</el-tooltip>
@ -95,8 +95,8 @@
</el-form>
</div>
<getPersonnel v-if="isSshowOutIds" :value.sync='form.outIds' :isShow.sync='isSshowOutIds' :showDataList.sync='outIdsLsit'/>
<getPersonnel v-if="isShowPersonnel" :value.sync='form.staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
<get-depart v-if="isShow" :value.sync='form.depIds' :isShow.sync='isShow' :showDataList.sync='showData'/>
<getPersonnel @cb='handleCheckStaffIds' v-if="isShowPersonnel" :value.sync='form.staffIds' :isShow.sync='isShowPersonnel' :showDataList.sync='personnelList'/>
<get-depart @cb='handleCheckDepIds' v-if="isShow" :value.sync='form.depIds' :isShow.sync='isShow' :showDataList.sync='showData'/>
<popup-right v-if="showRight" @cancel='handleCancel' @submit="handleSubmit" title="选择考评组管理员">
<div slot="content" class="chooseManage">
<div v-for="i in GroundList" :key="i.staffId" class="chooseManage-item" >
@ -112,7 +112,7 @@ import getDepart from '@/components/getDepart'
import getPersonnel from '@/components/getPersonnel'
import PopupRight from '@/components/PopupRight'
import { getGround } from '@/api/data'
import { getByIdForBasis } from '@/api/workbench'
import { getByIdForBasis, apiCheckStaff } from '@/api/workbench'
export default {
props: {
basisForm: {
@ -190,6 +190,45 @@ export default {
this.form = this.basisForm
},
methods: {
async handleCheckStaffIds (item) {
const params = Object.assign({}, this.form, {staffIds: item.value})
const bool = await this.handleCheckStaff(params)
if (bool) {
this.form.staffIds = item.value
this.personnelList = item
this.isShowPersonnel = false
}
},
async handleCheckDepIds (item) {
const params = Object.assign({}, this.form, {depIds: item.value})
const bool = await this.handleCheckStaff(params)
if (bool) {
this.form.depIds = item.value
this.showData = item
this.isShow = false
}
},
async handleCheckStaff (parmas = this.form) {
return new Promise(async (resolve, reject) => {
let res = await apiCheckStaff(Object.assign({}, parmas, {confirm: 0, id: this.$route.query.id || ''}))
console.log('res: ', res)
if (res.code === 504) {
this.$confirm(res.msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
resolve(true)
}).catch(() => {
resolve(false)
})
} else if (res.code === 200) {
resolve(true)
} else {
resolve(false)
}
})
},
//
async handleGetByIdForBasis (id) {
try {

View File

@ -21,8 +21,7 @@
import basis from './components/basis'
import process from './components/process'
import templateSet from './components/templateSet'
import {saveBaseSet, saveTemSet, saveDetailProcs} from '@/api/workbench'
import { saveBaseSet, saveTemSet, saveDetailProcs, apiCheckStaff } from '@/api/workbench'
export default {
data () {
return {
@ -56,6 +55,12 @@ export default {
created () {
const id = this.$route.query.id
this.$route.meta.title = !id ? '新增考评组' : '编辑考评组'
if (this.$route.query.copy) {
this.$message({
message: '考评组复制成功,需要重新设置被考核人与互评人',
type: 'success'
})
}
},
mounted () {
@ -72,9 +77,10 @@ export default {
if (!this.basisForm.depIds && !this.basisForm.staffIds) {
return this.$message.error('请选择被考核人员')
}
this.loadings = true
try {
let res1 = await apiCheckStaff(Object.assign({}, this.basisForm, {confirm: 1}))
console.log('res1: ', res1)
let res = await saveBaseSet(this.basisForm)
res = res.data
this.basisForm = res