Merge remote-tracking branch 'origin/test'

This commit is contained in:
fan 2024-03-08 11:29:24 +08:00
commit 5ea69acaf8
3 changed files with 7 additions and 4 deletions

View File

@ -17,7 +17,7 @@
<el-table-column label="评分标准" prop="criteria" /> <el-table-column label="评分标准" prop="criteria" />
<el-table-column label="分值" prop="score" width="50"> <el-table-column label="分值" prop="score" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.score === 0? '': scope.row.score }}</span> <span>{{ scope.row.score === 0? '': scope.row.score/100 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -59,6 +59,7 @@ export default {
const { data } = param; const { data } = param;
const sums = ['总分', '/', '/', 0, '/']; const sums = ['总分', '/', '/', 0, '/'];
this.handleSummaries(data, sums); this.handleSummaries(data, sums);
sums[3] = sums[3] / 100;
return sums; return sums;
} }
} }

View File

@ -14,7 +14,7 @@
<el-input v-model="formModel.criteria" autosize type="textarea" style="width: 200px;" /> <el-input v-model="formModel.criteria" autosize type="textarea" style="width: 200px;" />
</el-form-item> </el-form-item>
<el-form-item label="单元分值:" prop="score"> <el-form-item label="单元分值:" prop="score">
<el-input-number v-model="formModel.score" style="width: 200px;" :min="0" /> <el-input-number v-model="formModel.score" :precision="2" style="width: 200px;" :min="0" />
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -61,7 +61,7 @@ export default {
if (row) { if (row) {
this.formModel.id = row.id; this.formModel.id = row.id;
this.formModel.name = row.name; this.formModel.name = row.name;
this.formModel.score = row.score; this.formModel.score = row.score / 100;
this.formModel.criteria = row.criteria; this.formModel.criteria = row.criteria;
this.formModel.children = row.children; this.formModel.children = row.children;
} }
@ -84,6 +84,7 @@ export default {
if (valid) { if (valid) {
this.loading = true; this.loading = true;
const data = Object.assign({}, this.formModel); const data = Object.assign({}, this.formModel);
data.score = data.score * 100;
if (this.type === 'edit') { if (this.type === 'edit') {
this.$emit('editData', data); this.$emit('editData', data);
} else if (this.type === 'add') { } else if (this.type === 'add') {

View File

@ -27,7 +27,7 @@
<el-table-column label="评分标准" prop="criteria" /> <el-table-column label="评分标准" prop="criteria" />
<el-table-column label="分值" prop="score" width="50"> <el-table-column label="分值" prop="score" width="50">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.score === 0? '': scope.row.score }}</span> <span>{{ scope.row.score === 0? '': scope.row.score/100 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="场景步骤ID" prop="sceneStepId" width="100">--> <!-- <el-table-column label="场景步骤ID" prop="sceneStepId" width="100">-->
@ -184,6 +184,7 @@ export default {
const { data } = param; const { data } = param;
const sums = ['总分', '/', '/', 0, '/']; const sums = ['总分', '/', '/', 0, '/'];
this.handleSummaries(data, sums); this.handleSummaries(data, sums);
sums[3] = sums[3] / 100;
return sums; return sums;
} }
} }