<!-- 活动解析 -->
<template>
  <div>
    <!-- table 表格 -->
    <el-row :gutter="20" class="main-items">
      <!--数据监控-->
      <el-col :span="20" class="main" :offset="2">
        <el-row :gutter="20" class="main-header">
          <el-col :span="3" :offset="1">
            <div class="main-header-item">
              <div class="block">
                <el-date-picker
                  v-model="selMonth"
                  type="month"
                  placeholder="选择月份"
                  value-format="yyyy-MM"
                  :picker-options="pickerOptions0"
                  @change="GetTeacherSalaryListDatas()"
                ></el-date-picker>
              </div>
            </div>
          </el-col>
          <el-col :span="4" :offset="14">
            <div class="teach-block">
              <div class="Dayteach-Allot">
                <input
                  type="text"
                  placeholder="请输入老师名字"
                  v-model="inputValue"
                  class="Dayinput-with-Allot"
                />
                <span
                  v-if="ActiveIndex == 0"
                  @click="GetTeacherSalaryList()"
                  class="DaySeachIcon el-icon-search"
                ></span>
                <span
                  v-if="ActiveIndex == 1"
                  @click="GetKnownleageSalaryList()"
                  class="DaySeachIcon el-icon-search"
                ></span>
                <span
                  v-if="ActiveIndex == 2"
                  @click="AllInfoList()"
                  class="DaySeachIcon el-icon-search"
                ></span>
                 <span
                  v-if="ActiveIndex == 3"
                  @click="GetGetTeacherCorrectDetailInfo()"
                  class="DaySeachIcon el-icon-search"
                ></span>
              </div>
            </div>
          </el-col>
           <el-col :span="20" :offset="2">
               <el-col :span="14" :offset="4">
                   <div
              v-for="(item, key) of teacherList"
              :key="key"
              @click="teacherType(key)"
              :class="{navteacfertypeactive:ActiveIndex == key,ApporStyles:true}"
            >{{item}}</div>
                  </el-col>
             <el-col :span="4" :offset="2">
                 <div class="main-header-item">
              <i v-if="ActiveIndex == 0 || ActiveIndex == 1 || ActiveIndex == 2" class="el-icon-printer"></i>
              <span v-if="ActiveIndex == 0" @click="excel()">导出表格</span>
              <span v-if="ActiveIndex == 1" @click="ApporvalAutoexcel()">导出表格</span>
              <span v-if="ActiveIndex == 2" @click="TeacherInfoExcel()">导出表格</span>
            </div>
            </el-col>
        
          </el-col>
        </el-row>
        <!--批改老师列表  -->
        <el-col v-if="ActiveIndex == 0">
          <el-table
            :data="getTeacherSalaryList.list"
            :header-cell-class-name="tableheaderClassName"
            :header-cell-style="{
          'background-color': '#F6F7FB',
          'color': '#393939',
          'font-size': '16px'
           }"
            size="medium"
            border
            stripe
          >
            <el-table-column label="注册老师" header-align="center">
              <template slot-scope="scope">
                <div class="scope-list">
                  <img
                    :src="BASE_URL+scope.row.imgUrl"
                    alt
                    class="table-img"
                    v-if="scope.row.imgUrl"
                  />
                  <img
                    src="../../assets/img/user.jpg"
                    alt
                    v-if="!scope.row.imgUrl"
                    class="table-img"
                  />
                  <span class="scope-name">{{scope.row.name}}</span>
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="basicSalary" label="是否有底薪" header-align="center">
              <!-- <template slot-scope="scope">
              <div class="scope-list">
                <span v-if="scope.row.whetherHaveBasicSalary == 1"  class="scope-name">是</span>
                  <span v-if="scope.row.whetherHaveBasicSalary == 0"  class="scope-name">无</span>
              </div>
              </template>-->
            </el-table-column>
            <el-table-column prop label="1～2年级" header-align="center">
              <el-table-column prop="autoLowGradeCount" label="自动批改(0.2元/张)"></el-table-column>
              <el-table-column prop="manualLowGradeCount" label="手动批改(0.3元/张)"></el-table-column>
            </el-table-column>
            <el-table-column prop label="3～4年级" header-align="center">
              <el-table-column prop="autoMiddleGradeCount" label="自动批改(0.2元/张)"></el-table-column>
              <el-table-column prop="manualMiddleGradeCount" label="手动批改(0.4元/张)"></el-table-column>
            </el-table-column>
            <el-table-column label="5～6年级" header-align="center">
              <el-table-column prop="autoHighGradeCount" label="自动批改(0.2元/张)"></el-table-column>
              <el-table-column prop="manualHighGradeCount" label="手动批改(0.5元/张)"></el-table-column>
            </el-table-column>
            <el-table-column prop="total" label="总计" header-align="center"></el-table-column>
          </el-table>
          <!-- 分页显示 -->
          <div class="page-block" v-if="parseInt(getTeacherSalaryList.pages) > 10">
            <el-pagination
              background
              @size-change="handleSizeChange"
              @current-change="pageChange"
              :current-page.sync="currentPage"
              :page-sizes="[10,50,100,200]"
              layout="sizes,total,prev, pager, next"
              :total="parseInt(getTeacherSalaryList.pages)"
            ></el-pagination>
          </div>
        </el-col>
        <!-- 匹配知识点老师 -->
        <div v-if="ActiveIndex == 1">
          <el-table
            style="width: 100%"
            :data="GetKnowledgeTeacherSalaryList.list"
            :header-cell-class-name="tableheaderClassName"
            :header-cell-style="{
          'background-color': '#F6F7FB',
          'color': '#393939',
          'font-size': '16px'
           }"
            size="medium"
            border
            stripe
          >
            <el-table-column label="注册老师" header-align="center">
              <template slot-scope="scope">
                <div class="scope-list">
                  <img
                    :src="BASE_URL+scope.row.imgUrl"
                    alt
                    class="table-img"
                    v-if="scope.row.imgUrl"
                  />
                  <img
                    src="../../assets/img/user.jpg"
                    alt
                    v-if="!scope.row.imgUrl"
                    class="table-img"
                  />
                  <span class="scope-name">{{scope.row.name}}</span>
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="basicSalary" label="是否有底薪" header-align="center">
              <!-- <template slot-scope="scope">
              <div class="scope-list">
                <span v-if="scope.row.whetherHaveBasicSalary == 1"  class="scope-name">是</span>
                  <span v-if="scope.row.whetherHaveBasicSalary == 0"  class="scope-name">无</span>
              </div>
              </template>-->
            </el-table-column>
            <el-table-column prop="correctCount" label="批改张数(0.1元/张)" header-align="center"></el-table-column>
            <el-table-column prop="total" label="总计" header-align="center"></el-table-column>
          </el-table>
          <!-- 分页显示 -->
          <el-pagination
            background
            @size-change="handleSizeChange1"
            @current-change="pageChange1"
            :page-sizes="[10,50,100,200]"
            :current-page.sync="currentPage"
            layout="sizes, total,prev, pager, next"
            :total="parseInt(GetKnowledgeTeacherSalaryList.pages)"
          ></el-pagination>
        </div>
        <!-- 老师资料表 -->
        <div v-if="ActiveIndex == 2">
          <el-table
            style="width: 100%"
            :data="this.AllTeacherInfoList.list"
            :header-cell-class-name="tableheaderClassName"
            :header-cell-style="{
          'background-color': '#F6F7FB',
          'color': '#393939',
          'font-size': '16px'
           }"
            size="medium"
            border
            stripe
          >
            <el-table-column label="注册老师" header-align="center">
              <template slot-scope="scope">
                <div class="scope-list">
                  <img
                    :src="BASE_URL+scope.row.imgUrl"
                    alt
                    class="table-img"
                    v-if="scope.row.imgUrl"
                  />
                  <img
                    src="../../assets/img/user.jpg"
                    alt
                    v-if="!scope.row.imgUrl"
                    class="table-img"
                  />
                  <span class="scope-name">{{scope.row.name}}</span>
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="bankName" label="开户行" header-align="center"></el-table-column>
            <el-table-column prop="bankBranch" label="开户支行" header-align="center"></el-table-column>
            <el-table-column prop="cardholder" label="开户人姓名" header-align="center"></el-table-column>
            <el-table-column prop="cardNumber" label="银行卡号" header-align="center"></el-table-column>
            <el-table-column prop label="身份证" header-align="center" width="200">
              <template slot-scope="scope">
                <img
                  :src="BASE_URL+scope.row.idFace"
                  alt
                  class="identity-card"
                  v-if="scope.row.idFace"
                />
                <span
                  v-if="scope.row.idFace"
                  class="bank-active"
                  @click="isShow(3,scope.row.idFace)"
                >查看</span>
              </template>
            </el-table-column>
          </el-table>
          <!-- 分页显示 -->
          <el-pagination
            background
            @size-change="handleSizeChange2"
            @current-change="pageChange2"
            :page-sizes="[10,50,100,200]"
            :current-page.sync="currentPage"
            layout="sizes, total,prev, pager, next"
            :hide-on-single-page="true"
            :total="parseInt(AllTeacherInfoList.pages)"
          ></el-pagination>
        </div>
        <!-- 批改明细 -->
        <div v-if="ActiveIndex == 3">
          <el-table
            style="width: 100%"
            :data="this.GetTeacherCorrectDetail.list"
            :header-cell-class-name="tableheaderClassName"
            :header-cell-style="{
          'background-color': '#F6F7FB',
          'color': '#393939',
          'font-size': '16px'
           }"
            size="medium"
            border
            stripe
          >
            <el-table-column label="注册老师" header-align="center">
              <template slot-scope="scope">
                <div class="scope-list">
                  <img
                    :src="BASE_URL+scope.row.imgUrl"
                    alt
                    class="table-img"
                    v-if="scope.row.imgUrl"
                  />
                  <img
                    src="../../assets/img/user.jpg"
                    alt
                    v-if="!scope.row.imgUrl"
                    class="table-img"
                  />
                  <span class="scope-name">{{scope.row.name}}</span>
                </div>
              </template>
            </el-table-column>
            <el-table-column prop="subject" label="科目" header-align="center"></el-table-column>
            <el-table-column prop="regisTime" label="注册时间" header-align="center"></el-table-column>
            <el-table-column prop="status" label="状态" header-align="center">
                  <template slot-scope="scope">
                <span
                style="color:red;"
                  v-if="scope.row.status == 0"
               
                >封号</span>
                  <span
                  v-if="scope.row.status == 1"
                  
                >在岗</span>
                  <span
                  v-if="scope.row.status == 2"
                 
                >离岗</span>
              </template>
            </el-table-column>
            <el-table-column prop="totalCorrectCount" label="累计批改总张数" header-align="center">
                <template slot-scope="scope">
                <span 
                  class="ClickWork"
                  @click="TotalHomeworklists(scope.row)"
                >{{scope.row.totalCorrectCount}}</span>
              </template>
            </el-table-column>
            <el-table-column prop label="报错累计张数" header-align="center" width="200">
              <template slot-scope="scope">
                <span
                  class="ClickWork"
                  @click="HomeworkWornglists(scope.row)"
                >{{scope.row.totalWrongCount}}</span>
              </template>
            </el-table-column>
          </el-table>
          <!-- 分页显示 -->
          <el-pagination
            background
            @size-change="handleSizeChange3"
            @current-change="pageChange3"
            :page-sizes="[10,50,100,200]"
            :current-page.sync="currentPage"
            layout="sizes, total,prev, pager, next"
            :hide-on-single-page="true"
            :total="parseInt(GetTeacherCorrectDetail.pages)"
          ></el-pagination>
        </div>
      </el-col>
    </el-row>

    <!--弹框-->
    <div class="showModel" @click="allShowModel(2)" v-if="isPigai"></div>
    <div class="model" v-if="isPigai">
      <div class="model-text">
        <div class="model-text-items">
          <div>
            <img
              src="../../assets/img/del@2x.png"
              alt
              @click="allShowModel(2)"
              class="model-text-items-close"
            />
          </div>
          <div>是否导出表格？</div>
        </div>
        <div class="model-btn">
          <div class="model-btn-items main-gay">是</div>
          <div class="model-btn-items model-grdeen">否</div>
        </div>
      </div>
    </div>
    <!-- 查看身份证 -->
    <div class="showModel" @click="allShowModel(3)" v-if="cardShow"></div>
    <div class="model" v-if="cardShow" style="width: 34%;left: 33%;">
      <div class="model-text">
        <div class="model-text-items">
          <div>
            <img
              src="../../assets/img/del@2x.png"
              alt
              @click="allShowModel(3)"
              class="model-text-items-close"
            />
          </div>
        </div>
        <div class="model-btn">
          <img :src="BASE_URL+imgCard" alt class="model-btn-info-img" />
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { mapGetters, mapActions } from "vuex";
import { IMG_BASE_URL, APPOR_BASE_URL } from "@/config";
export default {
  components: {},
  name: "actvResolveLabel",
  props: {},
  data() {
    return {
      showApporAways: false,
      ActiveIndex: 0,
      inputValue: "",
      BASE_URL: IMG_BASE_URL,
      selMonth:this.monthFormatDate(),
      hiddenModel: false,
      isPigai: false,
      currentPageSize: 10,
      imgCard: "",
      currentPage: 1,
      cardShow: false,
      teacherList: ["批改老师", "匹配知识点老师", "银行卡信息", "批改明细"],
      ItemList: [
        {
          text: "数据监控"
        },
        {
          text: "当天"
        },
        {
          text: "当月"
        }
      ],
      pickerOptions0: {
        disabledDate(time) {
          return time.getTime() > Date.now() - 8.64e6;
        }
      },
      filters: {
        actvNm: "",
        actvCrtUserId: "",
        actvType: "",
        actvSmallType: "",
        // 排序
        MaxtimeValue: "",
        oneMonth: "",
        pageNo: 1,
        pageSize: 10,
        count: 0,
        orderField: "",
        orderAD: ""
      },
      filters0: {
        MaxtimeValue: "",
        oneMonth: "",
        pageNo: 1,
        pageSize: 10
      },
      filters1: {
        MaxtimeValue: "",
        oneMonth: "",
        pageNo: 1,
        pageSize: 10
      },
       filters2: {
        MaxtimeValue: "",
        oneMonth: "",
        pageNo: 1,
        pageSize: 10
      }
    };
  },
  watch: {},
  computed: {
    ...mapGetters([
      "getUser",
      "getTeacherSalaryList",
      "GetKnowledgeTeacherSalaryList",
      "AllTeacherInfoList",
      "GetTeacherCorrectDetail"
    ])
  },
  methods: {
    ...mapActions(["setUser"]),
    // 表格头部样式
    tableheaderClassName({ row, rowIndex }) {
      return "table-head-th";
    },
    //批改老师表格导出
    excel() {
      try {
        //var curTbl = document.getElementById(tableId);
        //var lenRow = curTbl.rows.length;
        var curTbl = $(".el-table")[0];
        var lenRow = curTbl.rows.length;
        //创建AX对象excel
        var oXL = new ActiveXObject("Excel.Application");
        //获取workbook对象
        var oWB = oXL.Workbooks.Add();
        var oSheet = oWB.ActiveSheet;

        //取得表格行数
        for (var i = 0; i < lenRow; i++) {
          var lenCol = curTbl.rows(i).cells.length;
          //取得每行的列数
          for (var j = 0; j < lenCol; j++) {
            oSheet.Cells(i + 1, j + 1).value = curTbl
              .rows(i)
              .cells(j).innerText;
          }
        }
        oXL.Visible = true; //设置excel可见属性
        //oXL.UserControl = true;
        //oXL=null
      } catch (e) {
        if (!+"\v1") {
          //ie浏览器
          alert("无法启动Excel，请确保电脑中已经安装了Excel!");
        } else {
          let arr = this.getTeacherSalaryList.list;
          let str =
            "注册老师,是否有底薪,1～2年级自动批改0.2元/张,1～2年级手动批改0.3元/张,3～4年级自动批改0.2元/张,3～4年级手动批改0.4元/张,5～6年级自动批改0.2元/张,5～6年级手动批改0.5元/张,总计/元";
          for (let i = 0; i < arr.length; i++) {
            str +=
              "\n" +
              arr[i].name +
              "," +
              arr[i].basicSalary +
              "," +
              arr[i].autoLowGradeCount +
              "," +
              arr[i].manualLowGradeCount +
              "," +
              arr[i].autoMiddleGradeCount +
              "," +
              arr[i].manualMiddleGradeCount +
              "," +
              arr[i].autoHighGradeCount +
              "," +
              arr[i].manualHighGradeCount +
              "," +
              arr[i].total;
          }
          var uri = "data:text/csv;charset=utf-8," + encodeURIComponent(str);
          var downloadLink = document.createElement("a");
          downloadLink.href = uri;
          downloadLink.download = "export.csv";

          document.body.appendChild(downloadLink);
          downloadLink.click();
          document.body.removeChild(downloadLink);
        }
      }
    },
    //匹配知识点老师
    ApporvalAutoexcel() {
      try {
        //var curTbl = document.getElementById(tableId);
        //var lenRow = curTbl.rows.length;
        var curTbl = $(".el-table")[0];
        var lenRow = curTbl.rows.length;
        //创建AX对象excel
        var oXL = new ActiveXObject("Excel.Application");
        //获取workbook对象
        var oWB = oXL.Workbooks.Add();
        var oSheet = oWB.ActiveSheet;

        //取得表格行数
        for (var i = 0; i < lenRow; i++) {
          var lenCol = curTbl.rows(i).cells.length;
          //取得每行的列数
          for (var j = 0; j < lenCol; j++) {
            oSheet.Cells(i + 1, j + 1).value = curTbl
              .rows(i)
              .cells(j).innerText;
          }
        }
        oXL.Visible = true; //设置excel可见属性
        //oXL.UserControl = true;
        //oXL=null
      } catch (e) {
        if (!+"\v1") {
          //ie浏览器
          alert("无法启动Excel，请确保电脑中已经安装了Excel!");
        } else {
          let arr = this.GetKnowledgeTeacherSalaryList.list;
          let str = "注册老师,是否有底薪,批改张数（0.1元/张）,总计/元";
          for (let i = 0; i < arr.length; i++) {
            str +=
              "\n" +
              arr[i].name +
              "," +
              arr[i].basicSalary +
              "," +
              arr[i].correctCount +
              "," +
              arr[i].total;
          }
          // debugger
          var uri = "data:text/csv;charset=utf-8," + encodeURIComponent(str);
          var downloadLink = document.createElement("a");
          downloadLink.href = uri;
          downloadLink.download = "export.csv";

          document.body.appendChild(downloadLink);
          downloadLink.click();
          document.body.removeChild(downloadLink);
        }
      }
    },
    //老师资料表
    TeacherInfoExcel() {
      try {
        //var curTbl = document.getElementById(tableId);
        //var lenRow = curTbl.rows.length;
        var curTbl = $(".el-table")[0];
        var lenRow = curTbl.rows.length;
        //创建AX对象excel
        var oXL = new ActiveXObject("Excel.Application");
        //获取workbook对象
        var oWB = oXL.Workbooks.Add();
        var oSheet = oWB.ActiveSheet;

        //取得表格行数
        for (var i = 0; i < lenRow; i++) {
          var lenCol = curTbl.rows(i).cells.length;
          //取得每行的列数
          for (var j = 0; j < lenCol; j++) {
            oSheet.Cells(i + 1, j + 1).value = curTbl
              .rows(i)
              .cells(j).innerText;
          }
        }
        oXL.Visible = true; //设置excel可见属性
        //oXL.UserControl = true;
        //oXL=null
      } catch (e) {
        if (!+"\v1") {
          //ie浏览器
          alert("无法启动Excel，请确保电脑中已经安装了Excel!");
        } else {
          let arr = this.AllTeacherInfoList.list;
          let str = "注册老师,开户行,开户支行,开户人姓名,银行卡号";
          for (let i = 0; i < arr.length; i++) {
            str +=
              "\n" +
              arr[i].name +
              "," +
              arr[i].bankName +
              "," +
              arr[i].bankBranch +
              "," +
              arr[i].cardholder +
              "," +
              "\t" + arr[i].cardNumber.toString();
          }
          var uri = "data:text/csv;charset=utf-8," + encodeURIComponent(str);
          var downloadLink = document.createElement("a");
          downloadLink.href = uri;
          downloadLink.download = "export.csv";

          document.body.appendChild(downloadLink);
          downloadLink.click();
          document.body.removeChild(downloadLink);
        }
      }
    },
    // 手动批改
    handApor() {
      this.Activeindex = false;
      this.showApporAways = false;
      this.filters.pageNo = 1;
      this.selMonth = "";
      this.filters.pageSize = 10;
      this.currentPage = 1;
      this.GetTeacherSalaryList();
    },
    // 匹配知识点老师
    AutoApor() {
      this.Activeindex = true;
      this.showApporAways = true;
      this.filters0.pageNo = 1;
      this.selMonth = "";
      this.currentPage = 1;
      this.filters0.pageSize = 10;
      this.GetKnownleageSalaryList();
    },
    // 选择老师
    teacherType(k) {
      this.ActiveIndex = k;
      if (k == 0) {
        this.filters.pageNo = 1;
        this.filters.pageSize = 10;
        this.currentPage = 1;
        this.inputValue = "";
        this.GetTeacherSalaryList();
      } else if (k == 1) {
        this.filters0.pageNo = 1;
        this.currentPage = 1;
        this.inputValue = "";
        this.filters0.pageSize = 10;
        this.GetKnownleageSalaryList();
      } else if (k == 2) {
        this.filters1.pageNo = 1;
        this.currentPage = 1;
        this.inputValue = "";
        this.filters1.pageSize = 10;
        this.AllInfoList();
      } else if (k == 3) {
        this.filters2.pageNo = 1;
        this.currentPage = 1;
        this.inputValue = "";
        this.filters2.pageSize = 10;
        this.GetGetTeacherCorrectDetailInfo();
      }
    },
    // 累计批改总张数
    TotalHomeworklists(v){
         this.$router.push({
        path: "/super/HomeworkInfoMessage",
        query: {
          teacherId: v.teacherId,
          type: v.type,
          oneMonth: this.selMonth
        }
      });
    },
     // 累计报错总张数
    HomeworkWornglists(v){
         this.$router.push({
        path: "/super/SuperTeacherPay",
           query: {
          teacherId: v.teacherId,
           type: v.type,
          oneMonth: this.selMonth
        }
      });
    },
    // 匹配知识点老师薪酬列表
    GetKnownleageSalaryList() {
      this.$store.dispatch("GetKnowledgeTeacherSalaryInfo", {
        pageNo: this.filters0.pageNo,
        pageSize: this.filters0.pageSize,
        oneMonth: this.selMonth,
        maxCreateTime: this.formatDate(),
        name: this.inputValue
      });
    },
    // 老师资料列表
    AllInfoList() {
      this.$store.dispatch("AllTeacherInfoList", {
        pageNo: this.filters1.pageNo,
        pageSize: this.filters1.pageSize,
        oneMonth: this.selMonth,
        maxCreateTime: this.formatDate(),
        name: this.inputValue
      });
    },
    // 批改明细
    GetGetTeacherCorrectDetailInfo() {
      this.$store.dispatch("GetGetTeacherCorrectDetail", {
        pageNo: this.filters2.pageNo,
        pageSize: this.filters2.pageSize,
        oneMonth: this.selMonth,
        maxCreateTime: this.formatDate(),
        name: this.inputValue
      });
    },
         //年月时间封装
    monthFormatDate: function() {
      let date = new Date();
      let y = date.getFullYear();
      let MM = date.getMonth() + 1;
      MM = MM < 10 ? "0" + MM : MM;
      return y + "-" + MM;
    },
    //弹框
    isShow(str, img) {
      let _this = this;
      console.log(str);
      if (str == 1) {
        _this.hiddenModel = true;
        _this.isPigai = false;
      } else if (str == 2) {
        _this.isPigai = true;
        _this.hiddenModel = false;
      } else if (str == 3) {
        _this.cardShow = true;
        _this.imgCard = img;
      }
    },
    //关闭弹框
    allShowModel(str) {
      let _this = this;
      if (str == 1) {
        _this.hiddenModel = false;
      } else if (str == 2) {
        _this.isPigai = false;
      } else if (str == 3) {
        _this.cardShow = false;
      }
    },
    //时间封装
    formatDate: function() {
      let date = new Date();
      let y = date.getFullYear();
      let MM = date.getMonth() + 1;
      MM = MM < 10 ? "0" + MM : MM;
      let d = date.getDate();
      d = d < 10 ? "0" + d : d;
      let h = date.getHours();
      h = h < 10 ? "0" + h : h;
      let m = date.getMinutes();
      m = m < 10 ? "0" + m : m;
      let s = date.getSeconds();
      s = s < 10 ? "0" + s : s;
      return y + "-" + MM + "-" + d + " " + h + ":" + m + ":" + s;
    },
    // 老师薪酬列表
    async GetTeacherSalaryList() {
      this.$store.dispatch("GetTeacherSalaryList", {
        pageNo: this.filters.pageNo,
        pageSize: this.filters.pageSize,
        oneMonth: this.selMonth,
        maxCreateTime: this.formatDate(),
        name: this.inputValue
      });
    },

    GetTeacherSalaryListDatas() {
      this.teacherType(this.ActiveIndex);
    },
    // 分页
    pageChange(val) {
      this.currentPage = val;
      this.filters.pageNo = val;
      this.GetTeacherSalaryList();
    },
    // 分页
    pageChange1(val) {
      this.currentPage = val;
      this.filters0.pageNo = val;
      this.GetKnownleageSalaryList();
    },
    // 分页
    pageChange2(val) {
      this.currentPage = val;
      this.filters1.pageNo = val;
      this.AllInfoList();
    },
     pageChange3(val) {
      this.currentPage = val;
      this.filters2.pageNo = val;
      this.GetGetTeacherCorrectDetailInfo();
    },
    changeDateSlot(dateSlot) {
      if (dateSlot) {
        this.filters.startDate = dateSlot[0];
        this.filters.endDate = dateSlot[1];
      } else {
        this.filters.startDate = null;
        this.filters.endDate = null;
      }
    },
    actvTypeChange(typeList) {
      switch (typeList.length) {
        case 1:
          this.filters.actvType = typeList[0];
          this.filters.actvSmallType = null;
          break;
        case 2:
          this.filters.actvType = null;
          this.filters.actvSmallType = typeList[1];
          break;
        default:
          this.filters.actvType = null;
          this.filters.actvSmallType = null;
          break;
      }
    },
    handleSizeChange(val) {
      this.filters.pageSize = val;
      this.GetTeacherSalaryList();
    },
    handleSizeChange1(val) {
      this.filters0.pageSize = val;
      this.GetKnownleageSalaryList();
    },
    handleSizeChange2(val) {
      this.filters1.pageSize = val;
      this.AllInfoList();
    },
    handleSizeChange3(val) {
      this.filters2.pageSize = val;
      this.GetGetTeacherCorrectDetailInfo();
    },
    // 排序
    sortChange(sort) {
      this.filters.orderField = sort.prop;
      this.filters.orderAD = sort.order != null ? sort.order : "";
      this.itemListReshow();
    },
    clearSearch() {
      this.filters.actvNm = null;
      this.filters.actvCrtUserId = null;
      this.filters.actvType = null;
      this.filters.actvSmallType = null;
      this.filtersActvType = [];
      this.createDateSlot = null;
    }
  },
  mounted() {
    sessionStorage.setItem("tabIndex", 2);

    this.GetTeacherSalaryList();
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>
.main {
  background-color: #fff;
  margin-top: 16px;
  padding: 0 !important;
  border: 1px solid #e1e1e1;
  min-height: 980px;
}

el-table {
  color: #999999;
  font-size: 18px;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: #52cc60 !important;
  color: #fff;
}
.main-items {
  color: #393939;
  text-align: center;
  line-height: 80px;
}
.main-header-item {
  cursor: pointer;
  font-size: 16px;
  color: #7e7e7e;
}

.input-with-select .el-input-group__prepend {
  background-color: #fff;
}

.table-img {
  width: 36px;
  height: 36px;
  border-radius: 6px;
}
.showModel {
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: #000000;
  opacity: 0.2;
  overflow: hidden;
  z-index: 1000;
  color: #fff;
}
.model {
  z-index: 1001;
  width: 40%;
  height: auto;
  position: fixed;
  top: 30%;
  left: 30%;
  margin: auto;
  background: #fff;
  border-radius: 10px;
  text-align: center;
}
.scope-name {
  margin-left: 13px;
}
.identity-card {
  width: 52px;
  height: 51px;
  border-radius: 4px;
  margin-right: 17px;
}
.model-text {
  background: rgba(255, 255, 255, 1);
  border-radius: 10px;
}

.model-btn {
  display: flex;
  justify-content: space-around;
  margin-bottom: 44px;
}
.model-btn-info-img {
  width: 451px;
  height: 298px;
}
.model-btn-items {
  width: 154px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 18px;
  border-radius: 4px;
}
.main-gay {
  background: rgba(246, 247, 251, 1);
  color: #7e7e7e;
}
.model-grdeen {
  background-color: #52cc60;
  color: #fff;
}
.model-text-items-close {
  position: absolute;
  top: 10px;
  right: 15px;
}
.model-text-items {
  position: relative;
  color: #000000;
  font-size: 24px;
  text-align: center;
  padding: 40px 0 50px 0;
}
.el-table .table-head-th {
  background-color: #f6f7fb;
  font-size: 16px !important;
  color: #393939;
}
.page-block {
  text-align: center !important;
  margin-top: 15px;
}
.scope-list {
  margin-left: 18px;
  text-align: left;
}
.ApporStyles {
  display: inline-block;
  width: 200px;
  height: 40px;
  line-height: 40px;
  background-color: #fff;
  border-radius: 20px;
  font-size: 16px;
  color: #7c819d;
  cursor: pointer;
}
.navteacfertypeactive {
  background-color: #52cc60 !important;
  color: #fff !important;
}
.el-pagination .el-select .el-input {
  /* width: 120px; */
  margin: 0 -100px !important;
}
.ClickWork{
 font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
}
.bank-active {
  color: #52cc60;
  font-size: 16px;
  text-decoration: underline;
  cursor: pointer;
}
.Dayinput-with-Allot {
  border: #b6b6b6;
  border-radius: 20px;
  height: 40px;
  width: 300px;
  font-size: 8px;
  color: #b6b6b6;
  text-align: left;
  line-height: 40px;
  background: #f1f2f4;
  padding: 0 10px;
  float: left;
  outline: none !important;
  box-shadow: none;
}
.Dayteach-Allot {
  width: 400px;
  position: relative;
  height: 40px;
  top: 15px;
}
.DaySeachIcon {
  position: absolute;
  font-size: 20px;
  color: #b6b6b6;
  right: 30%;
  margin-top: 10px;
  cursor: pointer;
}
</style>
