This commit is contained in:
熊成强 2020-11-13 11:59:30 +08:00
parent d5859111ed
commit 360c7a2663
6 changed files with 74 additions and 27 deletions

View File

@ -20,6 +20,7 @@
"element-ui": "^2.13.2", "element-ui": "^2.13.2",
"less": "^3.8.1", "less": "^3.8.1",
"less-loader": "^4.1.0", "less-loader": "^4.1.0",
"lodash": "^4.17.20",
"svg-sprite-loader": "^5.0.0", "svg-sprite-loader": "^5.0.0",
"vconsole": "^3.3.4", "vconsole": "^3.3.4",
"vue": "^2.5.2", "vue": "^2.5.2",

View File

@ -9,10 +9,11 @@ import './utils/elementConfig'
import './utils/permission' import './utils/permission'
import './style/index.less' import './style/index.less'
import '@/icons' import '@/icons'
import _ from 'lodash'
import VueCookie from 'vue-cookies' import VueCookie from 'vue-cookies'
import { debounce, departGetForm, personlGetForm, handleInput, messageSuccess, loading, loadingClose } from '@/utils/common' import { debounce, departGetForm, personlGetForm, handleInput, messageSuccess, loading, loadingClose } from '@/utils/common'
import { format } from '@/utils/dateFormat' import { format } from '@/utils/dateFormat'
Vue.prototype._ = _
Vue.mixin(Mixin) Vue.mixin(Mixin)
Vue.use(VueCookie) Vue.use(VueCookie)
Vue.config.productionTip = false Vue.config.productionTip = false

View File

@ -17,6 +17,7 @@
} }
.pre{ .pre{
pre{ pre{
line-height: 23px;
white-space:pre-line; white-space:pre-line;
word-wrap: break-word; word-wrap: break-word;
word-break: break-all; word-break: break-all;

View File

@ -7,7 +7,8 @@
<div class="title table-header-flex kaohe">考核标准</div> <div class="title table-header-flex kaohe">考核标准</div>
<div class="title table-header-flex jieguo" >结果值</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 quanzhong" >权重({{obj.weight*100}}%)</div>
<template v-if="tableAuth.editScore"> <template >
<!-- v-if="tableAuth.editScore" -->
<div class="title table-header-flex pingfen" v-for="k in obj.recortModelDtos[0].detailDtos[0].scoreDtos" > <div class="title table-header-flex pingfen" v-for="k in obj.recortModelDtos[0].detailDtos[0].scoreDtos" >
<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">
@ -20,23 +21,30 @@
</div> </div>
<div class="table-weidu" v-for="(item,index) in ((tableInfo.score || tableAuth.showScore) && tableAuth.editScore?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))" :key="index"> <div class="table-weidu" v-for="(item,index) in ((tableInfo.score || tableAuth.showScore) && tableAuth.editScore?obj.recortModelDtos:obj.recortModelDtos.slice(0,obj.recortModelDtos.length-1))" :key="index">
<div class="weidu"> <div class="weidu">
{{item.name}} <div v-for="(name,indexname) in item.name" :key="indexname">
{{name}}
</div>
</div> </div>
<div> <div>
<div class="table-content" v-for="i in item.detailDtos"> <div class="table-content" v-for="i in item.detailDtos">
<div class="name"> <div class="name">
{{i.target}} {{i.target}}
</div> </div>
<div class="kaohe"> <div class="kaohe pre">
{{i.keyResult}} <pre>
{{i.keyResult}}
</pre>
</div> </div>
<div class="jieguo"> <div class="jieguo pre">
<pre>
{{i.checkResult}} {{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>
<div v-for="dto in i.scoreDtos" class="pingfen table-content-pingfen"> <template >
<div v-for="dto in i.scoreDtos" class="pingfen table-content-pingfen">
<div class="pingfen-content-ping"> <div class="pingfen-content-ping">
{{dto.acquireScore}} {{dto.acquireScore}}
</div> </div>
@ -47,6 +55,8 @@
{{dto.scoreComment || '--'}} {{dto.scoreComment || '--'}}
</div> </div>
</div> </div>
</template>
</div> </div>
<div class="table-content" v-if="item.detailDtos.length===0"> <div class="table-content" v-if="item.detailDtos.length===0">
<div class="name"> <div class="name">
@ -203,15 +213,18 @@ export default {
border-bottom: 1px solid @borderColor; border-bottom: 1px solid @borderColor;
} }
.jieguo{ .jieguo{
padding:10px !important;
width: 300px ; width: 300px ;
.center(); .center();
} }
.name{ .name{
width: 60px ; padding:10px !important;
width: 300px ;
.center(); .center();
} }
.kaohe{ .kaohe{
width: 300px ; width: 300px ;
padding:10px !important;
display: block; display: block;
.center(); .center();
pre{ pre{
@ -223,12 +236,19 @@ export default {
.weidu{ .weidu{
flex: none ; flex: none ;
width: 60px ; width: 60px ;
.center();
flex-direction: column;
padding:10px !important;
border-left: 1px solid @borderColor;
border-right: 1px solid @borderColor; border-right: 1px solid @borderColor;
border-bottom: 1px solid @borderColor; border-bottom: 1px solid @borderColor;
.center(); >div{
text-align: center;
}
// .center();
} }
.quanzhong{ .quanzhong{
width: 90px ; width: 130px ;
.center(); .center();
} }
.pingfen{ .pingfen{
@ -285,9 +305,9 @@ width: 50px;
border-bottom: 1px solid @borderColor; border-bottom: 1px solid @borderColor;
} }
.table-list{ .table-list{
padding: 0 0 10px 0; margin: 0 0 10px 0;
border: 1px solid @borderColor; // border: 1px solid @borderColor;
border-bottom: none; // border-bottom: none;
overflow: auto; overflow: auto;
} }
@ -302,7 +322,8 @@ width: 50px;
// border: 1px solid @borderColor; // border: 1px solid @borderColor;
>div{ >div{
padding: 10px; padding: 10px;
border-right: 1px solid @borderColor;; border-right: 1px solid @borderColor;
border-top: 1px solid @borderColor;
} }
>div:last-child{ >div:last-child{
border-right: none; border-right: none;
@ -376,8 +397,12 @@ width: 50px;
width: 100px !important; width: 100px !important;
text-align: center; text-align: center;
} }
.table-content:hover{
background: rgb(247, 247, 247);
}
.table-content{ .table-content{
display: flex; display: flex;
height: 100%;
>div{ >div{
flex-shrink: 0; flex-shrink: 0;
border-right: 1px solid @borderColor; border-right: 1px solid @borderColor;

View File

@ -162,6 +162,7 @@ export default {
i = i.replace(/{|}/g, '') i = i.replace(/{|}/g, '')
return k[i] return k[i]
}) })
console.log('str: ', str)
let a = eval(str) let a = eval(str)
result += a result += a
}) })

View File

@ -1,3 +1,4 @@
<!-- --> <!-- -->
<template> <template>
<div class="addPerson"> <div class="addPerson">
@ -19,11 +20,12 @@
<el-button size="small" icon="el-icon-plus" plain @click="handleChoose">选人员</el-button> <el-button size="small" icon="el-icon-plus" plain @click="handleChoose">选人员</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button size="small" :loading='isLoading' type="primary" @click="handleOnSubmit">确定</el-button> <el-button size="small" :loading='isLoading' type="primary" @click="handleSumitForResult">确定</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<getPersonnel v-if="isSshow" :value.sync='form.staffIds' :isShow.sync='isSshow' :showDataList.sync='list'/> <getPersonnel v-if="isShow" isShow.sync='isShow' :isShow.sync='isShow' :showDataList.sync='list' @cb='handleOnSubmit' />
<!-- <getPersonnel v-if="isShow" :value.sync='form.staffIds' :isShow.sync='isShow' :showDataList.sync='list'/> -->
</div> </div>
</template> </template>
@ -35,11 +37,13 @@ export default {
data () { data () {
return { return {
isLoading: false, isLoading: false,
isSshow: false, isShow: false,
list: { list: {
list: [] list: []
}, },
form: {} form: {
staffIds: ''
}
} }
}, },
components: { components: {
@ -51,9 +55,10 @@ export default {
mounted () {}, mounted () {},
methods: { methods: {
handleChoose () { handleChoose () {
this.isSshow = true this.isShow = true
}, },
async handleOnSubmit () { async handleOnSubmit (list) {
this.form.staffIds = list.value
const parmas = { const parmas = {
startId: this.$route.query.id, startId: this.$route.query.id,
staffIds: this.form.staffIds, staffIds: this.form.staffIds,
@ -63,13 +68,18 @@ export default {
this.isLoading = false this.isLoading = false
this.$loadingStart() this.$loadingStart()
let res = await apiAssessManagerChange(parmas) let res = await apiAssessManagerChange(parmas)
console.log('res: ', res)
this.isLoading = true this.isLoading = true
if (res.code === 503) { if (res.code === 503) {
this.$alert(res.msg, '提示', { this.$alert(res.msg, '提示', {
confirmButtonText: '确定' confirmButtonText: '确定'
}).then(async () => { }).then(async () => {
let result = this.$personlGetForm(res.data)
const _res = this.$personlGetForm(this._.differenceBy(list.list, result.list, 'staffId'))
this.list = _res
this.form.staffIds = _res.value
this.isLoading = false this.isLoading = false
this.isShow = false
this.$loadingEnd() this.$loadingEnd()
// let res1 = await apiAssessManagerChange(parmas) // let res1 = await apiAssessManagerChange(parmas)
// this.isLoading = false // this.isLoading = false
@ -77,21 +87,29 @@ export default {
// if (res1.code !== 200) return this.$message.error(res1.msg) // if (res1.code !== 200) return this.$message.error(res1.msg)
// history.go(-1) // history.go(-1)
}).catch(() => { }).catch(() => {
this.form.staffIds = ''
this.isLoading = false this.isLoading = false
this.$loadingEnd() this.$loadingEnd()
}) })
} else if (res.code !== 200) { } else if (res.code !== 200) {
this.isLoading = false this.isLoading = false
this.$loadingEnd() this.$loadingEnd()
this.form.staffIds = ''
return this.$message.error(res.msg) return this.$message.error(res.msg)
} else { } else {
parmas.confirm = 1 this.list = list
let res1 = await apiAssessManagerChange(parmas) this.form.staffIds = list.value
this.isLoading = false
this.$loadingEnd()
if (res1.code !== 200) return this.$message.error(res1.msg)
history.go(-1)
} }
},
async handleSumitForResult (parmas = {}) {
parmas.confirm = 1
parmas.startId = this.$route.query.id || ''
parmas.changeType = 0
let res1 = await apiAssessManagerChange(Object.assign({}, this.form, parmas))
this.isLoading = false
this.$loadingEnd()
if (res1.code !== 200) return this.$message.error(res1.msg)
history.go(-1)
} }
}, },
watch: {} watch: {}