<!--级部教师电子档案 -->
<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.teacherName"></el-input>
      </el-form-item>
      <el-form-item label="任务名称">
        <el-select clearable v-model="queryForm.noticeName" style="width: 100%">
          <el-option
            v-for="item in listTeacherInfo"
            :key="item.id"
            :label="item.noticeName"
            :value="item.id"
          >
            {{ item.noticeName }}
          </el-option>
        </el-select>
      </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-button size="mini" icon="el-icon-refresh" @click="handleMutiSubmit"
          >确认</el-button
        >
      </el-form-item>
      <el-row :gutter="10">
        <el-col :span="1.5">
          <span>总计：</span>
          <span style="font-size: 14px">{{ this.total }}</span>
        </el-col>
        <el-col :span="1.5">
          <span>已填写：</span>
          <span style="font-size: 14px">{{ this.yfb }}</span>
        </el-col>
        <el-col :span="1.5">
          <span>已确认：</span>
          <span style="font-size: 14px">{{ this.yqr }}</span>
        </el-col>
      </el-row>
    </el-form>
    <el-table
      ref="multipleTable"
      style="margin-top: 20px"
      border
      :data="tableData"
      @selection-change="handleSelectionChange"
      @cell-dblclick="handleCheck"
    >
      <el-table-column type="selection" width="55" :selectable="selectable">
        <template> </template>
      </el-table-column>
      <el-table-column type="index" label="序号" width="55" align="center" />
      <el-table-column
        label="是否填写"
        align="center"
        prop="state"
        min-width="200"
      >
        <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"
        prop="noticeName"
        min-width="150"
      /> -->
      <el-table-column
        label="学年学期"
        align="center"
        prop="filesSemester"
        min-width="150"
      />
      <el-table-column
        label="级部"
        align="center"
        min-width="150"
        prop="gradeName"
      />
      <el-table-column
        label="姓名"
        align="center"
        min-width="200"
        prop="teacherName"
      />
      <el-table-column label="年龄" align="center" min-width="150" prop="age" />
      <el-table-column
        label="职称"
        align="center"
        min-width="150"
        prop="title"
      />
      <el-table-column
        label="学历"
        align="center"
        min-width="150"
        prop="education"
      >
        <template slot-scope="{ row }">
          {{
            row.education == 0
              ? "高中"
              : row.education == 1
              ? "专科"
              : row.education == 2
              ? "本科"
              : row.education == 3
              ? "研究生"
              : row.education == 4
              ? "硕士"
              : row.education == 5
              ? "博士"
              : ""
          }}
        </template>
      </el-table-column>
      <el-table-column
        label="政治面貌"
        align="center"
        min-width="150"
        prop="appearance"
      />
      <el-table-column
        label="任教学科"
        align="center"
        min-width="150"
        prop="courseName"
      />
      <el-table-column
        label="任教班级"
        align="center"
        min-width="150"
        prop="className"
      />
      <el-table-column
        label="任正班主任班级"
        align="center"
        min-width="150"
        prop="bzrClassName"
      />
      <el-table-column
        fixed="right"
        label="操作"
        align="center"
        min-width="200"
      >
        <template slot-scope="scope">
          <!-- 已发布 -->
          <div v-if="scope.row.state == '4'">
            <el-button size="mini" type="text" @click="handleSubmit(scope.row)"
              >确认
            </el-button>
            <el-button size="mini" type="text" @click="handleReject(scope.row)"
              >驳回
            </el-button>
            <el-button size="mini" type="text" @click="handleEdit(scope.row)"
              >修改
            </el-button>
            <el-button size="mini" type="text" @click="handleCheck(scope.row)"
              >查看
            </el-button>
          </div>
          <!--已提交-->
          <div v-if="scope.row.state == '1'">
            <el-button size="mini" type="text" @click="handleCheck(scope.row)"
              >查看
            </el-button>
          </div>
          <div v-if="scope.row.state == '5'">
            <el-button size="mini" type="text" @click="handleCheck(scope.row)"
              >查看
            </el-button>
          </div>
          <div v-if="scope.row.state == '9'">
            <el-button size="mini" type="text" @click="handleCheck(scope.row)"
              >查看
            </el-button>
          </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="dialogForm"
            label-width="120px"
          >
            <el-form-item label="学年学期:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.filesSemester"
              ></el-input>
            </el-form-item>
            <el-form-item label="级部:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.gradeName"
              ></el-input>
            </el-form-item>
            <el-form-item label="姓名:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.teacherName"
              ></el-input>
            </el-form-item>
            <!-- <el-form-item label="性别:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.sex"
              ></el-input>
            </el-form-item> -->
            <el-form-item
              :disabled="true"
              label="性别："
              style="padding-right: 10px"
            >
              <el-select
                :readonly="check == true ? true : false"
                v-model="dialogForm.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 label="年龄:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.age"
              ></el-input>
            </el-form-item>
            <el-form-item label="职称:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.title"
              ></el-input>
            </el-form-item>
            <!-- <el-form-item label="学历:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.education"
              ></el-input>
            </el-form-item> -->
            <el-form-item
              :disabled="true"
              label="学历:"
              style="padding-right: 10px"
            >
              <el-select
                :readonly="check == true ? true : false"
                v-model="dialogForm.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 label="政治面貌:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.appearance"
              ></el-input>
            </el-form-item>
            <el-form-item label="任教学科:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.courseName"
              ></el-input>
            </el-form-item>
            <el-form-item label="任教班级:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.className"
              ></el-input>
            </el-form-item>
            <el-form-item label="任正班主任班级:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.bzrClassName"
              ></el-input>
            </el-form-item>
            <el-form-item label="任副班主任班级:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.fbzrClassName"
              ></el-input>
            </el-form-item>
            <el-form-item label="是否教学组长:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.isTeachingGroupLeader"
              ></el-input>
            </el-form-item>
            <el-form-item label="是否教研组长:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.isResearchGroupLeader"
              ></el-input>
            </el-form-item>
            <el-form-item label="设计课时量:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.classHour"
              ></el-input>
            </el-form-item>
            <el-form-item label="班主任情况:" style="padding-right: 10px">
              <el-input
                :readonly="check == true ? true : false"
                v-model="dialogForm.classTeacherDetails"
              ></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
              size="small"
              type="primary"
              @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
              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"> -->
                    <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>
                    <!-- </el-carousel-item> -->
                    <!-- </el-carousel> -->
                  </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"
                      >
                        <img
                          :src="baseUrl + accessory.accessoryUrl"
                          style="width: 150px"
                        />
                      </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"
                      >
                        <img
                          :src="baseUrl + accessory.accessoryUrl"
                          style="width: 150px"
                        />
                      </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="licenseIssuingAuthority"
                  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"
                      >
                        <img
                          :src="baseUrl + accessory.accessoryUrl"
                          style="width: 150px"
                        />
                      </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, //老师查看档案详情
  getDepInfo, //级部查看档案详情
  getFileTnfo, //查看档案详情
  syncNotice, //同步档案
  updateInfo, //教师档案修改
  delInfo, //教师档案删除
  fileSubReview, //教师档案提交审核
  fileSubApproved, //教师档案提交通过
  fileSubRejected, //教师档案提交驳回
  getGradeTnfo, //级部列表查询
} from "@/api/smartSchool/teacherFiles/teacherElectronicFile";
export default {
  name: "gradeElectronicRecord",

  dicts: ["sys_user_sex", "education"],
  data() {
    return {
      completedCount: "", //填写
      confirmedCount: "", //确认
      listTeacherInfo: [],
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      yfb: 0,
      yqr: 0,
      queryForm: {
        pageSize: 10,
        pageNum: 1,
        noticeName: "",
        teacherName: "",
      },
      tableData: [],
      dialogVisible: false,
      form: {},
      status: this.$route.query.status,
      dialogTableData: [],
      check: false,
      //弹窗表单
      dialogForm: {},
      //弹窗标题
      title: "",
      //弹窗表格1
      tableFirstData: [],
      //弹窗表格2
      tableSecondData: [],
      //弹窗表格3
      tableThirdData: [],
      //弹窗表格4
      tableForthData: [],
      // 多选
      ids: [],
      tableFirstDataInfo: [], //awardList
      tableFirstDataInfoRes: [], //1
      tableSecondDataInfo: [], //materialList
      tableSecondDataInfoRes: [], //2
      tableThirdDataInfo: [], //trainingList
      tableThirdDataInfoRes: [], //3
      tableForthDataInfo: [], //thesisList
      tableForthDataInfoRes: [], //4
      baseUrl: process.env.VUE_APP_BASE_API,
    };
  },
  mounted() {
    this.getList();
    this.getListInfo();
  },
  methods: {
    // 任务下拉框
    getListInfo() {
      const params = {
        pageNum: this.queryForm.pageNum,
        pageSize: this.queryForm.pageSize,
        noticeState: 2,
      };
      const codePromise = new Promise((resolve) => {
        listTeacherNotice(params).then((res) => {
          this.listTeacherInfo = res.rows;
          resolve();
        });
      });
      return codePromise;
    },

    /** 查询信息列表 */
    async getList() {
      this.loading = true;
      await this.getListInfo();
      const params = {
        pageNum: this.queryForm.pageNum,
        pageSize: this.queryForm.pageSize,
        gradeTeacherId: this.$store.state.user.userId,
        noticeId: this.queryForm.noticeName,
        noticeName: this.queryForm.noticeName,
        teacherName: this.queryForm.teacherName,
      };

      getGradeTnfo(params).then((res) => {
        this.tableData = res.rows;
        console.log(res, 11111111);
        this.total = res.total;
        this.yfb = res.yfb;
        this.yqr = res.yqr;
        this.completedCount = res.rows.filter(
          (item) => item.state === 3
        ).length;
        this.confirmedCount = res.rows.filter(
          (item) => item.state === 5
        ).length;
        // console.log(this.completedCount, "this.completedCount");
        // console.log(this.confirmedCount, "this.confirmedCount");
      });
    },

    //  搜索按钮
    handleQuery() {
      this.queryForm.pageNum = 1;
      this.getList();
    },
    //  重置按钮
    resetQuery() {
      this.queryForm = {
        pageNum: 1,
        pageSize: 10,
        noticeName: "",
        name: "",
      };
      this.form = {};
      this.handleQuery();
    },
    //多选
    handleSelectionChange(row) {
      this.ids = row.map((item) => item.id);
    },
    //是否可勾选
    selectable(row, index) {
      if (row.state !== "5") {
        return true;
      }
    },
    //多选确认
    handleMutiSubmit(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm("是否确认该活动？")
        .then(function () {
          return fileSubApproved(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("任务已确认");
        })
        .catch((err) => {
          console.error(err);
        });
    },
    //查看按钮
    handleCheck(row) {
      this.check = true;
      this.dialogVisible = true;
      const id = row.id;
      getFileTnfo(id).then((res) => {
        this.dialogForm = res.data;
        console.log(this.dialogForm, 2222222);
        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;
        });
        console.log(this.tableForthDataInfo, "this.tableForthDataInfo333333");
        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.resetQuery();
      this.check = false;
      this.title = "基本信息修改";
      this.dialogVisible = true;
      const id = row.id;
      getFileTnfo(id).then((res) => {
        this.dialogForm = 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;
        });
        console.log(this.tableForthDataInfo, "this.tableForthDataInfo333333");
        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.handleCheck();
      //   this.dialogForm = row;
      //   this.dialogForm = JSON.parse(JSON.stringify(row));
    },

    //确认按钮
    handleSubmit(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm("是否确认该活动？")
        .then(function () {
          return fileSubRejected(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("任务已确认");
        })
        .catch((err) => {
          console.error(err);
        });
    },
    //驳回按钮
    handleReject(row) {
      const ids = row.id || this.ids;
      this.$modal
        .confirm("是否提交该活动？")
        .then(function () {
          return fileSubApproved(ids);
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("任务已提交");
        })
        .catch((err) => {
          console.error(err);
        });
    },
    // 提取 `
    handleExtract() {
      const id = this.dialogForm.id;
      syncNotice(id).then((res) => {
        console.log(id, "id");
        console.log("res提取", res);
        this.$modal.msgSuccess("提取成功");
        this.getList();
      });
    },
    //弹窗确定按钮
    confirmDialog() {
      this.dialogVisible = false;
      const params = {
        id: this.dialogForm.id,
        sex: this.dialogForm.sex,
        age: this.dialogForm.age,
        title: this.dialogForm.title,
        education: this.dialogForm.education,
        appearance: this.dialogForm.appearance,
        courseName: this.dialogForm.courseName,
        className: this.dialogForm.className,
        bzrClassName: this.dialogForm.bzrClassName,
        fbzrClassName: this.dialogForm.fbzrClassName,
        isTeachingGroupLeader: this.dialogForm.isTeachingGroupLeader,
        isResearchGroupLeader: this.dialogForm.isResearchGroupLeader,
        classHour: this.dialogForm.classHour,
        classTeacherDetails: this.dialogForm.classTeacherDetails,
        state: this.dialogForm.state,
      };
      updateInfo(params).then((res) => {
        this.form = res;
        this.getList();
      });
    },
  },
};
</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>
