<template>
  <div class="content-box">
    <!-- 明细列表搜索框 -->
    <div class="footerMenu">
      <div
        class="menuList"
        @click="collectMenu"
        :class="footerMenuIndex == 1 ? 'menuListActive' : ''"
      >
        教师认证
      </div>
      <div
        class="menuList"
        @click="detailMenu"
        :class="footerMenuIndex == 2 ? 'menuListActive' : ''"
      >
        暖心认证
      </div>
    </div>
    <!-- 教师认证 -->
    <div class="middle" v-if="footerMenuIndex == 1">
      <div class="filter">
        <div class="condition">
          <span>姓名 : </span>
          <el-input
            clearable
            v-model="searchInput.username"
            class="w-50 m-2"
            placeholder="请输入姓名"
            style="width: 200px"
          />
        </div>
        <div class="condition">
          <span>工号 : </span>
          <el-input
            clearable
            v-model="searchInput.cardNumber"
            class="w-50 m-2"
            placeholder="请输入工号"
            style="width: 200px"
          />
        </div>
        <div class="condition">
          <span>手机号码 : </span>
          <el-input
            clearable
            v-model="searchInput.mobile"
            class="w-50 m-2"
            placeholder="请输入手机号码"
            style="width: 200px"
          />
        </div>
        <div class="condition">
          <span>审核结果 : </span>
          <el-select
            v-model="searchInput.state"
            class="m-2"
            placeholder="请选择审核结果"
          >
            <el-option label="待审核" value="0" />
            <el-option label="通过" value="1" />
            <el-option label="拒绝" value="2" />
          </el-select>
        </div>
        <div class="condition">
          <span>申请时间 : </span>
          <el-date-picker
            v-model="searchInput.time"
            type="daterange"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            format="YYYY-MM-DD"
            value-format="YYYY-MM-DD"
            unlink-panels
          />
        </div>
        <el-button
          style="margin-left: 20px"
          color="rgba(61, 81, 232, 1)"
          type="primary"
          class="search"
          @click="search"
          ><el-icon> <Search /> </el-icon><span>搜索</span></el-button
        >
        <el-button
          style="margin-left: 20px"
          color="rgba(61, 81, 232, 1)"
          type="primary"
          class="search"
          @click="resetInput"
          ><el-icon> <Refresh /> </el-icon><span>重置</span></el-button
        >
        <el-button
          style="margin-left: 20px"
          color="rgba(61, 81, 232, 1)"
          class="import"
          type="primary"
          @click="downLoad"
          ><img
            src="@/assets/import.png"
            style="width: 14px; height: 14px; margin-right: 4px"
            alt=""
          />
          <span>导出表单</span></el-button
        >
      </div>
    </div>
    <!-- 暖心认证 -->
    <div class="middle" v-if="footerMenuIndex == 2">
      <div class="filter">
        <div class="condition">
          <span>姓名 : </span>
          <el-input
            clearable
            v-model="searchInputHZ.username"
            class="w-50 m-2"
            placeholder="请输入姓名"
            style="width: 200px"
          />
        </div>
        <div class="condition">
          <span>学号 : </span>
          <el-input
            clearable
            v-model="searchInputHZ.cardNumber"
            class="w-50 m-2"
            placeholder="请输入学号"
            style="width: 200px"
          />
        </div>
        <!-- <div class="condition">
          <span>手机号码 : </span>
          <el-input
            clearable
            v-model="searchInputHZ.mobile"
            class="w-50 m-2"
            placeholder="请输入手机号码"
            style="width: 200px"
          />
        </div> -->
        <!-- <div class="condition">
          <span>审核结果 : </span>
          <el-select
            v-model="searchInput.state"
            class="m-2"
            placeholder="请选择审核结果"
          >
            <el-option label="待审核" value="0" />
            <el-option label="通过" value="1" />
            <el-option label="拒绝" value="2" />
          </el-select>
        </div> -->
        <div class="condition">
          <span>申请时间 : </span>
          <el-date-picker
            v-model="searchInputHZ.time"
            type="daterange"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
            format="YYYY-MM-DD"
            value-format="YYYY-MM-DD"
            unlink-panels
          />
        </div>
        <el-button
          style="margin-left: 20px"
          color="rgba(61, 81, 232, 1)"
          type="primary"
          class="search"
          @click="searchHZ"
          ><el-icon> <Search /> </el-icon><span>搜索</span></el-button
        >
        <el-button
          style="margin-left: 20px"
          color="rgba(61, 81, 232, 1)"
          type="primary"
          class="search"
          @click="resetInputHZ"
          ><el-icon> <Refresh /> </el-icon><span>重置</span></el-button
        >
        <el-button
          style="margin-left: 20px"
          color="rgba(61, 81, 232, 1)"
          class="import"
          type="primary"
          @click="downLoad2"
          ><img
            src="@/assets/import.png"
            style="width: 14px; height: 14px; margin-right: 4px"
            alt=""
          />
          <span>导出表单</span></el-button
        >
      </div>
    </div>
    <!-- 审核 -->
    <el-dialog
      class="sendBus"
      v-model="centerDialogVisible"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
      title="审核"
      align-center
      width="500"
      :before-close="auditClose"
    >
      <el-form
        ref="ruleFormRef"
        :model="ruleForm"
        :rules="rules"
        label-width="100px"
        class="demo-ruleForm"
        :size="formSize"
        label-position="left"
        status-icon
      >
        <el-form-item label="审核结果 :" prop="state">
          <el-select
            v-model="ruleForm.state"
            class="m-2"
            placeholder="请选择审核结果"
          >
            <el-option label="通过" :value="1" />
            <el-option label="拒绝" :value="2" />
          </el-select>
        </el-form-item>
        <el-form-item label="审核理由 :" prop="remark">
          <el-input
            v-model="ruleForm.remark"
            placeholder="请输入审核理由"
            clearable
            style="width: 280px"
            :rows="4"
            type="textarea"
          />
        </el-form-item>
        <el-form-item class="options">
          <el-button class="congzhi" @click="auditClose(ruleFormRef)"
            >取消</el-button
          >
          <el-button
            color="rgba(61, 81, 232, 1)"
            class="queding"
            type="primary"
            @click="submitAdd(ruleFormRef)"
          >
            确定
          </el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <!-- 教师认证 -->
    <div class="MingXi" v-if="footerMenuIndex == 1">
      <div class="footer mingxi">
        <el-table
          :row-class-name="tableRowClassName"
          :data="tableData.list"
          style="width: 100%"
          :header-cell-style="{
            background: 'rgba(240, 243, 247, 1)',
            border: 0,
          }"
          @selection-change="handleSelectionChange"
        >
          <!-- <el-table-column align="center" type="selection" width="80" /> -->
          <el-table-column align="center" prop="username" label="姓名" />
          <el-table-column align="center" prop="cardNumber" label="工号" />
          <el-table-column align="center" prop="college" label="所在院系">
            <!-- <template #default="scope">
              <div
                v-if="scope.row.yy_num == scope.row.contain"
                style="color: red"
              >
                {{ scope.row.yy_num }}
              </div>
              <div v-else>{{ scope.row.yy_num }}</div>
            </template> -->
          </el-table-column>
          <el-table-column align="center" prop="professor" label="职称" />
          <el-table-column align="center" prop="mobile" label="手机号" />
          <el-table-column
            align="center"
            prop="car_number"
            label="证件信息"
            width="240"
          >
            <template #default="scope">
              <div
                v-if="scope.row.file1"
                style="
                  width: 100%;
                  height: 70px;
                  display: flex;
                  justify-content: space-around;
                  align-items: center;
                "
              >
                <img
                  v-viewer
                  v-if="scope.row.file1"
                  style="
                    object-fit: cover;
                    height: 60px;
                    border: 0.5px solid #ddd;
                  "
                  :src="scope.row.file1"
                  alt=""
                />

                <img
                  v-viewer
                  v-if="scope.row.file2"
                  style="
                    object-fit: cover;
                    height: 60px;
                    border: 0.5px solid #ddd;
                  "
                  :src="scope.row.file2"
                  alt=""
                />
                <!-- <el-image
                  style="width: 100px; height: 60px"
                  :src="scope.row.file1"
                  show-progress
                  fit="cover"
                /> 
                 <el-image
                  style="width: 100px; height: 60px"
                  :src="scope.row.file2"
                  show-progress
                  fit="cover"
                /> -->
              </div>
            </template>
          </el-table-column>
          <el-table-column align="center" label="审核结果">
            <template #default="scope">
              <div v-if="scope.row.state == 0">待审核</div>
              <div
                v-if="scope.row.state == 1"
                style="color: rgba(67, 207, 124, 1)"
              >
                通过
              </div>
              <div
                v-if="scope.row.state == 2"
                style="color: rgba(212, 48, 48, 1)"
              >
                拒绝
              </div>
            </template>
          </el-table-column>
          <el-table-column
            show-overflow-tooltip
            align="center"
            prop="remark"
            label="审核理由"
          />
          <el-table-column
            align="center"
            width="100"
            prop="createTime"
            label="申请时间"
          />
          <el-table-column
            align="center"
            width="100"
            prop="updateTime"
            label="审核时间"
          />
          <el-table-column align="center" label="操作" width="150">
            <template #default="scope">
              <el-button
                v-if="scope.row.state == 0"
                link
                type="primary"
                @click="audit(scope.row)"
              >
                <div class="look">审核</div>
              </el-button>
              <el-button link type="danger" @click="del(scope.row)"
                ><div class="del">删除</div></el-button
              >
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div class="pagination">
        <el-pagination
          background
          v-model:page-size="pageSize"
          v-model:current-page="currentPage"
          layout="total, prev, pager, next, jumper"
          :total="total"
          @current-change="handleCurrentChange"
        />
      </div>
    </div>
    <!-- 暖心认证 -->
    <div class="MingXi" v-else-if="footerMenuIndex == 2">
      <div class="footers footer mingxi">
        <el-table
          :row-class-name="tableRowClassName"
          :data="tableData.list2"
          style="width: 100%"
          :header-cell-style="{
            background: 'rgba(240, 243, 247, 1)',
            border: 0,
          }"
          @selection-change="handleSelectionChange"
        >
          <el-table-column align="center" prop="username" label="姓名" />
          <el-table-column align="center" prop="cardNumber" label="学号" />
          <el-table-column align="center" prop="cardNumber" label="匹配结果">
            <template #default="scope">
              <div v-if="scope.row.state == 0">待审核</div>
              <div
                v-if="scope.row.state == 1"
                style="color: rgba(67, 207, 124, 1)"
              >
                通过
              </div>
              <div
                v-if="scope.row.state == 2"
                style="color: rgba(212, 48, 48, 1)"
              >
                拒绝
              </div>
            </template>
          </el-table-column>
          <el-table-column align="center" prop="remark" label="原因描述" />
          <el-table-column align="center" prop="createTime" label="申请时间" />
          <!-- <el-table-column align="center" prop="college" label="所在院系"/> -->
          <!-- <el-table-column align="center" prop="instructor" label="辅导员姓名" /> -->
          <!-- <el-table-column align="center" prop="mobile" label="手机号" /> -->
          <!-- <el-table-column
            align="center"
            prop="car_number"
            label="证件信息"
            width="240"
          >
            <template #default="scope">
              <div
                v-if="scope.row.file1"
                style="
                  width: 100%;
                  height: 70px;
                  display: flex;
                  justify-content: space-around;
                  align-items: center;
                "
              >
                <img
                  v-viewer
                  v-if="scope.row.file1"
                  style="
                    object-fit: cover;
                    height: 60px;
                    border: 0.5px solid #ddd;
                  "
                  :src="scope.row.file1"
                  alt=""
                />

                <img
                  v-viewer
                  v-if="scope.row.file2"
                  style="
                    object-fit: cover;
                    height: 60px;
                    border: 0.5px solid #ddd;
                  "
                  :src="scope.row.file2"
                  alt=""
                />
              </div>
            </template>
          </el-table-column>
          <el-table-column
            align="center"
            width="100"
            prop="createTime"
            label="申请时间"
          /> -->
          <el-table-column align="center" label="操作">
            <template #default="scope">
              <el-button link type="danger" @click="del(scope.row)"
                ><div class="del">删除</div></el-button
              >
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div class="pagination">
        <el-pagination
          background
          v-model:page-size="pageSize2"
          v-model:current-page="currentPage2"
          layout="total, prev, pager, next, jumper"
          :total="total2"
          @current-change="handleCurrentChange2"
        />
      </div>
    </div>
  </div>
</template>

<script setup>
import { ref, reactive, watch, onBeforeMount } from "vue";
import { useRouter } from "vue-router";
import { Select, Pointer, Upload } from "@element-plus/icons-vue";
import { JSEncrypt } from "jsencrypt"; // 加密密码
import { ElMessage, ElMessageBox } from "element-plus";
import { dayjs } from "element-plus";
import axios from "axios";
import lodash from "lodash";
import adminApi from "@/api/admin.js";
import { useStore } from "vuex";
const store = useStore();
const router = useRouter();

// 暖心认证
const searchInputHZ = reactive({
  username: "",
  cardNumber: "",
  mobile: "",
  state: "",
  time: "",
});

const api = ref("");
// 教师认证
const searchInput = reactive({
  username: "",
  cardNumber: "",
  mobile: "",
  state: "",
  time: "",
});

// 表格数据
const tableData = reactive({
  list: [], //汇总数据
  list2: [], //明细列表数据
  account: "",
});

const dialongTitle = ref("候补派车"); // 弹窗标题
const centerDialogVisible = ref(false); // 候补弹窗显示

// 教师认证
const currentPage = ref(1); // 当前页
const pageSize = ref(9);
const total = ref(10); // 当前总数
const selectData = reactive({ list: [] }); // 多选框选择的数据

// 暖心认证
const currentPage2 = ref(1); // 当前页
const pageSize2 = ref(10);
const total2 = ref(10); // 当前总数

const footerMenuIndex = ref(1); // 控制汇总和明细列表
// 表单数据
const formSize = ref("default");
const ruleFormRef = ref();

const ruleForm = reactive({
  id: "",
  remark: "",
  state: "",
});
// 表单验证
const rules = reactive({
  state: [
    {
      required: true,
      message: "审核结果不能为空",
      trigger: "change",
    },
  ],
  remark: [
    {
      required: true,
      message: "审核理由不能为空",
      trigger: "blur",
    },
  ],
});

// 获取数据列表
const getList = async (message) => {
  if (footerMenuIndex.value == 1) {
    let data = new FormData();
    data.append("page", currentPage.value);
    data.append("rows", pageSize.value);
    data.append("username", searchInput.username);
    data.append("cardNumber", searchInput.cardNumber);
    data.append("mobile", searchInput.mobile);
    data.append("state", searchInput.state);
    if (searchInput.time) {
      data.append("createStart", searchInput.time[0]);
      data.append("createEnd", searchInput.time[1]);
    }
    data.append("type", 1); // 1教师认真,2暖心卡认真
    let res = await axios({
      method: "post",
      url: api.value + "/vertifylist.action",
      headers: {
        token: sessionStorage.getItem("token"),
      },
      data: data,
    });
    console.log(res, "教师认证");
    if (res.status == 200) {
      tableData.list = res.data.rows;
      // currentPage.value = res.data.currentPage;
      total.value = res.data.total;
    } else {
      tableData.list2 = res.data.rows;
      currentPage.value = 1;
      total.value = res.data.total;
      ElMessage({
        type: "error",
        showClose: true,
        message: res.data.message,
        center: true,
      });
      if (res.data.message == "token错误") {
        router.push({
          path: `/login`,
        });
      }
    }
  } else if (footerMenuIndex.value == 2) {
    let data = new FormData();
    data.append("page", currentPage2.value);
    data.append("rows", pageSize2.value);
    data.append("username", searchInputHZ.username);
    data.append("cardNumber", searchInputHZ.cardNumber);
    if (searchInputHZ.time) {
      data.append("createStart", searchInputHZ.time[0]);
      data.append("createEnd", searchInputHZ.time[1]);
    }
    data.append("type", 2); // 1教师认真,2暖心卡认真

    let res = await axios({
      method: "post",
      url: api.value + "/vertifylist.action",
      headers: {
        token: sessionStorage.getItem("token"),
      },
      data: data,
    });
    console.log(res, "暖心认证");
    if (res.status == 200) {
      tableData.list2 = res.data.rows;
      // currentPage.value = res.data.currentPage;
      total2.value = res.data.total;
    } else {
      ElMessage({
        type: "error",
        showClose: true,
        message: res.data.message,
        center: true,
      });
      if (res.data.message == "token错误") {
        router.push({
          path: `/login`,
        });
      }
    }
  }
};

// 暖心认证
const searchHZ = lodash.debounce(() => {
  getList("查询成功");
}, 300);
const resetInputHZ = lodash.debounce(() => {
  // searchInputHZ.state = "";
  searchInputHZ.username = "";
  searchInputHZ.cardNumber = "";
  searchInputHZ.mobile = "";
  searchInputHZ.time = "";
  getList();
}, 300);

// 教师认证
const search = lodash.debounce(() => {
  getList("查询成功");
}, 300);
const resetInput = lodash.debounce(() => {
  searchInput.state = "";
  searchInput.username = "";
  searchInput.cardNumber = "";
  searchInput.mobile = "";
  searchInput.time = "";
  getList();
}, 300);
const handleSelectionChange = (val) => {
  console.log(val);
  selectData.list = val;
};

// 汇总按钮
const collectMenu = () => {
  footerMenuIndex.value = 1;
  searchInput.state = "";
  searchInput.ciCreateTime = "";
  searchInput.car_number = "";
  searchInput.ci_time = "";
  searchInput.route = "";
  searchInput.createTime = "";
  getList();
};
//明细列表按钮
const detailMenu = () => {
  footerMenuIndex.value = 2;
  searchInputHZ.state = "";
  searchInputHZ.route = "";

  searchInputHZ.car_number = "";
  getList();
};

// 审核
const audit = (row) => {
  console.log(row);
  centerDialogVisible.value = true;
  ruleForm.id = row.id;
  ruleForm.state = "";
  ruleForm.remark = row.remark;
};
const auditClose = () => {
  centerDialogVisible.value = false;
  ruleFormRef.value.resetFields();
};
const submitAdd = async (formEl) => {
  if (!formEl) return;
  await formEl.validate(async (valid, fields) => {
    if (valid) {
      let data = new FormData();
      data.set("id", ruleForm.id); //前面的key记得对应！
      data.set("state", ruleForm.state);
      data.set("remark", ruleForm.remark); //前面的key记得对应！
      let res = await axios({
        method: "post",
        url: api.value + "/vertifyconfirm.action",
        headers: {
          token: sessionStorage.getItem("token"),
        },
        data: data,
      });
      console.log(res, "审核");

      if (res.data.code == 200) {
        getList();
        ElMessage({
          type: "success",
          showClose: true,
          message: res.data.message,
          center: true,
        });
        centerDialogVisible.value = false;
        ruleFormRef.value.resetFields();
      } else {
        ElMessage({
          type: "error",
          showClose: true,
          message: res.data.message,
          center: true,
        });
      }
    } else {
      console.log("error submit!", fields);
    }
  });
};

const del = (row) => {
  ElMessageBox.confirm("此操作将永久删除该认证, 是否继续?", "提示", {
    confirmButtonText: "确定",
    cancelButtonText: "取消",
    type: "warning",
  })
    .then(async () => {
      let data = new FormData();
      data.set("id", row.id);
      let res = await axios({
        method: "post",
        url: api.value + "/vertifydel.action",
        headers: {
          token: sessionStorage.getItem("token"),
        },
        data: data,
      });
      if (res.data.code == 200) {
        getList();
        ElMessage({
          type: "success",
          showClose: true,
          message: res.data.message,
          center: true,
        });
      } else {
        ElMessage({
          type: "error",
          showClose: true,
          message: res.data.message,
          center: true,
        });
      }
    })
    .catch(() => {
      ElMessage({
        type: "info",
        message: "已取消删除",
      });
    });
};

// 导出按钮
const downLoad = lodash.debounce(async () => {
  let data = new FormData();
  data.append("username", searchInput.username);
  data.append("cardNumber", searchInput.cardNumber);
  data.append("mobile", searchInput.mobile);
  data.append("state", searchInput.state);
  if (searchInput.time) {
    data.append("createStart", searchInput.time[0]);
    data.append("createEnd", searchInput.time[1]);
  }
  data.append("type", 1); // 1教师认真,2暖心卡认真
  let res = await axios({
    method: "post",
    url: api.value + "/vertifytoExcel1.action",
    headers: {
      token: sessionStorage.getItem("token"),
    },
    data: data,
  });
  console.log(res);
  if (res.data.code == 200) {
    // const elt = document.createElement("a");
    // elt.setAttribute(
    //   "href",
    //   "https://car.meiyishuoo.com/ride-sharing" + res.data.downurl
    // );
    // elt.setAttribute("download", "file.png");
    // elt.style.display = "none";
    // document.body.appendChild(elt);
    // elt.click();

    var downloadPath =
      "https://car.meiyishuoo.com/ride-sharing" + res.data.downurl;
    console.log("获得地址数据:", downloadPath);
    var downloadLink = document.createElement("a");
    downloadLink.style.display = "none"; // 使其隐藏
    downloadLink.href = downloadPath;
    downloadLink.download = "";
    downloadLink.click();
    document.body.appendChild(downloadLink);
    document.body.removeChild(downloadLink);
    ElMessage({
      type: "success",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
}, 300);

const downLoad2 = lodash.debounce(async () => {
  let data = new FormData();
  data.append("page", currentPage2.value);
  data.append("rows", pageSize2.value);
  data.append("username", searchInputHZ.username);
  data.append("cardNumber", searchInputHZ.cardNumber);
  // data.append("state", searchInputHZ.state);
  if (searchInputHZ.time) {
    data.append("createStart", searchInputHZ.time[0]);
    data.append("createEnd", searchInputHZ.time[1]);
  }
  data.append("type", 2); // 1教师认真,2暖心卡认真
  let res = await axios({
    method: "post",
    url: api.value + "/vertifytoExcel2.action",
    headers: {
      token: sessionStorage.getItem("token"),
    },
    data: data,
  });
  console.log(res);
  if (res.data.code == 200) {
    // const elt = document.createElement("a");
    // elt.setAttribute(
    //   "href",
    //   "https://car.meiyishuoo.com/ride-sharing" + res.data.downurl
    // );
    // elt.setAttribute("download", "file.png");
    // elt.style.display = "none";
    // document.body.appendChild(elt);
    // elt.click();

    var downloadPath =
      "https://car.meiyishuoo.com/ride-sharing" + res.data.downurl;
    console.log("获得地址数据:", downloadPath);
    var downloadLink = document.createElement("a");
    downloadLink.style.display = "none"; // 使其隐藏
    downloadLink.href = downloadPath;
    downloadLink.download = "";
    downloadLink.click();
    document.body.appendChild(downloadLink);
    document.body.removeChild(downloadLink);
    ElMessage({
      type: "success",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
}, 300);

// 表格斑马纹颜色修改
const tableRowClassName = ({ row, rowIndex }) => {
  if (rowIndex % 2 === 0) {
    return "even";
  } else if (rowIndex % 2 !== 0) {
    return "odd";
  }
  return "";
};
// 分页
const handleCurrentChange = (value) => {
  currentPage.value = value;
  getList();
};
// 分页
const handleCurrentChange2 = (value) => {
  console.log(value);
  currentPage2.value = value;
  getList();
};
onBeforeMount(() => {
  api.value = store.state.user.api;
  getList();
});
</script>

<style scoped lang="scss">
.content-box {
  width: calc(100% - 40px);
  height: calc(100% - 105px);
  margin: 20px auto;
  background-color: #fff;
  color: #fff;
  display: flex;
  flex-direction: column;

  .left {
    width: calc(100% - 60px);
    display: flex;
    align-items: center;
    height: 60px !important;
    margin: 0 30px;
    // padding: 10px 0;
    border-bottom: 1px solid #ccc;
    color: #000;
    font-size: 18px;
    font-weight: 600;

    .cameratxt {
      margin-right: 15px;
      display: flex;
      align-items: center;
      height: 60px !important;
    }
  }

  :deep(.sendBus) {
    //   height: 420px;
    border-radius: 11px;

    .el-dialog__header {
      border-radius: 11px 11px 0 0;
      background: rgba(237, 241, 245, 1);
      font-weight: 600;
      margin: 0;

      .el-dialog__headerbtn {
        outline: none;
      }
    }

    .el-dialog__body {
      padding: 30px 20px 10px 20px;

      .el-form-item--feedback {
        .el-input__validateIcon {
          color: rgba(61, 81, 232, 1);
        }
      }

      .el-form-item.is-error .el-input__validateIcon {
        color: red;
      }

      .el-input {
        width: 280px;
      }

      .options {
        margin-left: 200px;
      }
    }
  }

  .middle {
    width: calc(100% - 60px);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    color: #000;
    border-bottom: 1px solid rgb(231, 231, 231);
    padding: 10px 0;
    // 添加员工弹窗样式

    .filter {
      display: flex;
      flex-wrap: wrap;
      align-items: center;

      //   width: 100%;
      .condition {
        display: flex;
        align-items: center;
        margin: 10px 20px 10px 0;

        :deep(.el-input .el-input__inner) {
          font-size: 16px;
        }

        span {
          margin: 0 5px 0 0;
        }
      }
    }

    .import {
      margin: 10px 0;
    }

    .gongneng {
      margin: 10px 0;
    }

    :deep(.cont) {
      width: 60%;
      margin: 20px auto;
    }

    :deep(.download) {
      display: flex;
      align-items: center;
      margin: 10px;
    }

    :deep(.download span) {
      font-size: 16px;
      margin-left: 20px;
    }

    :deep(.cont .el-button) {
      margin-left: 60px;
      margin-bottom: 30px;
    }

    :deep(.cont .accomplish) {
      width: 100%;
      display: flex;
      justify-content: center;
    }

    :deep(.cont .accomplish .el-button) {
      width: 50%;
      margin: 0;
    }
  }

  .footerMenu {
    width: calc(100% - 60px);
    margin: 10px auto 0;
    display: flex;
    align-items: center;

    // height: 40px;
    .menuList {
      padding: 5px 12px;
      border-bottom: 2px solid transparent;
      //   color: rgba(61, 81, 232, 1);
      color: rgba(128, 128, 128, 1);
      cursor: pointer;
      //   font-size: 16px;
      font-weight: 600;
    }

    .menuListActive {
      border-bottom: 2px solid rgba(61, 81, 232, 1);
      color: rgba(61, 81, 232, 1);
      font-size: 17px;
    }
  }
  .MingXi {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
    .mingxi {
      flex: 1;
      overflow: auto;
      :deep(.el-table__header-wrapper) {
        height: 50px;

        .el-table__header {
          height: 50px;
        }
      }

      .el-table--fit {
        height: 100%;

        :deep(.el-table__row) {
          height: 50px;
        }
      }
    }
    .pagination {
      width: 100%;
      height: 70px;
      .el-pagination {
        position: relative;
        z-index: 999;
      }
    }
  }

  .footer {
    width: calc(100% - 60px);
    // height: 510px;
    margin: 0 auto;

    :deep(.el-table__header-wrapper) {
      height: 48px;

      .el-table__header {
        height: 48px;
        font-size: 16px;
        color: #000;
      }
    }

    .el-table--fit {
      height: 100%;

      :deep(.el-table__row) {
        height: 48px;
        font-size: 16px;
        color: #000;
      }

      :deep(.el-table__row td) {
        padding: 0;
        border: 0;
      }

      :deep(.look) {
        padding: 5px 10px;
        border-radius: 40px;
        border: 0.74px solid rgba(30, 125, 251, 1);
      }
      :deep(.del) {
        padding: 5px 10px;
        border-radius: 40px;
        border: 0.74px solid #f56c6c;
      }

      // 输出链接弹窗样式
      :deep(.link .el-dialog__header) {
        text-align: left;
        font-size: 20px;
        font-weight: 600;
      }

      :deep(.link .el-dialog__body) {
        padding: 10px 20px;
        height: 100px;
        margin-bottom: 10px;
      }

      .link {
        .linkcontent {
          text-align: left;
          height: 100px;
          border: 1px solid #ccc;

          p {
            margin: 5px 10px;
          }
        }
      }

      :deep(.playVideo .el-dialog__header) {
        text-align: left;
        font-size: 20px;
        font-weight: 600;
        background-color: #ccc;
        margin-right: 0;
      }

      :deep(.playVideo .el-dialog__body) {
        height: 600px;
      }

      .el-button--primary {
        margin-left: 5px;
      }

      :deep(.el-table__body .even) {
        background-color: #fff;
      }

      :deep(.el-table__body .odd) {
        background-color: rgba(240, 243, 247, 1);
      }
    }
  }

  .footers {
    width: 96%;
    // height: 550px;
    // margin: 20px auto 20px;

    :deep(.el-table__header-wrapper) {
      height: 48px;

      .el-table__header {
        height: 48px;
        font-size: 16px;
        color: #000;
      }
    }

    .el-table--fit {
      height: 100%;

      :deep(.el-table__row) {
        height: 48px;
        font-size: 16px;
        color: #000;
      }

      :deep(.el-table__row td) {
        padding: 0;
        border: 0;
      }

      :deep(.look) {
        padding: 3px 10px;
        border-radius: 40px;
        border: 0.74px solid rgba(30, 125, 251, 1);
      }

      // 输出链接弹窗样式
      :deep(.link .el-dialog__header) {
        text-align: left;
        font-size: 20px;
        font-weight: 600;
      }

      :deep(.link .el-dialog__body) {
        padding: 10px 20px;
        height: 100px;
        margin-bottom: 10px;
      }

      .link {
        .linkcontent {
          text-align: left;
          height: 100px;
          border: 1px solid #ccc;

          p {
            margin: 5px 10px;
          }
        }
      }

      :deep(.playVideo .el-dialog__header) {
        text-align: left;
        font-size: 20px;
        font-weight: 600;
        background-color: #ccc;
        margin-right: 0;
      }

      :deep(.playVideo .el-dialog__body) {
        height: 600px;
      }

      .el-button--primary {
        margin-left: 5px;
      }

      :deep(.el-table__body .even) {
        background-color: #fff;
      }

      :deep(.el-table__body .odd) {
        background-color: rgba(240, 243, 247, 1);
      }
    }
  }

  .el-pagination {
    // width: 1600px;
    width: calc(100% - 60px);
    height: 60px;
    margin: 0 30px;
    justify-content: flex-end;

    :deep(.el-pagination__total) {
      color: #000;
    }

    :deep(.el-pagination__goto) {
      color: #000;
    }

    :deep(.el-pagination__classifier) {
      color: #000;
    }

    :deep(.el-input__wrapper) {
      border: 1px solid rgba(0, 0, 0, 1);
      border-radius: 5px;
      box-shadow: none;
    }

    :deep(.el-pager li) {
      margin: 0 5px;
      border: 1px solid rgba(0, 0, 0, 1);
      border-radius: 5px;
      background-color: transparent;
    }

    :deep(.el-pager li.is-active) {
      background-color: rgba(30, 125, 251, 1);
    }

    :deep(.btn-prev) {
      margin-right: 5px;
      border: 1px solid rgba(0, 0, 0, 1);
      border-radius: 5px;
      background-color: transparent;
    }

    :deep(.btn-next) {
      margin-left: 5px;
      border: 1px solid rgba(0, 0, 0, 1);
      border-radius: 5px;
      background-color: transparent;
    }
  }
}

.el-input {
  width: 192px;
}
</style>
