<template>
    <div class="app-container">
        <div class="export-button-wrapper">
            <el-button type="danger" icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
        </div>
        <div class="title">
            — 教师个人信息汇总 —
        </div>
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">基本信息</div>
            <div style="margin: 3px 10px 15px;">
                <el-form :v-model="form" ref="form">
                    <!-- 距离 -->
                    <div style="height: 12px;"></div>
                    <div class="userinfo">
                        <el-col :span="18">
                            <!-- f1 -->
                            <el-row>
                                <el-col :span="24">
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="name">
                                            <span>姓名</span>
                                        </el-form-item></el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell ">
                                        <el-form-item prop="name">
                                            <span>{{ form.name }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="sex">
                                            <span>性别</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell ">
                                        <el-form-item prop="sex">
                                            <span>{{ form.sex == "0" ? '男' : form.sex == "1" ? '女' : '' }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="age">
                                            <span>年龄</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell ">
                                        <el-form-item prop="age">
                                            <span>{{ form.age }}</span>

                                        </el-form-item>
                                    </el-col>
                                </el-col>
                            </el-row>
                            <!-- f2 -->
                            <el-row>
                                <el-col :span="24">
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="birthDate">
                                            <span>出生年月</span>
                                        </el-form-item></el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell ">
                                        <el-form-item prop="birthDate">
                                            <span>{{ form.birthDate }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="hometown">
                                            <span>籍贯</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="hometown">
                                            <span>{{ form.hometown }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="nation">
                                            <span>民族</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="nation">
                                            <span>{{ form.nation }}</span>
                                        </el-form-item>
                                    </el-col>
                                </el-col>
                            </el-row>
                            <!-- f3 -->
                            <el-row>
                                <el-col :span="24">
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="idCard">
                                            <span>身份证号</span>
                                        </el-form-item></el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="idCard">
                                            <span>{{ form.idCard }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="fileBirthDate">
                                            <span>档案出生年月</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="fileBirthDate">
                                            <span>{{ form.fileBirthDate }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="politicalLandscape">
                                            <span>政治面貌</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="politicalLandscape">
                                            <span>{{ form.politicalLandscape }}</span>
                                        </el-form-item>
                                    </el-col>
                                </el-col>
                            </el-row>
                            <!-- f4 -->
                            <el-row>
                                <el-col :span="24">
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="partyMembershipTime">
                                            <span>入党时间</span>
                                        </el-form-item></el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="partyMembershipTime">
                                            <span>{{ form.partyMembershipTime }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="teachingSubject">
                                            <span>任教学科</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="teachingSubject">
                                            <span>{{ form.teachingSubject }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="currentProfessionalTitle">
                                            <span>现职称</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="currentProfessionalTitle">
                                            <span>{{ form.currentProfessionalTitle }}</span>
                                        </el-form-item>
                                    </el-col>
                                </el-col>
                            </el-row>
                            <!-- f5 -->
                            <el-row>
                                <el-col :span="24">
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="currentProfessionalTitleTime">
                                            <span>现职称取得资格时间</span>
                                        </el-form-item></el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="currentProfessionalTitleTime">
                                            <span>{{ form.currentProfessionalTitleTime }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="currentHiringProfessionalTitle">
                                            <span>现聘职称</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="currentHiringProfessionalTitle">
                                            <span>{{ form.currentHiringProfessionalTitle }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="currentHiringProfessionalTitleTime">
                                            <span>现聘任职时间</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="currentHiringProfessionalTitleTime">
                                            <span>{{ form.currentHiringProfessionalTitleTime }}</span>
                                        </el-form-item>
                                    </el-col>
                                </el-col>
                            </el-row>
                            <!-- f6-->
                            <el-row>
                                <el-col :span="24">
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="currentPosition">
                                            <span>现聘岗位</span>
                                        </el-form-item></el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="currentPosition">
                                            <span>{{ form.currentPosition }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="currentJobLevel">
                                            <span>现岗位等级</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="currentJobLevel">
                                            <span>{{ form.currentJobLevel }}</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell background">
                                        <el-form-item prop="currentJobLevelAppointmentTime">
                                            <span>现岗位等级聘任时间</span>
                                        </el-form-item>
                                    </el-col>
                                    <el-col :span="4" class="border_right border-bottom table_cell">
                                        <el-form-item prop="currentJobLevelAppointmentTime">
                                            <span>{{ form.currentJobLevelAppointmentTime }}</span>
                                        </el-form-item>
                                    </el-col>
                                </el-col>
                            </el-row>
                        </el-col>
                        <el-col :span="6">
                            <el-card
                                style=" height: 180px;   width: 100%;  display: flex;      align-items: center;  justify-content: center; ">
                                <el-upload v-loading="uploadLoading" class="avatar-uploader" action="#" accept="image/*"
                                    :show-file-list="false" :on-success="handleAvatarSuccess"
                                    :before-upload="beforeAvatarUpload" :http-request="uploadImage">
                                    <img v-if="form.photoUrl" :src="baseUrl + form.photoUrl"
                                        style="max-width: 100%; max-height: 180px; object-fit: contain;" class="avatar"
                                        alt="" />
                                    <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                                </el-upload>
                            </el-card>
                        </el-col>
                        <!-- f1 -->
                        <el-row>
                            <el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="duties">
                                        <span>职务</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="duties">
                                        <span>{{ form.duties }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="teacherQualificationType">
                                        <span>教师资格种类</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell ">
                                    <el-form-item prop="teacherQualificationType">
                                        <span>{{ form.teacherQualificationType }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="teacherQualificationCertificateNum">
                                        <span>教师资格号码</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell ">
                                    <el-form-item prop="teacherQualificationCertificateNum">
                                        <span>{{ form.teacherQualificationCertificateNum }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="workingHours">
                                        <span>参加工作时间</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="workingHours">
                                        <span>{{ form.workingHours }}</span>
                                    </el-form-item>
                                </el-col>

                            </el-col>
                        </el-row>
                        <!-- f2 -->
                        <el-row>
                            <el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="toSecondMiddleSchoolTime">
                                        <span>到二中工作时间</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="toSecondMiddleSchoolTime">
                                        <span>{{ form.toSecondMiddleSchoolTime }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="toSecondAge">
                                        <span>二中工作年龄</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="toSecondAge">
                                        <span>{{ form.toSecondAge }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="lengthOfTeacherTime">
                                        <span>教龄起算时间</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="lengthOfTeacherTime">
                                        <span>{{ form.lengthOfTeacherTime }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="lengthOfServiceTime">
                                        <span>工龄起算时间</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="lengthOfServiceTime">
                                        <span>{{ form.lengthOfServiceTime }}</span>
                                    </el-form-item>
                                </el-col>

                            </el-col>
                        </el-row>
                        <!-- f3 -->
                        <el-row>
                            <el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="seniority">
                                        <span>工龄年限</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="seniority">
                                        <span>{{ form.seniority }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="onDutySituation">
                                        <span>在岗情况</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="onDutySituation">
                                        <span>{{ form.onDutySituation }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="currentSituation">
                                        <span>在编情况</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="currentSituation">
                                        <span>{{ form.currentSituation }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="graduationInstitution1">
                                        <span>毕业院校1</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="graduationInstitution1">
                                        <el-form-item prop="graduationInstitution1">
                                            <span>{{ form.graduationInstitution1 }}</span>
                                        </el-form-item>
                                    </el-form-item>
                                </el-col>

                            </el-col>
                        </el-row>
                        <!-- f4 -->
                        <el-row>
                            <el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="major1">
                                        <span>专业1</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="major1">
                                        <span>{{ form.major1 }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="graduationTime1">
                                        <span>毕业时间1</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="graduationTime1">
                                        <span>{{ form.graduationTime1 }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="name">
                                        <span>毕业院校2</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="graduationInstitution2">
                                        <span>{{ form.graduationInstitution2 }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="major2">
                                        <span>专业2</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="major2">
                                        <span>{{ form.major2 }}</span>
                                    </el-form-item>
                                </el-col>

                            </el-col>
                        </el-row>
                        <!-- f5 -->
                        <el-row>
                            <el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="graduationTime2">
                                        <span>毕业时间2</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="graduationTime2">
                                        <span>{{ form.graduationTime2 }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="graduationInstitution3">
                                        <span>毕业学院3</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="graduationInstitution3">
                                        <span>{{ form.graduationInstitution3 }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="major3">
                                        <span>专业3</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="major3">
                                        <span>{{ form.major3 }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="graduationTime3">
                                        <span>毕业时间3</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="graduationTime3">
                                        <span>{{ form.graduationTime3 }}</span>
                                    </el-form-item>
                                </el-col>

                            </el-col>
                        </el-row>
                        <!-- f6 -->
                        <el-row>
                            <el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="firstDegree">
                                        <span>第一学历</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="firstDegree">
                                        <span>{{ form.firstDegree }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="lastDegree">
                                        <span>最后学历</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell">
                                    <el-form-item prop="lastDegree">
                                        <span>{{ form.lastDegree }}</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="3" class="border_right border-bottom table_cell background">
                                    <el-form-item prop="degree">
                                        <span>学位</span>
                                    </el-form-item>
                                </el-col>
                                <el-col :span="9" class="border_right border-bottom table_cell">
                                    <el-form-item prop="degree">
                                        <span>{{ form.degree }}</span>
                                    </el-form-item>
                                </el-col>


                            </el-col>
                        </el-row>
                    </div>
                </el-form>
            </div>
        </div>


        <!--工作量信息  -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">工作量信息</div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="schoolAworkload" :row-style="{ height: '0' }" :cell-style="{ padding: '3px' }">
                    <el-table-column label="学年" align="center" prop="schoolYear" width="120px" fixed="left"
                        show-overflow-tooltip />
                    <el-table-column label="学期" align="center" prop="semester" fixed="left" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.semester_jsdzda" :value="scope.row.semester" />
                        </template>
                    </el-table-column>
                    <el-table-column label="届别" align="center" prop="year" fixed="left" show-overflow-tooltip />
                    <el-table-column label="年级" align="center" prop="grade" fixed="left" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.grade_da" :value="scope.row.grade" />
                        </template>
                    </el-table-column>
                    <el-table-column label="姓名" align="center" prop="name" show-overflow-tooltip />
                    <el-table-column label="学科" align="center" prop="sub" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.teaching_subjects" :value="scope.row.sub" />
                        </template>
                    </el-table-column>
                    <el-table-column label="聘任岗位" align="center" prop="appointmentPost" width="120px" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.appointment_positions" :value="scope.row.appointmentPost" />
                        </template>
                    </el-table-column>
                    <el-table-column label="聘任职务" align="center" prop="appointmentPosition" width="120px"
                        show-overflow-tooltip />
                    <el-table-column label="聘任情况" align="center" prop="appointmentSituation" width="120px"
                        show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.appointment_situation" :value="scope.row.appointmentSituation" />
                        </template>
                    </el-table-column>
                    <el-table-column label="班级" align="center" prop="className" show-overflow-tooltip />
                    <el-table-column label="班级类型" align="center" prop="classType" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="周课时量" align="center" prop="weeklyClassHours" width="80px"
                        show-overflow-tooltip />
                    <!-- <el-table-column label="早读" align="center" prop="earlyReading" show-overflow-tooltip />
                    <el-table-column label="正课" align="center" prop="requiredCourses" show-overflow-tooltip />
                    <el-table-column label="晚自习" align="center" prop="eveningSelfStudy" width="100px"
                        show-overflow-tooltip />
                    <el-table-column label="合计" align="center" prop="amountTo" show-overflow-tooltip /> -->
                    <el-table-column label="证明人" align="center" prop="userName" width="120px" fixed="right"
                        show-overflow-tooltip />
                    <el-table-column label="备注" align="center" prop="remark" fixed="right" show-overflow-tooltip />
                </el-table>
            </div>
        </div>
        <!--班主任考核信息  -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">班主任考核</div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="schoolAclassTeacherAssessments" :row-style="{ height: '0' }"
                    :cell-style="{ padding: '3px' }">
                    <el-table-column label="学年" align="center" prop="schoolYear" show-overflow-tooltip />
                    <el-table-column label="学期" align="center" prop="semester" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.semester_jsdzda" :value="scope.row.semester" />
                        </template>
                    </el-table-column>
                    <el-table-column label="届别" align="center" prop="year" show-overflow-tooltip />
                    <el-table-column label="年级" align="center" prop="grade" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.grade_da" :value="scope.row.grade" />
                        </template>
                    </el-table-column>
                    <el-table-column label="班级" align="center" prop="className" show-overflow-tooltip />
                    <el-table-column label="班级类型" align="center" prop="classType" width="180px" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="姓名" align="center" prop="teacherName" show-overflow-tooltip width="180px" />
                    <el-table-column label="学科" align="center" prop="sub" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.teaching_subjects" :value="scope.row.sub" />
                        </template>
                    </el-table-column>
                    <el-table-column label="德育考核成绩" align="center" prop="moralEduCheckAchievement" width="130px"
                        show-overflow-tooltip />
                    <el-table-column label="智育考核成绩" align="center" prop="intellEduCheckAchievement" width="130px"
                        show-overflow-tooltip />
                    <el-table-column label="考核结果" align="center" prop="assessmentResults" width="130px">
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.assessment_results" :value="scope.row.assessmentResults" />
                        </template>
                    </el-table-column>
                    <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
                </el-table>
            </div>
        </div>
        <!--专业成长  -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">专业成长</div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="specialityVos" :row-style="{ height: '0' }" :cell-style="{ padding: '3px' }">
                    <el-table-column label="成长类型" align="center" prop="growthType" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="学科" align="center" prop="sub" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.teaching_subjects" :value="scope.row.sub" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖类别" align="center" prop="awardtype" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <span v-if="scope.row.growthType == '综合荣誉'">{{ scope.row.awardtype }}</span>
                            <dict-tag v-else :options="getDictionaryByGrowthType(scope.row)" :value="scope.row.awardtype" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖等级" align="center" prop="awardlevel" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.award_rank" :value="scope.row.awardlevel" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖级别" align="center" prop="awardrank" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.awards_level" :value="scope.row.awardrank" />
                        </template>
                    </el-table-column>
                    <el-table-column label="成果名称" align="center" prop="resultName" show-overflow-tooltip />
                    <el-table-column label="获奖人" align="center" prop="userName" show-overflow-tooltip />
                    <el-table-column label="主办单位" align="center" prop="org" show-overflow-tooltip />
                    <el-table-column label="获奖时间" align="center" prop="awardTime" width="180" show-overflow-tooltip>
                    </el-table-column>
                </el-table>
            </div>
        </div>
        <!--高考成绩  -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">高考成绩 </div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="schoolGkAchievement" :row-style="{ height: '0' }" :cell-style="{ padding: '3px' }">
                    <el-table-column label="届别" align="center" prop="year" show-overflow-tooltip />
                    <el-table-column label="学科" align="center" prop="sub" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.teaching_subjects" :value="scope.row.sub" />
                        </template>
                    </el-table-column>
                    <el-table-column label="教师姓名" align="center" prop="teacherName" show-overflow-tooltip />
                    <el-table-column label="授课班级" align="center" prop="teachingClassName" show-overflow-tooltip />
                    <el-table-column label="班级类型" align="center" prop="classType" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="高考评优" align="center" prop="gkAppraising" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.gk_appraising" :value="scope.row.sub" />
                        </template>
                    </el-table-column>
                    <el-table-column label="尖子生培养" align="center" prop="topStudentsCulture" show-overflow-tooltip />
                    <el-table-column label="增量情况" align="center" prop="incrementSituation" show-overflow-tooltip />
                    <el-table-column label="有效数情况" align="center" prop="effectiveNumSituation" show-overflow-tooltip />
                    <el-table-column label="其他" align="center" prop="other" show-overflow-tooltip />
                </el-table>
            </div>
        </div>
        <!--教学成绩  -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">教学成绩</div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="schoolXteachingAchievements" :row-style="{ height: '0' }" :cell-style="{ padding: '3px' }">
                    <el-table-column label="学年" align="center" prop="schoolYear" show-overflow-tooltip />
                    <el-table-column label="学期" align="center" prop="semester" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.semester_jsdzda" :value="scope.row.semester" />
                        </template>
                    </el-table-column>
                    <el-table-column label="考试时间" align="center" prop="examTime" width="180" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <span>{{ parseTime(scope.row.examTime, '{y}-{m}-{d}') }}</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="考试类型" align="center" prop="examType" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.exam_typeda" :value="scope.row.examType" />
                        </template>
                    </el-table-column>
                    <el-table-column label="届别" align="center" prop="year" show-overflow-tooltip />
                    <el-table-column label="年级" align="center" prop="grade" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.grade_da" :value="scope.row.grade" />
                        </template>
                    </el-table-column>
                    <el-table-column label="姓名" align="center" prop="userName" show-overflow-tooltip />
                    <el-table-column label="学科" align="center" prop="sub" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.teaching_subjects" :value="scope.row.sub" />
                        </template>
                    </el-table-column>
                    <el-table-column label="班级" align="center" prop="className" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="班级类型" align="center" prop="classType" show-overflow-tooltip>
                    </el-table-column>
                    <el-table-column label="增量分" align="center" prop="assessmentScore" show-overflow-tooltip />
                </el-table>
            </div>
        </div>
        <!--辅导教师获奖  -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">辅导老师获奖</div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="fudaoTeacher" :row-style="{ height: '0' }" :cell-style="{ padding: '3px' }">
                    <el-table-column label="成长类型" align="center" show-overflow-tooltip width="120px">
                        <template>
                            <span>辅导老师获奖</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="学科" align="center" prop="sub" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.teaching_subjects" :value="scope.row.sub" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖类别" align="center" prop="awardtype" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.award_type_fdjs" :value="scope.row.awardtype" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖等级" align="center" prop="awardlevel" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.award_rank" :value="scope.row.awardlevel" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖级别" align="center" prop="awardrank" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.awards_level" :value="scope.row.awardrank" />
                        </template>
                    </el-table-column>
                    <el-table-column label="比赛名称" align="center" prop="competitionname" show-overflow-tooltip />
                    <el-table-column label="获奖人" align="center" prop="username" show-overflow-tooltip />
                    <el-table-column label="指导教师" align="center" prop="guidanceteacher" show-overflow-tooltip />
                    <el-table-column label="辅导职责" align="center" prop="coachingr" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.coachingr" :value="scope.row.coachingr" />
                        </template>
                    </el-table-column>
                    <el-table-column label="主办单位" align="center" prop="org" show-overflow-tooltip />
                    <el-table-column label="获奖时间" align="center" prop="awardtime" width="180" show-overflow-tooltip>
                        <!-- <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.awardTime, '{y}-{m}-{d}') }}</span>
                </template> -->
                    </el-table-column>
                </el-table>
            </div>
        </div>
        <!--辅导学生获奖 -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">辅导学生获奖</div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="fudaoStudent" :row-style="{ height: '0' }" :cell-style="{ padding: '3px' }">
                    <el-table-column label="成长类型" align="center" show-overflow-tooltip>
                        <template>
                            <span>辅导学生获奖</span>
                        </template>
                    </el-table-column>
                    <el-table-column label="学科" align="center" prop="sub" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.teaching_subjects" :value="scope.row.sub" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖类别" align="center" prop="awardtype" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.award_type_fdxs" :value="scope.row.awardtype" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖等级" align="center" prop="awardlevel" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.award_rank" :value="scope.row.awardlevel" />
                        </template>
                    </el-table-column>
                    <el-table-column label="获奖级别" align="center" prop="awardrank" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.awards_level" :value="scope.row.awardrank" />
                        </template>
                    </el-table-column>
                    <el-table-column label="比赛名称" align="center" prop="resultname" show-overflow-tooltip />
                    <el-table-column label="获奖人" align="center" prop="username" show-overflow-tooltip />
                    <el-table-column label="指导教师" align="center" prop="guidanceteacher" show-overflow-tooltip />
                    <el-table-column label="主办单位" align="center" prop="org" show-overflow-tooltip />
                    <el-table-column label="获奖时间" align="center" prop="awardtime" width="180" show-overflow-tooltip>
                        <!-- <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.awardTime, '{y}-{m}-{d}') }}</span>
                </template> -->
                    </el-table-column>
                </el-table>
            </div>
        </div>
        <!--年度考核 -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">年度考核</div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="schoolAnnualAssessment" :row-style="{ height: '0' }" :cell-style="{ padding: '3px' }">
                    <el-table-column label="姓名" align="center" prop="name" show-overflow-tooltip />
                    <el-table-column label="年度" align="center" prop="year" show-overflow-tooltip />
                    <el-table-column label="考核结果" align="center" prop="checkResult" show-overflow-tooltip>
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.check_result" :value="scope.row.checkResult" />
                        </template>
                    </el-table-column>
                    <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
                </el-table>
            </div>
        </div>
        <!--青年教师成长档案 -->
        <div style="border: 1px solid #f3f3f3;border-radius: 13px 13px 0 0 ; margin:  20px 0;">
            <div class="card_title">青年教师成长档案</div>
            <div style="margin: 3px 10px 15px;">
                <el-table :data="youthTeacherList">
                    <el-table-column label="学年" align="center" prop="schoolYear" />
                    <el-table-column label="学期" align="center" prop="semester">
                        <template slot-scope="scope">
                            <dict-tag :options="dict.type.semester_jsdzda" :value="scope.row.semester" />
                        </template>
                    </el-table-column>
                    <el-table-column label="年级" align="center" prop="grade" />
                    <el-table-column label="姓名" align="center" prop="name" />
                    <el-table-column label="青年教师培养期" align="center" prop="incubationPeriod" />
                    <el-table-column label="师生同考成绩" align="center" prop="sameExamResults" />
                    <el-table-column label="研做高考题情况" align="center" prop="situation" />
                </el-table>
            </div>
        </div>
    </div>
</template>

<script>
import { listAward, listAwardgr } from "@/api/smartSchool/electronicArchives/personalInformation";
import { getToken } from "@/utils/auth";
import { uploadImage as commonUpload } from "@/api/common";
export default {
    dicts: ["teaching_subjects", 'semester_jsdzda', 'exam_typeda', 'grade_da', 'class_type', 'yearda', 'rankda', "sys_user_sex",
        "politics_tatusls",
        "current_professional",
        "current_position",
        "current_joblevel",
        "duty_situation",
        "current_situation",
        "appointment_positions",
        "gk_appraising",
        "award_type_fdjs",
        "award_type_fdxs",
        "award_rank",
        "awards_level", 'coachingr', 'check_result', 'appointment_situation', 'award_categoriesjs', 'award_categoriesjk', 'award_categories', 'project_research', 'assessment_results'],
    data() {
        return {
            sex: '',
            phoneNumber: '', // 在这里定义并初始化 phoneNumber 变量
            classType: "",
            uploadForm: {},
            baseUrl: [process.env.VUE_APP_BASE_API],
            uploadLoading: false,
            uploadFileLoading: false,
            youthTeacherList: [],
            //工作量信息
            schoolAworkload: [],
            //班主任考核
            schoolAclassTeacherAssessments: [],
            //年度考核
            schoolAnnualAssessment: [],
            //教学成绩
            schoolXteachingAchievements: [],
            // 高考成绩
            schoolGkAchievement: [],
            //辅导老师获奖
            fudaoTeacher: [],
            //辅导学生获奖
            fudaoStudent: [],
            //专业成长
            specialityVos: [],
            form: {

            },
            queryParams: {},
            showSearch: true,

        }
    },
    created() {
        this.getList();
    },

    methods: {
        getDictionaryByGrowthType(row) {
            console.log(row, 'row');
            switch (row.growthType) {
                // case '综合荣誉':
                //     console.log('awardtype', row.awardtype)
                //     return row.awardtype;
                case '教学获奖':
                    return this.dict.type.award_categoriesjs;
                case '讲课获奖':
                    return this.dict.type.award_categoriesjk;
                case '论文论著':
                    return this.dict.type.award_categories;
                case '课题研究':
                    return this.dict.type.project_research;
                default:
                    return {};
            }
        },
        //查询
        getList() {
            this.loading = true;
            const phoneNumber = this.$store.state.user.teacher.teacherTel;
            listAwardgr(phoneNumber).then(response => {
                console.log(response, response.data);
                this.form = response.data.basicInformation;
                this.form.idCard = response.data.basicInformation.idCard;
                this.form.photoUrl = response.data.basicInformation.photoUrl;
                console.log(this.form.photoUrl, ' this.form.photoUrl');
                this.schoolAworkload = response.data.schoolAworkload;
                this.schoolAclassTeacherAssessments = response.data.schoolAclassTeacherAssessments;
                this.schoolXteachingAchievements = response.data.schoolXteachingAchievements;
                this.schoolAnnualAssessment = response.data.schoolAnnualAssessment;
                this.schoolXteachingAchievements = response.data.schoolXteachingAchievements;
                this.schoolGkAchievement = response.data.schoolGkAchievement;
                this.youthTeacherList = response.data.schoolXsyouthTeachers
                this.fudaoTeacher = response.data.fudaoTeacher
                this.fudaoStudent = response.data.fudaoStudent
                // console.log(this.fudaoStudent, 'this.fudaoStudent');
                this.specialityVos = response.data.specialityVos
                // console.log(this.specialityVos, 'this.specialityVos');
                this.total = response.total;
                this.loading = false;
                console.log('teaching_subjects', this.dict.type.teaching_subjects);
                this.dict.type.teaching_subjects.find(item => {
                    if (item.value == response.data.basicInformation.teachingSubject) {
                        this.form.teachingSubject = item.label
                    }
                })
                this.dict.type.current_professional.find(item => {
                    if (item.value == response.data.basicInformation.currentHiringProfessionalTitle) {
                        this.form.currentHiringProfessionalTitle = item.label
                    }
                })
                this.dict.type.current_joblevel.find(item => {
                    if (item.value == response.data.basicInformation.currentJobLevel) {
                        this.form.currentJobLevel = item.label
                    }
                })
                this.dict.type.politics_tatusls.find(item => {
                    if (item.value == response.data.basicInformation.politicalLandscape) {
                        this.form.politicalLandscape = item.label
                    }
                })

                this.dict.type.current_professional.find(item => {
                    if (item.value == response.data.basicInformation.currentProfessionalTitle) {
                        this.form.currentProfessionalTitle = item.label
                    }
                })
                this.dict.type.duty_situation.find(item => {
                    if (item.value == response.data.basicInformation.onDutySituation) {
                        this.form.onDutySituation = item.label
                    }
                })
                this.dict.type.current_position.find(item => {
                    if (item.value == response.data.basicInformation.currentPosition) {
                        this.form.currentPosition = item.label
                    }
                })
                this.dict.type.current_situation.find(item => {
                    if (item.value == response.data.basicInformation.currentSituation) {
                        this.form.currentSituation = item.label
                    }
                })
            });
        },
        resetQuery() {
            // 清空搜索出来的表格数据
            this.form = {};
            this.schoolAworkload = [];
            this.schoolAclassTeacherAssessments = [];
            this.schoolAnnualAssessment = [];
            this.schoolXteachingAchievements = [];
            this.schoolGkAchievement = [];
            this.fudaoTeacher = [];
            this.fudaoStudent = [];
            this.specialityVos = [];
            this.queryParams = {
                name: '',
                idCard: '',
            };
            this.getList();
        },


        // 上传成功回调
        handleAvatarSuccess(res, file) {
            this.photoUrl = res.data.url;
            this.commonUpload(file);
        },

        // 上传前格式和图片大小限制
        beforeAvatarUpload(file) {
            const type =
                file.type === "image/jpeg" ||
                "image/jpg" ||
                "image/webp" ||
                "image/png";
            const isLt2M = file.size / 1024 / 1024 < 2;
            if (!type) {
                this.$message.error("图片格式不正确!(只能包含jpg，png，webp，JPEG)");
            }
            if (!isLt2M) {
                this.$message.error("上传图片大小不能超过 2MB!");
            }
            return type && isLt2M;
        },
        // 上传图片
        uploadImage(file) {
            const fileData = file.file;
            const formData = new FormData();
            formData.append("file", fileData);
            this.uploadLoading = true;
            commonUpload(formData)
                .then((response) => {
                    this.uploadLoading = false;
                    this.$modal.msgSuccess("上传成功");
                    this.photoUrl = this.pev + response.url;
                    this.form.photoUrl = response.url;
                    console.log(this.form.photoUr, 'this.form.photoUr');
                    console.log(response.url, 'response.url');
                })
                .catch((error) => {
                    this.uploadLoading = false;
                });
        },
        /** 导出按钮操作 */
        handleExport() {
            const phoneNumber = this.$store.state.user.teacher.teacherTel;
            const queryParams = {
                phoneNumber
            };
            this.download('/teacher/basiclnformation/exportPDF', queryParams, `教师个人信息汇总.pdf`);
        }


    },
}


</script>

<style scoped>
.el-form-item {
    margin-bottom: 0;
}

/* ::v-deep .el-form-item--medium .el-form-item__content {
    line-height: 32px;
    text-align: center;
    color: pink;
} */

.userinfo {
    border: 1px solid #e0dfdf;
}

.border_right {
    border-right: 1px solid #e0dfdf;
}

.border_left {
    border-left: 1px solid #e0dfdf;
}

.border_top {
    border-top: 1px solid #e0dfdf;
}

.border_bottom {
    border-bottom: 1px solid #e0dfdf;
}

.table_cell {
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-top: 1px solid #e0dfdf;
    border-bottom: 1px solid #e0dfdf;

}

.table_cell:last-child {
    border-bottom: 1px solid #e0dfdf;
}

.el-input--medium .el-input__inner {
    line-height: 20px;
}



.card_title {
    background-color: #f3f3f3;
    padding: 12px;
    border-radius: 13px 13px 0 0;
}

.title {
    border: 1px solid #e0dfdf;
    text-align: center;
    padding: 10px;
    margin: 15px 0;
    font-size: 30px;
}

.seach {
    background-color: #f3f3f3;
    padding: 10px;
    border-radius: 30px;

}

.background {
    background-color: #eff8fc;
}

.export-button-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
</style>