场景编辑代码调整
This commit is contained in:
parent
35bb645fba
commit
e9c65e5ba3
@ -2,7 +2,7 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" :before-close="doClose" top="50px" center custom-class="sceneModifyOut" fullscreen>
|
||||
<el-form ref="form" :model="formModel" label-width="120px" class="sceneModify" @submit.native.prevent>
|
||||
<!-- :rules="rules" -->
|
||||
<el-table :data="actionList" border style="width:1320px;margin: 0 auto;" height="500" :span-method="objectSpanMethod">
|
||||
<el-table :data="actionList" border style="width:1320px;margin: 0 auto;" height="500" :span-method="objectSpanMethod" :show-summary="true" :summary-method="getSummaries">
|
||||
<el-table-column label="步骤名称" width="100">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="stepVOs[scope.row.id]">
|
||||
@ -658,6 +658,34 @@ export default {
|
||||
this.currentSelectStep = index;
|
||||
this.radioBoxAction = actionId;
|
||||
this.isOperate = true;
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总分值';
|
||||
return;
|
||||
}
|
||||
if (index === 4) {
|
||||
const values = [];
|
||||
data.map(item =>{
|
||||
if (item.memberId === '1' && (item.type == 'Conversation' || item.type == 'Operation')) {
|
||||
values.push(item.id);
|
||||
}
|
||||
});
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(this.commandEvaluationRuleVOs[curr].score);
|
||||
if (!isNaN(value)) {
|
||||
return prev + value;
|
||||
} else {
|
||||
return Number(this.commandEvaluationRuleVOs[prev].score);
|
||||
}
|
||||
}, 0);
|
||||
return;
|
||||
}
|
||||
});
|
||||
return sums;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user