Pārlūkot izejas kodu

更新更新问卷状态

wuhongyuq 5 gadi atpakaļ
vecāks
revīzija
c323959f8c
2 mainītis faili ar 35 papildinājumiem un 39 dzēšanām
  1. 9 11
      src/views/certificaate/index.vue
  2. 26 28
      src/views/questionstate/index.vue

+ 9 - 11
src/views/certificaate/index.vue

@@ -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: '/certificaate/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>
@@ -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',
@@ -113,12 +113,10 @@ export default {
     total: 0,
   }),
 
-  created() {
-    this.search();
-  },
+  created() {},
   computed: {},
   methods: {
-    ...mapActions(['query', 'delete']),
+    // ...mapActions(['query', 'delete']),
     // async search({ skip = 0, limit = 10, ...info } = {}) {
     //   const res = await this.query({ skip, limit, ...info });
     //   if (this.$checkRes(res)) {
@@ -130,12 +128,12 @@ export default {
       this.$router.push({ path: '/certificaate/look', query: { id: data.id } });
     },
     toEdit({ data }) {
-      this.$router.push({ path: '/questionnaire/detail', query: { id: data.id } });
+      this.$router.push({ path: '/certificaate/detail', query: { id: data.id } });
     },
     async toDelete({ data }) {
-      const res = await this.delete(data.id);
-      this.$checkRes(res, '删除成功', '删除失败');
-      this.search();
+      // const res = await this.delete(data.id);
+      // this.$checkRes(res, '删除成功', '删除失败');
+      // this.search();
     },
   },
 };

+ 26 - 28
src/views/questionstate/index.vue

@@ -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>