<template>
  <div class="content-box" v-loading="loading">
    <div class="left">
      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
      <span class="cameratxt">在校统计</span>
    </div>
    <div class="middle">
      <div class="filter">
        <div class="condition">
          <el-input
            :clearable="true"
            @blur="searchBtn"
            @clear="searchBtn"
            v-model.trim="searchInput.keyWord"
            class="sel"
            placeholder="请输入姓名或学号"
          />
        </div>
        <el-button
          color="rgba(0, 97, 255, 1)"
          type="primary"
          class="search"
          @click="searchBtn"
        >
          <!-- <el-icon>
                <Search />
              </el-icon> -->
          查询</el-button
        >
        <!-- 年级 -->
        <div class="condition" v-if="classId == 0">
          <span class="title">年级 : </span>
          <el-select
            v-model="searchInput.grade"
            placeholder="请选择年级"
            style="width: 160px"
            @change="gradeChange"
            :clearable="false"
          >
            <el-option v-for="i in gradeData" :label="i.name" :value="i.id">
            </el-option>
          </el-select>
        </div>
        <!-- 班级 -->
        <div class="condition" v-if="classId == 0">
          <span class="title">班级 : </span>
          <el-tooltip
            class="box-item"
            effect="dark"
            content="请先选择年级"
            placement="top"
          >
            <el-select
              v-model="searchInput.class"
              placeholder="请选择班级"
              style="width: 160px"
              @change="searchBtn"
              :clearable="false"
            >
              <el-option
                v-for="i in classsData"
                :label="i.name"
                :value="i.id"
              />
            </el-select>
          </el-tooltip>
        </div>

        <!-- 年级 -->
        <div class="condition" v-if="classId != 0">
          <span class="title">年级 : </span>
          <el-select
            v-model="searchInput.grade"
            placeholder="请选择年级"
            style="width: 160px"
          >
            <el-option v-for="i in gradeData" :label="i.name" :value="i.id">
            </el-option>
          </el-select>
        </div>
        <!-- 班级 -->
        <div class="condition" v-if="classId != 0">
          <span class="title">班级 : </span>
          <el-select
            v-model="searchInput.class"
            placeholder="请选择班级"
            style="width: 160px"
            @change="searchBtn"
          >
            <el-option v-for="i in classsData" :label="i.name" :value="i.id" />
          </el-select>
        </div>
        <!-- 时间 -->
        <div class="condition">
          <span class="title">时间 : </span>
          <el-date-picker
            v-model="searchInput.createTime"
            type="datetime"
            format="YYYY-MM-DD HH:mm:ss"
            value-format="YYYY-MM-DD HH:mm:ss"
            :prefix-icon="Calendar"
            placeholder="请选择日期"
            @change="searchBtn"
            :clearable="false"
          />
          <!-- <el-date-picker
            v-model="searchInput.createTime"
            type="datetimerange"
            unlink-panels
            :clearable="false"
            range-separator="-"
            start-placeholder="起始时间"
            end-placeholder="结束时间"
            format="YYYY-MM-DD HH:mm:ss"
            value-format="YYYY-MM-DD HH:mm:ss"
            :prefix-icon="Calendar"
            placeholder="请选择日期"
            style="width: 350px"
            @change="searchBtn"
          /> -->
        </div>
        <el-button
          type="primary"
          color="rgba(0, 97, 255, 1)"
          plain
          @click="importExcel"
          >导出</el-button
        >
      </div>
    </div>
    <el-tabs
      v-model="statisticType"
      class="demo-tabs"
      @tab-change="statisticTypeClick"
    >
      <el-tab-pane :label="`异常(${abnormalNum})`" :name="1">异常</el-tab-pane>
      <el-tab-pane :label="`正常(${normalNum})`" :name="2">正常</el-tab-pane>
      <el-tab-pane :label="`请假(${ackNum})`" :name="3">请假</el-tab-pane>
    </el-tabs>
    <div class="scrollId">
      <div class="footer">
        <el-table
          :row-class-name="tableRowClassName"
          :data="tableData.list"
          @selection-change="handleSelectionChange"
          style="width: 100%"
          :header-cell-style="{
            background: 'rgba(240, 243, 247, 1)',
            height: '50px',
            border: 0,
          }"
        >
          <el-table-column
            align="center"
            type="index"
            label="序号"
            width="80"
          />
          <el-table-column align="center" prop="gradeName" label="年级" />
          <el-table-column align="center" prop="className" label="班级" />
          <el-table-column align="center" prop="name" label="姓名" />
          <el-table-column align="center" prop="cardNo" label="学号" />
          <el-table-column align="center" label="操作">
            <template #default="scope">
              <div class="look" @click="infoClick(scope.row)">详情</div>
            </template>
          </el-table-column>
        </el-table>
      </div>
     
      <!-- 分页组件 -->
      <!-- <div class="pageSize">
        <span></span>
        <el-pagination
          background
          :current-page="currentPage"
          :page-sizes="[10, 20, 50, 100]"
          :page-size="pageSize"
          layout="sizes,total, prev, pager, next, jumper, slot"
          :total="total"
          @update:page-size="handleSizeChange"
          @update:current-page="handleCurrentChange"
        />
      </div> -->

      <!-- 推送人设置 -->
      <el-dialog
        class="infoDialog"
        v-model="infoVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        :title="infoTitle"
        align-center
        width="650"
        :before-close="infoCancel"
      >
        <div class="abnormal" v-if="statisticType == 1">
          <div class="title">
            <div class="square"></div>
            <span class="studentInfo">学生信息</span>
          </div>
          <div class="infoCont">
            <img :src="abnormalData.student.headImage" alt="" />
            <div class="phone">
              <p>{{ abnormalData.student.name }}</p>
              <span>学号：{{ abnormalData.student.cardNo }}</span>
            </div>
          </div>
          <div class="title">
            <div class="square"></div>
            <span class="studentInfo">家长信息</span>
          </div>
          <div class="patriarchCont">
            <span class="patriarch" v-for="i in abnormalData.patriarch">关系：{{ i.ship }}&nbsp;&nbsp;  姓名：{{ i.name }}&nbsp;&nbsp; 电话：{{ i.phone }}</span>
          </div>
        </div>
        <div class="trackInfo" v-if="statisticType == 2">
          <el-timeline style="max-width: 600px">
            <el-timeline-item
              v-for="i in infoTable.list"
              center
              color="rgba(30, 125, 251, 1)"
              :timestamp="`${i.type} ( ${i.dateTime} )`"
              placement="top"
            >
              <el-card>
                <h4>{{ i.location }}</h4>
                <p>{{ i.name }}</p>
                <div v-viewer v-if="i.image">
                  <img :src="i.image" alt="" />
                </div>
              </el-card>
            </el-timeline-item>
          </el-timeline>
        </div>
        <div class="leaveInfo" v-if="statisticType == 3">
            <div class="name">
                 <span>请假人姓名：</span>{{ leaveData.name }}
            </div>
            <div class="name">
                 <span>学号：</span>{{ leaveData.cardNo }}
            </div>
            <div class="name">
                 <span>请假时间：</span>{{ leaveData.leaveTime }}
            </div>
            <div class="name">
                 <span>请假说明：</span>{{ leaveData.reason }}
            </div>
            <div class="name">
                 <span>创建时间：</span>{{ leaveData.createTiem }}
            </div>
        </div>
        <!-- <div class="options">
          <el-button
            color="rgba(41, 109, 227, 1)"
            class="queding"
            type="primary"
            @click="editConfirm"
          >
            确认
          </el-button>
          <el-button @click="editCancel">取消</el-button>
        </div> -->
      </el-dialog>
    </div>
  </div>
</template>

<script setup>
import {
  ref,
  reactive,
  watch,
  nextTick,
  onBeforeMount,
  onUnmounted,
} from "vue";
import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus";
import { Calendar } from "@element-plus/icons-vue";
import vidiconsApi from "@/api/vidicons.js";
import { dayjs } from "element-plus";
import eds from "@/utils/eds.js";
import lodash from "lodash";
import axios from "axios";
import { useStore } from "vuex";
const store = useStore();
const api = ref("");
const router = useRouter();
// 表格数据
const loading = ref(false);
const classId = ref(); // 获取所管理的班级的id（0是所有班级）
const tableData = reactive({
  list: [],
});
const gradeData = ref(); //年级下拉数据
const classsData = ref(); //班级下拉数据

const statisticType = ref(1); // 切换类型 (1：异常，2：正常，3：请假 )

const abnormalNum=ref(5)
const normalNum=ref(5)
const ackNum=ref(2)

const searchInput = reactive({
  keyWord: "",
  grade: "", // 年级
  class: "", // 班级
  createTime: dayjs().format("YYYY-MM-DD 00:00:00"), // 时间
}); // 搜索按钮数据

const currentPage = ref(1); // 当前页
const pageSize = ref(20);
const total = ref(5); // 当前总数

// 推送人设置
const infoVisible = ref(false);
const infoTitle = ref("请假详情");
const abnormalData=reactive({
    patriarch:'',
    student:''
}) // 异常详情数据
const infoTable = reactive({ list: [] });// 正常详情数据
const leaveData=reactive({
    name:'',
    cardNo:'',
    leaveTime:'',
    reason:'',
    createTiem:''
})// 请假详情数据

// 年级数据下拉
const adminClassDataList = async () => {
  console.log(classId.value == 1);
  if (classId.value == 0) {
    let grade = await axios({
      method: "get",
      url: api.value + "/wanzai/api/smartGrade/querySmartGrades",
      headers: {
        token: sessionStorage.getItem("token"),
        user_head: sessionStorage.getItem("userhead"),
      },
      // params: data,
    });
    console.log(
      grade,
      JSON.parse(eds.decryptDes(grade.data.data)),
      "年级下拉数据"
    );
    let resData=JSON.parse(eds.decryptDes(grade.data.data))
    gradeData.value = resData;
    searchInput.grade = resData[0].id;
    adminClassInfoList(searchInput.grade).then(()=>{
        searchInput.class = classsData.value[0].id;
        getList();
    })
  } else {
    let grade = await axios({
      method: "get",
      url: api.value + "/wanzai/api/smartClass/getClassId",
      headers: {
        token: sessionStorage.getItem("token"),
        user_head: sessionStorage.getItem("userhead"),
      },
      params: {
        schoolClass: classId.value,
      },
    });
    console.log(
      grade,
      JSON.parse(eds.decryptDes(grade.data.data)),
      "年级下拉数据"
    );
    let data = JSON.parse(eds.decryptDes(grade.data.data));
    gradeData.value = [
      {
        name: data.gradeName,
        id: data.gradeId,
      },
    ];
    classsData.value = [
      {
        name: data.className,
        id: data.classId,
      },
    ];
    searchInput.grade = data.gradeId;
    searchInput.class = data.classId;
    getList();
  }
};
// 管理员 改变年级选择
const gradeChange = (value) => {
  console.log(value);
  if (value) {
    adminClassInfoList(value).then(()=>{
        searchInput.class = classsData.value[0].id;
        getList();
    })
  } else {
    classsData.value = [];
    searchInput.class = "";
  }
};

// 管理员 班级数据下拉
const adminClassInfoList = async (value) => {
  let data = {
    gradeId: value,
  };
  let classs = await axios({
    method: "get",
    url: api.value + "/wanzai/api/smartClass/querySmartClasss",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    params: data,
  });

  if (classs.data.code == 200) {
    console.log(
      classs,
      JSON.parse(eds.decryptDes(classs.data.data)),
      "班级下拉数据"
    );
    classsData.value = JSON.parse(eds.decryptDes(classs.data.data));
  } else {
    classsData.value = [];
  }
};

// 获取成绩分页数据 （----------------------------------------------------------------）
const getList = async () => {
  loading.value = true;
  let data = {
    keyWord: searchInput.keyWord, // 用户名称
    gradeId: searchInput.grade,
    classId: searchInput.class,
    type: statisticType.value,
  };
  if (searchInput.createTime) {
    data.dateTime = searchInput.createTime;
  }
  console.log(searchInput.createTime);

  let res = await axios({
    method: "get",
    url: api.value + "/wanzai/api/smartUser/statisticsCampusManag",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    params: data,
  });
  console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "在校统计数据");
  if (res.data.code == 200) {
    let resData=JSON.parse(eds.decryptDes(res.data.data))
    tableData.list =resData.data;
    abnormalNum.value=resData.abnormal
    normalNum.value=resData.normal
    ackNum.value=resData.ack
    loading.value = false;
  } else {
    loading.value = false;
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
};

// 搜索功能
const searchBtn = lodash.debounce(async () => {
  getList();
}, 300);

// 切换 未监听 || 监听 || 请假
const statisticTypeClick = (val) => {
  getList();
};

// 分页
const subsectionCurrentChange = (value) => {
  // console.log(value);
  subsectionPage.value = value;
};

// 推送人设置
const infoClick = async (row) => {
  infoVisible.value = true;
  if (statisticType.value == 1) {
    infoTitle.value='异常详情'
    let data = {
      userId: row.userId,
    };
    let res = await axios({
      method: "get",
      url: api.value + "/wanzai/api/smartUser/addressBook",
      headers: {
        token: sessionStorage.getItem("token"),
        user_head: sessionStorage.getItem("userhead"),
      },
      params: data,
    });
    console.log(res, "异常详情");
    if (res.data.code == 200) {
      console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "异常详情");
        let resData = JSON.parse(eds.decryptDes(res.data.data));
        abnormalData.patriarch=resData.patriarch
        abnormalData.student=resData.student
    } else {
      ElMessage({
        type: "error",
        showClose: true,
        message: res.data.message,
        center: true,
      });
    }
  }
  if (statisticType.value == 2) {
    infoTitle.value='正常详情'
    let data = {
      id: row.userId,
    };
    if (searchInput.createTime) {
      data.startTime = searchInput.createTime;
      data.endTime = dayjs(searchInput.createTime)
        .add(1, "day")
        .format("YYYY-MM-DD 00:00:00");
    }
    let res = await axios({
      method: "get",
      url: api.value + "/wanzai/api/smartFaceDiscern/track",
      headers: {
        token: sessionStorage.getItem("token"),
        user_head: sessionStorage.getItem("userhead"),
      },
      params: data,
    });
    if (res.data.code == 200) {
      console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "正常详情");
      infoTable.list = JSON.parse(eds.decryptDes(res.data.data));
    } else {
      ElMessage({
        type: "error",
        showClose: true,
        message: res.data.message,
        center: true,
      });
    }
  }
  if (statisticType.value == 3) {
    infoTitle.value='请假详情'
    let data = {
        userId: row.userId,
    };
    if (searchInput.createTime) {
      data.dateTime = searchInput.createTime;
    }
    let res = await axios({
      method: "get",
      url: api.value + "/wanzai/api/smartAttendance/ackDetail",
      headers: {
        token: sessionStorage.getItem("token"),
        user_head: sessionStorage.getItem("userhead"),
      },
      params: data,
    });
    if (res.data.code == 200) {
      console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "请假详情");
      let resData= JSON.parse(eds.decryptDes(res.data.data));
      leaveData.name =resData[0].name
      leaveData.cardNo =resData[0].cardNo
      leaveData.leaveTime =dayjs(resData[0].startTime).format('YYYY/MM/DD HH:mm:ss') +' - '+dayjs(resData[0].endTime).format('YYYY/MM/DD HH:mm:ss')
      leaveData.reason =resData[0].reason
      leaveData.createTiem =dayjs(resData[0].createTime).format('YYYY/MM/DD HH:mm:ss')
    } else {
      ElMessage({
        type: "error",
        showClose: true,
        message: res.data.message,
        center: true,
      });
    }
  }
};
const infoCancel = () => {
  infoVisible.value = false;
  infoTable.list=[]
};

//导出功能 (-----------------------------------------------------------------)
const importExcel = async () => {
  let data = {
    keyWord: searchInput.keyWord, // 用户名称
    gradeId: searchInput.grade,
    classId: searchInput.class,
    type: statisticType.value, // 类型
  };
  if (searchInput.createTime) {
    data.dateTime = searchInput.createTime;
  }
  let res = await axios({
    method: "get",
    url: api.value + "/wanzai/api/smartUser/statisticsCampusManagExport",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    params: data,
    responseType: "blob",
  });
  console.log(res, "导出用户");
  if (res.status == 200) {
    let name = `在校统计信息`;
    var content = res.data;
    var datas = new Blob([content]);
    var downloadUrl = window.URL.createObjectURL(datas);
    var anchor = document.createElement("a");
    anchor.href = downloadUrl;
    anchor.download = name + ".xlsx";
    anchor.click();
    window.URL.revokeObjectURL(datas);
    ElMessage({
      type: "success",
      showClose: true,
      message: "导出成功",
      center: true,
    });
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: "导出失败",
      center: true,
    });
  }
};

// 表格斑马纹颜色修改
const tableRowClassName = ({ row, rowIndex }) => {
  if (rowIndex % 2 === 0) {
    return "even";
  } else if (rowIndex % 2 !== 0) {
    return "odd";
  }
  return "";
};
const handleSizeChange = (value) => {
  pageSize.value = value;
  getList();
};
// 分页
const handleCurrentChange = (value) => {
  // console.log(value);
  currentPage.value = value;
  getList();
};

// 查看图片
const imgClick = (row) => {
  console.log(row);

  bgImg.value = true;
  showImg.value = row;
};
// 判断为班主任 还是 超级管理员
const getAdminId = async () => {
  // 获取所管理的班级的id（0是所有班级）
  let res = await axios({
    method: "get",
    url: api.value + "/wanzai/api/smartAuthorGroup/getClassById",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    params: {
      userHead: sessionStorage.getItem("userhead"),
    },
  });
  // console.log(
  //   res,
  //   JSON.parse(eds.decryptDes(res.data.data)),
  //   "获取所管理的班级的id（0是所有班级）"
  // );
  if (res.data.code == 200) {
    let classIds = JSON.parse(eds.decryptDes(res.data.data)).schoolClass;
    classId.value = classIds;
    adminClassDataList();
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
};

onBeforeMount(async () => {
  api.value = store.state.user.api;
  // getList();
  getAdminId();
});
onUnmounted(() => {
  // document.removeEventListener("keyup", Enters);
});
</script>

<style scoped lang="scss">
.content-box {
  min-width: 500px;
  width: calc(100vw - 260px);
  height: calc(100vh - 105px);
  margin: 20px auto;
  background-color: #fff;
  color: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 3px 10px rgba(0, 97, 255, 0.2);

  .left {
    // width: calc(100wh - 40px);
    display: flex;
    align-items: center;
    height: 60px;
    margin: 0 30px;
    border-bottom: 1px solid #ccc;
    color: rgb(0, 0, 0);
    font-size: 18px;
    font-weight: 600;

    span {
      height: 60px;
      display: block;
      line-height: 60px;
      margin-right: 20px;
    }

    .is_active {
      color: rgba(111, 182, 184, 1);
    }
  }
  :deep(.el-tabs) {
    margin: 0 30px 15px;
    .el-tabs__header {
      margin: 0;
      .el-tabs__nav-wrap {
        &::after {
          display: none;
        }
        .el-tabs__item {
          box-shadow: none;
        }
      }
    }
    .el-tabs__content {
      display: none;
    }
  }
  .scrollId {
    overflow: auto;
    flex: 1;
    // height: calc(100% - 100px);
  }
  .middle {
    width: calc(100% - 60px);
    margin: 0 auto;

    color: #000;

    // border-bottom: 1px solid rgb(231, 231, 231);
    .filter {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      margin: 0;

      .search {
        color: #fff;
      }

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

        :deep(.el-input .el-input__inner) {
          font-size: 14px;
        }
        .title {
          padding: 0 25px 0 0;
        }
      }
      .grade {
        .el-input {
          :deep(.el-input__wrapper) {
            box-shadow: none;
          }
        }
        .grade_left {
          border-top: 1px solid #dcdfe6;
          border-bottom: 1px solid #dcdfe6;
          border-left: 1px solid #dcdfe6;
          border-top-left-radius: 4px;
          border-bottom-left-radius: 4px;
        }
        .line {
          display: block;
          height: 32px;
          line-height: 32px;
          padding: 0 8px;
          border-top: 1px solid #dcdfe6;
          border-bottom: 1px solid #dcdfe6;
        }
        .grade_right {
          border-top: 1px solid #dcdfe6;
          border-bottom: 1px solid #dcdfe6;
          border-right: 1px solid #dcdfe6;
          border-top-right-radius: 4px;
          border-bottom-right-radius: 4px;
        }
      }
      .search {
        margin-right: 20px;
      }
    }

    .gongneng {
      margin: 10px 0 20px 0;

      span {
        color: #fff;
      }
      .el-button {
        margin-right: 10px;
      }
    }

    :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;
    }
  }

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

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

      :deep(.el-table__header-wrapper) {
        background-color: #000;
        font-size: 14px;

        tr {
          // color: #000;
        }
      }

      :deep(.el-table__row) {
        height: 50px;
        font-size: 14px;
        // color: #000;

        &:hover {
          td {
            background-color: rgba(223, 236, 254, 1);
          }
        }
      }

      :deep(.el-table__row td) {
        padding: 0;
        border: 0;
        .normal {
          background-color: rgba(139, 195, 74, 1);
          color: #fff;
          padding: 4px;
        }
      }

      .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);
      }

      :deep(.edit) {
        display: flex;
        align-items: center;
        justify-content: center;
        color: rgba(111, 182, 184, 1);
      }

      :deep(.look) {
        padding: 0 10px;
        cursor: pointer;
        color: rgba(30, 125, 251, 1);
      }

      .del {
        padding: 0 10px;
        color: rgba(212, 48, 48, 1);
        cursor: pointer;
      }

      // :deep(.look):hover {
      //   color: red;
      // }
      // :deep(.del):hover {
      //   color: red;
      // }
    }
  }

  :deep(.infoDialog) {
    //   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: 0 30px;
      height: 500px;
      .abnormal {
        width: 100%;
        height: calc(100%);
        .title {
            display: flex;
            align-items: center;
            margin: 15px 0;
          .square {
            width: 16px;
            height: 16px;
            background: rgba(52, 100, 255, 1);
          }
          .studentInfo {
            font-size: 16px;
            font-weight: 600;
            margin-left: 10px;
            color: rgba(0, 0, 0, 1);
          }
        }
        .infoCont {
            display: flex;
            align-items: center;
            margin:10px 0 20px 0;
          img {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            margin-right:20px;
          }
          .phone {
            p {
              font-size: 18px;
              font-weight: 500;
              color: rgba(0, 0, 0, 1);
              margin: 0;
              padding-bottom: 10px;
            }
            span {
              font-size: 14px;
              font-weight: 400;
              color: rgba(102, 102, 102, 1);
            }
          }
          .patriarch {
            font-size: 16px;
            color: rgba(0, 0, 0, 1);
          }
        }
        .patriarchCont{
            display: flex;
            flex-direction: column;
            margin:15px 0 20px 0;
            .patriarch{
                margin-bottom: 5px;
                font-size: 15px;
            }
        }
      }
      .trackInfo {
        width: 100%;
        height: calc(100%);
        display: flex;
        align-items: center;
        justify-content: center;

        .el-timeline {
          height: calc(100% - 30px);
          overflow: auto;
          padding-left: 5px;
          padding-right: 25px;
          width: 505px !important;
          // 整个滚动条
          &::-webkit-scrollbar-track {
            background-color: rgb(219, 219, 219);
            border-radius: 4px;
          }
          // 滚动条的滚动区域（轨道）
          &::-webkit-scrollbar {
            background-color: #088afd;
            height: 3px;
            width: 4px;
            border-radius: 4px;
          }
          // 滚动条的可拖拽部分（滑块）
          &::-webkit-scrollbar-thumb {
            background: rgba(30, 125, 251, 1);
            border-radius: 4px;
          }
          .el-timeline-item__tail {
            border-left: 2px dashed rgba(173, 173, 173, 1);
          }
          h4 {
            margin: 0 0 10px 0;
            color: rgba(255, 255, 255, 0.6);
          }
          .el-timeline-item__wrapper {
            .el-timeline-item__timestamp {
              color: #000;
              font-size: 16px;
              font-weight: 600;
            }
            h4 {
              color: rgba(0, 0, 0,1);
              font-size: 14px;
            }
            p {
              color: rgba(0, 0, 0,1);
              font-size: 14px;
            }
            img {
              width: 100px;
            }
          }
          .el-card {
            background-color: transparent;
            border: none;
            .el-card__body {
              padding: 10px;
            }
          }
        }
      }
      .leaveInfo{
        font-size: 16px;
        color: #000;
        .name{
            margin:10px 0 15px 0;
            span{
                display: inline-block;
                width: 100px;
            }
        }
      }
      .options {
        margin: 160px 20px 20px 0;
        width: 100%;
        display: flex;
        flex-direction: row-reverse;
        .queding {
          color: #fff;
          margin-left: 15px;
        }
      }
    }
  }

  .pageSize {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    margin: 0 30px;

    span {
      color: #000;
    }

    .el-pagination {
      // width: 1600px;
      :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(0, 97, 255, 0.8);
        border: 1px solid rgba(0, 97, 255, 1);
        color: rgba(0, 97, 255, 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;
      }
    }
  }

  .bgImg {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 99999999;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    :deep(.el-carousel__arrow) {
      display: none;
    }
    // border-radius: 50px;
    :deep(.el-carousel__container) {
      width: 100%;
      height: calc(100vh);

      .el-carousel__item {
        display: flex;
        justify-content: center;

        img {
          height: 100%;
        }
      }
    }
  }
}

.el-input {
  width: 192px;
}
</style>
<style lang="scss">
//添加成员 联系人下拉框样式
.gradeSelect {
  // border: 1px solid red;
  .el-select-dropdown__wrap {
    height: 200px;
    // border: 1px solid red;
  }
}
.el-popper {
  .addStudentMore {
    text-align: center;
  }
}
</style>
