<template>
  <div class="inform" style="height:100%">
    <el-card class="box-card">
      <!-- 标题区域 -->
      <!-- <div slot="header" class="clearfix">
        <div class="inform-title">当日出入统计</div>
      </div>
      <div class="scroll">
        <div class="carNum">
          <div
            class="carType carNumType"
            v-for="item in carTypeNum"
            :key="item.name"
          >
            <span class="type">{{ item.name }}</span>
            <div class="num">{{ item.value }}</div>
            <span>辆</span>
          </div>
        </div>
      </div> -->

      <div
        class="clearfix"
        style="border-bottom: 1px solid rgba(230, 230, 230, 1);"
      >
        <div class="inform-title">车辆管理</div>
      </div>
      <!-- 主体内容区域 -->
      <div class="inform-body">
        <!-- 筛选条件区域 -->
        <div class="order-top">
          <div style="display: flex">
            <!--时间筛选 -->
            <div class="paydate">
              <span>时间筛选:</span>
              <el-date-picker
                v-model="timeValue"
                align="center"
                type="datetimerange"
                format="yyyy-MM-dd HH:mm:ss"
                value-format="yyyy-MM-dd HH:mm:ss"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
                @change="getStartTime"
              ></el-date-picker>
            </div>

            <!-- 车牌号筛选 -->
            <div class="plateNum">
              <span>车牌号:</span>
              <el-input
                placeholder="请输入车牌号"
                style="width: 185px"
                clearable
                v-model="value"
                @change="getCarNum"
              >
                <i slot="prefix" class="el-input__icon el-icon-search"></i>
              </el-input>
            </div>

            <!-- 车辆类型筛选 -->
            <div class="state">
              <span>车辆类型:</span>
              <el-select
                v-model="state"
                placeholder="请选择车辆类型"
                clearable
                @change="getTypeData"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :value="item.value"
                  :label="item.label"
                ></el-option>
              </el-select>
            </div>
          </div>
          <div style="display: flex" class="addblock">
            <div class="addcar export" @click="addCar">新增车辆</div>
            <!-- 详情弹窗区域 -->
            <el-dialog
              :title="addTitle"
              :visible.sync="dialogVisible"
              :before-close="closeDialog"
              width="30%"
            >
              <div>
                <el-form
                  :model="ruleForm"
                  status-icon
                  label-position="left"
                  :rules="rules"
                  ref="ruleForm"
                  label-width="100px"
                  class="demo-ruleForm"
                >
                  <el-form-item label="车牌号" prop="carNum">
                    <el-input
                      v-model="ruleForm.carNum"
                      autocomplete="off"
                    ></el-input>
                    <!-- <CarNumber></CarNumber> -->
                  </el-form-item>
                  <el-form-item label="类型" prop="carType">
                    <el-input v-model="ruleForm.carType"></el-input>
                  </el-form-item>
                  <el-form-item label="车主姓名" prop="name">
                    <el-input v-model="ruleForm.name"></el-input>
                  </el-form-item>
                  <el-form-item label="联系方式" prop="phone">
                    <el-input
                      v-model.number="ruleForm.phone"
                      autocomplete="off"
                    ></el-input>
                  </el-form-item>
                  <el-form-item>
                    <el-button @click="resetForm('ruleForm')" plain
                      >取消</el-button
                    >
                    <el-button type="primary" @click="submitForm('ruleForm')"
                      >确认</el-button
                    >
                  </el-form-item>
                </el-form>
              </div>
            </el-dialog>
            <div class="export" @click="exportExcel">导出订单</div>
          </div>
        </div>
        <!-- 表格区域 -->
        <div class="inform-table">
          <!-- 表格区域 -->
          <el-table
            :data="tableData"
            @selection-change="handleSelectionChange"
            max-height="480"
            style="width: 1550px; height: 480px"
            stripe
            class="Devicetable"
            :cell-style="rowbg"
            :header-cell-style="{
              color: ' rgba(0, 0, 0, 1)',
              background: 'rgba(230, 236, 254, 1)'
            }"
          >
            <el-table-column
              width="120"
              label="序号"
              type="index"
              align="center"
            ></el-table-column>
            <el-table-column
              prop="car_number"
              align="center"
              label="车牌号"
            ></el-table-column>
            <el-table-column
              prop="c_type"
              align="center"
              label="车辆类型"
            ></el-table-column>
            <el-table-column
              prop="create_time"
              width="200"
              align="center"
              label="创建时间"
            ></el-table-column>
            <el-table-column
              prop="user_name"
              align="center"
              label="车主姓名"
            ></el-table-column>
            <el-table-column
              prop="user_phone"
              align="center"
              label="联系方式"
            ></el-table-column>
            <el-table-column align="center" label="操作">
              <template slot-scope="{ row }">
                <!-- 详情按钮 -->
                <span
                  @click="amendCar(row)"
                  class="operate"
                  style="margin-right: 5px"
                  v-if="
                    row.c_type !== '免费车' &&
                      row.c_type !== '临时车' &&
                      row.c_type !== '月租车' &&
                      row.c_type !== '访客车'
                  "
                  >修改</span
                >
                <!-- 删除按钮 -->
                <span
                  @click="handleDelete(row)"
                  class="operate"
                  v-if="
                    row.c_type !== '免费车' &&
                      row.c_type !== '临时车' &&
                      row.c_type !== '月租车' &&
                      row.c_type !== '访客车'
                  "
                  >删除</span
                >
              </template>
            </el-table-column>
          </el-table>
        </div>
        <!-- 分页器区域 -->
        <div class="block">
          <!-- <el-pagination
            background
            :page-sizes="[100, 200, 300, 400]"
            :page-size="100"
            layout="prev, pager, next"
            :total="1000"
          >
          </el-pagination>-->
          <el-pagination
            @current-change="handleCurrentChange"
            :current-page="curPage"
            :page-size="7"
            layout="total,  prev, pager, next, jumper"
            :total="total"
          ></el-pagination>
        </div>
      </div>
    </el-card>
  </div>
</template>

<script>
import dayjs from "dayjs";
export default {
  name: "role",
  data() {
    return {
      // 显示的总数据
      tableData: [],
      // 车辆数量
      carTypeNum: [],
      // 状态数组
      options: [],
      timeValue: "", // 时间筛选
      value: "", // 车牌号
      state: "", // 车辆类型
      curPage: 1, // 当前页
      total: 0, // 总条数
      dialogVisible: false, // 新增车辆窗口显示
      addTitle: "",
      ruleForm: {
        name: "",
        carNum: "",
        carType: "",
        phone: ""
      },
      carNumShow: false,
      rules: {
        name: [{ required: true, message: "姓名不能为空", trigger: "blur" }],
        carNum: [
          { required: true, message: "请输入车牌号", trigger: "blur" },
          {
            pattern: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/,
            message: "请输入合法车牌号",
            trigger: "blur"
          }
        ],
        carType: [
          { required: true, message: "请输入车辆类型", trigger: "blur" }
        ],
        phone: [
          { required: true, message: "请输入手机号", trigger: "blur" },
          {
            pattern: /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/,
            message: "请输入合法手机号/电话号",
            trigger: "blur"
          }
        ]
      }
    };
  },
  mounted() {
    document.getElementsByClassName(
      "el-pagination__jump"
    )[0].childNodes[0].nodeValue = "跳转";
    this.typeNum();
    this.getData(1);
  },
  methods: {
    // 获取车辆类型和数据
    async typeNum() {
      let dataNum = await this.API.car.carquery();
      // console.log(dataNum);
      this.carTypeNum = [];
      (this.options = []),
        dataNum.data.forEach(item => {
          Object.keys(item).forEach(key => {
            // if (item[key] != 0) {
            //   this.carTypeNum.push({ name: key, value: item[key] });
            //   this.options.push({
            //     label: key,
            //     value: key,
            //   });
            // }
            this.carTypeNum.push({ name: key, value: item[key] });
            this.options.push({
              label: key,
              value: key
            });
          });
        });
    },
    // 获取表格数据
    async getData(page) {
      let data;
      // 判断车辆类型
      if (this.state && !this.value && !this.timeValue) {
        // console.log(this.state);
        data = await this.API.car.carList({
          page: page,
          rows: 7,
          c_type: this.state
        });
      }
      // 判断搜索车辆牌号
      else if (!this.state && this.value && !this.timeValue) {
        data = await this.API.car.carList({
          page: page,
          rows: 7,
          car_number: this.value
        });
      }
      // 判断筛选时间
      else if (!this.state && !this.value && this.timeValue) {
        data = await this.API.car.carList({
          page: page,
          rows: 7,
          start_time: this.timeValue[0],
          end_time: this.timeValue[1]
        });
      }
      // 当车辆类型和搜索车牌号同时存在
      else if (this.value && this.state && !this.timeValue) {
        data = await this.API.car.carList({
          page: page,
          rows: 7,
          c_type: this.state,
          car_number: this.value
        });
      }
      // 当筛选时间和搜索车牌号同时存在
      else if (this.value && !this.state && this.timeValue) {
        data = await this.API.car.carList({
          page: page,
          rows: 7,
          car_number: this.value,
          start_time: this.timeValue[0],
          end_time: this.timeValue[1]
        });
      }
      // 当筛选时间和车辆类型同时存在
      else if (!this.value && this.state && this.timeValue) {
        data = await this.API.car.carList({
          page: page,
          rows: 7,
          c_type: this.state,
          start_time: this.timeValue[0],
          end_time: this.timeValue[1]
        });
      }
      // 当筛选时间、车辆类型和搜索车牌号同时存在
      else if (this.value && this.state && this.timeValue) {
        data = await this.API.car.carList({
          page: page,
          rows: 7,
          c_type: this.state,
          car_number: this.value,
          start_time: this.timeValue[0],
          end_time: this.timeValue[1]
        });
      } else {
        data = await this.API.car.carList({ page: page, rows: 7 });
      }
      // console.log(data);
      if (data.total == 0) {
        this.tableData = [];
        this.total = data.total;
      } else {
        this.tableData = data.rows;
        this.total = data.total;
      }
    },
    // 车辆类型选中
    getTypeData() {
      // console.log("车辆类型触发");
      this.getData(1);
      this.curPage = 1;
    },
    // 车牌号搜索
    getCarNum() {
      // console.log("车牌号搜索触发");
      this.getData(1);
      this.curPage = 1;
    },
    // 时间筛选车辆
    getStartTime() {
      // console.log("时间筛选触发");
      this.getData(1);
      this.curPage = 1;
    },

    // 新增车辆
    addCar() {
      this.addTitle = "新增车辆";
      this.dialogVisible = true;
      this.ruleForm = {
        name: "",
        carNum: "",
        carType: "VIP",
        phone: ""
      };
    },
    // 确定车牌号

    // 确定新增和修改车辆
    submitForm(formName) {
      this.$refs[formName].validate(async valid => {
        if (valid) {
          if (this.addTitle === "新增车辆") {
            let params = {
              car_number: this.ruleForm.carNum,
              c_type: this.ruleForm.carType,
              user_name: this.ruleForm.name,
              user_phone: this.ruleForm.phone
            };
            let data = await this.API.car.caradd(params);
            // console.log(data);
            if (data.code == 200) {
              let param = { car_type: this.ruleForm.carType };
              // console.log(param);
              let typedata = await this.API.car.ctypeinsert(param);
              // console.log(typedata);
              if ((typedata.code = 200)) {
                this.typeNum();
              }
              this.$message({
                showClose: true,
                message: data.message,
                type: "success"
              });
            } else {
              this.$message({
                showClose: true,
                message: data.message,
                type: "error"
              });
            }
            this.timeValue = [];
            this.value = "";
            this.state = "";
            this.curPage = 1;
            this.getData(1);
          } else if (this.addTitle === "修改车辆") {
            let params = {
              id: this.ruleForm.id,
              create_time: dayjs().format("YYYY-MM-DD HH:mm:ss"),
              car_number: this.ruleForm.carNum,
              c_type: this.ruleForm.carType,
              user_name: this.ruleForm.name,
              user_phone: this.ruleForm.phone
            };
            let data = await this.API.car.carupdate(params);
            // console.log(data);
            if (data.code == 200) {
              this.$message({
                showClose: true,
                message: data.message,
                type: "success"
              });
            } else {
              this.$message({
                showClose: true,
                message: data.message,
                type: "error"
              });
            }

            this.getData(this.curPage);
          }
        } else {
          this.$message({
            showClose: true,
            message: `${this.addTitle}失败`,
            type: "error"
          });
          return false;
        }
        this.dialogVisible = false;
      });
    },
    // 重置弹窗表单数据
    resetForm(formName) {
      console.log(formName);
      this.dialogVisible = false;
      this.$refs[formName].resetFields();
    },
    // 修改车辆
    amendCar(row) {
      this.addTitle = "修改车辆";
      this.dialogVisible = true;
      // console.log(row);
      this.ruleForm = {
        id: row.id,
        name: row.user_name,
        carNum: row.car_number,
        carType: row.c_type,
        phone: row.user_phone
      };
    },
    closeDialog(done) {
      this.resetForm("ruleForm");
      done();
    },

    cancel(formName) {
      this.dialogVisible = false;
      this.$refs[formName].resetFields();
    },

    // 导出表格
    async exportExcel(id) {
      let params;
      params = {
        car_number: this.value,
        c_type: this.state,
        start_time: this.timeValue[0],
        end_time: this.timeValue[1]
      };

      if (this.state && !this.value && !this.timeValue) {
        params = {
          c_type: this.state
        };
      }
      // 判断搜索车辆牌号
      else if (!this.state && this.value && !this.timeValue) {
        params = {
          car_number: this.value
        };
      }
      // 判断筛选时间
      else if (!this.state && !this.value && this.timeValue) {
        params = {
          start_time: this.timeValue[0],
          end_time: this.timeValue[1]
        };
      }
      // 当车辆类型和搜索车牌号同时存在
      else if (this.value && this.state && !this.timeValue) {
        params = {
          car_number: this.value,
          c_type: this.state
        };
      }
      // 当筛选时间和搜索车牌号同时存在
      else if (this.value && !this.state && this.timeValue) {
        params = {
          car_number: this.value,
          start_time: this.timeValue[0],
          end_time: this.timeValue[1]
        };
      }
      // 当筛选时间和车辆类型同时存在
      else if (!this.value && this.state && this.timeValue) {
        params = {
          c_type: this.state,
          start_time: this.timeValue[0],
          end_time: this.timeValue[1]
        };
      }
      // 当筛选时间、车辆类型和搜索车牌号同时存在
      else if (this.value && this.state && this.timeValue) {
        params = {
          car_number: this.value,
          c_type: this.state,
          start_time: this.timeValue[0],
          end_time: this.timeValue[1]
        };
      } else {
        params = {};
      }

      let data = await this.API.car.cartoExcel(params);
      // console.log(data);
      if (data.code == 200) {
        let url = data.downurl.slice(11);
        // console.log(url);
        window.open("https://chtech.ncjti.edu.cn/carstop/carMonitor" + url);
        this.$message({
          showClose: true,
          message: data.message,
          type: "success"
        });
      } else {
        this.$message({
          showClose: true,
          message: data.message,
          type: "error"
        });
      }
    },

    //删除按钮回调
    handleDelete(row) {
      // console.log(row);
      this.$confirm("此操作将永久删除该用户, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(async () => {
          if (this.tableData.length == 1) {
            this.curPage = this.curPage - 1;
          }
          let data = await this.API.car.cardel({ id: row.id });
          this.getData(this.curPage);
          if (data.code) {
            this.$message({
              showClose: true,
              type: "success",
              message: data.message
            });
          } else {
            this.$message({
              showClose: true,
              message: data.message,
              type: "error"
            });
          }
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除"
          });
        });
    },

    // 翻页逻辑回调
    handleCurrentChange(val) {
      this.getData(val);
      this.curPage = val;
    },

    // 多选框按钮操作
    handleSelectionChange(list) {
      // console.log(list);
    },

    // 表格样式设置
    rowbg(row) {
      if (row.rowIndex % 2 != 0) {
        return { background: "rgba(245, 248, 252, 1)", "border-radius": "5px" };
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.inform {
  display: flex;
  justify-content: center;
  align-items: center;
}
.inform /deep/ .el-card {
  height: 95%;
  width: 97.5%;
  // width: 1612px;
  box-shadow: 0px 0px 21px 0px rgba(60, 108, 254, 0.16) !important;
  border-radius: 8px;
  // margin: 0 auto;

  .el-card__header {
    border-bottom: none;
  }
  .clearfix {
    height: 66px;
    box-sizing: border-box;
    display: flex;
    margin: 0 36px;
    border-top: none;
    justify-content: space-between;
    align-items: center;
    .inform-title {
      // width: 96px;
      height: 36px;
      color: rgba(0, 0, 0, 1);
      font-size: 24px;
      font-weight: 600;
    }
    .inform-header {
      display: flex;
      margin-right: 29px;
      .el-button {
        margin-left: 9px;
        background-color: rgba(41, 109, 227, 1);
      }
    }
  }
  .scroll {
    width: 100%;
    height: 100%;
    .carNum {
      display: flex;
      margin: 0 36px;
      padding: 0px 0 10px 0;
      // border-bottom: 1px dashed rgba(217, 217, 217, 1);
      overflow-y: hidden;
      overflow-x: scroll;
      &::-webkit-scrollbar {
        width: 1px;
        height: 10px;
      }
      &::-webkit-scrollbar-thumb {
        border-radius: 10px;
        // box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
        background: rgba(0, 0, 0, 0.2);
      }
      &::-webkit-scrollbar-track {
        // box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
        border-radius: 0;
        background: rgba(60, 108, 254, 0.1);
      }
      .carType {
        flex-shrink: 0;
        width: 288px;
        height: 84px;
        background: #f4f6fa;
        border-radius: 10px;
        margin: 0 25px 15px 0;
        display: flex;
        align-items: center;
        justify-content: center;

        .type {
          height: 24px;
          border-right: 2px solid rgba(186, 186, 186, 1);
          padding: 0 22px 0 0;
          font-size: 18px;
          font-family: Microsoft YaHei-3970(82674968);
          font-weight: 400;
          color: #292b34;
        }
        .num {
          width: 60px;
          height: 29px;
          font-size: 34px;
          font-family: Microsoft YaHei-3970(82674968);
          font-weight: 600;
          color: #292b34;
          margin: 0 5px 0 29px;
          transform: translateY(-7px);
        }
      }
    }
  }

  .inform-body {
    margin: 0 36px;
    .order-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 30px 0 34px 0;
      font-size: 16px;
      font-weight: 400;
      color: #000;
      .el-button {
        background-color: rgba(41, 109, 227, 1);
        color: #fff;
        margin-left: 9px;
      }
      .paydate {
        margin: 0 51px 0 0;
        .el-date-editor {
          margin-left: 7px;
          width: 373px;
          .el-range__icon {
            display: block;
          }
        }
      }
      .state {
        margin-left: 51px;
        .el-input {
          width: 150px;
        }
      }
      .export {
        width: 94px;
        height: 42px;
        color: #fff;
        text-align: center;
        line-height: 42px;
        background: rgba(65, 106, 165, 1);
        cursor: pointer;
        border-radius: 5px;
      }
      .addblock {
        .addcar {
          background: rgba(43, 76, 254, 1);
          margin-right: 15px;
        }
        .el-dialog__wrapper {
          overflow: hidden;
          .el-dialog {
            width: 600px !important;
            height: 497px;
            background: #ffffff;
            box-shadow: 0px 0px 13px 0px rgba(0, 0, 0, 0.29);
            border-radius: 10px;
            margin-top: 230px !important;
            .el-dialog__header {
              height: 60px;
              padding: 0;
              border-top-left-radius: 10px;
              border-top-right-radius: 10px;
              border-bottom: 1px solid rgba(230, 230, 230, 1);
              background-color: rgba(230, 235, 254, 1);

              span {
                float: left;
                font-size: 20px;
                font-weight: 500;
                color: #000;
                line-height: 60px;
                margin-left: 30px;
              }

              .el-dialog__close {
                width: 35px;
                height: 35px;
                &::before {
                  font-size: 24px;
                  color: #000;
                }
              }
            }
            .el-dialog__body {
              padding: 0;
              .el-form {
                margin: 39px 0 0 81px;
                .el-form-item {
                  // 文字
                  .el-form-item__label {
                    height: 47px;
                    font-size: 18px;
                    line-height: 47px;
                    font-family: Microsoft YaHei-3970(82674968);
                    font-weight: 400;
                    color: #53575a;
                  }
                  // 输入框
                  .el-form-item__content {
                    .el-button--default {
                      background-color: #fff;
                      border: 1px solid rgba(43, 76, 254, 1);
                      color: rgba(43, 76, 254, 1);
                      margin: 15px 36px 0 34px;
                    }
                    .el-button--primary {
                      background-color: rgba(43, 76, 254, 1);
                    }
                    .el-input {
                      width: 222px;
                    }
                    .el-input__inner {
                      width: 222px;
                      height: 47px;
                      border-radius: 6px;
                    }
                  }
                }
              }
              .userinfo {
                font-size: 20px;
                font-weight: 500;
                color: rgba(0, 0, 0, 1);
                text-align: left;
                margin-top: 15px;
              }
              .info {
                display: flex;
                .user {
                  .name {
                    text-align: left;
                  }
                  .el-input {
                    width: 283px;
                    height: 38px;
                    opacity: 1;
                    margin-right: 81px;
                    .el-input__inner {
                      color: #000;
                    }
                  }
                }
              }
              .rate {
                font-size: 20px;
                font-weight: 500;
                color: rgba(0, 0, 0, 1);
                text-align: left;
                margin: 15px 0;
              }
              .water {
                text-align: left;
                font-size: 16px;
                font-weight: 400;
                color: rgba(0, 0, 0, 1);
              }
              .el-table {
                margin: 10px 0;
                tr {
                  height: 48px;
                }
                .el-table__body-wrapper {
                  overflow: visible;
                }
              }
            }
          }
        }
      }
    }
    .inform-table {
      .execlTable,
      .selectTable {
        display: none;
      }
      .el-table {
        font-weight: 400;
        font-size: 16px;
        color: rgba(0, 0, 0, 1);
        margin: 0 auto;

        .el-table__header-wrapper {
          border-radius: 5px;
          .el-checkbox.is-checked {
            .el-checkbox__inner {
              background-color: rgba(41, 109, 227, 1);
            }
          }

          .el-checkbox__input.is-checked,
          .el-checkbox__input.is-indeterminate {
            .el-checkbox__inner {
              background-color: rgba(41, 109, 227, 1);
            }
          }
        }
        .el-table__body-wrapper {
          max-height: 420px !important;
          .el-table__body {
            .el-table__row {
              .el-table_1_column_7 {
                .cell {
                  .operate {
                    .el-dialog {
                      width: 600px !important;
                      height: 497px;
                      background: #ffffff;
                      box-shadow: 0px 0px 13px 0px rgba(0, 0, 0, 0.29);
                      border-radius: 10px;
                      .el-dialog__header {
                        height: 60px;
                        padding: 0;
                        border-top-left-radius: 10px;
                        border-top-right-radius: 10px;
                        border-bottom: 1px solid rgba(230, 230, 230, 1);
                        background-color: rgba(230, 235, 254, 1);

                        span {
                          float: left;
                          font-size: 20px;
                          font-weight: 500;
                          color: #000;
                          line-height: 60px;
                          margin-left: 30px;
                        }

                        .el-dialog__close {
                          width: 35px;
                          height: 35px;
                          &::before {
                            font-size: 24px;
                            color: #000;
                          }
                        }
                      }
                      .el-dialog__body {
                        padding: 0;
                        .el-form {
                          margin: 39px 0 0 81px;
                          .el-form-item {
                            // 文字
                            .el-form-item__label {
                              height: 47px;
                              font-size: 18px;
                              line-height: 47px;
                              font-family: Microsoft YaHei-3970(82674968);
                              font-weight: 400;
                              color: #53575a;
                            }
                            // 输入框
                            .el-form-item__content {
                              .el-button--default {
                                background-color: #fff;
                                border: 1px solid rgba(43, 76, 254, 1);
                                color: rgba(43, 76, 254, 1);
                                margin: 15px 36px 0 34px;
                              }
                              .el-button--primary {
                                background-color: rgba(43, 76, 254, 1);
                              }
                              .el-input {
                                width: 222px;
                              }
                              .el-input__inner {
                                width: 222px;
                                height: 47px;
                                border-radius: 6px;
                              }
                            }
                          }
                        }
                        .userinfo {
                          font-size: 20px;
                          font-weight: 500;
                          color: rgba(0, 0, 0, 1);
                          text-align: left;
                          margin-top: 15px;
                        }
                        .info {
                          display: flex;
                          .user {
                            .name {
                              text-align: left;
                            }
                            .el-input {
                              width: 283px;
                              height: 38px;
                              opacity: 1;
                              margin-right: 81px;
                              .el-input__inner {
                                color: #000;
                              }
                            }
                          }
                        }
                        .rate {
                          font-size: 20px;
                          font-weight: 500;
                          color: rgba(0, 0, 0, 1);
                          text-align: left;
                          margin: 15px 0;
                        }
                        .water {
                          text-align: left;
                          font-size: 16px;
                          font-weight: 400;
                          color: rgba(0, 0, 0, 1);
                        }
                        .el-table {
                          margin: 10px 0;
                          tr {
                            height: 48px;
                          }
                          .el-table__body-wrapper {
                            overflow: visible;
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
        tr {
          height: 60px;
          td {
            .cell {
              .el-checkbox.is-checked {
                .el-checkbox__inner {
                  background-color: rgba(41, 109, 227, 1);
                }
              }
              .is-indeterminate {
                .el-checkbox__inner {
                  background-color: rgba(41, 109, 227, 1);
                }
              }
              .operate {
                display: inline-block;
                color: rgba(84, 136, 254, 1);
                cursor: pointer;
                font-size: 16px;
                font-weight: 400;
                width: 60px;
                height: 30px;
                line-height: 32px;
                border: 1px solid rgba(84, 136, 254, 1);
                border-radius: 15px;
              }
              .el-dialog__wrapper {
                overflow: hidden;
                .el-dialog {
                  width: 600px !important;
                  height: 497px;
                  background: #ffffff;
                  box-shadow: 0px 0px 13px 0px rgba(0, 0, 0, 0.29);
                  border-radius: 10px;
                  .el-dialog__header {
                    height: 83px;
                    border-bottom: 1px solid rgba(230, 230, 230, 1);

                    span {
                      float: left;
                      font-size: 20px;
                      font-weight: 500;
                      color: #000;
                    }

                    .el-dialog__close {
                      width: 35px;
                      height: 35px;
                      &::before {
                        font-size: 24px;
                        color: #000;
                      }
                    }
                  }
                  .el-dialog__body {
                    padding: 0 38px;
                    .userinfo {
                      font-size: 20px;
                      font-weight: 500;
                      color: rgba(0, 0, 0, 1);
                      text-align: left;
                      margin-top: 15px;
                    }
                    .info {
                      display: flex;
                      .user {
                        .name {
                          text-align: left;
                        }
                        .el-input {
                          width: 283px;
                          height: 38px;
                          opacity: 1;
                          margin-right: 81px;
                          .el-input__inner {
                            color: #000;
                          }
                        }
                      }
                    }
                    .rate {
                      font-size: 20px;
                      font-weight: 500;
                      color: rgba(0, 0, 0, 1);
                      text-align: left;
                      margin: 15px 0;
                    }
                    .water {
                      text-align: left;
                      font-size: 16px;
                      font-weight: 400;
                      color: rgba(0, 0, 0, 1);
                    }
                    .el-table {
                      margin: 10px 0;
                      tr {
                        height: 48px;
                      }
                      .el-table__body-wrapper {
                        overflow: visible;
                      }
                    }
                  }
                }
              }

              .el-dialog__title {
                color: rgba(41, 109, 227, 1);
                cursor: pointer;
                padding: 10px 18px 0 18px;
              }
            }
          }
          .el-checkbox__inner {
            width: 18px;
            height: 18px;
            &::after {
              transform: rotate(45deg) scaleY(1.5);
              top: 3px;
              left: 5px;
            }
          }
        }
        th {
          font-weight: 400;
        }
      }
    }
    .block {
      height: 36px;
      margin: 65px 0 0 0;
      float: right;
      .el-pagination {
        padding: 0;
        .el-pagination__total {
          font-size: 18px;
          line-height: 36px;
        }
        button {
          width: 36px;
          background: #fff;
          color: rgba(0, 0, 0, 1);
          height: 36px;
          font-size: 14px;
          border: 1px solid rgba(112, 112, 112, 1);
          border-radius: 8px;
        }
        ul {
          .active {
            background: #fff;
            color: rgba(0, 97, 255, 1);
            border: 1px solid rgba(0, 97, 255, 1);
            box-sizing: border-box;
          }
          .el-icon {
            border: none;
          }
          li {
            background: #fff;
            color: rgba(0, 0, 0, 1);
            width: 36px;
            height: 36px;
            font-size: 14px;
            border: 1px solid rgba(112, 112, 112, 1);
            border-radius: 8px;
            line-height: 36px;
            margin-left: 8px;
          }
        }

        .btn-next {
          margin-left: 8px;
        }
        .el-pagination__jump {
          color: rgba(0, 0, 0, 1);
          font-size: 16px;
          margin-left: 10px;
          font-weight: 400;
          height: 36px;
          .el-input {
            width: 65px;
            height: 36px;
            margin: 0 10px;
            input {
              width: 65px;
              height: 36px;
              border: 1px solid rgba(0, 0, 0, 1);
              border-radius: 8px;
            }
          }
        }
      }
    }
  }
}
.box-card {
  /deep/ .el-card__header {
    padding: 0;
  }
  /deep/ .el-card__body {
    padding: 0;
  }
}
</style>
<style lang="scss">
.el-message-box__wrapper {
  .el-button--primary {
    background-color: #296de3;
  }
}
</style>
