<template>
  <div class="content-box">
    <div class="left">
      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
      <span class="cameratxt">水电表管理</span>
    </div>
    <div class="scroll">
      <div class="middle">
        <div class="filter">
          <div class="condition">
            <span>关键字&nbsp;&nbsp;</span>
            <el-input
              :clearable="true"
              @clear="searchBtn"
              v-model.trim="searchInput.keyWord"
              style="width: 250px"
              placeholder="请输入房间号，电、水表设备编码"
            />
          </div>
          <el-button
            color="rgba(0, 97, 255, 1)"
            type="primary"
            class="search"
            @click="searchBtn"
            ><el-icon>
              <Search />
            </el-icon>
            <span>查询</span></el-button
          >
          <div class="condition">
            <span>创建时间&nbsp;&nbsp;</span>
            <el-date-picker
              v-model="searchInput.createTime"
              type="daterange"
              range-separator="-"
              start-placeholder="起始时间"
              end-placeholder="结束时间"
              format="YYYY-MM-DD"
              value-format="YYYY-MM-DD"
              :prefix-icon="Calendar"
              placeholder="请选择日期"
              style="width: 270px"
              @change="searchBtn"
            />
          </div>
          <div class="condition">
            <span>楼栋单元 </span>
            <el-select
              v-model="searchInput.buildingId"
              placeholder="请选择楼栋单元"
              style="width: 200px"
              @change="searchBtn"
              :clearable="true"
            >
              <el-option
                v-for="item in buildData"
                :key="item.id"
                :label="`${item.building}${item.element}`"
                :value="item.id"
              />
            </el-select>
            <!-- <el-cascader
              v-model="searchInput.buildingId"
              :options="buildData"
              :props="defaultProps"
              clearable
              @change="searchBtn"
            /> -->
          </div>
          <div class="condition">
            <span>房型名称 </span>
            <el-select
              style="width: 180px"
              v-model="searchInput.houseId"
              class="m-2"
              placeholder="请选择房型"
              :clearable="true"
              @change="searchBtn"
            >
              <el-option
                :label="`${i.roomName}(${i.roomType == 1 ? '全' : '钟'})`"
                :value="i.id"
                v-for="i in roomTypeData"
              />
            </el-select>
          </div>
          
        </div>
        <!-- 按钮列表 -->
        <div class="gongneng">
          <el-button 
            v-if="flagBtn.tianjia==1"
            type="primary"
            color="rgba(0, 97, 255, 1)"
            @click="addClick"
            ><span>添加</span></el-button
          >
          <el-button
            v-if="flagBtn.daochu==1"
            @click="exportExcel"
            type="primary"
            color="rgba(0, 97, 255, 1)"
            ><span>导出</span></el-button
          >
          <el-upload
            v-if="flagBtn.daoru==1"
            class="avatar-uploader"
            action=""
            :on-preview="handlePreview"
            :on-remove="handleRemove"
            :on-change="handleChange"
            :http-request="handleUpload"
            :before-upload="beforeAvatarUpload"
          >
            <template #trigger>
              <el-button type="primary" color="rgba(0, 97, 255, 1)"
                >导入</el-button
              >
            </template>
            <template #tip>
              <!-- <div class="el-upload__tip">
                    （注：图片大小不超过10M，建议按16:9比例）
                  </div> -->
            </template>
          </el-upload>
          <!-- <el-button @click="importClick" type="primary" color="rgba(0, 97, 255, 1)"
            ><span>导入</span></el-button
          > -->
        </div>
      </div>
      <div class="footer" v-loading="loading">
        <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="selection" width="80" /> -->
          <el-table-column
            width="100"
            align="center "
            type="index"
            label="序号"
          />
          <el-table-column
            align="center"
            prop="waterEquipmentMeterName"
            label="水表编码"
          />
          <el-table-column
            align="center"
            prop="electricEquipmentMeterName"
            label="电表编码"
          />
          <el-table-column align="center" prop="houseName" label="房型">
            <template #default="{ row }">
              {{ row.houseName
              }}<span style="color: rgb(30, 125, 251)"
                >( {{ row.roomType == 1 ? "全" : "钟" }} )</span
              >
            </template>
          </el-table-column>
          <el-table-column align="center" prop="roomNumber" label="房间号" />
          <el-table-column align="center" prop="createTime" label="创建时间" />
          <el-table-column align="center" label="操作" width="200">
            <template #default="scope">
              <div class="edit">
                <div v-if="flagBtn.bianji==1" class="look" @click="editClick(scope.row)">编辑</div>
                <el-popconfirm
                  v-if="flagBtn.shanchu==1"
                  width="220"
                  confirm-button-text="确认"
                  cancel-button-text="取消"
                  :icon="InfoFilled"
                  icon-color="#f89626"
                  title="是否删除此房型?"
                  @confirm="del(scope.row)"
                  @cancel="cancelEvent"
                >
                  <template #reference>
                    <div class="del">删除</div>
                  </template>
                </el-popconfirm>
              </div>
            </template>
          </el-table-column>
        </el-table>
         <!-- 分页组件 -->
        <div class="pageSize">
          <span></span>
          <el-pagination
            background
            :current-page="currentPage"
            :page-size="pageSize"
            layout="total, prev, pager, next, jumper, slot"
            :total="total"
            @update:current-page="handleCurrentChange"
          />
        </div>
      </div>

      <!-- 编辑按钮 -->
      <el-dialog
        class="editDialog"
        v-model="editVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        :title="titleDialog"
        align-center
        width="550"
        :before-close="cancelEdit"
      >
        <el-form
          ref="editRef"
          :model="editRuleForm"
          :rules="editRules"
          label-width="90px"
          class="demo-ruleForm"
          :size="formSize"
          label-position="left"
          status-icon
        >
          <el-form-item label="水表编码 :" prop="SB_encoding">
            <el-input
              v-model.trim="editRuleForm.SB_encoding"
              placeholder="请输入水表编码"
              clearable
              style="width: 500px"
            />
          </el-form-item>
          <el-form-item label="电表编码 :" prop="DB_encoding">
            <el-input
              v-model.trim="editRuleForm.DB_encoding"
              placeholder="请输入电表编码"
              clearable
              style="width: 500px"
            />
          </el-form-item>
          <el-form-item label="房间号 :" prop="roomNum">
            <!-- <el-tree
              :data="roomNumData"
              :props="{
                label: 'label',
                children: 'children',
                value: 'value',
                disabled: 'disabled',
              }"
              node-key="id"
              show-checkbox
              ref="roomNumRef"
              @node-click="roomNumClick"
              @check-change="handleCheckChange"
            /> -->
            <!-- <el-cascader
              v-model="editRuleForm.roomNum"
              :options="roomNumData"
              :show-all-levels="false"
            /> -->
            <el-select
              v-model="editRuleForm.roomNum"
              popper-class="more-tag-data"
              filterable
              clearable
              remote
              :remote-method="keyWordMethod"
              :loading="conteactLoading"
              placeholder="请选择房间号"
              style="width: 200px"
              @change="searchBtn"
            >
              <el-option
                v-for="item in roomNumData"
                :key="item.id"
                :label="item.roomNumber"
                :value="item.id"
              >
                <span style="float: left">{{ item.roomNumber }}</span>
              </el-option>
              <template #footer>
                <div class="addStudentMore">
                  <el-button
                    v-if="editCurrentPage < editPageTotal && editPageTotal != 0"
                    @click="addEditMore"
                    >加载更多+</el-button
                  >
                </div>
              </template>
            </el-select>
          </el-form-item>
          <el-form-item class="options">
            <el-button
              color="rgba(41, 109, 227, 1)"
              class="queding"
              type="primary"
              @click="confirmEdit(editRef)"
            >
              确定
            </el-button>
            <el-button @click="cancelEdit(editRef)">取消</el-button>
          </el-form-item>
        </el-form>
      </el-dialog>
    </div>
    <div class="bgImg" v-if="bgImg">
      <el-carousel
        @click="bgImg = false"
        ref="bgImgs"
        indicator-position
        arrow="always"
        :autoplay="false"
        trigger
      >
        <el-carousel-item v-for="item in bgImgList" :key="item.id">
          <img :src="item.url" alt="" />
        </el-carousel-item>
      </el-carousel>
    </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 lodash from "lodash";
import axios from "axios";
import { useStore } from "vuex";
const store = useStore();
const api = ref("");
const router = useRouter();

const flagBtn = ref(); // 按钮权限
// 表格数据
const loading = ref(false);
const tableData = reactive({
  list: [
    // {
    //   userName: "双人房",
    //   userPhone: 150,
    //   teamName: 12,
    // },
    // {
    //   userName: "双人房",
    //   userPhone: 150,
    //   teamName: 12,
    // },
    // {
    //   userName: "双人房",
    //   userPhone: 150,
    //   teamName: 12,
    // },
    // {
    //   userName: "双人房",
    //   userPhone: 150,
    //   teamName: 12,
    // },
  ],
});

const searchInput = reactive({
  keyWord: "",
  buildingId: "", // 楼栋
  houseId: "", // 房型
  createTime:"",
}); // 搜索按钮数据
const roomTypeData = ref(); // 房型数据
const buildData = ref(); // 楼栋数据

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

// 编辑功能
const titleDialog = ref("");
const editVisible = ref(false);
const editRef = ref();
const keyWord = ref(); // 房间号搜索
const editCurrentPage = ref(1); // 当前页
const editPageSize = ref(100);
const editPageTotal = ref(); // 总页数
const editRuleForm = reactive({
  SB_encoding: "",
  DB_encoding: "",
  roomNum: "",
});
// 树形结构配置
const roomNumRef = ref();
const roomNumData = ref();
// 表单验证
const editRules = reactive({
  SB_encoding: [
    { required: true, message: "水表编码不能为空", trigger: "blur" },
  ],
  DB_encoding: [
    {
      required: true,
      message: "电表编码不能为空",
      trigger: "blur",
    },
  ],
  roomNum: [
    {
      required: true,
      message: "房间号不能为空",
      trigger: "blur",
    },
  ],
});

// 查看房型列表
const getList = async () => {
  loading.value = true;
  let data = {
    page: currentPage.value,
    size: pageSize.value,
    keyWord: searchInput.keyWord, // 房型名称
    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
    houseId: searchInput.houseId,
    buildingId: searchInput.buildingId,
  };
  if (searchInput.createTime) {
    data.startTime = searchInput.createTime[0];
    data.endTime = searchInput.createTime[1];
  }
  let res = await axios({
    method: "get",
    url: api.value + "/house-number/list",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("user_head"),
    },
    params: data,
  });
  console.log(res, "水电表管理");
  if (res.data.code == 200) {
    loading.value = false;
    tableData.list = res.data.data.list;
    total.value = res.data.data.totalCount;
    // ElMessage({
    //   type: "success",
    //   showClose: true,
    //   message: res.data.message,
    //   center: true,
    // });
  } else {
    loading.value = false;
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
};

// 搜索功能
const searchBtn = lodash.debounce(async () => {
  getList();
}, 300);
// 添加按钮 （-------------------------------------------）
// 房间号数据
const roomNumClick = async () => {
  let data = {
    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
    page: editCurrentPage.value,
    size: editPageSize.value,
    keyWord: keyWord.value,
  };
  let res = await axios({
    method: "get",
    url: api.value + "/house-number/pullDownList",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("user_head"),
    },
    params: data,
  });
  console.log(res, "房间号查询");
  if (res.data.code == 200) {
    roomNumData.value = res.data.data.records;
    editPageTotal.value = res.data.data.pages;
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
};
// 房间号 下拉框搜索时加载
const keyWordMethod = (query) => {
  console.log(query);
  keyWord.value = query;
  editCurrentPage.value = 1;
  roomNumClick();
};
const addEditMore = async () => {
  if (editCurrentPage.value < editPageTotal.value) {
    editCurrentPage.value++;
    let data = {
      permissionSettingId: sessionStorage.getItem("permissionSettingId"),
      page: editCurrentPage.value,
      size: editPageSize.value,
      keyWord: keyWord.value,
    };
    let res = await axios({
      method: "get",
      url: api.value + "/house-number/pullDownList",
      headers: {
        token: sessionStorage.getItem("token"),
        user_head: sessionStorage.getItem("user_head"),
      },
      params: data,
    });
    console.log(res.data.data.records, "加载更多房间号下拉数据");
    roomNumData.value = [...roomNumData.value, ...res.data.data.records];
  } else {
    console.log("数据全部加载完成");
  }
};
const addClick = async () => {
  titleDialog.value = "新增";
  editVisible.value = true;
};

//编辑按钮  （-------------------------------------------）
const editClick = async (row) => {
  titleDialog.value = "编辑";
  editVisible.value = true;
  editRuleForm.SB_encoding = row.waterEquipmentMeterName;
  editRuleForm.DB_encoding = row.electricEquipmentMeterName;
  roomNumClick().then(() => {
    editRuleForm.roomNum = row.id;
  });
};
// 确定编辑
const confirmEdit = (formEl) => {
  if (!formEl) return;
  formEl.validate(async (valid, fields) => {
    if (valid) {
      if (titleDialog.value == "新增") {
        let data = {
          houseNumberId: editRuleForm.roomNum,
          meterNameElectric: editRuleForm.DB_encoding,
          meterNameWater: editRuleForm.SB_encoding, // 房型名称
          permissionSettingId: sessionStorage.getItem("permissionSettingId"),
        };
        let res = await axios({
          method: "post",
          url: api.value + "/house-number/binding",
          headers: {
            token: sessionStorage.getItem("token"),
            user_head: sessionStorage.getItem("user_head"),
          },
          data: data,
        });
        console.log(res, "新增确定");
        if (res.data.code == 200) {
          editVisible.value = false;
          editRef.value.resetFields();
          getList();
          ElMessage({
            type: "success",
            showClose: true,
            message: res.data.message,
            center: true,
          });
        } else {
          ElMessage({
            type: "error",
            showClose: true,
            message: res.data.message,
            center: true,
          });
        }
      } else if (titleDialog.value == "编辑") {
        let data = {
          houseNumberId: editRuleForm.roomNum,
          meterNameElectric: editRuleForm.DB_encoding,
          meterNameWater: editRuleForm.SB_encoding, // 房型名称
          permissionSettingId: sessionStorage.getItem("permissionSettingId"),
        };
        let res = await axios({
          method: "post",
          url: api.value + "/house-number/update",
          headers: {
            token: sessionStorage.getItem("token"),
            user_head: sessionStorage.getItem("user_head"),
          },
          data: data,
        });
        console.log(res, "编辑确定");
        if (res.data.code == 200) {
          editVisible.value = false;
          editRef.value.resetFields();
          getList();
          ElMessage({
            type: "success",
            showClose: true,
            message: res.data.message,
            center: true,
          });
        } else {
          ElMessage({
            type: "error",
            showClose: true,
            message: res.data.message,
            center: true,
          });
        }
      }
    }
  });
};
const cancelEdit = () => {
  editVisible.value = false;
  editRef.value.resetFields();
  editRuleForm.SB_encoding = "";
  editRuleForm.DB_encoding = "";
  editRuleForm.roomNum = "";
  editCurrentPage.value = 1;
};
// // 树形结构 复选框被触发
// const handleCheckChange = (data, checked, indeterminate) => {
//   //   console.log(data, checked, indeterminate);
//   if (data.list) {
//     // console.log(data.list);
//   } else {
//     if (checked) {
//       roomNumRef.value.setCheckedKeys([data.id]);
//     }
//     let keys = roomNumRef.value.getCheckedKeys();
//     console.log(keys);
//     editRuleForm.roomNum = keys;
//   }
// };
// // 树形结构 被点击时触发
// const roomNumClick = (data, node, component) => {
//   //  * @description: node - click 节点被点击时的回调
//   //  * @param {*} data 该节点所对应的对象
//   //  * @param {*} node 节点对应的 Node
//   //  * @param {*} component 节点组件本身
//   console.log("子组件触发 node-click 事件", data, node, component);
//   //   buildIdsRef.value.setCheckedKeys(item.build);
// };

//删除按钮
const del = async (row) => {
  let data = {
    houseNumberId: row.id,
    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  };
  let res = await axios({
    method: "post",
    url: api.value + "/house-number/delete",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    data: data,
  });
  if (res.data.code == 200) {
    if (tableData.list.length == 1 && currentPage.value != 1) {
      currentPage.value = currentPage.value - 1;
    }
    getList();
    ElMessage({
      type: "success",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
  // console.log(res);
};

// 多选框功能
const handleSelectionChange = (val) => {
  console.log(val);
  selectData.list = val;
};

// 楼栋单元数据
const schoolData = async () => {
  let res = await axios({
    method: "get",
    url: api.value + "/building/beDisplayBar",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("user_head"),
    },
  });
  console.log(res, "楼栋单元下拉框");
  if (res.data.code == 200) {
    buildData.value = res.data.data;
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
};
// 房型列表数据
const roomTypeList = async () => {
  let res = await axios({
    method: "get",
    url: api.value + "/house/displayBar",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("user_head"),
    },
  });
  console.log(res, "房型列表数据");
  if (res.data.code == 200) {
    roomTypeData.value = res.data.data;
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
};

// 导入 (--------------------------------------------------------------)
const handleRemove = (uploadFile, uploadFiles) => {
  // console.log(uploadFile.uid, uploadFiles);
};
// 点击图片的查看按钮
const handlePreview = (file) => {
  // console.log(file);
};
// 限制上传图片的大小
const beforeAvatarUpload = (rawFile) => {
  console.log(rawFile.type);
  // if (rawFile.type !== "image/jpeg") {
  //   ElMessage.error("图片格式必须为JPG/PNG格式!");
  //   return false;
  // } 
  // return true;
};
// 添加照片时往fileList列表中添加图片信息
const handleChange = async (file, fileLists) => {
  // console.log(file, "1111");
};
// 可以获取图片参数
const handleUpload = async (file) => {
  console.log(file, "22222222");
  let data = new FormData();
  data.append("file", file.file);
  let res = await axios({
    method: "post",
    url: api.value + "/house-number/importList",

    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("user_head"),
    },
    data: data,
  });
  console.log(res, "导入水电表信息");
  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,
    });
  }
};

//导出功能
const exportExcel = async () => {
  let data = {
    keyWord: searchInput.keyWord, // 房型名称
    houseId: searchInput.houseId,
    buildingId: searchInput.buildingId,
    permissionSettingId: sessionStorage.getItem("permissionSettingId"),
  };
  if (searchInput.createTime) {
    data.startTime = searchInput.createTime[0];
    data.endTime = searchInput.createTime[1];
  }
  let res = await axios({
    method: "get",
    url: api.value + "/house-number/listExport",
    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: res.data.message,
      center: true,
    });
  }
};
// 表格斑马纹颜色修改
const tableRowClassName = ({ row, rowIndex }) => {
  if (rowIndex % 2 === 0) {
    return "even";
  } else if (rowIndex % 2 !== 0) {
    return "odd";
  }
  return "";
};
// 分页
const handleCurrentChange = (value) => {
  // console.log(value);
  currentPage.value = value;
  getList();
};

onBeforeMount(async () => {
  api.value = store.state.user.api;
  const btnflag = JSON.parse(sessionStorage.getItem("btnflag"));
  flagBtn.value = btnflag.meter;
  console.log(flagBtn.value, "按钮权限");
  getList();
  roomTypeList();
  schoolData();
});
onUnmounted(() => {
  // document.removeEventListener("keyup", Enters);
});
</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;
  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 {
      margin-right: 20px;
      cursor: pointer;
    }

    .is_active {
      color: rgba(111, 182, 184, 1);
    }
  }

  .scroll{
    width:calc(100% );
    height: calc(100% - 61px);
    display:flex;
    flex-direction:column;
  }

  .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: 10px 0 0 0;

      .search {
        color: #fff;
        margin-right:30px;
      }

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

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

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

    .gongneng {
      margin: 10px 0 10px 0;
      display:flex;
      span {
        color: #fff;
      }
      .el-button {
        margin-right: 10px;
      }
      .avatar-uploader{
        margin-left:10px;
        :deep(.el-upload-list){
          display:none;
        }
      }
    }

    :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);
    flex: 1;
    margin: 0 auto;
    overflow: auto;

    .el-table--fit {
      height: calc(100% - 60px);

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

        tr {
          color: #000;
        }
      }

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

      :deep(.el-table__row):nth-child(2n) {
        .el-table-fixed-column--right {
          background-color: rgba(240, 243, 247, 1);
        }
      }

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

      .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(.editDialog) {
    //   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__content {
        width: 200px;
        .el-tree-node__content {
          //   border: 1px solid red;
          .el-checkbox {
            display: none;
          }
        }
        .el-tree-node__children {
          .el-checkbox {
            display: block;
          }
        }
      }
      .options {
        margin: 10px 20px 20px 0;
        width: 100%;
        .el-form-item__content {
          display: flex;
          flex-direction: row-reverse;
        }
        .queding {
          color: #fff;
          margin-left: 15px;
        }
      }
    }
  }

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

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

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