|
@@ -1,6 +1,14 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
- <list-frame title="作业列表页" @query="search" :total="total" :filter="filFields" :needPag="false" @add="$router.push({ path: '/work/detail' })">
|
|
|
+ <list-frame
|
|
|
+ title="作业列表页"
|
|
|
+ @query="search"
|
|
|
+ :total="total"
|
|
|
+ :needFilter="false"
|
|
|
+ :needPag="false"
|
|
|
+ @add="$router.push({ path: '/work/detail' })"
|
|
|
+ :returns="toReturns"
|
|
|
+ >
|
|
|
<template #options="{item}">
|
|
|
<el-option v-for="(item, index) in subjectList" :key="index" :label="item.name" :value="item.code"></el-option>
|
|
|
</template>
|
|
@@ -56,14 +64,18 @@ export default {
|
|
|
],
|
|
|
list: [],
|
|
|
subjectList: [],
|
|
|
- filFields: [{ label: '科目', model: 'code', type: 'select' }],
|
|
|
+ // filFields: [{ label: '科目', model: 'code', type: 'select' }],
|
|
|
total: 0,
|
|
|
}),
|
|
|
created() {
|
|
|
this.getOtherList();
|
|
|
this.search();
|
|
|
},
|
|
|
- computed: {},
|
|
|
+ computed: {
|
|
|
+ code() {
|
|
|
+ return this.$route.query.code;
|
|
|
+ },
|
|
|
+ },
|
|
|
methods: {
|
|
|
...mapActions(['query', 'delete']),
|
|
|
...mapSubject({ subject: 'query' }),
|
|
@@ -80,6 +92,9 @@ export default {
|
|
|
toDocument({ data }) {
|
|
|
this.$router.push({ path: '/work/look', query: { id: data.id } });
|
|
|
},
|
|
|
+ toReturns() {
|
|
|
+ this.$router.push({ path: '/subject/index' });
|
|
|
+ },
|
|
|
async toDelete({ data }) {
|
|
|
const res = await this.delete(data.id);
|
|
|
this.$checkRes(res, '删除成功', '删除失败');
|