|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div id="index">
|
|
|
- <list-frame title="问卷状态页" @query="search" :total="total" :filter="filFields" @add="$router.push({ path: '/questionnaire/detail' })">
|
|
|
+ <list-frame title="问卷状态页" :total="total" :filter="filFields" @add="$router.push({ path: '/questionnaire/detail' })">
|
|
|
<template #options="{item}">
|
|
|
<template v-if="item.model == 'class'">
|
|
|
<el-option v-for="(item, index) in list" :key="index" :value="item.label"></el-option>
|
|
@@ -10,7 +10,7 @@
|
|
|
</template>
|
|
|
</template>
|
|
|
|
|
|
- <data-table :fields="fields" :data="index" :opera="opera" @edit="toEdit" @delete="toDelete"></data-table>
|
|
|
+ <data-table :fields="fields" :data="index" :opera="opera"></data-table>
|
|
|
</list-frame>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -18,8 +18,8 @@
|
|
|
<script>
|
|
|
import listFrame from '@frame/layout/admin/list-frame';
|
|
|
import dataTable from '@frame/components/data-table';
|
|
|
-import { createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions } = createNamespacedHelpers('questionnaire');
|
|
|
+// import { createNamespacedHelpers } from 'vuex';
|
|
|
+// const { mapActions } = createNamespacedHelpers('questionnaire');
|
|
|
|
|
|
export default {
|
|
|
name: 'index',
|
|
@@ -50,11 +50,11 @@ export default {
|
|
|
// icon: 'el-icon-edit',
|
|
|
// method: 'edit',
|
|
|
// },
|
|
|
- {
|
|
|
- label: '删除',
|
|
|
- icon: 'el-icon-delete',
|
|
|
- method: 'delete',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // label: '删除',
|
|
|
+ // icon: 'el-icon-delete',
|
|
|
+ // method: 'delete',
|
|
|
+ // },
|
|
|
],
|
|
|
fields: [
|
|
|
{ label: '期数', prop: 'term' },
|
|
@@ -106,27 +106,25 @@ export default {
|
|
|
total: 0,
|
|
|
}),
|
|
|
|
|
|
- created() {
|
|
|
- this.search();
|
|
|
- },
|
|
|
+ created() {},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
- ...mapActions(['query', 'delete']),
|
|
|
- async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
- const res = await this.query({ skip, limit, ...info });
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.$set(this, `list`, res.data);
|
|
|
- this.$set(this, `total`, res.total);
|
|
|
- }
|
|
|
- },
|
|
|
- toEdit({ data }) {
|
|
|
- this.$router.push({ path: '/questionnaire/detail', query: { id: data.id } });
|
|
|
- },
|
|
|
- async toDelete({ data }) {
|
|
|
- const res = await this.delete(data.id);
|
|
|
- this.$checkRes(res, '删除成功', '删除失败');
|
|
|
- this.search();
|
|
|
- },
|
|
|
+ // ...mapActions(['query', 'delete']),
|
|
|
+ // async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ // const res = await this.query({ skip, limit, ...info });
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // this.$set(this, `list`, res.data);
|
|
|
+ // this.$set(this, `total`, res.total);
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // toEdit({ data }) {
|
|
|
+ // this.$router.push({ path: '/questionnaire/detail', query: { id: data.id } });
|
|
|
+ // },
|
|
|
+ // async toDelete({ data }) {
|
|
|
+ // const res = await this.delete(data.id);
|
|
|
+ // this.$checkRes(res, '删除成功', '删除失败');
|
|
|
+ // this.search();
|
|
|
+ //},
|
|
|
},
|
|
|
};
|
|
|
</script>
|