优化
This commit is contained in:
parent
d5859111ed
commit
360c7a2663
@ -20,6 +20,7 @@
|
||||
"element-ui": "^2.13.2",
|
||||
"less": "^3.8.1",
|
||||
"less-loader": "^4.1.0",
|
||||
"lodash": "^4.17.20",
|
||||
"svg-sprite-loader": "^5.0.0",
|
||||
"vconsole": "^3.3.4",
|
||||
"vue": "^2.5.2",
|
||||
|
||||
@ -9,10 +9,11 @@ import './utils/elementConfig'
|
||||
import './utils/permission'
|
||||
import './style/index.less'
|
||||
import '@/icons'
|
||||
|
||||
import _ from 'lodash'
|
||||
import VueCookie from 'vue-cookies'
|
||||
import { debounce, departGetForm, personlGetForm, handleInput, messageSuccess, loading, loadingClose } from '@/utils/common'
|
||||
import { format } from '@/utils/dateFormat'
|
||||
Vue.prototype._ = _
|
||||
Vue.mixin(Mixin)
|
||||
Vue.use(VueCookie)
|
||||
Vue.config.productionTip = false
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
}
|
||||
.pre{
|
||||
pre{
|
||||
line-height: 23px;
|
||||
white-space:pre-line;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
|
||||
@ -7,7 +7,8 @@
|
||||
<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>
|
||||
<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="pingfen-title">上级评分 - {{k.approvalName}} ( {{( Math.round((k.weight * 100) * 1000) / 1000 )}}%)</div>
|
||||
<div class="pingfen-content">
|
||||
@ -20,22 +21,29 @@
|
||||
</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="weidu">
|
||||
{{item.name}}
|
||||
<div v-for="(name,indexname) in item.name" :key="indexname">
|
||||
{{name}}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="table-content" v-for="i in item.detailDtos">
|
||||
<div class="name">
|
||||
{{i.target}}
|
||||
</div>
|
||||
<div class="kaohe">
|
||||
<div class="kaohe pre">
|
||||
<pre>
|
||||
{{i.keyResult}}
|
||||
</pre>
|
||||
</div>
|
||||
<div class="jieguo">
|
||||
<div class="jieguo pre">
|
||||
<pre>
|
||||
{{i.checkResult}}
|
||||
</pre>
|
||||
</div>
|
||||
<div class="quanzhong">
|
||||
{{( Math.round((i.checkWeight * 100) * 1000) / 1000 )}}%
|
||||
</div>
|
||||
<template >
|
||||
<div v-for="dto in i.scoreDtos" class="pingfen table-content-pingfen">
|
||||
<div class="pingfen-content-ping">
|
||||
{{dto.acquireScore}}
|
||||
@ -47,6 +55,8 @@
|
||||
{{dto.scoreComment || '--'}}
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</div>
|
||||
<div class="table-content" v-if="item.detailDtos.length===0">
|
||||
<div class="name">
|
||||
@ -203,15 +213,18 @@ export default {
|
||||
border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
.jieguo{
|
||||
padding:10px !important;
|
||||
width: 300px ;
|
||||
.center();
|
||||
}
|
||||
.name{
|
||||
width: 60px ;
|
||||
padding:10px !important;
|
||||
width: 300px ;
|
||||
.center();
|
||||
}
|
||||
.kaohe{
|
||||
width: 300px ;
|
||||
padding:10px !important;
|
||||
display: block;
|
||||
.center();
|
||||
pre{
|
||||
@ -223,12 +236,19 @@ export default {
|
||||
.weidu{
|
||||
flex: none ;
|
||||
width: 60px ;
|
||||
.center();
|
||||
flex-direction: column;
|
||||
padding:10px !important;
|
||||
border-left: 1px solid @borderColor;
|
||||
border-right: 1px solid @borderColor;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
.center();
|
||||
>div{
|
||||
text-align: center;
|
||||
}
|
||||
// .center();
|
||||
}
|
||||
.quanzhong{
|
||||
width: 90px ;
|
||||
width: 130px ;
|
||||
.center();
|
||||
}
|
||||
.pingfen{
|
||||
@ -285,9 +305,9 @@ width: 50px;
|
||||
border-bottom: 1px solid @borderColor;
|
||||
}
|
||||
.table-list{
|
||||
padding: 0 0 10px 0;
|
||||
border: 1px solid @borderColor;
|
||||
border-bottom: none;
|
||||
margin: 0 0 10px 0;
|
||||
// border: 1px solid @borderColor;
|
||||
// border-bottom: none;
|
||||
overflow: auto;
|
||||
|
||||
}
|
||||
@ -302,7 +322,8 @@ width: 50px;
|
||||
// border: 1px solid @borderColor;
|
||||
>div{
|
||||
padding: 10px;
|
||||
border-right: 1px solid @borderColor;;
|
||||
border-right: 1px solid @borderColor;
|
||||
border-top: 1px solid @borderColor;
|
||||
}
|
||||
>div:last-child{
|
||||
border-right: none;
|
||||
@ -376,8 +397,12 @@ width: 50px;
|
||||
width: 100px !important;
|
||||
text-align: center;
|
||||
}
|
||||
.table-content:hover{
|
||||
background: rgb(247, 247, 247);
|
||||
}
|
||||
.table-content{
|
||||
display: flex;
|
||||
height: 100%;
|
||||
>div{
|
||||
flex-shrink: 0;
|
||||
border-right: 1px solid @borderColor;
|
||||
|
||||
@ -162,6 +162,7 @@ export default {
|
||||
i = i.replace(/{|}/g, '')
|
||||
return k[i]
|
||||
})
|
||||
console.log('str: ', str)
|
||||
let a = eval(str)
|
||||
result += a
|
||||
})
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
|
||||
<!-- -->
|
||||
<template>
|
||||
<div class="addPerson">
|
||||
@ -19,11 +20,12 @@
|
||||
<el-button size="small" icon="el-icon-plus" plain @click="handleChoose">选人员</el-button>
|
||||
</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>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
@ -35,11 +37,13 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
isLoading: false,
|
||||
isSshow: false,
|
||||
isShow: false,
|
||||
list: {
|
||||
list: []
|
||||
},
|
||||
form: {}
|
||||
form: {
|
||||
staffIds: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -51,9 +55,10 @@ export default {
|
||||
mounted () {},
|
||||
methods: {
|
||||
handleChoose () {
|
||||
this.isSshow = true
|
||||
this.isShow = true
|
||||
},
|
||||
async handleOnSubmit () {
|
||||
async handleOnSubmit (list) {
|
||||
this.form.staffIds = list.value
|
||||
const parmas = {
|
||||
startId: this.$route.query.id,
|
||||
staffIds: this.form.staffIds,
|
||||
@ -63,13 +68,18 @@ export default {
|
||||
this.isLoading = false
|
||||
this.$loadingStart()
|
||||
let res = await apiAssessManagerChange(parmas)
|
||||
console.log('res: ', res)
|
||||
|
||||
this.isLoading = true
|
||||
if (res.code === 503) {
|
||||
this.$alert(res.msg, '提示', {
|
||||
confirmButtonText: '确定'
|
||||
}).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.isShow = false
|
||||
this.$loadingEnd()
|
||||
// let res1 = await apiAssessManagerChange(parmas)
|
||||
// this.isLoading = false
|
||||
@ -77,22 +87,30 @@ export default {
|
||||
// if (res1.code !== 200) return this.$message.error(res1.msg)
|
||||
// history.go(-1)
|
||||
}).catch(() => {
|
||||
this.form.staffIds = ''
|
||||
this.isLoading = false
|
||||
this.$loadingEnd()
|
||||
})
|
||||
} else if (res.code !== 200) {
|
||||
this.isLoading = false
|
||||
this.$loadingEnd()
|
||||
this.form.staffIds = ''
|
||||
return this.$message.error(res.msg)
|
||||
} else {
|
||||
this.list = list
|
||||
this.form.staffIds = list.value
|
||||
}
|
||||
},
|
||||
async handleSumitForResult (parmas = {}) {
|
||||
parmas.confirm = 1
|
||||
let res1 = await apiAssessManagerChange(parmas)
|
||||
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: {}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user