This commit is contained in:
熊成强 2020-11-02 17:19:29 +08:00
parent ad107cb8bc
commit 96afbf4d12
14 changed files with 97 additions and 22 deletions

View File

@ -7,7 +7,7 @@ import store from './store'
import './utils/elementConfig' import './utils/elementConfig'
import './utils/permission' import './utils/permission'
import './style/index.less' import './style/index.less'
import {debounce, departGetForm, personlGetForm} from '@/utils/common' import {debounce, departGetForm, personlGetForm, handleInput} from '@/utils/common'
import '@/icons' import '@/icons'
import { import {
format format
@ -19,7 +19,7 @@ Vue.prototype.$format = format
Vue.prototype.debounce = debounce Vue.prototype.debounce = debounce
Vue.prototype.$personlGetForm = personlGetForm Vue.prototype.$personlGetForm = personlGetForm
Vue.prototype.$departGetForm = departGetForm Vue.prototype.$departGetForm = departGetForm
Vue.prototype.$handleInputInt = handleInput
/* eslint-disable no-new */ /* eslint-disable no-new */
new Vue({ new Vue({
el: '#app', el: '#app',

View File

@ -76,3 +76,9 @@ export function departGetForm (arr = []) {
} }
return params return params
} }
export function handleInput (form) {
let value = this[form.split('.')[0]][form.split('.')[1]]
if (value.split('.').length > 2) value = String(parseFloat(value))
this[form.split('.')[0]][form.split('.')[1]] = Number(value) > 100 ? 0 : value.replace(/[^.\d]/g, '')
}

View File

@ -62,6 +62,14 @@
</div> </div>
</div> </div>
</draggable> </draggable>
<div style=" padding: 10px;font-size:16px;" class="commonFont">
<div>
业务指标权重{{handleGetWeight(i)}}%/{{Math.round((i.weight * 100)*1000)/1000}}%
</div>
<div>
所有指标总权重: {{ Math.round((obj.weight * 100)*1000)/1000}}%
</div>
</div>
<div style=" padding: 10px;"> <div style=" padding: 10px;">
<!-- <el-button size="mini" plain>选择指标项</el-button> --> <!-- <el-button size="mini" plain>选择指标项</el-button> -->
<el-button @click="hanidleEdit(i,-1,index)" size="mini" plain>增加指标项</el-button> <el-button @click="hanidleEdit(i,-1,index)" size="mini" plain>增加指标项</el-button>
@ -90,7 +98,7 @@
<el-input size="small" clearable type="textarea" v-model="formIndicators.keyResult"></el-input> <el-input size="small" clearable type="textarea" v-model="formIndicators.keyResult"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="权重" prop="weight"> <el-form-item label="权重" prop="weight">
<el-input size="small" clearable v-model="formIndicators.checkWeight"> <el-input size="small" @input="handleInput" clearable v-model="formIndicators.checkWeight">
<template slot="append">%</template> <template slot="append">%</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -165,11 +173,29 @@ export default {
this.handleGetTbale() this.handleGetTbale()
}, },
methods: { methods: {
handleInput (value) {
if (value.split('.').length > 2) value = String(parseFloat(value))
this.formIndicators.checkWeight = Number(value) > 100 ? '' : value.replace(/[^.\d]/g, '')
},
handleGetWeight (arr) {
const weight = arr.detailDtos.reduce((num, i) => {
num += i.isDelete !== 1 ? i.checkWeight : 0
return num
}, 0)
arr.isTrue = weight === arr.weight
return Math.round((weight * 100) * 1000) / 1000
},
async handleSaveDetail (params = this.obj) { async handleSaveDetail (params = this.obj) {
console.log('params: ', params)
for (let i in params.recortModelDtos) {
if (!params.recortModelDtos[i].isTrue) {
this.$message.error(params.recortModelDtos[i].name + '维度内的权重和必须为' + Math.round((params.recortModelDtos[i].weight * 100) * 1000) / 1000)
return
}
}
let res = await apiSaveDetail(params) let res = await apiSaveDetail(params)
if (res.code !== 200) { if (res.code !== 200) {
this.$message.error(res.msg) this.$message.error(res.msg)
return
} }
this.$message({ this.$message({
message: res.msg, message: res.msg,

View File

@ -15,7 +15,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item > <el-form-item >
<el-input @change="handleChange" @keyup.enter="handleChange" size="small" clearable prefix-icon="el-icon-search" v-model="form.name" placeholder="搜索考核名称"></el-input> <el-input @change="handleChange" @keyup.enter="handleChange" size="small" clearable prefix-icon="el-icon-search" v-model="form.name" placeholder="搜索考核名称"></el-input>
</el-form-item> </el-form-item>
</div> </div>
<div> <div>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -1,6 +1,6 @@
<template> <template>
<div class='table'> <div class='table'>
<div class="table-list"> <div v-if="obj.recortModelDtos.length !== 0" class="table-list commonFont">
<div class="table-header"> <div class="table-header">
<div class="table-left">维度</div> <div class="table-left">维度</div>
<div class="table-header-flex name">名称</div> <div class="table-header-flex name">名称</div>
@ -10,12 +10,11 @@
<div class="table-header-flex" v-if="tableInfo.score">上级评分</div> <div class="table-header-flex" v-if="tableInfo.score">上级评分</div>
<div class="table-header-flex" v-if="tableInfo.score">评分说明</div> <div class="table-header-flex" v-if="tableInfo.score">评分说明</div>
</div> </div>
<div v-if="obj.recortModelDtos.length === 0" class='listNone'> <!-- <div v-if="obj.recortModelDtos.length === 0" class='listNone'>
<!-- -->
<div> <div>
暂无数据 暂无数据
</div> </div>
</div> </div> -->
<div v-for="(item,index) in obj.recortModelDtos" :key="index" class="table-content"> <div v-for="(item,index) in obj.recortModelDtos" :key="index" class="table-content">
<div class="table-content-left table-left"> <div class="table-content-left table-left">
<!-- {{item.name}} --> <!-- {{item.name}} -->
@ -59,6 +58,12 @@
</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 v-if="tableInfo.result || tableInfo.score" class="table-bottom">
<div class="table-bottom-content"> <div class="table-bottom-content">
@ -133,6 +138,9 @@ export default {
} }
</script> </script>
<style lang='less' scoped> <style lang='less' scoped>
.nojixiao{
text-align: center;
}
.listNone{ .listNone{
height: 100px; height: 100px;
text-align: center; text-align: center;

View File

@ -14,7 +14,7 @@
</div> </div>
<div class="performance-content-center"> <div class="performance-content-center">
<div <div
class="performance-content-center-item" class="performance-content-center-item commonFont"
:class="{ :class="{
active:i.isActive, active:i.isActive,
right:true, right:true,

View File

@ -11,7 +11,7 @@
<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 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'">
<try-authority></try-authority> <try-authority></try-authority>
</div> </div>
@ -51,4 +51,7 @@ export default {
padding-top: 0px; padding-top: 0px;
// min-height: 600px; // min-height: 600px;
} }
.kaoping{
padding: 20px 0 00 0;
}
</style> </style>

View File

@ -1,7 +1,15 @@
<!-- 执行中 --> <!-- 执行中 -->
<template> <template>
<div> <div class="zhixing">
执行中 <div class="zhixing-center">
<img src="./imgs/zhixing.png" alt="">
</div>
<div class="commonFont zhixing-center">
该节点为业务节点目标确认后流程将停在执行中节点
</div>
<div class="commonFont zhixing-center">
当管理员发起考评后绩效流程将自动流转到评分节点
</div>
</div> </div>
</template> </template>
@ -22,6 +30,14 @@ export default {
</script> </script>
<style lang='' scoped> <style lang='less' scoped>
.zhixing{
padding: 20px 0;
}
.zhixing-center{
img{
padding: 10px;
}
.center()
}
</style> </style>

View File

@ -45,7 +45,7 @@
<div style="padding:20px 0 0 0 "> <div style="padding:20px 0 0 0 ">
<span>评分权重</span> <span>评分权重</span>
<div style="padding:10px 0 0 20px"> <div style="padding:10px 0 0 20px">
<el-input style="width:200px;" size="small" clearable v-model="itemInfo.weight1"> <el-input @input.native="$handleInputInt('itemInfo.weight1')" style="width:200px;" size="small" clearable v-model="itemInfo.weight1">
<template slot="append">%</template> <template slot="append">%</template>
</el-input> </el-input>
</div> </div>
@ -129,7 +129,6 @@ export default {
beforeMount () {}, beforeMount () {},
mounted () { mounted () {
this.list = this.handleListFor(this.info) this.list = this.handleListFor(this.info)
console.log('info: ', this.info)
}, },
methods: { methods: {
// //

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -150,7 +150,7 @@
<el-radio label="">不限数量</el-radio> <el-radio label="">不限数量</el-radio>
<el-radio label="1">自定义</el-radio> <el-radio label="1">自定义</el-radio>
</el-radio-group> </el-radio-group>
<el-input clearable size="small" style="width:160px;'" v-if="maxCount" v-model="form.maxCount"></el-input> <el-input @input="handleInputWeiduZhi" clearable size="small" style="width:160px;'" v-if="maxCount" v-model="form.maxCount"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="所含指标总权重"> <el-form-item label="所含指标总权重">
<div slot="label">所含指标总权重 <div slot="label">所含指标总权重
@ -162,7 +162,7 @@
<el-radio :label="0">不限权重</el-radio> <el-radio :label="0">不限权重</el-radio>
<el-radio :label="1">自定义</el-radio> <el-radio :label="1">自定义</el-radio>
</el-radio-group> </el-radio-group>
<el-input clearable size="small" style="width:160px;'" v-if="weight!==0" v-model="form.weight"> <el-input @input.native="$handleInputInt('form.weight')" clearable size="small" style="width:160px;'" v-if="weight!==0" v-model="form.weight">
<template slot="append">%</template> <template slot="append">%</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -188,7 +188,7 @@
<el-input size="small" clearable type="textarea" v-model="formIndicators.keyResult"></el-input> <el-input size="small" clearable type="textarea" v-model="formIndicators.keyResult"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="权重" prop="weight"> <el-form-item label="权重" prop="weight">
<el-input size="small" clearable v-model="formIndicators.weight"> <el-input size="small" @input.native="$handleInputInt('formIndicators.weight')" clearable v-model="formIndicators.weight">
<template slot="append">%</template> <template slot="append">%</template>
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -291,6 +291,9 @@ export default {
this.handleGetDimensions() this.handleGetDimensions()
}, },
methods: { methods: {
handleInputWeiduZhi (value) {
this.form.maxCount = value.replace(/[^\d]/g, '')
},
async handleGetByGroupId (id) { async handleGetByGroupId (id) {
try { try {
let res = await getByGroupId({id}) let res = await getByGroupId({id})
@ -344,6 +347,20 @@ export default {
this.show = false this.show = false
}, },
handleSubmit () { handleSubmit () {
if (!this.form.maxCount && this.maxCount) {
this.$message({
message: '请填写指标数量',
type: 'warning'
})
return
}
if (!this.form.weight && this.weight) {
this.$message({
message: '请填写指标权重',
type: 'warning'
})
return
}
this.$refs.form.validate((v) => { this.$refs.form.validate((v) => {
if (v) { if (v) {
this.form.weight = this.form.weight / 100 > 1 ? 1 : this.form.weight / 100 this.form.weight = this.form.weight / 100 > 1 ? 1 : this.form.weight / 100

View File

@ -135,7 +135,7 @@ export default {
.center() .center()
} }
&-content{ &-content{
height: 600px; min-height: 600px;
background: #fff; background: #fff;
padding: 40px 28px; padding: 40px 28px;
overflow: auto; overflow: auto;

View File

@ -4,7 +4,7 @@
<div class="assessment-form"> <div class="assessment-form">
<el-form ref="form" @submit.native.prevent inline :model="form" > <el-form ref="form" @submit.native.prevent inline :model="form" >
<el-form-item > <el-form-item >
<el-input @change="handleChange" @keyup.enter="handleChange" size="small" clearable prefix-icon="el-icon-search" v-model="form.name" placeholder="搜索考核名称"></el-input> <el-input @change="handleChange" @keyup.enter="handleChange" size="small" clearable prefix-icon="el-icon-search" v-model="form.name" placeholder="搜索考核名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item > <el-form-item >
<el-dropdown > <el-dropdown >