|
@@ -8,41 +8,29 @@
|
|
|
width="200"
|
|
|
fixed="left"
|
|
|
></el-table-column>
|
|
|
- <el-table-column
|
|
|
- v-for="(column, cindex) in columns"
|
|
|
- :key="cindex"
|
|
|
- :label="column"
|
|
|
- >
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input-number
|
|
|
- v-model="scope.row.evaluationList[cindex].weight"
|
|
|
- class="width-50"
|
|
|
- size="small"
|
|
|
- :min="0"
|
|
|
- :max="100"
|
|
|
- :step="1"
|
|
|
- step-strictly
|
|
|
- :controls="false"
|
|
|
- >
|
|
|
- </el-input-number>
|
|
|
- <span style="margin-left: 5px">%</span>
|
|
|
- </template>
|
|
|
+ <el-table-column label="考核项目及比例(%)">
|
|
|
+ <el-table-column
|
|
|
+ v-for="(column, cindex) in columns"
|
|
|
+ :key="cindex"
|
|
|
+ :label="column"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input-number
|
|
|
+ v-model="scope.row.evaluationList[cindex].weight"
|
|
|
+ class="width-50"
|
|
|
+ size="small"
|
|
|
+ :min="0"
|
|
|
+ :max="100"
|
|
|
+ :step="1"
|
|
|
+ step-strictly
|
|
|
+ :controls="false"
|
|
|
+ @change="weightChange"
|
|
|
+ >
|
|
|
+ </el-input-number>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="目标整体权重" prop="totalWeight">
|
|
|
- <template slot-scope="scope">
|
|
|
- <el-input-number
|
|
|
- v-model="scope.row.totalWeight"
|
|
|
- class="width-50"
|
|
|
- size="small"
|
|
|
- :min="0"
|
|
|
- :max="100"
|
|
|
- :step="1"
|
|
|
- step-strictly
|
|
|
- :controls="false"
|
|
|
- >
|
|
|
- </el-input-number>
|
|
|
- <span style="margin-left: 5px">%</span>
|
|
|
- </template>
|
|
|
+ <el-table-column label="权重(%)" prop="totalWeight">
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div class="text-center">
|
|
@@ -56,8 +44,7 @@
|
|
|
<p>
|
|
|
1.课程目标评价依据来源于平时成绩和期末考试成绩二部分,请录入平时成绩,期末成绩整体权重及各目标的权重;
|
|
|
</p>
|
|
|
- <p>2.各课程目标下选择评价方式总权重应等于100%;</p>
|
|
|
- <p>3.目标整体权重应等于100%,用于计算课程整体达成度。</p>
|
|
|
+ <p>2.目标整体权重应等于100%,用于计算课程整体达成度。</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -109,14 +96,17 @@ export default {
|
|
|
(item) => item.evaluationName
|
|
|
);
|
|
|
},
|
|
|
+ weightChange() {
|
|
|
+ this.dataList.forEach((item, tindex) => {
|
|
|
+ item.totalWeight = calcSum(
|
|
|
+ item.evaluationList.map((item) => item.weight || 0)
|
|
|
+ );
|
|
|
+ });
|
|
|
+ },
|
|
|
checkDataList() {
|
|
|
if (!this.dataList.length) return;
|
|
|
|
|
|
// 目标整体权重
|
|
|
- if (this.dataList.some((item) => !item.totalWeight)) {
|
|
|
- this.$message.error("请设置所有目标的目标整体权重");
|
|
|
- return;
|
|
|
- }
|
|
|
const totalWeight = calcSum(
|
|
|
this.dataList.some((item) => item.totalWeight || 0)
|
|
|
);
|
|
@@ -125,23 +115,6 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- // 目标权重统计
|
|
|
- const unvalidTargets = [];
|
|
|
- this.dataList.forEach((item, tindex) => {
|
|
|
- const totalWeight = calcSum(
|
|
|
- item.evaluationList.map((item) => item.weight || 0)
|
|
|
- );
|
|
|
- if (totalWeight !== 100) {
|
|
|
- unvalidTargets.push(item.courseTargetName);
|
|
|
- }
|
|
|
- });
|
|
|
- if (unvalidTargets.length) {
|
|
|
- this.$message.error(
|
|
|
- `${unvalidTargets.join()}评价方式权重合计不等于100%`
|
|
|
- );
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
return true;
|
|
|
},
|
|
|
async submit() {
|
|
@@ -170,17 +143,17 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (index === lastNo) {
|
|
|
- sums[index] =
|
|
|
- calcSum(this.dataList.map((item) => item.totalWeight || 0)) + "%";
|
|
|
+ sums[index] = calcSum(
|
|
|
+ this.dataList.map((item) => item.totalWeight || 0)
|
|
|
+ );
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- sums[index] =
|
|
|
- calcSum(
|
|
|
- this.dataList.map(
|
|
|
- (item) => item.evaluationList[index - 1].weight || 0
|
|
|
- )
|
|
|
- ) + "%";
|
|
|
+ sums[index] = calcSum(
|
|
|
+ this.dataList.map(
|
|
|
+ (item) => item.evaluationList[index - 1].weight || 0
|
|
|
+ )
|
|
|
+ );
|
|
|
});
|
|
|
return sums;
|
|
|
},
|