|
@@ -37,7 +37,7 @@
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
<FormItem>
|
|
<FormItem>
|
|
- <Select v-model="filter.areaCode" placeholder="考区">
|
|
|
|
|
|
+ <Select v-model="filter.areaCode" placeholder="选择考区">
|
|
<Option
|
|
<Option
|
|
v-for="area in areas"
|
|
v-for="area in areas"
|
|
:key="area.id"
|
|
:key="area.id"
|
|
@@ -76,6 +76,20 @@
|
|
></Option>
|
|
></Option>
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
|
|
+ <FormItem>
|
|
|
|
+ <Select
|
|
|
|
+ v-model="filter.scanUserId"
|
|
|
|
+ placeholder="选择采集账号"
|
|
|
|
+ clearable
|
|
|
|
+ >
|
|
|
|
+ <Option
|
|
|
|
+ v-for="user in scanUsers"
|
|
|
|
+ :key="user.id"
|
|
|
|
+ :value="user.id"
|
|
|
|
+ :label="user.loginName"
|
|
|
|
+ ></Option>
|
|
|
|
+ </Select>
|
|
|
|
+ </FormItem>
|
|
<FormItem>
|
|
<FormItem>
|
|
<Input
|
|
<Input
|
|
v-model.trim="filter.studentName"
|
|
v-model.trim="filter.studentName"
|
|
@@ -93,16 +107,23 @@
|
|
></Option>
|
|
></Option>
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
- <FormItem>
|
|
|
|
- <Button
|
|
|
|
- class="btn-form-search"
|
|
|
|
- size="small"
|
|
|
|
- type="primary"
|
|
|
|
- @click="toPage(1)"
|
|
|
|
- >查询</Button
|
|
|
|
- >
|
|
|
|
- </FormItem>
|
|
|
|
</Form>
|
|
</Form>
|
|
|
|
+ <div class="box-justify">
|
|
|
|
+ <Button
|
|
|
|
+ type="success"
|
|
|
|
+ shape="circle"
|
|
|
|
+ icon="upload-white icon"
|
|
|
|
+ @click="toExportMark"
|
|
|
|
+ >导出标记试卷</Button
|
|
|
|
+ >
|
|
|
|
+ <Button
|
|
|
|
+ size="small"
|
|
|
|
+ class="btn-form-search"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="toPage(1)"
|
|
|
|
+ >查询</Button
|
|
|
|
+ >
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<image-action-list
|
|
<image-action-list
|
|
@@ -139,7 +160,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { workList, areaList, paperPageList } from "@/api";
|
|
|
|
|
|
+import { workList, areaList, paperPageList, clientUserQuery } from "@/api";
|
|
import { SORT_RULE_TYPE, CAFA_EXCEPTION_TYPE } from "@/constants/enumerate";
|
|
import { SORT_RULE_TYPE, CAFA_EXCEPTION_TYPE } from "@/constants/enumerate";
|
|
import ImageActionList from "../main/components/ImageActionList";
|
|
import ImageActionList from "../main/components/ImageActionList";
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
import SimpleImagePreview from "@/components/SimpleImagePreview";
|
|
@@ -151,17 +172,18 @@ export default {
|
|
return {
|
|
return {
|
|
filter: {
|
|
filter: {
|
|
workId: null,
|
|
workId: null,
|
|
- subject: null,
|
|
|
|
|
|
+ studentName: "",
|
|
areaCode: null,
|
|
areaCode: null,
|
|
startNumber: null,
|
|
startNumber: null,
|
|
endNumber: null,
|
|
endNumber: null,
|
|
|
|
+ subject: null,
|
|
|
|
+ sortBy: "1",
|
|
|
|
+ scanUserId: "",
|
|
isManual: null,
|
|
isManual: null,
|
|
- missing: null,
|
|
|
|
- studentName: "",
|
|
|
|
- sortBy: "1"
|
|
|
|
|
|
+ missing: null
|
|
},
|
|
},
|
|
- paperType: "2",
|
|
|
|
- selectPaperType: "0",
|
|
|
|
|
|
+ paperType: "9",
|
|
|
|
+ confirmPaperType: "9",
|
|
SORT_RULE_TYPE,
|
|
SORT_RULE_TYPE,
|
|
CAFA_EXCEPTION_TYPE: {},
|
|
CAFA_EXCEPTION_TYPE: {},
|
|
current: 1,
|
|
current: 1,
|
|
@@ -171,6 +193,7 @@ export default {
|
|
papers: [],
|
|
papers: [],
|
|
works: [],
|
|
works: [],
|
|
subjects: [],
|
|
subjects: [],
|
|
|
|
+ scanUsers: [],
|
|
areas: [],
|
|
areas: [],
|
|
curPaper: {},
|
|
curPaper: {},
|
|
curPaperIndex: 0
|
|
curPaperIndex: 0
|
|
@@ -178,12 +201,22 @@ export default {
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
imageListActions() {
|
|
imageListActions() {
|
|
- return this.selectPaperType === "1" ? [] : ["rotate", "absent"];
|
|
|
|
|
|
+ return this.confirmPaperType === "1"
|
|
|
|
+ ? ["mark"]
|
|
|
|
+ : ["rotate", "absent", "mark"];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
- this.CAFA_EXCEPTION_TYPE = { ...CAFA_EXCEPTION_TYPE, 2: "全部" };
|
|
|
|
|
|
+ this.CAFA_EXCEPTION_TYPE = {
|
|
|
|
+ ...CAFA_EXCEPTION_TYPE,
|
|
|
|
+ 8: "已标记",
|
|
|
|
+ 9: "全部"
|
|
|
|
+ };
|
|
this.initData();
|
|
this.initData();
|
|
|
|
+ document.addEventListener("keydown", this.keyEvent);
|
|
|
|
+ },
|
|
|
|
+ beforeDestroy() {
|
|
|
|
+ document.removeEventListener("keydown", this.keyEvent);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
async initData() {
|
|
async initData() {
|
|
@@ -192,7 +225,34 @@ export default {
|
|
this.workChange();
|
|
this.workChange();
|
|
await this.getAreaList();
|
|
await this.getAreaList();
|
|
this.filter.areaCode = this.areas[0].areaCode;
|
|
this.filter.areaCode = this.areas[0].areaCode;
|
|
- this.getList();
|
|
|
|
|
|
+ this.getScanUsers();
|
|
|
|
+ this.toPage(1);
|
|
|
|
+ },
|
|
|
|
+ keyEvent(e) {
|
|
|
|
+ if (!e.altKey && !e.shiftKey && !e.repeat) {
|
|
|
|
+ // 左右键切换分页
|
|
|
|
+ if (e.code === "ArrowLeft") {
|
|
|
|
+ e.preventDefault();
|
|
|
|
+ if (e.ctrlKey) {
|
|
|
|
+ this.toPage(1);
|
|
|
|
+ } else {
|
|
|
|
+ if (this.current === 1) return;
|
|
|
|
+ this.toPage(this.current - 1);
|
|
|
|
+ }
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (e.code === "ArrowRight") {
|
|
|
|
+ e.preventDefault();
|
|
|
|
+ if (e.ctrlKey) {
|
|
|
|
+ this.toPage(this.totalPage);
|
|
|
|
+ } else {
|
|
|
|
+ if (this.current === this.totalPage) return;
|
|
|
|
+ this.toPage(this.current + 1);
|
|
|
|
+ }
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
},
|
|
},
|
|
async getWorkList() {
|
|
async getWorkList() {
|
|
this.works = await workList();
|
|
this.works = await workList();
|
|
@@ -213,6 +273,10 @@ export default {
|
|
this.filter.areaCode = this.areas[0].areaCode;
|
|
this.filter.areaCode = this.areas[0].areaCode;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async getScanUsers() {
|
|
|
|
+ const data = await clientUserQuery(this.filter.workId);
|
|
|
|
+ this.scanUsers = data;
|
|
|
|
+ },
|
|
async getList() {
|
|
async getList() {
|
|
const datas = {
|
|
const datas = {
|
|
...this.filter,
|
|
...this.filter,
|
|
@@ -222,13 +286,17 @@ export default {
|
|
this.papers = [];
|
|
this.papers = [];
|
|
const data = await paperPageList(datas);
|
|
const data = await paperPageList(datas);
|
|
this.papers = data.data.map(paper => {
|
|
this.papers = data.data.map(paper => {
|
|
|
|
+ const title = paper.manual
|
|
|
|
+ ? `${paper.examNumber} ${paper.studentName}`
|
|
|
|
+ : paper.examNumber;
|
|
return {
|
|
return {
|
|
id: paper.id,
|
|
id: paper.id,
|
|
key: this.$randomCode(),
|
|
key: this.$randomCode(),
|
|
- title: paper.examNumber,
|
|
|
|
|
|
+ title,
|
|
imgSrc: paper.imgSrc,
|
|
imgSrc: paper.imgSrc,
|
|
thumbSrc: paper.thumbSrc,
|
|
thumbSrc: paper.thumbSrc,
|
|
missing: paper.missing,
|
|
missing: paper.missing,
|
|
|
|
+ mark: paper.adminMark,
|
|
stage: paper.stage,
|
|
stage: paper.stage,
|
|
styles: {},
|
|
styles: {},
|
|
deg: 0
|
|
deg: 0
|
|
@@ -236,18 +304,22 @@ export default {
|
|
});
|
|
});
|
|
this.total = data.totalCount;
|
|
this.total = data.totalCount;
|
|
this.totalPage = data.pageCount;
|
|
this.totalPage = data.pageCount;
|
|
- this.selectPaperType = this.paperType;
|
|
|
|
|
|
+ this.confirmPaperType = this.paperType;
|
|
},
|
|
},
|
|
toPage(page) {
|
|
toPage(page) {
|
|
|
|
+ if (!this.filter.subject || !this.filter.areaCode) {
|
|
|
|
+ this.$Message.error("请选择科目和考区!");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.confirmPaperType = this.paperType;
|
|
this.current = page;
|
|
this.current = page;
|
|
- this.papers = [];
|
|
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
workChange() {
|
|
workChange() {
|
|
this.filter.subject = null;
|
|
this.filter.subject = null;
|
|
this.filter.areaCode = null;
|
|
this.filter.areaCode = null;
|
|
const curWork = this.works.find(item => item.id === this.filter.workId);
|
|
const curWork = this.works.find(item => item.id === this.filter.workId);
|
|
- this.subjects = curWork.subjects;
|
|
|
|
|
|
+ this.subjects = curWork.subjects.filter(item => item.enable);
|
|
this.filter.subject = this.subjects[0].subject;
|
|
this.filter.subject = this.subjects[0].subject;
|
|
this.subjectChange();
|
|
this.subjectChange();
|
|
},
|
|
},
|
|
@@ -258,16 +330,22 @@ export default {
|
|
this.getAreaList();
|
|
this.getAreaList();
|
|
},
|
|
},
|
|
typeChange() {
|
|
typeChange() {
|
|
- if (this.paperType === "1") {
|
|
|
|
- this.filter.isManual = true;
|
|
|
|
- this.filter.missing = null;
|
|
|
|
- } else if (this.paperType === "0") {
|
|
|
|
- this.filter.isManual = null;
|
|
|
|
- this.filter.missing = true;
|
|
|
|
- } else {
|
|
|
|
- this.filter.isManual = null;
|
|
|
|
- this.filter.missing = null;
|
|
|
|
- }
|
|
|
|
|
|
+ const typeToField = {
|
|
|
|
+ 0: "missing",
|
|
|
|
+ 1: "isManual",
|
|
|
|
+ 2: "isRelate",
|
|
|
|
+ 8: "isMark"
|
|
|
|
+ };
|
|
|
|
+ Object.values(typeToField).forEach(val => {
|
|
|
|
+ this.filter[val] = typeToField[this.paperType] === val ? true : null;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ toExportMark() {
|
|
|
|
+ window.open(
|
|
|
|
+ this.urlAddAuthor(
|
|
|
|
+ `${this.GLOBAL.domain}/api/export/paper/${this.filter.workId}/mark`
|
|
|
|
+ )
|
|
|
|
+ );
|
|
},
|
|
},
|
|
// paper view
|
|
// paper view
|
|
toReview(index) {
|
|
toReview(index) {
|