|
@@ -48,18 +48,24 @@
|
|
|
<span>{{ page.current }}</span
|
|
|
><span>/</span><span>{{ page.totalPage }}</span>
|
|
|
</div>
|
|
|
- <div class="marker-page" slot="content">
|
|
|
- <div class="marker-page-set">
|
|
|
- <span>页面跳转:</span>
|
|
|
+ <div class="header-filter-body dark-mark" slot="content">
|
|
|
+ <div class="filter-part-body">
|
|
|
+ <span class="filter-label">页面跳转:</span>
|
|
|
<InputNumber
|
|
|
- size="small"
|
|
|
+ class="filter-input"
|
|
|
:min="1"
|
|
|
:max="page.totalPage"
|
|
|
:step="1"
|
|
|
:precision="0"
|
|
|
v-model="pageNo"
|
|
|
></InputNumber>
|
|
|
- <div class="marker-page-btn" @click="pageNoSet">跳转</div>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ class="filter-btn"
|
|
|
+ @click="pageNoSet"
|
|
|
+ >跳转</Button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</Poptip>
|
|
@@ -110,6 +116,76 @@
|
|
|
</div>
|
|
|
全选
|
|
|
</div>
|
|
|
+ <Poptip
|
|
|
+ v-if="IS_MARK_LEADER"
|
|
|
+ popper-class="marker-popper"
|
|
|
+ placement="bottom"
|
|
|
+ trigger="click"
|
|
|
+ transfer
|
|
|
+ >
|
|
|
+ <div class="header-part header-filter">
|
|
|
+ 筛选 <Icon type="ios-arrow-down"></Icon>
|
|
|
+ </div>
|
|
|
+ <div class="header-filter-body dark-mark" slot="content">
|
|
|
+ <!-- 查询标记 -->
|
|
|
+ <div class="filter-part">
|
|
|
+ <h4 class="filter-part-title">查询标记试卷</h4>
|
|
|
+ <div class="filter-part-body">
|
|
|
+ <Select
|
|
|
+ class="filter-select"
|
|
|
+ v-model="markFilter.markerId"
|
|
|
+ placeholder="评卷员"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="item in markers"
|
|
|
+ :key="item.key"
|
|
|
+ :value="item.key"
|
|
|
+ :label="item.val"
|
|
|
+ ></Option>
|
|
|
+ </Select>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ class="filter-btn"
|
|
|
+ @click="searchMarkFilter"
|
|
|
+ >查询</Button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <!-- 查询密号 -->
|
|
|
+ <div class="filter-part">
|
|
|
+ <h4 class="filter-part-title">密号查询试卷</h4>
|
|
|
+ <div class="filter-part-body">
|
|
|
+ <Select
|
|
|
+ class="filter-select"
|
|
|
+ v-model="codeFilter.codeType"
|
|
|
+ placeholder="密号类型"
|
|
|
+ >
|
|
|
+ <Option
|
|
|
+ v-for="item in codeTypes"
|
|
|
+ :key="item.key"
|
|
|
+ :value="item.key"
|
|
|
+ :label="item.val"
|
|
|
+ ></Option>
|
|
|
+ </Select>
|
|
|
+ <Input
|
|
|
+ class="filter-input"
|
|
|
+ v-model.trim="codeFilter.code"
|
|
|
+ placeholder="输入密号"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ </Input>
|
|
|
+ <Button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ class="filter-btn"
|
|
|
+ @click="searchCodeFilter"
|
|
|
+ >查询</Button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </Poptip>
|
|
|
<div class="header-part header-step">
|
|
|
<Dropdown
|
|
|
placement="bottom"
|
|
@@ -190,6 +266,7 @@
|
|
|
import { mapState, mapMutations } from "vuex";
|
|
|
import { areaList, logout } from "@/api";
|
|
|
import ResetPwd from "@/modules/login/ResetPwd";
|
|
|
+import { CODE_TYPE } from "@/constants/enumerate";
|
|
|
|
|
|
export default {
|
|
|
name: "marker-header",
|
|
@@ -218,7 +295,16 @@ export default {
|
|
|
pageVisible: false,
|
|
|
pageSizeList: [2, 3, 4, 6, 8, 9, 10, 12, 15, 16, 20, 24],
|
|
|
pageNo: 1,
|
|
|
- allSelected: false
|
|
|
+ allSelected: false,
|
|
|
+ codeTypes: [],
|
|
|
+ codeFilter: {
|
|
|
+ codeType: "examNumber",
|
|
|
+ code: ""
|
|
|
+ },
|
|
|
+ markers: [],
|
|
|
+ markFilter: {
|
|
|
+ markerId: ""
|
|
|
+ }
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -245,6 +331,15 @@ export default {
|
|
|
this.filter.subject = subjectId[1];
|
|
|
this.getAreaList();
|
|
|
document.addEventListener("keydown", this.keyEvent);
|
|
|
+
|
|
|
+ this.codeTypes = Object.entries(CODE_TYPE)
|
|
|
+ .map(([key, val]) => {
|
|
|
+ return {
|
|
|
+ key,
|
|
|
+ val
|
|
|
+ };
|
|
|
+ })
|
|
|
+ .filter(item => item.key !== "examNumber");
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations("marker", ["setPage", "setAreas"]),
|
|
@@ -264,10 +359,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
keyEvent(e) {
|
|
|
- e.preventDefault();
|
|
|
if (!e.altKey && !e.shiftKey && !e.repeat) {
|
|
|
// 左右键切换分页
|
|
|
if (e.code === "ArrowLeft") {
|
|
|
+ e.preventDefault();
|
|
|
if (e.ctrlKey) {
|
|
|
this.toFirstPage();
|
|
|
} else {
|
|
@@ -277,6 +372,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (e.code === "ArrowRight") {
|
|
|
+ e.preventDefault();
|
|
|
if (e.ctrlKey) {
|
|
|
this.toLastPage();
|
|
|
} else {
|
|
@@ -344,6 +440,20 @@ export default {
|
|
|
this.pageVisible = false;
|
|
|
this.$emit("page-set-change", this.page);
|
|
|
},
|
|
|
+ searchCodeFilter() {
|
|
|
+ if (!this.codeFilter.code || !this.codeFilter.codeType) {
|
|
|
+ this.$Message.error("请设置密号类型和密号!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$emit("on-code-search", this.codeFilter);
|
|
|
+ },
|
|
|
+ searchMarkFilter() {
|
|
|
+ if (!this.markFilter.markerId) {
|
|
|
+ this.$Message.error("请选择评卷员!");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$emit("on-mark-search", this.markFilter);
|
|
|
+ },
|
|
|
userClick(name) {
|
|
|
if (!name) return;
|
|
|
this[name]();
|