diff --git a/src/main.js b/src/main.js
index 26d62d1..40475cf 100644
--- a/src/main.js
+++ b/src/main.js
@@ -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',
diff --git a/src/utils/common.js b/src/utils/common.js
index 08336af..c794c08 100644
--- a/src/utils/common.js
+++ b/src/utils/common.js
@@ -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, '')
+}
diff --git a/src/views/kpi/assessment/goals/index.vue b/src/views/kpi/assessment/goals/index.vue
index 5e090d3..6125ec6 100644
--- a/src/views/kpi/assessment/goals/index.vue
+++ b/src/views/kpi/assessment/goals/index.vue
@@ -62,6 +62,14 @@
+
+
+ 业务指标权重:{{handleGetWeight(i)}}%/{{Math.round((i.weight * 100)*1000)/1000}}%
+
+
+ 所有指标总权重: {{ Math.round((obj.weight * 100)*1000)/1000}}%
+
+
增加指标项
@@ -90,7 +98,7 @@
-
+
%
@@ -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,
diff --git a/src/views/kpi/assessment/homeList/index.vue b/src/views/kpi/assessment/homeList/index.vue
index e52a124..1f2cf95 100644
--- a/src/views/kpi/assessment/homeList/index.vue
+++ b/src/views/kpi/assessment/homeList/index.vue
@@ -15,7 +15,7 @@
-
+
diff --git a/src/views/kpi/assessment/performance/components/imgs/nojixiao.png b/src/views/kpi/assessment/performance/components/imgs/nojixiao.png
new file mode 100644
index 0000000..7e72bf6
Binary files /dev/null and b/src/views/kpi/assessment/performance/components/imgs/nojixiao.png differ
diff --git a/src/views/kpi/assessment/performance/components/table.vue b/src/views/kpi/assessment/performance/components/table.vue
index 227e81e..c86ff84 100644
--- a/src/views/kpi/assessment/performance/components/table.vue
+++ b/src/views/kpi/assessment/performance/components/table.vue
@@ -1,6 +1,6 @@
-
+
-
+
+

+
+ 未制定绩效目标,暂无数据
+
+
@@ -133,6 +138,9 @@ export default {
}
diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/Perform.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/Perform.vue
index 8ce4607..68f62e6 100644
--- a/src/views/kpi/workbench/assessmentGroup/edit/components/Perform.vue
+++ b/src/views/kpi/workbench/assessmentGroup/edit/components/Perform.vue
@@ -1,7 +1,15 @@
-
- 执行中
+
+
+

+
+
+ 该节点为业务节点,目标确认后,流程将停在执行中节点,
+
+
+ 当管理员发起考评后,绩效流程将自动流转到评分节点
+
@@ -22,6 +30,14 @@ export default {
-
diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/ScoreList.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/ScoreList.vue
index acc2f05..29a354e 100644
--- a/src/views/kpi/workbench/assessmentGroup/edit/components/ScoreList.vue
+++ b/src/views/kpi/workbench/assessmentGroup/edit/components/ScoreList.vue
@@ -45,7 +45,7 @@
评分权重:
-
+
%
@@ -129,7 +129,6 @@ export default {
beforeMount () {},
mounted () {
this.list = this.handleListFor(this.info)
- console.log('info: ', this.info)
},
methods: {
// 将传入的数值复现
diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/imgs/zhixing.png b/src/views/kpi/workbench/assessmentGroup/edit/components/imgs/zhixing.png
new file mode 100644
index 0000000..cf6a3cd
Binary files /dev/null and b/src/views/kpi/workbench/assessmentGroup/edit/components/imgs/zhixing.png differ
diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue
index 3b40537..62f93c0 100644
--- a/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue
+++ b/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue
@@ -150,7 +150,7 @@
不限数量
自定义
-
+
所含指标总权重
@@ -162,7 +162,7 @@
不限权重
自定义
-
+
%
@@ -188,7 +188,7 @@
-
+
%
@@ -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
diff --git a/src/views/kpi/workbench/assessmentGroup/edit/index.vue b/src/views/kpi/workbench/assessmentGroup/edit/index.vue
index 1af783b..d34d502 100644
--- a/src/views/kpi/workbench/assessmentGroup/edit/index.vue
+++ b/src/views/kpi/workbench/assessmentGroup/edit/index.vue
@@ -135,7 +135,7 @@ export default {
.center()
}
&-content{
- height: 600px;
+ min-height: 600px;
background: #fff;
padding: 40px 28px;
overflow: auto;
diff --git a/src/views/kpi/workbench/assessmentGroup/groundTable.vue b/src/views/kpi/workbench/assessmentGroup/groundTable.vue
index 8e01598..26e9d60 100644
--- a/src/views/kpi/workbench/assessmentGroup/groundTable.vue
+++ b/src/views/kpi/workbench/assessmentGroup/groundTable.vue
@@ -4,7 +4,7 @@
-
+