This commit is contained in:
熊成强 2020-11-09 16:17:06 +08:00
parent 75ddbc808f
commit 89453b9d9a
4 changed files with 31 additions and 16 deletions

View File

@ -15,7 +15,8 @@
暂无数据 暂无数据
</div> </div>
</div> --> </div> -->
<div v-for="(item,index) in obj.recortModelDtos" :key="index" class="table-content">
<div v-for="(item,index) in ((tableInfo.score || auth.showScore)?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))" :key="index" class="table-content">
<div class="table-content-left table-left"> <div class="table-content-left table-left">
<!-- {{item.name}} --> <!-- {{item.name}} -->
<div v-for="(i,indexs) in item.name" :key="indexs"> <div v-for="(i,indexs) in item.name" :key="indexs">
@ -56,19 +57,23 @@
<el-input v-if="tableInfo.score" style="width:200px;" size="mini" type="textarea" placeholder="请输入内容" v-model="child.scoreComment" clearable></el-input> <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> <span v-else>{{child.scoreComment || '--'}}</span>
</div> </div>
</div> </div>
<div v-if="item.detailDtos.length===0" class="table-content-right-item"> <div v-if="item.detailDtos.length===0" class="table-content-right-item">
<div class="name"> <div class="name">
</div> </div>
<div> <div>
</div> </div>
<div v-if="tableInfo.result"> <div v-if="tableInfo.result || auth.showResult">
</div> </div>
<div class="quanzhomng" style="flex:none;"> <div class="quanzhomng" style="flex:none;">
</div> </div>
<div v-if="tableInfo.score"> <div v-if="tableInfo.score">
</div> </div>
<div style="padding:10px;" v-if="tableInfo.score"> <div style="width:140px;" v-if="tableInfo.score || auth.showScore">
{{handleGetScorc()}}
</div>
<div style="padding:10px;" v-if="tableInfo.score || auth.showScore">
</div> </div>
</div> </div>
</div> </div>
@ -135,10 +140,23 @@ export default {
} }
}, },
mounted () { mounted () {
console.log('list', this.obj)
this.handleGrt375() this.handleGrt375()
}, },
methods: { methods: {
handleGetScorc (obj = this.obj) {
const result = obj.recortModelDtos.reduce((result, i) => {
i.detailDtos.map(j => {
const str = j.calculate.replace(/{\w+}/g, (i) => {
i = i.replace(/{|}/g, '')
return j[i]
})
let a = eval(str)
result += a
})
return result
}, 0)
return result.toFixed(3)
},
handleScore (item) { handleScore (item) {
console.log('this.scoreList: ', this.scoreList) console.log('this.scoreList: ', this.scoreList)
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
@ -172,7 +190,6 @@ export default {
let res = await apiGet375() let res = await apiGet375()
if (res.code !== 200) return if (res.code !== 200) return
this.scoreList = res.data this.scoreList = res.data
console.log('resssss: ', res)
}, },
async handleSaveDetail (params = this.obj) { async handleSaveDetail (params = this.obj) {
this.loadingZan = true this.loadingZan = true

View File

@ -90,10 +90,7 @@
</div> </div>
<div class="performance-content-jilu-item-content"> <div class="performance-content-jilu-item-content">
<div class="performance-content-jilu-item-content-img"> <div class="performance-content-jilu-item-content-img">
<img <InfoHeader :isShow='false' :obj='{src:i.avatar}' />
:src="i.avatar|| ''"
alt=""
>
</div> </div>
<div> <div>
<span>{{i.staffName}}</span><span class="mubiao">#{{i.optDesc}}#</span> <span>{{i.staffName}}</span><span class="mubiao">#{{i.optDesc}}#</span>
@ -187,6 +184,7 @@ export default {
let res = await apiResultGetDetail({ id }) let res = await apiResultGetDetail({ id })
this.$loadingEnd() this.$loadingEnd()
if (res.code !== 200) return this.$message.error(res.msg) if (res.code !== 200) return this.$message.error(res.msg)
res.data.recortModelDtos = res.data.recortModelDtos.concat([{name: '总分', detailDtos: []}])
this.obj = res.data this.obj = res.data
}, },
handleRight (item) { handleRight (item) {
@ -340,14 +338,14 @@ export default {
margin: 0 4px; margin: 0 4px;
} }
&-img { &-img {
width: 30px; // width: 30px;
height: 30px; // height: 30px;
border-radius: 50%; border-radius: 50%;
overflow: hidden; overflow: hidden;
margin-right: 10px; margin-right: 10px;
img { img {
width: 100%; // width: 100%;
height: 100%; // height: 100%;
} }
} }
} }

View File

@ -9,7 +9,7 @@
active-text-color="#3ba1ff" active-text-color="#3ba1ff"
> >
<el-menu-item index="0">考评组设置</el-menu-item> <el-menu-item index="0">考评组设置</el-menu-item>
<el-menu-item index="1">默认值设置</el-menu-item> <el-menu-item index="1">权限设置</el-menu-item>
</el-menu> </el-menu>
<ground-table class="kaoping" v-if="activeIndex==='0'"></ground-table> <ground-table class="kaoping" v-if="activeIndex==='0'"></ground-table>
<div v-else-if="activeIndex==='1'"> <div v-else-if="activeIndex==='1'">

View File

@ -8,7 +8,7 @@
style="border-top: 1px solid #ebebeb;" style="border-top: 1px solid #ebebeb;"
max-height="500" max-height="500"
> >
<el-table-column width="100"> <el-table-column width="80">
<template slot-scope="scope"> <template slot-scope="scope">
<InfoHeader :isShow='false' :obj='{src:scope.row.avatar}' /> <InfoHeader :isShow='false' :obj='{src:scope.row.avatar}' />
</template> </template>
@ -19,7 +19,7 @@
align="right" align="right"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.time}}<i class="el-icon-arrow-right"></i> {{scope.row.time}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>