优化
This commit is contained in:
parent
374711de70
commit
cd9022e34e
@ -162,6 +162,7 @@ export default {
|
||||
handleDataList () {
|
||||
apiGetEvaluationTeamList(Object.assign({}, this.pageInfo, this.filtersDic)).then(res => {
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.pageInfo.currPage = res.data.currPage
|
||||
|
||||
@ -136,7 +136,7 @@ export default {
|
||||
}
|
||||
}
|
||||
&-content {
|
||||
width: 480px;
|
||||
min-width: 480px;
|
||||
flex: 1;
|
||||
padding: 20px 20px;
|
||||
overflow: auto;
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
.pre{
|
||||
pre{
|
||||
white-space: pre-wrap;
|
||||
white-space:pre-line;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@ -104,5 +104,5 @@ export function loading (options = opt) {
|
||||
export function loadingClose () {
|
||||
setTimeout(() => {
|
||||
this.$loading.service(opt).close()
|
||||
}, 300)
|
||||
}, 100)
|
||||
}
|
||||
|
||||
469
src/views/kpi/assessment/performance/components/table copy 2.vue
Normal file
469
src/views/kpi/assessment/performance/components/table copy 2.vue
Normal file
@ -0,0 +1,469 @@
|
||||
<template>
|
||||
<div class='table'>
|
||||
<div v-if="obj.recortModelDtos.length !== 0" class="table-list commonFont">
|
||||
<div class="table-header">
|
||||
<div class="title table-left weidu">维度</div>
|
||||
<div class="title table-header-flex name">名称</div>
|
||||
<div class="title table-header-flex kaohe">考核标准</div>
|
||||
<div class="title table-header-flex jieguo" >结果值</div>
|
||||
<div class="title table-header-flex quanzhong" >权重({{obj.weight*100}}%)</div>
|
||||
<div class="title table-header-flex pingfen" v-for="i in 3" >
|
||||
<div class="pingfen-title">上级评分</div>
|
||||
<div class="pingfen-content">
|
||||
<div class="pingfen-content-ping" >评分</div>
|
||||
<div class="pingfen-content-defen" >得分</div>
|
||||
<div class=" pingfen-content-shuoming" >评分说明</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-weidu">
|
||||
<div class="weidu">
|
||||
维度
|
||||
</div>
|
||||
<div>
|
||||
<div class="table-content" v-for="i in 4">
|
||||
<div class="name">
|
||||
名称
|
||||
</div>
|
||||
<div class="kaohe">
|
||||
考核标准
|
||||
</div>
|
||||
<div class="jieguo">
|
||||
结果值
|
||||
</div>
|
||||
<div class="quanzhong">
|
||||
权重
|
||||
</div>
|
||||
<div v-for="i in 3" class="pingfen table-content-pingfen">
|
||||
<div class="pingfen-content-ping">
|
||||
20000
|
||||
</div>
|
||||
<div class="pingfen-content-defen">
|
||||
20000
|
||||
</div>
|
||||
<div class="pingfen-content-shuoming">
|
||||
20000
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class='nojixiao'>
|
||||
<img src="./imgs/nojixiao.png" alt="">
|
||||
<div class="commonFont">
|
||||
未制定绩效目标,暂无数据
|
||||
</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>
|
||||
<el-button size='small' :loading='loadingZan' @click="handleSaveDetail()" plain>暂存</el-button>
|
||||
<el-button size='small' :loading='loadingTi' @click="handleGetNext" type="primary" >{{tableInfo.result?'提交结果值':'提交评分'}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { apiSaveDetail, apiGet375, apiSaveapproval } from '@/api/assessment'
|
||||
export default {
|
||||
name: 'columnsTbale',
|
||||
props: {
|
||||
obj: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
recortModelDtos: []
|
||||
}
|
||||
}
|
||||
},
|
||||
tableInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
result: false,
|
||||
score: false
|
||||
}
|
||||
}
|
||||
},
|
||||
tableAuth: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loadingTi: false,
|
||||
loadingZan: false,
|
||||
input: '',
|
||||
scoreList: []
|
||||
// score: {
|
||||
// lastScore: '',
|
||||
// scoreLevel: ''
|
||||
// }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
score () {
|
||||
const result = this.obj.recortModelDtos.reduce((result, i) => {
|
||||
i.detailDtos.map(j => {
|
||||
j.scoreDtos.map(k => {
|
||||
const str = j.calculate.replace(/{\w+}/g, (i) => {
|
||||
i = i.replace(/{|}/g, '')
|
||||
return k[i]
|
||||
})
|
||||
let a = eval(str)
|
||||
result += a
|
||||
})
|
||||
})
|
||||
return result
|
||||
}, 0)
|
||||
const arr = this.scoreList.filter(i => i.minScore <= result && i.maxScore > result)
|
||||
return {
|
||||
lastScore: result.toFixed(3),
|
||||
scoreLevel: arr.length > 0 ? arr[0].name : ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.handleGrt375()
|
||||
},
|
||||
methods: {
|
||||
handleScore (item) {
|
||||
return this.scoreList.filter(i => i.score === item).length > 0 ? this.scoreList.filter(i => i.score === item)[0].name : 0
|
||||
},
|
||||
async handleGetNext () {
|
||||
this.loadingTi = true
|
||||
let res1 = await apiSaveDetail(Object.assign({}, this.obj, this.score))
|
||||
if (res1.code !== 200) {
|
||||
this.$message.error(res1.msg)
|
||||
this.loadingTi = false
|
||||
return
|
||||
}
|
||||
const obj = {status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分'}
|
||||
const params = Object.assign({}, {resultRecordId: this.$route.query.id || ''}, obj)
|
||||
let res = await apiSaveapproval(params)
|
||||
this.loadingTi = false
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
history.go(0)
|
||||
},
|
||||
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
|
||||
},
|
||||
async handleSaveDetail (params = Object.assign({}, this.obj, this.score)) {
|
||||
this.loadingZan = true
|
||||
let res = await apiSaveDetail(params)
|
||||
this.loadingZan = false
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='less' scoped>
|
||||
.title{
|
||||
background: #f5f5f5;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
.jieguo{
|
||||
width: 300px ;
|
||||
.center();
|
||||
}
|
||||
.name{
|
||||
width: 60px ;
|
||||
.center();
|
||||
}
|
||||
.kaohe{
|
||||
width: 300px ;
|
||||
display: block;
|
||||
.center();
|
||||
pre{
|
||||
white-space:pre-line;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
.weidu{
|
||||
flex: none ;
|
||||
width: 60px ;
|
||||
border-right: 1px solid @borderColor;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
.center();
|
||||
}
|
||||
.quanzhong{
|
||||
width: 90px ;
|
||||
.center();
|
||||
}
|
||||
.pingfen{
|
||||
width: 300px;
|
||||
display: flex;
|
||||
padding: 0 !important;
|
||||
border-right: 1px solid @borderColor !important;
|
||||
flex-direction: column;
|
||||
&-title{
|
||||
padding:10px 0 !important;
|
||||
text-align: center;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
|
||||
}
|
||||
&-content{
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
>div{
|
||||
border-right: 1px solid @borderColor;
|
||||
padding:10px 0 !important;
|
||||
.center();
|
||||
}
|
||||
&-ping{
|
||||
width: 100px;
|
||||
height: 100%;
|
||||
}
|
||||
&-defen{
|
||||
width: 40px;
|
||||
height: 100%;
|
||||
}
|
||||
&-shuoming{
|
||||
border-right: none !important;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.defen{
|
||||
width: 50px;
|
||||
}
|
||||
.shuoming{
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.nojixiao{
|
||||
text-align: center;
|
||||
}
|
||||
.listNone{
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
line-height: 100px;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
.table-list{
|
||||
padding: 0 0 10px 0;
|
||||
border: 1px solid @borderColor;
|
||||
border-bottom: none;
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
.table-weidu{
|
||||
display: flex;
|
||||
}
|
||||
.table-header{
|
||||
display: flex;
|
||||
|
||||
flex-shrink: 0;
|
||||
// justify-content: space-between;
|
||||
// border: 1px solid @borderColor;
|
||||
>div{
|
||||
padding: 10px;
|
||||
border-right: 1px solid @borderColor;;
|
||||
}
|
||||
>div:last-child{
|
||||
border-right: none;
|
||||
}
|
||||
&-flex{
|
||||
flex-shrink: 0;
|
||||
// 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;
|
||||
text-align: center;
|
||||
}
|
||||
.quanzhomng{
|
||||
width: 100px !important;
|
||||
text-align: center;
|
||||
}
|
||||
.table-content{
|
||||
display: flex;
|
||||
>div{
|
||||
flex-shrink: 0;
|
||||
border-right: 1px solid @borderColor;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
padding: 10px 0;
|
||||
}
|
||||
&-pingfen{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
>div{
|
||||
text-align: center;
|
||||
border-right: 1px solid @borderColor;
|
||||
.center();
|
||||
}
|
||||
}
|
||||
}
|
||||
.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>
|
||||
431
src/views/kpi/assessment/performance/components/table copy.vue
Normal file
431
src/views/kpi/assessment/performance/components/table copy.vue
Normal file
@ -0,0 +1,431 @@
|
||||
<template>
|
||||
<div class='table'>
|
||||
<div v-if="obj.recortModelDtos.length !== 0" class="table-list commonFont">
|
||||
<div class="table-header">
|
||||
<div class="table-left name">维度</div>
|
||||
<div class="table-header-flex name">名称</div>
|
||||
<div class="table-header-flex kaohe">考核标准</div>
|
||||
<div class="table-header-flex jieguo" v-if="tableInfo.result || tableAuth.showResult">结果值</div>
|
||||
<div class="table-header-flex quanzhomng" style="flex:none;">权重({{obj.weight*100}}%)</div>
|
||||
<div class="table-header-flex" style="flex:none;width:130px;" v-if="tableInfo.score || tableAuth.showScore">上级评分</div>
|
||||
<div class="table-header-flex quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">得分</div>
|
||||
<div class="table-header-flex" v-if="tableInfo.score || tableAuth.showScore">评分说明</div>
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in ((tableInfo.score || tableAuth.showScore)?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))" :key="index" class="table-content">
|
||||
<div class="table-content-left table-left name">
|
||||
<div v-for="(i,indexs) in item.name" :key="indexs">
|
||||
{{i}}
|
||||
</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>
|
||||
</div>
|
||||
<div class="kaohe">
|
||||
<pre >
|
||||
{{child.keyResult || ''}}
|
||||
</pre>
|
||||
</div>
|
||||
<div class='pre jieguo' v-if="tableInfo.result || tableAuth.showResult">
|
||||
<el-input v-if="tableInfo.result" type="textarea" size="mini" placeholder="请输入内容" v-model="child.checkResult" clearable></el-input>
|
||||
<pre v-else>{{child.checkResult || '--'}}</pre>
|
||||
</div>
|
||||
<div class="quanzhomng" style="flex:none;">
|
||||
{{( Math.round((child.checkWeight * 100) * 1000) / 1000 )}}%
|
||||
</div>
|
||||
<div v-if="tableInfo.score || tableAuth.showScore" style="flex:none;width:130px;">
|
||||
<!-- gradeGroupId=== 1 下拉 -->
|
||||
<el-select v-if="tableInfo.score && obj.gradeGroupId===1" style="width:115px;" 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>
|
||||
<el-input v-if="tableInfo.score && obj.gradeGroupId===2" style="width:115px;" size="mini" placeholder="请输入评分值" v-model="child.scoreDtos[child.scoreDtos.length-1].acquireScore" clearable></el-input>
|
||||
<span v-if="!tableInfo.score">{{handleScore(child.scoreDtos[child.scoreDtos.length-1].acquireScore)}}</span>
|
||||
</div>
|
||||
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
||||
<span>{{child.scoreDtos[child.scoreDtos.length-1].acquireScore || '--'}}</span>
|
||||
</div>
|
||||
<div class='pre' style="padding:10px;" v-if="tableInfo.score || tableAuth.showScore">
|
||||
<el-input v-if="tableInfo.score" style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input>
|
||||
<span v-else>{{child.scoreComment || '--'}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="item.detailDtos.length ===0 && item.name !=='总分'" class="table-content-right-item">
|
||||
<div class="name">
|
||||
</div>
|
||||
<div class="kaohe">
|
||||
</div>
|
||||
<div class='jieguo' v-if="tableInfo.result || tableAuth.showResult">
|
||||
</div>
|
||||
<div class="quanzhomng " style="flex:none;">
|
||||
</div>
|
||||
<div style="padding:10px;flex:none;width:130px;" v-if="tableInfo.score || tableAuth.showScore">
|
||||
|
||||
</div>
|
||||
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
||||
|
||||
</div>
|
||||
<div style="padding:10px;" v-if="tableInfo.score || tableAuth.showScore">
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.name==='总分'" class="table-content-right-item">
|
||||
<div class="name">
|
||||
</div>
|
||||
<div class="kaohe">
|
||||
</div>
|
||||
<div class='jieguo' v-if="tableInfo.result || tableAuth.showResult">
|
||||
</div>
|
||||
<div class="quanzhomng " style="flex:none;">
|
||||
</div>
|
||||
<div style="padding:10px;flex:none;width:130px;" v-if="tableInfo.score || tableAuth.showScore">
|
||||
{{score.scoreLevel}}
|
||||
</div>
|
||||
<div class="quanzhomng" style="flex:none;" v-if="tableInfo.score || tableAuth.showScore">
|
||||
{{score.lastScore}}
|
||||
</div>
|
||||
<div style="padding:10px;" v-if="tableInfo.score || tableAuth.showScore">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class='nojixiao'>
|
||||
<img src="./imgs/nojixiao.png" alt="">
|
||||
<div class="commonFont">
|
||||
未制定绩效目标,暂无数据
|
||||
</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>
|
||||
<el-button size='small' :loading='loadingZan' @click="handleSaveDetail()" plain>暂存</el-button>
|
||||
<el-button size='small' :loading='loadingTi' @click="handleGetNext" type="primary" >{{tableInfo.result?'提交结果值':'提交评分'}}</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { apiSaveDetail, apiGet375, apiSaveapproval } from '@/api/assessment'
|
||||
export default {
|
||||
name: 'columnsTbale',
|
||||
props: {
|
||||
obj: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
recortModelDtos: []
|
||||
}
|
||||
}
|
||||
},
|
||||
tableInfo: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
result: false,
|
||||
score: false
|
||||
}
|
||||
}
|
||||
},
|
||||
tableAuth: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
loadingTi: false,
|
||||
loadingZan: false,
|
||||
input: '',
|
||||
scoreList: []
|
||||
// score: {
|
||||
// lastScore: '',
|
||||
// scoreLevel: ''
|
||||
// }
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
score () {
|
||||
const result = this.obj.recortModelDtos.reduce((result, i) => {
|
||||
i.detailDtos.map(j => {
|
||||
j.scoreDtos.map(k => {
|
||||
const str = j.calculate.replace(/{\w+}/g, (i) => {
|
||||
i = i.replace(/{|}/g, '')
|
||||
return k[i]
|
||||
})
|
||||
let a = eval(str)
|
||||
result += a
|
||||
})
|
||||
})
|
||||
return result
|
||||
}, 0)
|
||||
const arr = this.scoreList.filter(i => i.minScore <= result && i.maxScore > result)
|
||||
return {
|
||||
lastScore: result.toFixed(3),
|
||||
scoreLevel: arr.length > 0 ? arr[0].name : ''
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.handleGrt375()
|
||||
},
|
||||
methods: {
|
||||
handleScore (item) {
|
||||
return this.scoreList.filter(i => i.score === item).length > 0 ? this.scoreList.filter(i => i.score === item)[0].name : 0
|
||||
},
|
||||
async handleGetNext () {
|
||||
this.loadingTi = true
|
||||
let res1 = await apiSaveDetail(Object.assign({}, this.obj, this.score))
|
||||
if (res1.code !== 200) {
|
||||
this.loadingTi = false
|
||||
this.$message.error(res1.msg)
|
||||
return
|
||||
}
|
||||
const obj = {status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分'}
|
||||
const params = Object.assign({}, {resultRecordId: this.$route.query.id || ''}, obj)
|
||||
let res = await apiSaveapproval(params)
|
||||
this.loadingTi = false
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
history.go(0)
|
||||
},
|
||||
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
|
||||
},
|
||||
async handleSaveDetail (params = Object.assign({}, this.obj, this.score)) {
|
||||
this.loadingZan = true
|
||||
let res = await apiSaveDetail(params)
|
||||
this.loadingZan = false
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
type: 'success'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='less' scoped>
|
||||
.jieguo{
|
||||
width: 300px !important;
|
||||
flex: none !important;
|
||||
}
|
||||
.name{
|
||||
flex: none !important;
|
||||
width: 60px !important;
|
||||
}
|
||||
.kaohe{
|
||||
width: 300px !important;
|
||||
display: block;
|
||||
pre{
|
||||
white-space:pre-line;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
.nojixiao{
|
||||
text-align: center;
|
||||
}
|
||||
.listNone{
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
line-height: 100px;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
.table-list{
|
||||
border: 1px solid @borderColor;
|
||||
border-bottom: none;
|
||||
|
||||
}
|
||||
.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;
|
||||
text-align: center;
|
||||
}
|
||||
.quanzhomng{
|
||||
width: 100px !important;
|
||||
text-align: center;
|
||||
}
|
||||
.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>
|
||||
@ -24,7 +24,7 @@
|
||||
<span> {{child.target || ''}}</span>
|
||||
</div>
|
||||
<div class="kaohe">
|
||||
<pre>
|
||||
<pre >
|
||||
{{child.keyResult || ''}}
|
||||
</pre>
|
||||
</div>
|
||||
@ -155,9 +155,9 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
score () {
|
||||
const result = this.obj.recortModelDtos.reduce((result, i) => {
|
||||
i.detailDtos.map(j => {
|
||||
j.scoreDtos.map(k => {
|
||||
const result = this.obj.recortModelDtos && this.obj.recortModelDtos.reduce((result, i) => {
|
||||
i.detailDtos && i.detailDtos.map(j => {
|
||||
j.scoreDtos && j.scoreDtos.map(k => {
|
||||
const str = j.calculate.replace(/{\w+}/g, (i) => {
|
||||
i = i.replace(/{|}/g, '')
|
||||
return k[i]
|
||||
@ -186,8 +186,8 @@ export default {
|
||||
this.loadingTi = true
|
||||
let res1 = await apiSaveDetail(Object.assign({}, this.obj, this.score))
|
||||
if (res1.code !== 200) {
|
||||
this.$message.error(res1.msg)
|
||||
this.loadingTi = false
|
||||
this.$message.error(res1.msg)
|
||||
return
|
||||
}
|
||||
const obj = {status: 1, menuName: this.tableInfo.result ? '提交了结果值' : '提交了评分'}
|
||||
@ -241,7 +241,7 @@ export default {
|
||||
width: 300px !important;
|
||||
display: block;
|
||||
pre{
|
||||
white-space: pre-wrap;
|
||||
white-space:pre-line;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ export default {
|
||||
this.isLoading = false
|
||||
this.$loadingEnd()
|
||||
if (res1.code !== 200) return this.$message.error(res1.msg)
|
||||
// history.go(-1)
|
||||
history.go(-1)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user