|
@@ -0,0 +1,95 @@
|
|
|
+<template>
|
|
|
+ <div id="detail">
|
|
|
+ <detail-frame :title="mainTitle" returns="/teacher/list">
|
|
|
+ <data-form :data="info" :fields="fields" :needSave="false" :isNew="false">
|
|
|
+ <template #custom="{ item, form }">
|
|
|
+ <template v-if="item.model === 'gender'">{{ form[item.model] === '0' ? '女' : '男' }}</template>
|
|
|
+ <template v-if="item.model === 'is_etiquette_teacher'">{{ form[item.model] === '0' ? '否' : '是' }}</template>
|
|
|
+ <template v-if="item.model === 'reason'">
|
|
|
+ <el-form-item>
|
|
|
+ <el-input v-model="reason" placeholder="审核原因(非必填)"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ <template #submit>
|
|
|
+ <el-row type="flex" justify="middle" align="center">
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-button type="primary" size="mini" @click="setCheck('0')">确认教师</el-button>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="7">
|
|
|
+ <el-button type="danger" size="mini" @click="setCheck('1')">退回教师</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ </data-form>
|
|
|
+ </detail-frame>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import detailFrame from '@frame/layout/admin/detail-frame';
|
|
|
+import dataForm from '@frame/components/form';
|
|
|
+import { createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions } = createNamespacedHelpers('teacher');
|
|
|
+export default {
|
|
|
+ metaInfo: { title: '教师信息' },
|
|
|
+ name: 'detail',
|
|
|
+ props: {},
|
|
|
+ components: { detailFrame, dataForm },
|
|
|
+ data: () => ({
|
|
|
+ info: {},
|
|
|
+ reason: '', //审核原因
|
|
|
+ fields: [
|
|
|
+ { label: '教师姓名', model: 'name', type: 'text' },
|
|
|
+ { label: '性别', model: 'gender', custom: true },
|
|
|
+ { label: '手机号', model: 'phone', type: 'text' },
|
|
|
+ { label: '身份证号', model: 'id_number', type: 'text' },
|
|
|
+ { label: '教师资格证号', model: 'profession_number', type: 'text' },
|
|
|
+ { label: '学校名称', model: 'school_name', type: 'text' },
|
|
|
+ { label: '邮箱', model: 'email', type: 'text' },
|
|
|
+ { label: '年龄', model: 'age', type: 'text' },
|
|
|
+ { label: '出生日期', model: 'birthday', type: 'text' },
|
|
|
+ { label: '职务', model: 'job', type: 'text' },
|
|
|
+ { label: '专业', model: 'major', type: 'text' },
|
|
|
+ { label: '是/否是礼仪老师', model: 'is_etiquette_teacher', custom: true },
|
|
|
+ { label: '审核原因', model: 'reason', custom: true },
|
|
|
+ ],
|
|
|
+ loading: true,
|
|
|
+ }),
|
|
|
+ created() {},
|
|
|
+ computed: {
|
|
|
+ id() {
|
|
|
+ return this.$route.query.id;
|
|
|
+ },
|
|
|
+ mainTitle() {
|
|
|
+ let meta = this.$route.meta;
|
|
|
+ let main = meta.title || '';
|
|
|
+ let sub = meta.sub || '';
|
|
|
+ return `${main}${sub}`;
|
|
|
+ },
|
|
|
+ keyWord() {
|
|
|
+ let meta = this.$route.meta;
|
|
|
+ let main = meta.title || '';
|
|
|
+ return main;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ id: {
|
|
|
+ immediate: true,
|
|
|
+ handler(val) {
|
|
|
+ if (val) this.loading = false;
|
|
|
+ else this.search();
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapActions(['fetch']),
|
|
|
+ async search() {},
|
|
|
+ setCheck(status) {
|
|
|
+ //this.reason 是审核原因,需要带上
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped></style>
|