This commit is contained in:
zhujida 2020-12-22 18:16:31 +08:00
parent 41c1e31718
commit 7ed758d90a

View File

@ -1,20 +1,26 @@
<template> <template>
<div class='table'> <div class='table'>
<div v-if="obj.recortModelDtos.length !== 0" <div
class="table-list commonFont"> v-if="obj.recortModelDtos.length !== 0"
class="table-list commonFont"
>
<div class="table-header"> <div class="table-header">
<div class="title table-left weidu">维度</div> <div class="title table-left weidu">维度</div>
<div class="title table-header-flex name">名称</div> <div class="title table-header-flex name">名称</div>
<div class="title table-header-flex jindu">任务</div> <div class="title table-header-flex jindu">任务</div>
<div class="title table-header-flex kaohe">考核标准</div> <div class="title table-header-flex kaohe">考核标准</div>
<div class="title table-header-flex jieguo" <div
v-if="tableInfo.result || tableAuth.showResult">结果值</div> class="title table-header-flex jieguo"
v-if="tableInfo.result || tableAuth.showResult"
>结果值</div>
<div class="title table-header-flex quanzhong">权重({{Math.round((obj.weight * 100)*1000)/1000}}%)</div> <div class="title table-header-flex quanzhong">权重({{Math.round((obj.weight * 100)*1000)/1000}}%)</div>
<template v-if="obj.recortModelDtos.length>0 && obj.recortModelDtos[0].detailDtos && obj.recortModelDtos[0].detailDtos.length>0"> <template v-if="obj.recortModelDtos.length>0 && obj.recortModelDtos[0].detailDtos && obj.recortModelDtos[0].detailDtos.length>0">
<!-- v-if="tableAuth.editScore" --> <!-- v-if="tableAuth.editScore" -->
<div class="title table-header-flex pingfen" <div
class="title table-header-flex pingfen"
v-for="(k,index1) in handleGetScorlList(obj.recortModelDtos[0].detailDtos[0].scoreDtos)" v-for="(k,index1) in handleGetScorlList(obj.recortModelDtos[0].detailDtos[0].scoreDtos)"
:key="index1"> :key="index1"
>
<div class="pingfen-title">上级评分 - {{k.approvalName}} ( {{( Math.round((k.weight * 100) * 1000) / 1000 )}}%)</div> <div class="pingfen-title">上级评分 - {{k.approvalName}} ( {{( Math.round((k.weight * 100) * 1000) / 1000 )}}%)</div>
<div class="pingfen-content"> <div class="pingfen-content">
<div class="pingfen-content-ping">评分</div> <div class="pingfen-content-ping">评分</div>
@ -23,109 +29,150 @@
</div> </div>
</div> </div>
</template> </template>
<div class="title table-header-flex kaohejieguo" v-if="auth.showAllScore">考核结果</div> <div
<div class="title table-header-flex jixiaodengji" v-if="auth.showAllScore">绩效等级</div> class="title table-header-flex kaohejieguo"
v-if="auth.showAllScore"
>考核结果</div>
<div
class="title table-header-flex jixiaodengji"
v-if="auth.showAllScore"
>绩效等级</div>
</div> </div>
<div class="tableRight"> <div class="tableRight">
<div style="flex:1 0 auto;"> <div style="flex:1 0 auto;">
<div class="table-weidu" <div
class="table-weidu"
v-for="(item,index) in ((tableInfo.score || tableAuth.showScore)?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))" v-for="(item,index) in ((tableInfo.score || tableAuth.showScore)?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))"
:key="index"> :key="index"
>
<!-- ((tableInfo.score || tableAuth.showScore) && tableAuth.editScore?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1)) --> <!-- ((tableInfo.score || tableAuth.showScore) && tableAuth.editScore?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1)) -->
<div class="weidu"> <div class="weidu">
<div v-for="(name,indexname) in item.name" <div
:key="indexname"> v-for="(name,indexname) in item.name"
:key="indexname"
>
{{name}} {{name}}
</div> </div>
</div> </div>
<div style="flex: 1 1 auto;" <div
class="table-right"> style="flex: 1 1 auto;"
<div class="table-content" class="table-right"
v-for="(i,index2) in item.detailDtos"
:key="index2">
<div class="name pre"
> >
<div
class="table-content"
v-for="(i,index2) in item.detailDtos"
:key="index2"
>
<div class="name pre">
<pre>{{i.target}}</pre> <pre>{{i.target}}</pre>
</div> </div>
<div class="jindu"> <div class="jindu">
<el-progress v-if='i.taskDtos.length !== 0' type="circle" <el-progress
v-if='i.taskDtos.length !== 0'
type="circle"
:width='50' :width='50'
:stroke-width='4' :stroke-width='4'
:percentage="Math.round((i.processRate * 100) * 1000) / 1000 "></el-progress> :percentage="Math.round((i.processRate * 100) * 1000) / 1000 "
<el-button v-if='i.taskDtos.length !== 0' type="text" ></el-progress>
<el-button
v-if='i.taskDtos.length !== 0'
type="text"
@click="handleLookProcess(i.id)" @click="handleLookProcess(i.id)"
size="mini"> size="mini"
>
查看任务({{i.taskDtos.length || 0}}) 查看任务({{i.taskDtos.length || 0}})
</el-button> </el-button>
<el-button v-if='i.taskDtos.length === 0' type="text" <el-button
v-if='i.taskDtos.length === 0'
type="text"
@click="handleLookProcess(i.id)" @click="handleLookProcess(i.id)"
size="mini"> size="mini"
暂无任务<br/>去添加 >
暂无任务<br />去添加
</el-button> </el-button>
</div> </div>
<div class="kaohe pre" style="justify-content: flex-start;"> <div
class="kaohe pre"
style="justify-content: flex-start;"
>
<pre> <pre>
{{i.keyResult}} {{i.keyResult}}
</pre> </pre>
</div> </div>
<div class="jieguo pre" <div
v-if="tableInfo.result || tableAuth.showResult"> class="jieguo pre"
<el-input v-if="tableInfo.result" v-if="tableInfo.result || tableAuth.showResult"
>
<el-input
v-if="tableInfo.result"
type="textarea" type="textarea"
:rows="12" :rows="12"
size="mini" size="mini"
placeholder="请输入内容" placeholder="请输入内容"
v-model="i.checkResult" v-model="i.checkResult"
clearable></el-input> clearable
></el-input>
<pre v-else>{{i.checkResult || '--'}}</pre> <pre v-else>{{i.checkResult || '--'}}</pre>
</div> </div>
<div class="quanzhong"> <div class="quanzhong">
{{( Math.round((i.checkWeight * 100) * 1000) / 1000 )}}% {{( Math.round((i.checkWeight * 100) * 1000) / 1000 )}}%
</div> </div>
<template> <template>
<div v-for="(dto,index3) in handleGetScorlList(i.scoreDtos)" <div
v-for="(dto,index3) in handleGetScorlList(i.scoreDtos)"
:key="index3" :key="index3"
class="pingfen table-content-pingfen"> class="pingfen table-content-pingfen"
>
<div class="pingfen-content-ping"> <div class="pingfen-content-ping">
<el-select v-if="tableInfo.score && obj.gradeGroupId===1 && dto.approvalId ===userInfo.userId" <el-select
v-if="tableInfo.score && obj.gradeGroupId===1 && dto.approvalId ===userInfo.userId"
style="width:115px;" style="width:115px;"
size="mini" size="mini"
v-model="dto.acquireScore"> v-model="dto.acquireScore"
<el-option v-for="item in scoreList" >
<el-option
v-for="item in scoreList"
:key="item.id" :key="item.id"
:label="item.name" :label="item.name"
:value="item.score"> :value="item.score"
>
</el-option> </el-option>
</el-select> </el-select>
<el-input v-if="tableInfo.score && obj.gradeGroupId===2 && dto.approvalId ===userInfo.userId" <el-input
v-if="tableInfo.score && obj.gradeGroupId===2 && dto.approvalId ===userInfo.userId"
style="width:115px;" style="width:115px;"
size="mini" size="mini"
placeholder="请输入评分值" placeholder="请输入评分值"
v-model="dto.acquireScore" v-model="dto.acquireScore"
clearable></el-input> clearable
></el-input>
<span v-if="!tableInfo.score || dto.approvalId !== userInfo.userId">{{handleScore(dto.acquireScore)}}</span> <span v-if="!tableInfo.score || dto.approvalId !== userInfo.userId">{{handleScore(dto.acquireScore)}}</span>
</div> </div>
<div class="pingfen-content-defen"> <div class="pingfen-content-defen">
{{dto.acquireScore}} {{dto.acquireScore}}
</div> </div>
<div class="pingfen-content-shuoming"> <div class="pingfen-content-shuoming">
<el-input v-if="tableInfo.score && dto.approvalId ===userInfo.userId" <el-input
v-if="tableInfo.score && dto.approvalId ===userInfo.userId"
style="width:200px;" style="width:200px;"
:rows="4" :rows="4"
size="mini" size="mini"
type="textarea" type="textarea"
placeholder="请输入内容" placeholder="请输入内容"
v-model="dto.scoreComment" v-model="dto.scoreComment"
clearable></el-input> clearable
></el-input>
<span v-else>{{dto.scoreComment || '--'}}</span> <span v-else>{{dto.scoreComment || '--'}}</span>
</div> </div>
</div> </div>
</template> </template>
</div> </div>
<div class="table-content" <div
v-if="item.detailDtos.length===0"> class="table-content"
v-if="item.detailDtos.length===0"
>
<div class="name"> <div class="name">
-- --
</div> </div>
@ -135,17 +182,21 @@
<div class="kaohe"> <div class="kaohe">
-- --
</div> </div>
<div class="jieguo" <div
v-if="tableInfo.result || tableAuth.showResult"> class="jieguo"
v-if="tableInfo.result || tableAuth.showResult"
>
-- --
</div> </div>
<div class="quanzhong"> <div class="quanzhong">
-- --
</div> </div>
<template> <template>
<div v-for="(k,index4) in (scoreListForParams)" <div
v-for="(k,index4) in (scoreListForParams)"
:key="index4" :key="index4"
class="pingfen table-content-pingfen"> class="pingfen table-content-pingfen"
>
<div class="pingfen-content-ping"> <div class="pingfen-content-ping">
{{handleGetDengJi(k.ScoreSimple)}} {{handleGetDengJi(k.ScoreSimple)}}
</div> </div>
@ -162,7 +213,10 @@
</div> </div>
</div> </div>
</div> </div>
<div v-if="auth.showAllScore" style='display:flex;'> <div
v-if="auth.showAllScore"
style='display:flex;'
>
<div class="item kaohejieguo"> <div class="item kaohejieguo">
{{handleGetAllScore(scoreListForParams).score}} {{handleGetAllScore(scoreListForParams).score}}
</div> </div>
@ -172,36 +226,50 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else <div
class='nojixiao'> v-else
<img src="./imgs/nojixiao.png" class='nojixiao'
alt=""> >
<img
src="./imgs/nojixiao.png"
alt=""
>
<div class="commonFont"> <div class="commonFont">
未制定绩效目标暂无数据 未制定绩效目标暂无数据
</div> </div>
</div> </div>
<div v-if="tableInfo.result || tableInfo.score" <div
class="table-bottom"> v-if="tableInfo.result || tableInfo.score"
class="table-bottom"
>
<div class="table-bottom-content"> <div class="table-bottom-content">
<el-button size='small' <el-button
size='small'
@click="handleCancelResult" @click="handleCancelResult"
plain>取消</el-button> plain
<el-button size='small' >取消</el-button>
<el-button
size='small'
:loading='loadingZan' :loading='loadingZan'
@click="handleSaveDetail()" @click="handleSaveDetail()"
plain>暂存</el-button> plain
<el-button size='small' >暂存</el-button>
<el-button
size='small'
:loading='loadingTi' :loading='loadingTi'
@click="handleGetNext" @click="handleGetNext"
type="primary">{{tableInfo.result?'提交结果值':'提交评分'}}</el-button> type="primary"
>{{tableInfo.result?'提交结果值':'提交评分'}}</el-button>
</div> </div>
</div> </div>
<!-- <div v-if="scoreListForParams.length>0" <!-- <div v-if="scoreListForParams.length>0"
class="commonFont" class="commonFont"
style="font-size:12px;margin:10px 0;">{{handleGetAllScore(scoreListForParams)}}</div> --> style="font-size:12px;margin:10px 0;">{{handleGetAllScore(scoreListForParams)}}</div> -->
<process v-if="!_.isEmpty(taskInfo)" <process
v-if="!_.isEmpty(taskInfo)"
:taskObj='taskInfo' :taskObj='taskInfo'
:drawer.sync='drawer' /> :drawer.sync='drawer'
/>
</div> </div>
</template> </template>
<script> <script>
@ -358,9 +426,10 @@ export default {
return this.scoreList.filter(i => i.score === item).length > 0 ? this.scoreList.filter(i => i.score === item)[0].name : 0 return this.scoreList.filter(i => i.score === item).length > 0 ? this.scoreList.filter(i => i.score === item)[0].name : 0
}, },
async handleGetNext () { async handleGetNext () {
console.log(this.obj)
this.loadingTi = true this.loadingTi = true
const obj = { status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分' } const obj = { status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分' }
const params = Object.assign({}, { resultRecordId: this.$route.query.id || '' }, obj) const params = Object.assign({}, { resultRecordId: this.obj.id || '' }, obj)
if (!this.tableInfo.result) { if (!this.tableInfo.result) {
let isScore = true let isScore = true
this.obj.recortModelDtos.map(i => { this.obj.recortModelDtos.map(i => {
@ -410,7 +479,7 @@ export default {
if (res.code !== 200) return if (res.code !== 200) return
this.scoreList = res.data this.scoreList = res.data
}, },
async handleSaveDetail (params = Object.assign({}, this.obj, this.score, {save: 1})) { async handleSaveDetail (params = Object.assign({}, this.obj, this.score, { save: 1 })) {
this.loadingZan = true this.loadingZan = true
let res = await apiSaveDetail(params) let res = await apiSaveDetail(params)
this.loadingZan = false this.loadingZan = false
@ -427,21 +496,21 @@ export default {
} }
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
.item{ .item {
border-right: 1px solid @borderColor; border-right: 1px solid @borderColor;
border-bottom: 1px solid @borderColor; border-bottom: 1px solid @borderColor;
} }
.tableRight{ .tableRight {
display: flex; display: flex;
} }
.kaohejieguo{ .kaohejieguo {
width: 100px; width: 100px;
.center(); .center();
font-size:10px; font-size: 10px;
} }
.jixiaodengji{ .jixiaodengji {
width: 100px; width: 100px;
font-size:10px; font-size: 10px;
.center(); .center();
} }
.title { .title {