<!--个人工作教师电子档案 -->
<template>
  <div>
    <el-form
      style="margin-top: 20px; margin-left: 20px"
      :inline="true"
      :model="queryForm"
      class="demo-form-inline"
    >
      <el-form-item label="任务名称:">
        <el-input
          v-model="queryForm.noticeName"
          placeholder="请输入"
        ></el-input>
      </el-form-item>
      <el-form-item>
        <el-button
          size="mini"
          icon="el-icon-search"
          type="primary"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button size="mini" icon="el-icon-refresh" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>
    <el-table style="margin-top: 20px" border :data="tableData">
      <el-table-column type="index" label="序号" width="55" align="center" />
      <el-table-column
        label="任务名称"
        align="center"
        prop="noticeName"
        min-width="200"
      />
      <el-table-column
        label="任务状态"
        align="center"
        prop="noticeState"
        min-width="150"
      >
        <template slot-scope="{ row }">
          {{
            row.noticeState == 1
              ? "未发布"
              : row.noticeState == 2
              ? "已发布"
              : row.noticeState == 7
              ? "已结束"
              : ""
          }}
        </template>
      </el-table-column>
      <el-table-column
        label="填写状态"
        align="center"
        min-width="150"
        prop="state"
      >
        <template slot-scope="{ row }">
          {{
            row.state == 1
              ? "编辑"
              : row.state == 4
              ? "已提交"
              : row.state == 5
              ? "已确认"
              : row.state == 9
              ? "驳回"
              : ""
          }}
        </template>
      </el-table-column>
      <el-table-column
        label="开始时间"
        align="center"
        min-width="200"
        prop="startTime"
      />
      <el-table-column
        label="结束时间"
        align="center"
        min-width="150"
        prop="endTime"
      />
      <el-table-column fixed="right" label="操作" align="center">
        <template slot-scope="scope">
          <!-- 未填写 -->
          <div v-if="scope.row.state == '1'">
            <el-button size="mini" type="text" @click="handleEdit(scope.row)"
              >填写
            </el-button>
            <el-button size="mini" type="text" @click="handleEdit(scope.row)"
              >修改
            </el-button>
            <el-button size="mini" type="text" @click="handleSubmit(scope.row)"
              >提交
            </el-button>
          </div>
          <div v-if="scope.row.state == '9'">
            <el-button size="mini" type="text" @click="handleEdit(scope.row)"
              >填写
            </el-button>
            <el-button size="mini" type="text" @click="handleEdit(scope.row)"
              >修改
            </el-button>
            <el-button size="mini" type="text" @click="handleSubmit(scope.row)"
              >提交
            </el-button>
          </div>
          <el-button
            v-if="scope.row.state == '4'"
            size="mini"
            type="text"
            @click="handleCheck(scope.row)"
            >查看
          </el-button>
          <el-button
            v-if="scope.row.state == '5'"
            size="mini"
            type="text"
            @click="handleCheck(scope.row)"
            >查看
          </el-button>
          <div></div>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryForm.pageNum"
      :limit.sync="queryForm.pageSize"
      @pagination="getList"
    />
    <!--弹窗-->
    <el-dialog :title="title" :visible.sync="dialogVisible" width="95%">
      <div style="display: flex">
        <div class="leftContent">
          <div style="margin-bottom: 10px">
            <span class="line"></span>
            <span class="title">基本信息</span>
          </div>
          <el-form
            size="mini"
            ref="form"
            label-position="left"
            :model="form"
            label-width="120px"
          >
            <el-form-item
              label="学年学期:"
              style="padding-right: 10px"
              :disabled="true"
            >
              <el-input
                v-model="form.filesSemester"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="级部:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.gradeName"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="姓名:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.teacherName"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <!-- <el-form-item label="性别:" style="padding-right: 10px">
              <el-input v-model="form.sex"></el-input>
            </el-form-item> -->
            <el-form-item
              :disabled="true"
              label="性别："
              style="padding-right: 10px"
            >
              <el-select
                :disabled="form.state == '4' ? true : false"
                v-model="form.sex"
                placeholder="请输入性别"
                style="width: 100%"
              >
                <el-option
                  v-for="dict in dict.type.sys_user_sex"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="年龄:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.age"
                :disabled="form.state == '4' ? true : false"
              >
              </el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="职称:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.title"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="学历:"
              style="padding-right: 10px"
            >
              <el-select
                :disabled="form.state == '4' ? true : false"
                v-model="form.education"
                style="width: 100%"
                placeholder="请选择学历"
              >
                <el-option
                  v-for="dict in dict.type.education"
                  :key="dict.value"
                  :label="dict.label"
                  :value="dict.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="政治面貌:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.appearance"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="任教学科:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.courseName"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="任教班级:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.className"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="任正班主任班级:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.bzrClassName"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="任副班主任班级:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.fbzrClassName"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="是否教学组长:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.isTeachingGroupLeader"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="是否教研组长:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.isResearchGroupLeader"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="设计课时量:"
              style="padding-right: 10px"
            >
              <el-input
                type="number"
                placeholder="请输入数字"
                v-model="form.classHour"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
            <el-form-item
              :disabled="true"
              label="班主任情况:"
              style="padding-right: 10px"
            >
              <el-input
                v-model="form.classTeacherDetails"
                :disabled="form.state == '4' ? true : false"
              ></el-input>
            </el-form-item>
          </el-form>
          <span
            style="display: flex; justify-content: center"
            slot="footer"
            class="dialog-footer"
          >
            <div v-if="check == false">
              <el-button size="small" type="primary" @click="confirmDialog"
                >保 存</el-button
              >
              <el-button size="small" @click="dialogVisible = false"
                >取 消</el-button
              >
            </div>
            <el-button
              v-else
              type="primary"
              size="small"
              @click="dialogVisible = false"
              >关 闭</el-button
            >
          </span>
        </div>
        <div class="rightContent">
          <div style="margin-bottom: 10px">
            <span class="line"></span>
            <span class="title">教育科研</span>
            <el-button
              :disabled="form.state == '4' ? true : false"
              type="success"
              size="mini"
              style="float: right; margin-right: 50px; margin-top: 10px"
              @click="handleExtract"
              >提 取
            </el-button>
          </div>
          <div class="tableList">
            <div class="tableFirst">
              <div class="tableTitle">
                <i class="el-icon-collection"></i>
                <span style="margin-left: 5px">发表成就奖论文情况</span>
              </div>
              <el-table :data="tableFirstData" border>
                <el-table-column align="center" fixed type="index" label="序号">
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="thesisName"
                  label="论文名称"
                >
                </el-table-column>
                <el-table-column align="center" prop="level" label="级别">
                </el-table-column>
                <el-table-column align="center" prop="grade" label="等级">
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="publishTime"
                  label="发表时间"
                >
                </el-table-column>
                <el-table-column align="center" label="附件" prop="thesisList">
                  <template slot-scope="scope">
                    <!-- <el-carousel trigger="click" height="60px">
                      <el-carousel-item
                        v-for="(accessory, index) in scope.row.thesisListInfo"
                        :key="index"
                      >
                        <template>
                          <a :href="baseUrl + accessory.accessoryUrl">{{
                            accessory.accessoryName
                          }}</a>
                        </template>
                      </el-carousel-item>
                    </el-carousel> -->
                    <span
                      v-for="(accessory, index) in scope.row.thesisListInfo"
                      :key="index"
                    >
                      <el-link
                        :href="`${baseUrl}${accessory.accessoryUrl}`"
                        :underline="false"
                        target="_blank"
                      >
                        <span class="el-icon-document">
                          {{ accessory.accessoryName }}
                        </span>
                      </el-link>
                    </span>
                  </template>
                </el-table-column>
              </el-table>
            </div>
            <div class="tableSecond">
              <div class="tableTitle">
                <i class="el-icon-edit-outline"></i>
                <span style="margin-left: 5px"
                  >课题、结题、专著、校本教材编写情况</span
                >
              </div>
              <el-table :data="tableSecondData" border>
                <el-table-column align="center" fixed type="index" label="序号">
                </el-table-column>
                <el-table-column align="center" prop="name" label="名称">
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="publishTime"
                  label="发表时间"
                >
                </el-table-column>
                <el-table-column
                  align="center"
                  label="附件"
                  prop="materialList"
                >
                  <template slot-scope="scope">
                    <!-- <el-carousel trigger="click" height="60px">
                      <el-carousel-item
                        v-for="(accessory, index) in scope.row.matListInfo"
                        :key="index"
                      >
                        <a :href="baseUrl + accessory.accessoryUrl">{{
                          accessory.accessoryName
                        }}</a>
                      </el-carousel-item>
                    </el-carousel> -->
                    <span
                      v-for="(accessory, index) in scope.row.matListInfo"
                      :key="index"
                    >
                      <el-link
                        :href="`${baseUrl}${accessory.accessoryUrl}`"
                        :underline="false"
                        target="_blank"
                      >
                        <span class="el-icon-document">
                          {{ accessory.accessoryName }}
                        </span>
                      </el-link>
                    </span>
                  </template>
                </el-table-column>
              </el-table>
            </div>
            <div class="tableThird">
              <div class="tableTitle">
                <i class="el-icon-data-analysis"></i>
                <span style="margin-left: 5px">培训情况</span>
              </div>
              <el-table :data="tableThirdData" border>
                <el-table-column align="center" fixed type="index" label="序号">
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="trainingTime"
                  label="培训时间"
                >
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="trainingName"
                  label="培训名称"
                >
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="isQualified"
                  label="是否合格"
                >
                </el-table-column>
                <el-table-column align="center" label="附件">
                  <template slot-scope="scope">
                    <!-- <el-carousel trigger="click" height="60px">
                      <el-carousel-item
                        v-for="(accessory, index) in scope.row.trainingListInfo"
                        :key="index"
                      >
                        <a :href="baseUrl + accessory.accessoryUrl">{{
                          accessory.accessoryName
                        }}</a>
                      </el-carousel-item>
                    </el-carousel> -->
                    <span
                      v-for="(accessory, index) in scope.row.trainingListInfo"
                      :key="index"
                    >
                      <el-link
                        :href="`${baseUrl}${accessory.accessoryUrl}`"
                        :underline="false"
                        target="_blank"
                      >
                        <span class="el-icon-document">
                          {{ accessory.accessoryName }}
                        </span>
                      </el-link>
                    </span>
                  </template>
                </el-table-column>
              </el-table>
            </div>
            <div class="tableForth">
              <div class="tableTitle">
                <i class="el-icon-trophy"></i>
                <span style="margin-left: 5px">业务获奖情况</span>
              </div>
              <el-table :data="tableForthData" border>
                <el-table-column align="center" fixed type="index" label="序号">
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="awardName"
                  label="获奖名称"
                >
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="awardTime"
                  label="获奖时间"
                >
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="gradeOfAward"
                  label="获奖等级"
                >
                </el-table-column>
                <el-table-column
                  align="center"
                  prop="licenselssuingAuthority"
                  label="发证机关"
                >
                </el-table-column>
                <el-table-column
                  align="center"
                  label="附件"
                  prop="awardList
"
                >
                  <template slot-scope="scope">
                    <!-- <el-carousel trigger="click" height="60px">
                      <el-carousel-item
                        v-for="(accessory, index) in scope.row.accListInfo"
                        :key="index"
                      >
                        <a :href="baseUrl + accessory.accessoryUrl">{{
                          accessory.accessoryName
                        }}</a>
                      </el-carousel-item>
                    </el-carousel> -->
                    <span
                      v-for="(accessory, index) in scope.row.accListInfo"
                      :key="index"
                    >
                      <el-link
                        :href="`${baseUrl}${accessory.accessoryUrl}`"
                        :underline="false"
                        target="_blank"
                      >
                        <span class="el-icon-document">
                          {{ accessory.accessoryName }}
                        </span>
                      </el-link>
                    </span>
                  </template>
                </el-table-column>
              </el-table>
            </div>
          </div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>

<script>
import {
  addTeacherNotice, //添加任务
  listTeacherNotice, // 任务列表
  infoTeaNotice, //任务详情
  updateTask, //添加修改
  infoTeacherNotice, //发布任务
  taskRetracted, //任务撤回
  taskCompleted, //任务完成
  delTaskInfo, //任务删除
  getteacherNotice, // 通知下档案查看|数据维护
  getNoticeInfo, //老师查看档案详情
  getTeacherTnfo, //档案列表
  getDepInfo, //级部查看档案详情
  getFileTnfo, //查看档案详情
  syncNotice, //同步档案
  updateInfo, //教师档案修改
  delInfo, //教师档案删除
  fileSubReview, //教师档案提交审核
  fileSubApproved, //教师档案提交通过
  fileSubRejected, //教师档案提交驳回
} from "@/api/smartSchool/teacherFiles/teacherElectronicFile";
export default {
  name: "personElectronicRecord",
  dicts: ["sys_user_sex", "education"],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      queryForm: {
        pageNum: 1,
        pageSize: 10,
        noticeName: "",
      },
      tableData: [],
      dialogVisible: false,
      form: {
        fid: "",
        filesSemester: "",
        gradeName: "",
        teacherName: "",
        sex: "",
        age: "",
        title: "",
        education: "",
        appearance: "",
        courseName: "",
        className: "",
        bzrClassName: "",
        fbzrClassName: "",
        isTeachingGroupLeader: "",
        isResearchGroupLeader: "",
        classHour: "",
        classTeacherDetails: "",
      },
      status: this.$route.query.status,
      dialogTableData: [],
      check: false,
      //弹窗表单
      dialogForm: {},
      //弹窗标题
      title: "",
      //弹窗表格1
      tableFirstData: [],
      //弹窗表格2
      tableSecondData: [],
      //弹窗表格3
      tableThirdData: [],
      //弹窗表格4
      tableForthData: [],
      tableFirstDataInfo: [], //awardList
      tableFirstDataInfoRes: [], //1
      tableSecondDataInfo: [], //materialList
      tableSecondDataInfoRes: [], //2
      tableThirdDataInfo: [], //trainingList
      tableThirdDataInfoRes: [], //3
      tableForthDataInfo: [], //thesisList
      tableForthDataInfoRes: [], //4
      baseUrl: process.env.VUE_APP_BASE_API,
      tableDataInfo: [],
    };
  },
  mounted() {
    this.getList();
  },
  methods: {
    /** 查询信息列表 */
    getList() {
      this.loading = true;
      const params = {
        userId: this.$store.state.user.userId,
        noticeName: this.queryForm.noticeName,
      };
      getTeacherTnfo(params).then((res) => {
        this.tableData = res.rows;
        console.log(this.tableData, "this.tableData11111");
        this.tableDataInfo = res.rows.map((item) => {
          return item.fid; // 如果需要将 fid 属性单独提取出来，可以返回一个包含 fid 的新数组
        });
        this.total = res.total;
      });
    },
    isImage(url) {
      return /\.(jpg|jpeg|png|gif)$/i.test(url);
    },

    // 提取
    handleExtract() {
      const id = this.form.id;
      syncNotice(id).then((res) => {
        this.tableDataInfo.forEach((item) => {
          getFileTnfo(item).then((res) => {
            // this.form = res.data;
            this.tableFirstData = res.data.thesisList;
            this.tableSecondData = res.data.materialList;
            this.tableThirdData = res.data.trainingList;
            this.tableForthData = res.data.awardList;
            // ----------------------------------------4
            this.tableForthDataInfo = res.data.awardList.map((item) => {
              item.accList = item.accessories;
              return item;
            });
            this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
              val.accListInfo = val.accList;
              return val;
            });
            // ---------------------------------------2
            this.tableSecondDataInfo = res.data.materialList.map((item) => {
              item.accessoriesInfo = item.accessories;
              return item;
            });
            this.tableSecondDataInfoRes = this.tableSecondDataInfo.map(
              (val) => {
                val.matListInfo = val.accessories;
                return val;
              }
            );
            // ---------------------------------------3
            this.tableThirdDataInfo = res.data.trainingList.map((item) => {
              item.accessoriesInfo = item.accessories;
              return item;
            });
            this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
              val.trainingListInfo = val.accessories;
              return val;
            });
            // -----------------------------1
            this.tableFirstDataInfo = res.data.thesisList.map((item) => {
              item.accessoriesInfo = item.schoolAccessoryList;
              return item;
            });
            this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
              val.thesisListInfo = val.schoolAccessoryList;
              return val;
            });
          });
        });
        this.$modal.msgSuccess("提取成功");
      });
    },

    //  搜索按钮
    handleQuery() {
      this.queryForm.pageNum = 1;
      this.getList();
    },
    //  重置按钮
    resetQuery() {
      this.queryForm = {
        pageNum: 1,
        pageSize: 10,
        noticeName: "",
      };
      this.handleQuery();
    },
    //查看按钮
    handleCheck(row) {
      this.check = true;
      this.dialogVisible = true;
      const id = row.fid;
      getFileTnfo(id).then((res) => {
        this.form = res.data;
        this.title = "基本信息查看";
        this.tableFirstData = res.data.thesisList;
        this.tableSecondData = res.data.materialList;
        this.tableThirdData = res.data.trainingList;
        this.tableForthData = res.data.awardList;
        // ----------------------------------------4
        this.tableForthDataInfo = res.data.awardList.map((item) => {
          item.accList = item.accessories;
          return item;
        });
        this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
          val.accListInfo = val.accList;
          return val;
        });
        // ---------------------------------------2
        this.tableSecondDataInfo = res.data.materialList.map((item) => {
          item.accessoriesInfo = item.accessories;
          return item;
        });
        this.tableSecondDataInfoRes = this.tableSecondDataInfo.map((val) => {
          val.matListInfo = val.accessories;
          return val;
        });
        // ---------------------------------------3
        this.tableThirdDataInfo = res.data.trainingList.map((item) => {
          item.accessoriesInfo = item.accessories;
          return item;
        });
        this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
          val.trainingListInfo = val.accessories;
          return val;
        });
        // -----------------------------1
        this.tableFirstDataInfo = res.data.thesisList.map((item) => {
          item.accessoriesInfo = item.schoolAccessoryList;
          return item;
        });
        this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
          val.thesisListInfo = val.schoolAccessoryList;
          return val;
        });
      });
    },
    //填写按钮
    handleEdit(row) {
      this.check = false;
      this.title = "基本信息修改";
      this.dialogVisible = true;
      const id = row.fid;
      getFileTnfo(id).then((res) => {
        this.form = res.data;
        console.log(res.data, "填写按钮");
        this.title = "基本信息查看";
        this.tableFirstData = res.data.thesisList;
        this.tableSecondData = res.data.materialList;
        this.tableThirdData = res.data.trainingList;
        this.tableForthData = res.data.awardList;
        // ----------------------------------------4
        this.tableForthDataInfo = res.data.awardList.map((item) => {
          item.accList = item.accessories;
          return item;
        });
        this.tableForthDataInfoRes = this.tableForthDataInfo.map((val) => {
          val.accListInfo = val.accList;
          return val;
        });
        // ---------------------------------------2
        this.tableSecondDataInfo = res.data.materialList.map((item) => {
          item.accessoriesInfo = item.accessories;
          return item;
        });
        this.tableSecondDataInfoRes = this.tableSecondDataInfo.map((val) => {
          val.matListInfo = val.accessories;
          return val;
        });
        // ---------------------------------------3
        this.tableThirdDataInfo = res.data.trainingList.map((item) => {
          item.accessoriesInfo = item.accessories;
          return item;
        });
        this.tableThirdDataInfoRes = this.tableThirdDataInfo.map((val) => {
          val.trainingListInfo = val.accessories;
          return val;
        });
        // -----------------------------1
        this.tableFirstDataInfo = res.data.thesisList.map((item) => {
          item.accessoriesInfo = item.schoolAccessoryList;
          return item;
        });
        this.tableFirstDataInfoRes = this.tableFirstDataInfo.map((val) => {
          val.thesisListInfo = val.schoolAccessoryList;
          return val;
        });
      });
    },
    //提交按钮
    handleSubmit(row) {
      const id = row.fid;
      this.$modal
        .confirm("是否提交该活动？")
        .then(function () {
          return fileSubReview(id);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("提交成功");
        })
        .catch((err) => {
          console.error(err);
        });
    },

    //弹窗确定按钮
    confirmDialog(row) {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.fid != null) {
            // 修改
            const params = {
              id: this.form.id,
              sex: this.form.sex,
              age: this.form.age,
              title: this.form.title,
              education: this.form.education,
              appearance: this.form.appearance,
              courseName: this.form.courseName,
              className: this.form.className,
              bzrClassName: this.form.bzrClassName,
              fbzrClassName: this.form.fbzrClassName,
              isTeachingGroupLeader: this.form.isTeachingGroupLeader,
              isResearchGroupLeader: this.form.isResearchGroupLeader,
              classHour: this.form.classHour,
              classTeacherDetails: this.form.classTeacherDetails,
              state: this.form.state,
            };
            console.log(params, "修改");

            updateInfo(params)
              .then((response) => {
                this.getList();
                this.$message.success("修改成功");
                this.dialogVisible = false;
              })
              .catch((err) => {});
          } else {
            // 新增
            const params = {
              id: this.form.id,
              sex: this.form.sex,
              age: this.form.age,
              title: this.form.title,
              education: this.form.education,
              appearance: this.form.appearance,
              courseName: this.form.courseName,
              className: this.form.className,
              bzrClassName: this.form.bzrClassName,
              fbzrClassName: this.form.fbzrClassName,
              isTeachingGroupLeader: this.form.isTeachingGroupLeader,
              isResearchGroupLeader: this.form.isResearchGroupLeader,
              classHour: this.form.classHour,
              classTeacherDetails: this.form.classTeacherDetails,
              state: this.form.state,
            };
            console.log(params, "新增");

            updateInfo(params)
              .then((response) => {
                this.getList();
                this.$message.success("新增成功");
                this.dialogVisible = false;
              })
              .catch((err) => {});
          }
        }
      });
    },
  },
};
</script>

<style scoped>
.leftContent {
  padding-top: 5px;
  padding-left: 10px;
  width: 25%;
  border: 1px solid silver;
  border-radius: 10px;
  padding-bottom: 10px;
}

.rightContent {
  padding-top: 5px;
  padding-left: 10px;
  margin-left: 5px;
  width: 75%;
  border: 1px solid silver;
  border-radius: 10px;
}

.line {
  display: inline-block;
  width: 5px;
  height: 20px;
  vertical-align: middle;
  background: #0d84ff;
  border-radius: 5px;
}

.title {
  padding-left: 10px;
  font-size: 16px;
  vertical-align: middle;
}
</style>
