优化
This commit is contained in:
parent
ad107cb8bc
commit
96afbf4d12
@ -7,7 +7,7 @@ import store from './store'
|
||||
import './utils/elementConfig'
|
||||
import './utils/permission'
|
||||
import './style/index.less'
|
||||
import {debounce, departGetForm, personlGetForm} from '@/utils/common'
|
||||
import {debounce, departGetForm, personlGetForm, handleInput} from '@/utils/common'
|
||||
import '@/icons'
|
||||
import {
|
||||
format
|
||||
@ -19,7 +19,7 @@ Vue.prototype.$format = format
|
||||
Vue.prototype.debounce = debounce
|
||||
Vue.prototype.$personlGetForm = personlGetForm
|
||||
Vue.prototype.$departGetForm = departGetForm
|
||||
|
||||
Vue.prototype.$handleInputInt = handleInput
|
||||
/* eslint-disable no-new */
|
||||
new Vue({
|
||||
el: '#app',
|
||||
|
||||
@ -76,3 +76,9 @@ export function departGetForm (arr = []) {
|
||||
}
|
||||
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, '')
|
||||
}
|
||||
|
||||
@ -62,6 +62,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</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;">
|
||||
<!-- <el-button 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-form-item>
|
||||
<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>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -165,11 +173,29 @@ export default {
|
||||
this.handleGetTbale()
|
||||
},
|
||||
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) {
|
||||
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)
|
||||
if (res.code !== 200) {
|
||||
this.$message.error(res.msg)
|
||||
return
|
||||
}
|
||||
this.$message({
|
||||
message: res.msg,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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-left">维度</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>
|
||||
<div v-if="obj.recortModelDtos.length === 0" class='listNone'>
|
||||
<!-- -->
|
||||
<!-- <div v-if="obj.recortModelDtos.length === 0" class='listNone'>
|
||||
<div>
|
||||
暂无数据
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div v-for="(item,index) in obj.recortModelDtos" :key="index" class="table-content">
|
||||
<div class="table-content-left table-left">
|
||||
<!-- {{item.name}} -->
|
||||
@ -59,6 +58,12 @@
|
||||
</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 class="table-bottom-content">
|
||||
@ -133,6 +138,9 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style lang='less' scoped>
|
||||
.nojixiao{
|
||||
text-align: center;
|
||||
}
|
||||
.listNone{
|
||||
height: 100px;
|
||||
text-align: center;
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="performance-content-center">
|
||||
<div
|
||||
class="performance-content-center-item"
|
||||
class="performance-content-center-item commonFont"
|
||||
:class="{
|
||||
active:i.isActive,
|
||||
right:true,
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
<el-menu-item index="0">考评组设置</el-menu-item>
|
||||
<el-menu-item index="1">默认值设置</el-menu-item>
|
||||
</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'">
|
||||
<try-authority></try-authority>
|
||||
</div>
|
||||
@ -51,4 +51,7 @@ export default {
|
||||
padding-top: 0px;
|
||||
// min-height: 600px;
|
||||
}
|
||||
.kaoping{
|
||||
padding: 20px 0 00 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -1,7 +1,15 @@
|
||||
<!-- 执行中 -->
|
||||
<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>
|
||||
</template>
|
||||
|
||||
@ -22,6 +30,14 @@ export default {
|
||||
|
||||
</script>
|
||||
|
||||
<style lang='' scoped>
|
||||
|
||||
<style lang='less' scoped>
|
||||
.zhixing{
|
||||
padding: 20px 0;
|
||||
}
|
||||
.zhixing-center{
|
||||
img{
|
||||
padding: 10px;
|
||||
}
|
||||
.center()
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<div style="padding:20px 0 0 0 ">
|
||||
<span>评分权重:</span>
|
||||
<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>
|
||||
</el-input>
|
||||
</div>
|
||||
@ -129,7 +129,6 @@ export default {
|
||||
beforeMount () {},
|
||||
mounted () {
|
||||
this.list = this.handleListFor(this.info)
|
||||
console.log('info: ', this.info)
|
||||
},
|
||||
methods: {
|
||||
// 将传入的数值复现
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
@ -150,7 +150,7 @@
|
||||
<el-radio label="">不限数量</el-radio>
|
||||
<el-radio label="1">自定义</el-radio>
|
||||
</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 label="所含指标总权重">
|
||||
<div slot="label">所含指标总权重
|
||||
@ -162,7 +162,7 @@
|
||||
<el-radio :label="0">不限权重</el-radio>
|
||||
<el-radio :label="1">自定义</el-radio>
|
||||
</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>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -188,7 +188,7 @@
|
||||
<el-input size="small" clearable type="textarea" v-model="formIndicators.keyResult"></el-input>
|
||||
</el-form-item>
|
||||
<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>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@ -291,6 +291,9 @@ export default {
|
||||
this.handleGetDimensions()
|
||||
},
|
||||
methods: {
|
||||
handleInputWeiduZhi (value) {
|
||||
this.form.maxCount = value.replace(/[^\d]/g, '')
|
||||
},
|
||||
async handleGetByGroupId (id) {
|
||||
try {
|
||||
let res = await getByGroupId({id})
|
||||
@ -344,6 +347,20 @@ export default {
|
||||
this.show = false
|
||||
},
|
||||
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) => {
|
||||
if (v) {
|
||||
this.form.weight = this.form.weight / 100 > 1 ? 1 : this.form.weight / 100
|
||||
|
||||
@ -135,7 +135,7 @@ export default {
|
||||
.center()
|
||||
}
|
||||
&-content{
|
||||
height: 600px;
|
||||
min-height: 600px;
|
||||
background: #fff;
|
||||
padding: 40px 28px;
|
||||
overflow: auto;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user