<template>
  <div class="content-box">
    <div class="left">
      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
      <span class="cameratxt">应用管理</span>
    </div>
    <div class="scrollId">
      <div class="middle">
        <div class="filter">
          <el-button
            color="rgba(0, 97, 255, 1)"
            type="primary"
            @click="addApply"
            plain
          >
            <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="150"
            align="center "
            type="index"
            label="序号"
          />
          <el-table-column align="center" prop="name" label="名称">
            <template #default="{ row }">
              <div v-if="row.category == '管理后台'">
                <span
                  style="color: rgb(30, 125, 251); cursor: pointer"
                  @click="applyLink(row)"
                  >{{ row.name }}</span
                >
              </div>
            </template>
          </el-table-column>
          <el-table-column align="center" prop="category" label="类别" />
          <el-table-column align="center" prop="updateTime" label="创建时间">
            <template #default="{ row }">
              <span>{{
                dayjs(row.createTime).format("YYYY-MM-DD HH:mm:ss")
              }}</span>
            </template>
          </el-table-column>
          <el-table-column align="center" label="操作" width="200">
            <template #default="scope">
              <div class="edit">
                <!-- <div class="look" @click="applyClick(scope.row)">打开项目</div> -->
                <div class="look" @click="editClick(scope.row)">编辑</div>
                <el-popconfirm
                  v-if="scope.row.appid!='wx2fc3f45732fae5d3'"
                  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>

      <!-- 分页组件 -->
      <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>

      <!-- 编辑按钮 -->
      <el-dialog
        class="editDialog"
        v-model="editVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        :title="titleDialog"
        align-center
        width="600"
        :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="name">
            <el-input
              v-model="editRuleForm.name"
              placeholder="请输入名称"
              clearable
              style="width: 500px"
            />
          </el-form-item>
          <el-form-item label="类别 :" prop="type">
            <el-select
              v-model="editRuleForm.type"
              class="m-2"
              placeholder="请选择类别"
              style="width: 500px"
              @change="typeSel"
            >
              <el-option label="管理后台" value="管理后台" />
              <el-option label="移动端H5" value="移动端H5" />
              <el-option label="小程序" value="小程序" />
              <el-option label="其他小程序" value="其他小程序" />
            </el-select>
          </el-form-item>
          <el-form-item label="logo图标 :" prop="logoUrl">
            <div class="xcxLogo">
              <img
                :src="editRuleForm.logoUrl"
                alt=""
                style="width: 80px; height: 80px"
              />
              <el-upload
                class="avatar-uploader"
                action="#"
                ref="upload"
                :auto-upload="false"
                list-type="picture"
                :on-preview="handlePreview"
                :on-remove="handleRemove"
                :on-change="handleChange"
                :before-upload="beforeAvatarUpload"
                :limit="1"
                :on-exceed="handleExceed"
              >
                <template #trigger>
                  <el-button
                    type="primary"
                    color="rgba(41, 109, 227, 1)"
                    @click="updateImg"
                    >上传图片</el-button
                  >
                </template>
                <template #tip>
                  <div class="el-upload__tip">
                    （ 注：图片格式必须为JPG/PNG格式，大小不超过50Kb ）
                  </div>
                </template>
              </el-upload>
            </div>
          </el-form-item>
          <el-form-item
            v-if="editRuleForm.type == '管理后台'"
            label="应用链接 :"
            prop="applyLink"
          >
            <el-input
              v-model="editRuleForm.applyLink"
              placeholder="请输入应用链接"
              clearable
              style="width: 500px"
            />
          </el-form-item>
          <el-form-item>
            <span style="color: red" v-if="editRuleForm.type == '移动端H5'"
              >配置该应用需要联系创海配置域名</span
            >
          </el-form-item>
          <el-form-item
            v-if="
              editRuleForm.type == '小程序' || editRuleForm.type == '其他小程序'
            "
            label="APPID :"
            prop="appid"
          >
            <el-input
              v-model="editRuleForm.appid"
              placeholder="请输入APPID"
              clearable
              style="width: 500px"
            />
          </el-form-item>
          <el-form-item
            v-if="
              editRuleForm.type == '小程序' ||
              editRuleForm.type == '其他小程序' ||
              editRuleForm.type == '移动端H5'
            "
            :label="editRuleForm.type == '移动端H5' ? '应用链接' : '路径'"
            prop="route"
          >
            <el-input
              v-model="editRuleForm.route"
              placeholder="请输入路径"
              clearable
              style="width: 500px"
            />
          </el-form-item>
          <el-form-item label="应用简介 :" prop="content">
            <el-input
              v-model="editRuleForm.content"
              :rows="4"
              show-word-limit
              maxlength="50"
              type="textarea"
              placeholder="请输入应用简介"
            />
          </el-form-item>
          <el-form-item
            v-if="editRuleForm.type == '管理后台'"
            label="是否置顶 :"
            prop="switch"
          >
            <el-tooltip
              effect="dark"
              placement="right"
              content="置顶功能可将应用在首页展示"
            >
              <el-switch
                v-model="editRuleForm.switch"
                style="--el-switch-on-color: rgba(41, 109, 227, 1)"
                active-value="1"
                inactive-value="2"
              />
            </el-tooltip>
          </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>

      <el-dialog
        class="applyDialog"
        v-model="applyVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        :title="applyTitle"
        align-center
        width="1800"
        :before-close="cancelApply"
      >
        <div style="width: 100%; height: 800px">
          <iframe
            :src="iframeSrc"
            width="100%"
            height="100%"
            frameborder="0"
            scrolling="yes"
          >
          </iframe>
        </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, genFileId } 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();
import COS from "cos-js-sdk-v5";
// 表格数据
const loading = ref(false);
const tableData = reactive({
  list: [],
});

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

// 编辑功能
const titleDialog = ref("");
const editVisible = ref(false);
const editRef = ref();
const upload = ref();
const editRuleForm = reactive({
  name: "", // 名称
  type: "", // 类别
  logoUrl: "", // 图标

  applyLink: "", // 应用链接
  content: "", // 应用简介
  switch: 2, // 是否置顶

  appId: "", //
  route: "", // 路径

  id: "",
});
// 表单验证
const editRules = reactive({
  name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
  logoUrl: [{ required: true, message: "图标不能为空", trigger: "blur" }],
  type: [
    {
      required: true,
      message: "类别不能为空",
      trigger: "blur",
    },
  ],
  applyLink: [
    {
      required: true,
      message: "应用链接不能为空",
      trigger: "blur",
    },
  ],
  appid: [
    {
      required: true,
      message: "APPID不能为空",
      trigger: "blur",
    },
  ],
  route: [
    {
      required: true,
      message: "路径不能为空",
      trigger: "blur",
    },
  ],
});

// 打开项目弹窗
const applyVisible = ref(false);
const applyTitle = ref();
const iframeSrc = ref();

// 应用管理分页数据
const getList = async () => {
  loading.value = true;
  let data = {
    currentPage: currentPage.value,
    pageCount: pageSize.value,
    // managerId: sessionStorage.getItem("token"),
  };
  let res = await axios({
    method: "get",
    url: api.value + "/wanzai/api/smartApply/queryPageSmartApply",
    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)),"应用管理分页数据");
    loading.value = false;
    tableData.list = JSON.parse(eds.decryptDes(res.data.data)).list;
    total.value = JSON.parse(eds.decryptDes(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 applyLink = (row) => {
  console.log(row);
  let str = row.urlLink;
  let charToCheck = "http";

  if (str.includes(charToCheck)) {
    if(row.descript=='领导驾驶舱'){
      window.open(`${row.urlLink}?token=${sessionStorage.getItem("token")}`);
    }else{
      window.open(row.urlLink)
    }
  } else {
    window.open(`https://${row.urlLink}?token=${sessionStorage.getItem("token")}`);
  }
};

// 添加按钮 （-------------------------------------------）
const addApply = async () => {
  titleDialog.value = "新建应用";
  editVisible.value = true;
  editRuleForm.name = "";
  editRuleForm.applyLink = "";
  editRuleForm.type = "";
  editRuleForm.logoUrl = "";
  editRuleForm.route = "";
  editRuleForm.switch = 2;
  editRuleForm.id = "";
};
// 确定添加应用
const confirmEdit = (formEl) => {
  if (!formEl) return;
  formEl.validate(async (valid, fields) => {
    if (valid) {
      let data = {
        name: editRuleForm.name,
        logo: editRuleForm.logoUrl,
        category: editRuleForm.type,
        urlLink: editRuleForm.applyLink,
        descript: editRuleForm.content,
        route: editRuleForm.route,
        isTop: editRuleForm.switch,
        appid: editRuleForm.appid,
      };
      // if (editRuleForm.type == "管理后台") {
      //   data = {
      //     name: editRuleForm.name,
      //     category: editRuleForm.type,
      //     urlLink: editRuleForm.applyLink,
      //   };
      // } else if (editRuleForm.type == "小程序") {
      //   data = {
      //     name: editRuleForm.name,
      //     category: editRuleForm.type,
      //     urlLink: editRuleForm.applyLink,
      //   };
      // } else if (editRuleForm.type == "移动端H5") {
      //   data = {
      //     name: editRuleForm.name,
      //     category: editRuleForm.type,
      //     urlLink: editRuleForm.applyLink,
      //   };
      // }
      if (editRuleForm.logoUrl) {
        data.logo = editRuleForm.logoUrl;
      }
      let res = "";
      if (editRuleForm.id) {
        data.id = editRuleForm.id;
        res = await axios({
          method: "post",
          url: api.value + "/wanzai/api/smartApply/updateSmartApplyById",
          headers: {
            token: sessionStorage.getItem("token"),
            user_head: sessionStorage.getItem("userhead"),
          },
          data: data,
        });
      } else {
        res = await axios({
          method: "post",
          url: api.value + "/wanzai/api/smartApply/insertSmartApply",
          headers: {
            token: sessionStorage.getItem("token"),
            user_head: sessionStorage.getItem("userhead"),
          },
          data: data,
        });
      }
      console.log(res, "添加/编辑应用");
      if (res.data.code == 200) {
        editVisible.value = false;
        getList();
        editRef.value.resetFields();
        ElMessage({
          type: "success",
          showClose: true,
          message: res.data.message,
          center: true,
        });
      } else {
        ElMessage({
          type: "error",
          showClose: true,
          message: res.data.message,
          center: true,
        });
      }
    }
  });
};
// 切换类别 （小程序 管理后台）
const typeSel = () => {
  editRuleForm.applyLink = "";
  editRuleForm.route = "";
  editRuleForm.switch = 2;
  // editRuleForm.id = "";
};
// 封面图上传(------------------------------------------------------)
// 添加照片时往fileList列表中添加图片信息(封面图上传图片)
const handleChange = (file, fileLists) => {
  console.log(file, "file11111");
  if (file.raw.type == "image/jpeg" || file.raw.type == "image/png") {
    if (file.size / 1024 > 50) {
      ElMessage.error("图片的大小不能超过50Kb!");
    } else {
      if (file.raw) {
        const cos = new COS({
          SecretId: "AKIDCPVZdcWIxgHpy5FYxVyPiqkZGrhdXUBg",
          SecretKey: "NkyCN3cz97qKaeXLvHOGxOcdS8f184pL",
          SecurityToken: "1306339220",
          Bucket: "wanzai-1306339220",
          Region: "ap-shanghai",
        });
        const files = file.raw;
        console.log(files, "files文件");
        const key = file.name; // 设置上传到 COS 后的文件名
        cos.putObject(
          {
            Bucket: "wanzai-1306339220",
            Region: "ap-shanghai",
            Key: key,
            Body: files,
            onProgress: function (progressData) {
              console.log(JSON.stringify(progressData));
            },
          },
          function (err, data) {
            if (err) {
              console.error(err, "请求失败");
            } else {
              console.log(data, "请求成功");
              editRuleForm.logoUrl = "https://" + data.Location;
              // 成功
            }
          }
        );
      }
    }
  } else {
    ElMessage.error("图片格式必须为JPG/PNG格式!");
  }
  // ruleForm.coverImg = file.url;
};
// 可以获取图片参数(封面图上传图片)
const handleUpload = async (file) => {
  console.log(file, "2222");
  // if (xcxFile.value) {
  //   const cos = new COS({
  //     SecretId: "AKIDCPVZdcWIxgHpy5FYxVyPiqkZGrhdXUBg",
  //     SecretKey: "NkyCN3cz97qKaeXLvHOGxOcdS8f184pL",
  //     SecurityToken: "1306339220",
  //     Bucket: "wanzai-1306339220",
  //     Region: "ap-shanghai",
  //   });

  //   const files = file.file;
  //   console.log(files, "files文件");

  //   const key = file.file.name; // 设置上传到 COS 后的文件名

  //   cos.putObject(
  //     {
  //       Bucket: "wanzai-1306339220",
  //       Region: "ap-shanghai",
  //       Key: key,
  //       Body: files,
  //       onProgress: function (progressData) {
  //         console.log(JSON.stringify(progressData));
  //       },
  //     },
  //     function (err, data) {
  //       if (err) {
  //         console.error(err, "请求失败");
  //       } else {
  //         console.log(data, "请求成功");
  //         editRuleForm.logoUrl = "https://" + data.Location;
  //         // 成功
  //       }
  //     }
  //   );

  //   // datas.set("files", img1File.value);
  //   // let ress = await axios({
  //   //   method: "post",
  //   //   url: api.value + "/file/cos/upload",
  //   //   headers: {
  //          token: sessionStorage.getItem("token"),
  //          user_head: sessionStorage.getItem("userhead"),
  // },
  //   //   data: datas,
  //   // });
  //   // console.log(ress, "图片上传成功封面图");
  //   // ruleForm.coverImg = ress.data.data;
  // }
};
// 移出图片(封面图上传图片)
const handleRemove = (uploadFile, uploadFiles) => {
  console.log(uploadFile, uploadFiles, "移出图片");
  editRuleForm.logoUrl = "";
};
// 限制上传图片的大小
const beforeAvatarUpload = (rawFile) => {
  console.log(rawFile.type, 333333333333);

  if (rawFile.type !== "image/jpeg" && rawFile.type !== "image/png") {
    ElMessage.error("图片格式必须为JPG/PNG格式!");
    return false;
  } else if (rawFile.size / 1024 > 0.05) {
    ElMessage.error("图片的大小不能超过50Kb!");
    return false;
  }
  return true;
};
// 选中时自动替换上一个文件。
const handleExceed = (files) => {
  upload.value.clearFiles();
  const file = files[0];
  file.uid = genFileId();
  upload.value.handleStart(file);
};

//编辑按钮  （-------------------------------------------）
const editClick = async (row) => {
  titleDialog.value = "编辑应用";
  editVisible.value = true;
  editRuleForm.name = row.name;
  editRuleForm.type = row.category;
  editRuleForm.applyLink = row.urlLink;
  editRuleForm.logoUrl = row.logo;
  editRuleForm.switch = row.isTop;
  editRuleForm.content = row.descript;
  editRuleForm.route = row.route;
  editRuleForm.appid = row.appid;
  editRuleForm.id = row.id;
};
const cancelEdit = () => {
  editVisible.value = false;
  editRef.value.resetFields();
  editRuleForm.name = "";
  editRuleForm.type = "";
  editRuleForm.logoUrl = "";
  editRuleForm.applyLink = "";
  editRuleForm.id = "";
};

// (-------------------------------------------------------------)
//删除按钮
const del = async (row) => {
  let data = {
    id: row.id,
  };
  let res = await axios({
    method: "get",
    url: api.value + "/wanzai/api/smartApply/deleteSmartApplyById",
    headers: {
      token: sessionStorage.getItem("token"),
      user_head: sessionStorage.getItem("userhead"),
    },
    params: 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 applyClick = (row) => {
  applyVisible.value = true;
  applyTitle.value = "嵌套项目";
  applyTitle.value = row.name;
  // iframeSrc.value = row.urlLink;
  iframeSrc.value = "https://www.campussmartlife.com/smartManage/#/login";
  console.log(row.urlLink);
};
const cancelApply = () => {
  applyVisible.value = false;
};

// 多选框功能
const handleSelectionChange = (val) => {
  console.log(val);
  selectData.list = val;
};
// 表格斑马纹颜色修改
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;
  getList();
});
</script>

<style scoped lang="scss">
.content-box {
  min-width: 500px;
  width: calc(100vw - 260px);
  height: calc(100vh - 105px);
  margin: 20px auto;
  background-color: #fff;
  border-radius: 8px;
  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;

    margin: 0 30px;
    border-bottom: 1px solid #ccc;
    color: rgb(0, 0, 0);
    font-size: 18px;
    font-weight: 600;

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

    .is_active {
      color: rgba(111, 182, 184, 1);
    }
  }
  .scrollId {
    overflow: auto;
    height: calc(100% - 61px);
  }
  .middle {
    width: 96%;
    margin: 0 auto;

    color: #000;

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

      .search {
        color: #fff;
      }

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

    :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: 96%;
    height: calc(100% - 170px);
    min-height: 300px;
    margin: 10px auto 30px;

    .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):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 30px 10px 30px;
      .el-form-item__content {
        width: 200px;
        .el-input-group__append {
          background-color: rgba(222, 234, 252, 1);
          color: rgba(0, 97, 255, 1);
          cursor: pointer;
          user-select: none;
        }
        .el-upload-list {
          display: none;
        }
      }
      .options {
        margin: 30px 20px 20px 0;
        width: 100%;
        .el-form-item__content {
          display: flex;
          flex-direction: row-reverse;
        }
        .queding {
          color: #fff;
          margin-left: 15px;
        }
      }
    }
  }

  :deep(.applyDialog) {
    //   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: 10px;
    }
  }

  .pageSize {
    display: flex;
    align-items: center;
    justify-content: space-between;
    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;
      }
    }
  }
}

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