|
@@ -4,11 +4,16 @@
|
|
<el-form ref="FilterForm" label-position="left" label-width="85px" inline>
|
|
<el-form ref="FilterForm" label-position="left" label-width="85px" inline>
|
|
<el-form-item label="评阅题目">
|
|
<el-form-item label="评阅题目">
|
|
<el-select
|
|
<el-select
|
|
- v-model="filter.groupQuestion"
|
|
|
|
|
|
+ v-model="filter.groupNumber"
|
|
placeholder="评阅题目"
|
|
placeholder="评阅题目"
|
|
clearable
|
|
clearable
|
|
>
|
|
>
|
|
- <el-option :value="1">班级1</el-option>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="group in questions"
|
|
|
|
+ :key="group.groupNumber"
|
|
|
|
+ :value="group.groupNumber"
|
|
|
|
+ :label="group.groupQuestions"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label-width="0px">
|
|
<el-form-item label-width="0px">
|
|
@@ -19,7 +24,7 @@
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
:disabled="!multipleSelection.length"
|
|
:disabled="!multipleSelection.length"
|
|
- @click="toDone(multipleSelection)"
|
|
|
|
|
|
+ @click="toBatchDone(multipleSelection)"
|
|
>
|
|
>
|
|
批量处理
|
|
批量处理
|
|
</el-button>
|
|
</el-button>
|
|
@@ -36,6 +41,7 @@
|
|
type="selection"
|
|
type="selection"
|
|
width="55"
|
|
width="55"
|
|
align="center"
|
|
align="center"
|
|
|
|
+ @selectable="rowSelectable"
|
|
></el-table-column>
|
|
></el-table-column>
|
|
<el-table-column prop="studentName" label="姓名" min-width="100">
|
|
<el-table-column prop="studentName" label="姓名" min-width="100">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -79,7 +85,7 @@
|
|
<el-button
|
|
<el-button
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
type="text"
|
|
type="text"
|
|
- @click="toDone([scope.row])"
|
|
|
|
|
|
+ @click="toDone(scope.row)"
|
|
>处理</el-button
|
|
>处理</el-button
|
|
>
|
|
>
|
|
</template>
|
|
</template>
|
|
@@ -103,10 +109,12 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { markArbitrationListPage } from "../../api";
|
|
|
|
|
|
+import { markArbitrationListPage, markGroupQuestions } from "../../api";
|
|
|
|
+import markMinxin from "../../markMinxin";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "mark-detail-arbitration",
|
|
name: "mark-detail-arbitration",
|
|
|
|
+ mixins: [markMinxin],
|
|
props: {
|
|
props: {
|
|
baseInfo: {
|
|
baseInfo: {
|
|
type: Object,
|
|
type: Object,
|
|
@@ -118,19 +126,35 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
filter: {
|
|
filter: {
|
|
- groupQuestion: "",
|
|
|
|
|
|
+ groupNumber: "",
|
|
},
|
|
},
|
|
current: 1,
|
|
current: 1,
|
|
size: this.GLOBAL.pageSize,
|
|
size: this.GLOBAL.pageSize,
|
|
total: 0,
|
|
total: 0,
|
|
dataList: [],
|
|
dataList: [],
|
|
multipleSelection: [],
|
|
multipleSelection: [],
|
|
|
|
+ questions: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ computed: {
|
|
|
|
+ selectGroupNumber() {
|
|
|
|
+ return this.multipleSelection[0]?.groupNumber;
|
|
|
|
+ },
|
|
|
|
+ },
|
|
mounted() {
|
|
mounted() {
|
|
|
|
+ this.filter.groupNumber = this.$ls.get("preset-groupNumber", "");
|
|
|
|
+ this.$ls.remove("preset-groupNumber");
|
|
|
|
+ this.getQuestions();
|
|
this.toPage(1);
|
|
this.toPage(1);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async getQuestions() {
|
|
|
|
+ const res = await markGroupQuestions({
|
|
|
|
+ examId: this.baseInfo.examId,
|
|
|
|
+ paperNumber: this.baseInfo.paperNumber,
|
|
|
|
+ });
|
|
|
|
+ this.questions = res || [];
|
|
|
|
+ },
|
|
async getList() {
|
|
async getList() {
|
|
const datas = {
|
|
const datas = {
|
|
...this.filter,
|
|
...this.filter,
|
|
@@ -150,12 +174,34 @@ export default {
|
|
search() {
|
|
search() {
|
|
this.toPage(1);
|
|
this.toPage(1);
|
|
},
|
|
},
|
|
|
|
+ rowSelectable(row) {
|
|
|
|
+ return (
|
|
|
|
+ !this.selectGroupNumber || this.selectGroupNumber === row.groupNumber
|
|
|
|
+ );
|
|
|
|
+ },
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
this.multipleSelection = val;
|
|
this.multipleSelection = val;
|
|
},
|
|
},
|
|
- toDone(data) {
|
|
|
|
- // TODO: 处理
|
|
|
|
- console.log(data);
|
|
|
|
|
|
+ toDone(row) {
|
|
|
|
+ this.toMarkArbitrate({ arbitrateId: row.id });
|
|
|
|
+ },
|
|
|
|
+ toBatchDone() {
|
|
|
|
+ if (!this.multipleSelection.length) return;
|
|
|
|
+
|
|
|
|
+ if (
|
|
|
|
+ this.multipleSelection.some(
|
|
|
|
+ (item) => item.groupNumber !== this.selectGroupNumber
|
|
|
|
+ )
|
|
|
|
+ ) {
|
|
|
|
+ this.$message.error("只能批量处理同一分组的数据");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.toMarkArbitrate({
|
|
|
|
+ examId: this.baseInfo.examId,
|
|
|
|
+ paperNumber: this.baseInfo.paperNumber,
|
|
|
|
+ groupNumber: this.selectGroupNumber,
|
|
|
|
+ });
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|