|
@@ -0,0 +1,83 @@
|
|
|
+<template>
|
|
|
+ <div id="index">
|
|
|
+ <list-frame title="班主任管理" @query="search" :filter="filFields">
|
|
|
+ <template #options="{item}">
|
|
|
+ <template v-if="item.model"></template>
|
|
|
+ </template>
|
|
|
+ <data-table :fields="fields" :data="list" :opera="opera" @edit="toEdit"></data-table>
|
|
|
+ </list-frame>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import listFrame from '@frame/layout/admin/list-frame';
|
|
|
+import dataTable from '@frame/layout/admin/data-table';
|
|
|
+export default {
|
|
|
+ metaInfo: { title: '班主任表' },
|
|
|
+ name: 'index',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ listFrame,
|
|
|
+ dataTable,
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ opera: [
|
|
|
+ {
|
|
|
+ label: '编辑',
|
|
|
+ icon: 'el-icon-edit',
|
|
|
+ method: 'edit',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '删除',
|
|
|
+ icon: 'el-icon-delete',
|
|
|
+ method: 'delete',
|
|
|
+ display: item => {
|
|
|
+ return item.gender === '1';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ filFields: [
|
|
|
+ { label: '姓名', model: 'name' },
|
|
|
+ { label: '所属部门', model: 'dept', type: 'select' },
|
|
|
+ ],
|
|
|
+ fields: [
|
|
|
+ { label: '姓名', prop: 'name' },
|
|
|
+ { label: '所在部门', prop: 'deptname' },
|
|
|
+ {
|
|
|
+ label: '性别',
|
|
|
+ prop: 'gender',
|
|
|
+ format: item => {
|
|
|
+ return item === '1' ? '男' : '女';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ { label: '电话', prop: 'tel' },
|
|
|
+ { label: '年龄', prop: 'age' },
|
|
|
+ { label: '出生日期', prop: 'birthday' },
|
|
|
+ {
|
|
|
+ label: '礼仪课教师',
|
|
|
+ prop: 'is_ly',
|
|
|
+ format: item => {
|
|
|
+ return item === '1' ? '是' : '否';
|
|
|
+ },
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ list: [
|
|
|
+ { name: '班主任1', deptname: '信息部', gender: '1', tel: '13089419810', age: 20, birthday: `2020-01-01`, is_ly: 0 },
|
|
|
+ { name: '班主任2', deptname: '信息部', gender: '0', tel: '13089419810', age: 20, birthday: `2020-01-01`, is_ly: 1 },
|
|
|
+ ],
|
|
|
+ }),
|
|
|
+ created() {},
|
|
|
+ computed: {},
|
|
|
+ methods: {
|
|
|
+ search({ skip = 0, limit = 15, ...info } = {}) {
|
|
|
+ console.log(`in search`);
|
|
|
+ },
|
|
|
+ toEdit(data) {
|
|
|
+ console.log(`in toEdit`);
|
|
|
+ console.log(data);
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped></style>
|