|
@@ -15,28 +15,36 @@
|
|
|
:key="item.mainNumber"
|
|
|
class="board-question"
|
|
|
>
|
|
|
- <div class="board-question-head"></div>
|
|
|
+ <div class="board-question-head">第{{ item.mainNumber }}大题</div>
|
|
|
<a-table
|
|
|
:dataSource="item.subQuestions"
|
|
|
:columns="columns"
|
|
|
:showHeader="false"
|
|
|
- />
|
|
|
+ :pagination="false"
|
|
|
+ size="small"
|
|
|
+ >
|
|
|
+ </a-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="board-footer">
|
|
|
- <qm-button class="board-goback" :clickTimeout="300" @click="openModal">
|
|
|
+ <qm-button
|
|
|
+ class="board-goback"
|
|
|
+ :clickTimeout="300"
|
|
|
+ block
|
|
|
+ type="primary"
|
|
|
+ @click="openModal"
|
|
|
+ >
|
|
|
打回
|
|
|
</qm-button>
|
|
|
</div>
|
|
|
|
|
|
<!-- 打回原因 -->
|
|
|
- <qm-dialog
|
|
|
- v-if="rejectModalVisible"
|
|
|
- top="10vh"
|
|
|
- width="500px"
|
|
|
- height="400px"
|
|
|
+
|
|
|
+ <a-modal
|
|
|
+ v-model:visible="rejectModalVisible"
|
|
|
title="打回原因"
|
|
|
- @close="closeModal"
|
|
|
+ top="10vh"
|
|
|
+ :footer="null"
|
|
|
>
|
|
|
<a-form
|
|
|
ref="formRef"
|
|
@@ -48,18 +56,21 @@
|
|
|
<a-textarea
|
|
|
v-model:value="formState.rejectReason"
|
|
|
showCount
|
|
|
+ :autosize="{ minRows: 2, maxRows: 6 }"
|
|
|
:maxlength="100"
|
|
|
/>
|
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item>
|
|
|
- <a-button type="primary" htmlType="submit">确定</a-button>
|
|
|
+ <a-button type="primary" :loading="loading" htmlType="submit"
|
|
|
+ >确定</a-button
|
|
|
+ >
|
|
|
<a-button style="margin-left: 10px" @click="closeModal"
|
|
|
>取消</a-button
|
|
|
>
|
|
|
</a-form-item>
|
|
|
</a-form>
|
|
|
- </qm-dialog>
|
|
|
+ </a-modal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -73,6 +84,7 @@ import { doRejectTask } from "@/api/markPage";
|
|
|
|
|
|
interface SubQuestion {
|
|
|
subNumber: string;
|
|
|
+ subName: string;
|
|
|
score: number;
|
|
|
}
|
|
|
|
|
@@ -86,8 +98,8 @@ const questions = ref<QuestionGroupItem[]>([]);
|
|
|
const columns = [
|
|
|
{
|
|
|
title: "小题",
|
|
|
- dataIndex: "subNumber",
|
|
|
- key: "subNumber",
|
|
|
+ dataIndex: "subName",
|
|
|
+ key: "subName",
|
|
|
},
|
|
|
{
|
|
|
title: "得分",
|
|
@@ -110,13 +122,14 @@ function parseQuestions() {
|
|
|
};
|
|
|
}
|
|
|
|
|
|
- questionList[q.mainNumber].push({
|
|
|
+ questionList[q.mainNumber].subQuestions.push({
|
|
|
subNumber: q.subNumber,
|
|
|
+ subName: `${q.mainNumber}-${q.subNumber}`,
|
|
|
score: q.score,
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- questions.value = questionList.filter((item) => !item);
|
|
|
+ questions.value = questionList.filter((item) => !!item);
|
|
|
}
|
|
|
|
|
|
interface FormState {
|
|
@@ -139,11 +152,18 @@ function openModal() {
|
|
|
rejectModalVisible.value = true;
|
|
|
}
|
|
|
|
|
|
+const loading = ref(false);
|
|
|
+
|
|
|
async function toReject(values: FormState) {
|
|
|
+ if (loading.value) return;
|
|
|
+ loading.value = true;
|
|
|
+
|
|
|
const res = await doRejectTask({
|
|
|
id: store.currentTask.taskId,
|
|
|
rejectReason: values.rejectReason,
|
|
|
}).catch(() => false);
|
|
|
+
|
|
|
+ loading.value = false;
|
|
|
const mkey = "reject_task_key";
|
|
|
|
|
|
if (!res) return;
|
|
@@ -158,6 +178,7 @@ async function toReject(values: FormState) {
|
|
|
key: mkey,
|
|
|
duration: 2,
|
|
|
});
|
|
|
+ closeModal();
|
|
|
setTimeout(() => {
|
|
|
window.close();
|
|
|
}, 3000);
|