|
@@ -16,6 +16,9 @@
|
|
<el-col :span="3">
|
|
<el-col :span="3">
|
|
<el-button size="mini" type="primary" @click="downloadTemplate">下载上传教师评分模板</el-button>
|
|
<el-button size="mini" type="primary" @click="downloadTemplate">下载上传教师评分模板</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="3">
|
|
|
|
+ <el-button size="mini" type="primary" @click="selectDisplay">选择显示</el-button>
|
|
|
|
+ </el-col>
|
|
<el-col :span="3">
|
|
<el-col :span="3">
|
|
<el-upload action="/files/train/score/upload" :show-file-list="false" :on-success="handleSuccess" :on-error="handleError" multiple>
|
|
<el-upload action="/files/train/score/upload" :show-file-list="false" :on-success="handleSuccess" :on-error="handleError" multiple>
|
|
<el-button size="mini" type="primary">点击上传教师评分</el-button>
|
|
<el-button size="mini" type="primary">点击上传教师评分</el-button>
|
|
@@ -33,6 +36,18 @@
|
|
<el-dialog :visible.sync="dialog" title="添加教师" @close="toClose" width="50%">
|
|
<el-dialog :visible.sync="dialog" title="添加教师" @close="toClose" width="50%">
|
|
<data-form :data="form" :fields="tearcherForm" :rules="rules" @save="turnSave"> </data-form>
|
|
<data-form :data="form" :fields="tearcherForm" :rules="rules" @save="turnSave"> </data-form>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <el-dialog :visible.sync="columnDialog" title="显示列" @close="toClose" width="50%">
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-checkbox-group v-model="columnSelect">
|
|
|
|
+ <el-col :span="4" v-for="(i, index) in columns" :key="index">
|
|
|
|
+ <el-checkbox :label="i.prop">{{ i.label }}</el-checkbox>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-button type="primary" @click="changeColumns">确定</el-button>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -86,7 +101,40 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- fields: [
|
|
|
|
|
|
+ fields: [],
|
|
|
|
+ list: [],
|
|
|
|
+ filFields: [
|
|
|
|
+ { label: '教师名称', model: 'name' },
|
|
|
|
+ { label: '年龄', model: 'age' },
|
|
|
|
+ {
|
|
|
|
+ label: '状态',
|
|
|
|
+ model: 'status',
|
|
|
|
+ type: 'select',
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ label: '性别',
|
|
|
|
+ model: 'gender',
|
|
|
|
+ type: 'select',
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ total: 0,
|
|
|
|
+ // 添加教师
|
|
|
|
+ dialog: false,
|
|
|
|
+ form: {},
|
|
|
|
+ tearcherForm: [
|
|
|
|
+ { label: '教师姓名', required: true, model: 'name' },
|
|
|
|
+ { label: '手机号', required: true, model: 'phone', options: { maxLength: 11, minLength: 11 } },
|
|
|
|
+ ],
|
|
|
|
+ rules: {
|
|
|
|
+ name: [{ required: true, message: '请输入教师姓名' }],
|
|
|
|
+ phone: [
|
|
|
|
+ { required: true, message: '请输入手机号' },
|
|
|
|
+ { min: 11, max: 11, message: '请输入11位手机号 ', trigger: 'blur' },
|
|
|
|
+ ],
|
|
|
|
+ },
|
|
|
|
+ columnSelect: [],
|
|
|
|
+ columnDialog: false,
|
|
|
|
+ columns: [
|
|
{ label: '姓名', prop: 'name' },
|
|
{ label: '姓名', prop: 'name' },
|
|
{ label: '性别', prop: 'gender', options: { width: `80px` } },
|
|
{ label: '性别', prop: 'gender', options: { width: `80px` } },
|
|
{ label: '手机号', prop: 'phone' },
|
|
{ label: '手机号', prop: 'phone' },
|
|
@@ -126,38 +174,14 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- list: [],
|
|
|
|
- filFields: [
|
|
|
|
- { label: '教师名称', model: 'name' },
|
|
|
|
- { label: '年龄', model: 'age' },
|
|
|
|
- {
|
|
|
|
- label: '状态',
|
|
|
|
- model: 'status',
|
|
|
|
- type: 'select',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: '性别',
|
|
|
|
- model: 'gender',
|
|
|
|
- type: 'select',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- total: 0,
|
|
|
|
- // 添加教师
|
|
|
|
- dialog: false,
|
|
|
|
- form: {},
|
|
|
|
- tearcherForm: [
|
|
|
|
- { label: '教师姓名', required: true, model: 'name' },
|
|
|
|
- { label: '手机号', required: true, model: 'phone', options: { maxLength: 11, minLength: 11 } },
|
|
|
|
- ],
|
|
|
|
- rules: {
|
|
|
|
- name: [{ required: true, message: '请输入教师姓名' }],
|
|
|
|
- phone: [
|
|
|
|
- { required: true, message: '请输入手机号' },
|
|
|
|
- { min: 11, max: 11, message: '请输入11位手机号 ', trigger: 'blur' },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
}),
|
|
}),
|
|
created() {
|
|
created() {
|
|
|
|
+ this.$set(this, `fields`, this.columns);
|
|
|
|
+ this.$set(
|
|
|
|
+ this,
|
|
|
|
+ 'columnSelect',
|
|
|
|
+ this.columns.map(i => i.prop)
|
|
|
|
+ );
|
|
this.search();
|
|
this.search();
|
|
},
|
|
},
|
|
computed: {},
|
|
computed: {},
|
|
@@ -221,6 +245,16 @@ export default {
|
|
this.from = {};
|
|
this.from = {};
|
|
this.dialog = false;
|
|
this.dialog = false;
|
|
},
|
|
},
|
|
|
|
+ // 列显示选择
|
|
|
|
+ selectDisplay() {
|
|
|
|
+ this.columnDialog = true;
|
|
|
|
+ },
|
|
|
|
+ //改变显示列
|
|
|
|
+ changeColumns() {
|
|
|
|
+ const r = this.columns.filter(f => this.columnSelect.find(fc => fc == f.prop));
|
|
|
|
+ this.$set(this, `fields`, r);
|
|
|
|
+ this.columnDialog = false;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|