优化
This commit is contained in:
parent
75ddbc808f
commit
89453b9d9a
@ -15,7 +15,8 @@
|
||||
暂无数据
|
||||
</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">
|
||||
<!-- {{item.name}} -->
|
||||
<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>
|
||||
<span v-else>{{child.scoreComment || '--'}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div v-if="item.detailDtos.length===0" class="table-content-right-item">
|
||||
<div class="name">
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
<div v-if="tableInfo.result">
|
||||
<div v-if="tableInfo.result || auth.showResult">
|
||||
</div>
|
||||
<div class="quanzhomng" style="flex:none;">
|
||||
</div>
|
||||
<div v-if="tableInfo.score">
|
||||
</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>
|
||||
@ -135,10 +140,23 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
console.log('list', this.obj)
|
||||
this.handleGrt375()
|
||||
},
|
||||
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) {
|
||||
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
|
||||
@ -172,7 +190,6 @@ export default {
|
||||
let res = await apiGet375()
|
||||
if (res.code !== 200) return
|
||||
this.scoreList = res.data
|
||||
console.log('resssss: ', res)
|
||||
},
|
||||
async handleSaveDetail (params = this.obj) {
|
||||
this.loadingZan = true
|
||||
|
||||
@ -90,10 +90,7 @@
|
||||
</div>
|
||||
<div class="performance-content-jilu-item-content">
|
||||
<div class="performance-content-jilu-item-content-img">
|
||||
<img
|
||||
:src="i.avatar|| ''"
|
||||
alt=""
|
||||
>
|
||||
<InfoHeader :isShow='false' :obj='{src:i.avatar}' />
|
||||
</div>
|
||||
<div>
|
||||
<span>{{i.staffName}}</span><span class="mubiao">#{{i.optDesc}}#</span>
|
||||
@ -187,6 +184,7 @@ export default {
|
||||
let res = await apiResultGetDetail({ id })
|
||||
this.$loadingEnd()
|
||||
if (res.code !== 200) return this.$message.error(res.msg)
|
||||
res.data.recortModelDtos = res.data.recortModelDtos.concat([{name: '总分', detailDtos: []}])
|
||||
this.obj = res.data
|
||||
},
|
||||
handleRight (item) {
|
||||
@ -340,14 +338,14 @@ export default {
|
||||
margin: 0 4px;
|
||||
}
|
||||
&-img {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
// width: 30px;
|
||||
// height: 30px;
|
||||
border-radius: 50%;
|
||||
overflow: hidden;
|
||||
margin-right: 10px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// width: 100%;
|
||||
// height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
active-text-color="#3ba1ff"
|
||||
>
|
||||
<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>
|
||||
<ground-table class="kaoping" v-if="activeIndex==='0'"></ground-table>
|
||||
<div v-else-if="activeIndex==='1'">
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
style="border-top: 1px solid #ebebeb;"
|
||||
max-height="500"
|
||||
>
|
||||
<el-table-column width="100">
|
||||
<el-table-column width="80">
|
||||
<template slot-scope="scope">
|
||||
<InfoHeader :isShow='false' :obj='{src:scope.row.avatar}' />
|
||||
</template>
|
||||
@ -19,7 +19,7 @@
|
||||
align="right"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.time}}<i class="el-icon-arrow-right"></i>
|
||||
{{scope.row.time}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user