|
@@ -49,10 +49,10 @@
|
|
style="width: 130px"
|
|
style="width: 130px"
|
|
>
|
|
>
|
|
<Option
|
|
<Option
|
|
- v-for="(val, key) in ACTION_TYPE"
|
|
|
|
- :key="key"
|
|
|
|
- :value="key * 1"
|
|
|
|
- :label="val"
|
|
|
|
|
|
+ v-for="item in actionTypes"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :value="item.id * 1"
|
|
|
|
+ :label="item.name"
|
|
></Option>
|
|
></Option>
|
|
</Select>
|
|
</Select>
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -71,7 +71,7 @@
|
|
class="btn-form-search"
|
|
class="btn-form-search"
|
|
size="small"
|
|
size="small"
|
|
type="primary"
|
|
type="primary"
|
|
- @click="toPage(1)"
|
|
|
|
|
|
+ @click="toSearch"
|
|
>查询</Button
|
|
>查询</Button
|
|
>
|
|
>
|
|
</FormItem>
|
|
</FormItem>
|
|
@@ -104,8 +104,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { inspectionActionLogPageList, workList } from "@/api";
|
|
|
|
-import { ACTION_TYPE } from "@/constants/enumerate";
|
|
|
|
|
|
+import { inspectionActionLogPageList, workList, logTypeList } from "@/api";
|
|
import { filterObjNull, qsParams } from "@/plugins/utils";
|
|
import { filterObjNull, qsParams } from "@/plugins/utils";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -121,7 +120,9 @@ export default {
|
|
startTime: null,
|
|
startTime: null,
|
|
endTime: null
|
|
endTime: null
|
|
},
|
|
},
|
|
- ACTION_TYPE,
|
|
|
|
|
|
+ actionTypes: [],
|
|
|
|
+ ACTION_TYPE: {},
|
|
|
|
+ SUBJECT_TYPE: {},
|
|
current: 1,
|
|
current: 1,
|
|
size: this.GLOBAL.pageSize,
|
|
size: this.GLOBAL.pageSize,
|
|
total: 0,
|
|
total: 0,
|
|
@@ -144,7 +145,10 @@ export default {
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "科目",
|
|
title: "科目",
|
|
- key: "subject"
|
|
|
|
|
|
+ key: "subject",
|
|
|
|
+ render: (h, param) => {
|
|
|
|
+ return h("div", this.SUBJECT_TYPE[param.row.subject]);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: "准考证号",
|
|
title: "准考证号",
|
|
@@ -159,7 +163,7 @@ export default {
|
|
title: "操作类型",
|
|
title: "操作类型",
|
|
key: "operType",
|
|
key: "operType",
|
|
render: (h, param) => {
|
|
render: (h, param) => {
|
|
- return h("div", ACTION_TYPE[param.row.operType]);
|
|
|
|
|
|
+ return h("div", this.ACTION_TYPE[param.row.operType]);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -184,11 +188,18 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
async initData() {
|
|
async initData() {
|
|
await this.getWorkList();
|
|
await this.getWorkList();
|
|
|
|
+ await this.getActionTypeList();
|
|
this.filter.workId = this.works[0].id;
|
|
this.filter.workId = this.works[0].id;
|
|
this.subjects = this.works[0].subjects;
|
|
this.subjects = this.works[0].subjects;
|
|
this.filter.subject = this.subjects[0].subject;
|
|
this.filter.subject = this.subjects[0].subject;
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
|
|
+ async getActionTypeList() {
|
|
|
|
+ this.actionTypes = await logTypeList();
|
|
|
|
+ this.actionTypes.map(item => {
|
|
|
|
+ this.ACTION_TYPE[item.id] = item.name;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
async getWorkList() {
|
|
async getWorkList() {
|
|
this.works = await workList();
|
|
this.works = await workList();
|
|
},
|
|
},
|
|
@@ -207,6 +218,12 @@ export default {
|
|
this.current = page;
|
|
this.current = page;
|
|
this.getList();
|
|
this.getList();
|
|
},
|
|
},
|
|
|
|
+ toSearch() {
|
|
|
|
+ this.subjects.map(item => {
|
|
|
|
+ this.SUBJECT_TYPE[item.subject] = item.name;
|
|
|
|
+ });
|
|
|
|
+ this.toPage(1);
|
|
|
|
+ },
|
|
workChange() {
|
|
workChange() {
|
|
this.filter.subject = null;
|
|
this.filter.subject = null;
|
|
const curWork = this.works.find(item => item.id === this.filter.workId);
|
|
const curWork = this.works.find(item => item.id === this.filter.workId);
|