-
+
- {{
+ {{
item.className
}}
diff --git a/src/views/basic/setUp/student.vue b/src/views/basic/setUp/student.vue
index e623a13..af8f56a 100644
--- a/src/views/basic/setUp/student.vue
+++ b/src/views/basic/setUp/student.vue
@@ -604,10 +604,14 @@ export default {
}
},
async removeStu(obj, index, $event) {
+ let query = {};
+ if (obj.classList.length) {
+ query.classId = obj.classList[0].id;
+ }
const { data, status, info } = await this.$request.delStudent({
type: this.query.classType,
studentId: obj.id,
- classId: this.query.classId,
+ ...query,
});
if (status === 0) {
this.$message.success("删除成功");
diff --git a/src/views/basic/test/components/scoreSet.vue b/src/views/basic/test/components/scoreSet.vue
index 538a511..79693de 100644
--- a/src/views/basic/test/components/scoreSet.vue
+++ b/src/views/basic/test/components/scoreSet.vue
@@ -43,26 +43,32 @@
+ >
+ {{ scoped.row.all }}
+
-
+ > -->
+ {{ scoped.row.object }}
+
-
+ > -->
+ {{ scoped.row.subject }}
@@ -82,7 +88,8 @@
$event,
question.questionScore,
scoped.row.scoreMap,
- question.questionId
+ question.questionId,
+ scoped.row
)
"
v-model="scoped.row.scoreMap[question.questionId]"
@@ -145,22 +152,73 @@ export default {
questionList: [],
cNum: cNum,
tableMaxHeight: 300,
+ isSetScore: true,
};
},
watch: {
diaScoreSet: {
handler: function (nVal) {
if (nVal) {
+ this.isSetScore = true;
this._QueryData();
}
},
},
},
methods: {
- setScore(val, max, obj, questionId) {
+ setScore(val, max, obj, questionId, rowData) {
if (max && Number(val) > Number(max)) {
obj[questionId] = max;
}
+ if (!this.isSetScore) {
+ let { score, object, subject } = this.getScore(rowData);
+ rowData.all = score;
+ rowData.object = object;
+ rowData.subject = subject;
+ }
+ },
+ //计算总分
+ setAllScore(obj) {
+ let { score } = this.getScore(obj);
+ return score;
+ },
+ //计算客观总分
+ setObjectScore(obj) {
+ let { object } = this.getScore(obj);
+ return object;
+ },
+ //计算主观总分
+ setSubjectScore(obj) {
+ let { subject } = this.getScore(obj);
+ return subject;
+ },
+ getScore(obj) {
+ let score = 0;
+ let subject = 0;
+ let object = 0;
+ this.questionList.map((question) => {
+ let keys = question.questionId;
+ if (!obj.scoreMap[keys]) {
+ if (obj.scoreMap[keys] == 0) {
+ obj.scoreMap[keys] = 0;
+ } else {
+ obj.scoreMap[keys] = "";
+ }
+ } else {
+ let num = Number(obj.scoreMap[keys]);
+ obj.scoreMap[keys] = num;
+ if (num > 0) {
+ this.isSetScore = false;
+ }
+ score += num;
+ if (question.questionType == 5) {
+ subject += num;
+ } else {
+ object += num;
+ }
+ }
+ });
+ return { score, subject, object };
},
closeScoreSet() {
this.$emit("closeScoreSet");
@@ -205,12 +263,9 @@ export default {
} else {
let num = Number(item.scoreMap[keys]);
item.scoreMap[keys] = num;
- // item.score += num
- // if (question.questionType == 5) {
- // item.subjectiveScore += num
- // } else {
- // item.objectiveScore += num
- // }
+ if (num > 0) {
+ this.isSetScore = false;
+ }
}
});
diff --git a/vue.config.js b/vue.config.js
index 4cd1bb7..bf84d83 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -23,8 +23,8 @@ module.exports = {
proxy: {
"/": {
// target:"http://ezquiz.sunvotecloud.cn",
- // target:"http://121.40.127.171",
- target:"http://192.168.3.221:8080",
+ // target:"http://192.168.3.221:8080",
+ target:"http://121.40.127.171",
changeOrigin: true,
ws:true,
},