diff --git a/src/views/kpi/assessment/goals/index.vue b/src/views/kpi/assessment/goals/index.vue
index e7fd545..5c4d493 100644
--- a/src/views/kpi/assessment/goals/index.vue
+++ b/src/views/kpi/assessment/goals/index.vue
@@ -62,7 +62,7 @@
- 业务指标权重:{{handleGetWeight(i)}}%/{{Math.round((i.weight * 100)*1000)/1000}}%
+ 业务指标权重:{{handleGetWeight(i)}}% /{{Math.round((i.weight * 100)*1000)/1000}}%
所有指标总权重: {{ handleGetWeight1()}}%
@@ -176,12 +176,28 @@ export default {
},
async handleGetNext () {
const arr = this.handleFilter(this.obj.recortModelDtos)
- console.log('arr: ', arr)
- for (let i in arr) {
- if (arr[i].detailDtos.length > 0 && !arr[i].isTrue) {
- this.$message.error(arr[i].name + '维度内的权重和必须为' + Math.round((arr[i].weight * 100) * 1000) / 1000)
+ if (arr.some(i => i.weight === null)) {
+ let weight = 0
+ let maxWeight = 0
+ const nullArray = arr.map(i => {
+ i.detailDtos.map(j => {
+ if (i.weight === null) maxWeight += j.checkWeight
+ weight += j.checkWeight
+ })
+ })
+ if (weight !== 1) {
+ const noWeightArr = arr.filter(i => i.weight === null)
+ let str = noWeightArr.map(i => i.name).join(',')
+ this.$message.error(str + '维度内的权重和必须为' + Math.round(((1 - maxWeight) * 100) * 1000) / 1000 + '%')
return
}
+ } else {
+ for (let i in arr) {
+ if (arr[i].detailDtos.length > 0 && !arr[i].isTrue) {
+ this.$message.error(arr[i].name + '维度内的权重和必须为' + Math.round((arr[i].weight * 100) * 1000) / 1000)
+ return
+ }
+ }
}
let res1 = await apiSaveDetail(this.obj)
if (res1.code !== 200) {
diff --git a/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue b/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue
index 75f1c06..b5e13d6 100644
--- a/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue
+++ b/src/views/kpi/workbench/assessmentGroup/edit/components/templateSet.vue
@@ -401,7 +401,7 @@ export default {
this.show = true
} else {
this.zhibiaoTitle = '编辑指标'
- this.formIndicators = Object.assign({}, item, {index, index2: type, isEdit: true})
+ this.formIndicators = Object.assign({}, item, {index: type, index2: index, isEdit: true})
this.formIndicators.weight = this.formIndicators.weight * 100
this.showIndicators = true
}
diff --git a/src/views/kpi/workbench/home/report.vue b/src/views/kpi/workbench/home/report.vue
index 34fa391..1703c4b 100644
--- a/src/views/kpi/workbench/home/report.vue
+++ b/src/views/kpi/workbench/home/report.vue
@@ -9,7 +9,7 @@
v-model="value1"
value-format='yyyy-MM-dd'
type="daterange"
- range-separator="至"
+ range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期">