|
@@ -0,0 +1,163 @@
|
|
|
+<template>
|
|
|
+ <div id="index">
|
|
|
+ <list-frame title="问卷状态页" @query="search" :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>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.model == 'batch'">
|
|
|
+ <el-option v-for="(item, index) in lists" :key="index" :value="item.label"></el-option>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <data-table :fields="fields" :data="index" :opera="opera"> </data-table>
|
|
|
+ <!-- <data-table :fields="field" :data="index" :opera="opera"> </data-table> -->
|
|
|
+ </list-frame>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import listFrame from '@frame/layout/admin/list-frame';
|
|
|
+import dataTable from '@frame/components/data-table';
|
|
|
+// import { createNamespacedHelpers } from 'vuex';
|
|
|
+// const { mapActions } = createNamespacedHelpers('questionnaire');
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'index',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ listFrame,
|
|
|
+ dataTable,
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ lists: [
|
|
|
+ { label: '第一批次', value: 0 },
|
|
|
+ { label: '第二批次', value: 1 },
|
|
|
+ { label: '第三批次', value: 2 },
|
|
|
+ { label: '特殊批次', value: 2 },
|
|
|
+ ],
|
|
|
+ list: [
|
|
|
+ { label: '一班', value: 0 },
|
|
|
+ { label: '二班', value: 1 },
|
|
|
+ { label: '三班', value: 2 },
|
|
|
+ { label: '四班', value: 3 },
|
|
|
+ { label: '五班', value: 4 },
|
|
|
+ { label: '六班', value: 5 },
|
|
|
+ { label: '七班', value: 6 },
|
|
|
+ ],
|
|
|
+ opera: [
|
|
|
+ // {
|
|
|
+ // label: '编辑',
|
|
|
+ // icon: 'el-icon-edit',
|
|
|
+ // method: 'edit',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: '删除',
|
|
|
+ // icon: 'el-icon-delete',
|
|
|
+ // method: 'delete',
|
|
|
+ // },
|
|
|
+ ],
|
|
|
+ fields: [
|
|
|
+ {
|
|
|
+ label: '姓名',
|
|
|
+ prop: 'name',
|
|
|
+ },
|
|
|
+
|
|
|
+ { label: '期数', prop: 'term' },
|
|
|
+ {
|
|
|
+ label: '批次',
|
|
|
+ prop: 'batch',
|
|
|
+ format: item => {
|
|
|
+ return item === '0' ? '第一批次' : item === '1' ? '第二批次' : item === '2' ? '第三批次' : item === '3' ? '特殊批次' : '其他';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '班级',
|
|
|
+ prop: 'class',
|
|
|
+ format: item => {
|
|
|
+ return item === '0'
|
|
|
+ ? '一班'
|
|
|
+ : item === '1'
|
|
|
+ ? '二班'
|
|
|
+ : item === '2'
|
|
|
+ ? '三班'
|
|
|
+ : item === '3'
|
|
|
+ ? '四班'
|
|
|
+ : item === '4'
|
|
|
+ ? '五班'
|
|
|
+ : item === '5'
|
|
|
+ ? '六班'
|
|
|
+ : item === '6'
|
|
|
+ ? '七班'
|
|
|
+ : '其他';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { label: '问卷进度', prop: 'id' },
|
|
|
+ ],
|
|
|
+
|
|
|
+ field: [
|
|
|
+ { label: '期数', prop: 'term' },
|
|
|
+ {
|
|
|
+ label: '批次',
|
|
|
+ prop: 'batch',
|
|
|
+ format: item => {
|
|
|
+ return item === '0' ? '第一批次' : item === '1' ? '第二批次' : item === '2' ? '第三批次' : item === '3' ? '特殊批次' : '其他';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '班级',
|
|
|
+ prop: 'class',
|
|
|
+ format: item => {
|
|
|
+ return item === '0'
|
|
|
+ ? '一班'
|
|
|
+ : item === '1'
|
|
|
+ ? '二班'
|
|
|
+ : item === '2'
|
|
|
+ ? '三班'
|
|
|
+ : item === '3'
|
|
|
+ ? '四班'
|
|
|
+ : item === '4'
|
|
|
+ ? '五班'
|
|
|
+ : item === '5'
|
|
|
+ ? '六班'
|
|
|
+ : item === '6'
|
|
|
+ ? '七班'
|
|
|
+ : '其他';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { label: '问卷进度', prop: 'id' },
|
|
|
+ ],
|
|
|
+ filFields: [
|
|
|
+ {
|
|
|
+ label: '姓名',
|
|
|
+ model: 'name',
|
|
|
+ },
|
|
|
+ { label: '期数', model: 'term' },
|
|
|
+
|
|
|
+ {
|
|
|
+ label: '批次',
|
|
|
+ model: 'batch',
|
|
|
+ type: 'select',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '班级',
|
|
|
+ model: 'class',
|
|
|
+ type: 'select',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ index: [],
|
|
|
+ total: 0,
|
|
|
+ }),
|
|
|
+
|
|
|
+ created() {},
|
|
|
+ computed: {},
|
|
|
+ methods: {
|
|
|
+ async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ console.log(info.name);
|
|
|
+ if (info.name == '') this.$set(this, 'fields', this.index);
|
|
|
+ console.log(this.fields);
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped></style>
|