| | |
| | | <FYPageHeader title="评估结果详情"></FYPageHeader> |
| | | <el-row v-for="item in evaluation" :key="item.id"> </el-row> |
| | | <div class="btns"> |
| | | <el-button type="primary" @click="submit" :disabled="!isUpdated">提交</el-button> |
| | | <!-- <el-button type="primary" @click="submit" :disabled="!isUpdated">提交</el-button> --> |
| | | </div> |
| | | <div class="fixed-div"> |
| | | <span>总分: {{ score }}</span> |
| | | </div> |
| | | <el-table |
| | | class="table-style" |
| | |
| | | <el-table-column prop="two_maxScore" label="最大分值" width="90" /> |
| | | <el-table-column v-slot="scope" prop="three_title" label="具体问题"> |
| | | <el-checkbox |
| | | :disabled="disable" |
| | | v-model="scope.row.three_select" |
| | | @change="(checked) => threeSelectChange(checked, scope.row)" |
| | | >{{ scope.row.three_title }}</el-checkbox |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | disable: false, |
| | | score: '', |
| | | tableData: [], |
| | | evaluation: [], |
| | | subTaskId: '', |
| | |
| | | }, |
| | | /** 提价 */ |
| | | submit() { |
| | | this.disable = true; |
| | | evaluateApi |
| | | .updateScore({ |
| | | subTaskId: this.subTaskId, |
| | | itemList: this.checkedUpdatedList |
| | | }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | ElMessage({ |
| | | message: res.message, |
| | | type: 'success' |
| | | }); |
| | | }else { |
| | | ElMessage({ |
| | | message: res.message, |
| | | type: 'error' |
| | | }); |
| | | } |
| | | this.disable = false; |
| | | this.score = res.data.score; |
| | | // if (res.success) { |
| | | // ElMessage({ |
| | | // message: res.message, |
| | | // type: 'success' |
| | | // }); |
| | | // }else { |
| | | // ElMessage({ |
| | | // message: res.message, |
| | | // type: 'error' |
| | | // }); |
| | | // } |
| | | }) |
| | | .catch((e) => { |
| | | this.disable = false; |
| | | }); |
| | | setTimeout(() => { |
| | | this.getList(); |
| | | }, 1000); |
| | | }, 200); |
| | | }, |
| | | /** 通过第三级的id获取上级以及顶级 */ |
| | | getSuperObjByThreeId(threeId, list, path = []) { |
| | |
| | | /** 问题选择框 */ |
| | | threeSelectChange(isSelect, row) { |
| | | this.isUpdated = true; |
| | | this.submit(); |
| | | }, |
| | | /** 列合并 */ |
| | | objectSpanMethod({ row, column, rowIndex, columnIndex }) { |
| | |
| | | this.subTaskId = this.$route.params.subTaskId; |
| | | evaluateApi.fetchItemEvaluation(this.subTaskId).then((res) => { |
| | | this.isUpdated = false; |
| | | this.score = res.data.score; |
| | | this.tableData = this.genTableData(res.data.details); |
| | | }); |
| | | }, |
| | |
| | | .red-cell { |
| | | background-color: red; |
| | | } |
| | | /* 固定定位的 div */ |
| | | .fixed-div { |
| | | position: fixed; |
| | | top: 7%; /* 距离顶部 20px */ |
| | | right: 20px; /* 距离右侧 20px */ |
| | | width: 200px; /* div 的宽度 */ |
| | | background-color: #f2f2f2; /* 背景颜色 */ |
| | | padding: 20px; /* 内边距 */ |
| | | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* 阴影效果 */ |
| | | z-index: 1000; /* 确保 div 在页面其他内容之上 */ |
| | | } |
| | | </style> |