<template>
  <div class="index1">
    <div class="operation">
      <span @click="curState = 2">修改</span>
      <span v-if="curClass.type === strategyInfo.sttype" @click="Reset"
        >重置</span
      >
      <span @click="getstPad_list">引用</span>
    </div>
    <div class="strategy_list">
      <div class="strategy_title">
        <div>
          <span
            style="font-size: 26px"
            class="ivu-icon iconfont icon-shijian"
          ></span
          >时间限制策略
        </div>
        <div>
          <Checkbox
            v-if="curState === 2"
            v-model="strategyInfo.hastime"
            @on-change="HandleIsShowChange(strategyInfo.hastime, 1)"
            >启用</Checkbox
          >
        </div>
      </div>
      <div style="margin-bottom: 10px" v-if="strategyInfo.hastime">
        <TimeStrategy
          v-if="curState === 2"
          :times="strategyInfo.padTimes"
          @timesChange="timesChange"
        ></TimeStrategy>
        <div class="showtime" v-if="curState === 1">
          <div style="line-height: 30px; font-size: 16px; margin-bottom: 10px">
            设备生效时间
          </div>
          <div class="week">
            <div class="day" v-for="item in weeks" :key="item.id">
              <div class="day_title">{{ item.title }}</div>
              <div class="day_content">
                <div
                  class="time"
                  v-for="(sitem, index) in getDay(item.id)"
                  :key="index"
                >
                  {{ getTime(sitem.starttime) }}-{{ getTime(sitem.stoptime) }}
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="nodata" v-else>未设置时间限制策略</div>
    </div>
    <div class="strategy_list">
      <div class="strategy_title">
        <div>
          <span class="ivu-icon iconfont icon-yingyongcelve"></span>应用策略
        </div>
        <div>
          <Checkbox
            v-if="curState === 2"
            v-model="strategyInfo.hasapp"
            @on-change="HandleIsShowChange(strategyInfo.hastime, 2)"
            >启用</Checkbox
          >
        </div>
      </div>
      <div class="strategy_content" v-if="strategyInfo.hasapp">
        <div class="strategy_top">
          <span>授权应用</span>
        </div>
        <div
          class="strategy_bottom"
          style="min-height: 160px"
          v-if="padApps.length > 0"
        >
          <div class="app_list" v-for="item in padApps" :key="item.appid">
            <img :src="$api.baseImageUrl + item.appIcon" />
            <div>{{ item.appName }}</div>
            <Checkbox
              class="checked"
              :disabled="curState === 1"
              v-model="item.checked"
            ></Checkbox>
          </div>
        </div>
      </div>
      <div class="nodata" v-else>未设置应用策略</div>
    </div>
    <div class="strategy_list">
      <div class="strategy_title">
        <div><span class="ivu-icon iconfont icon-shezhi"></span>设备策略</div>
        <div>
          <Checkbox
            v-if="curState === 2"
            v-model="strategyInfo.hasdevice"
            @on-change="HandleIsShowChange(strategyInfo.hastime, 3)"
            >启用</Checkbox
          >
        </div>
      </div>
      <div class="strategy_content" v-if="strategyInfo.hasdevice">
        <div class="strategy_top">
          <span>设备功能管理</span>
        </div>
        <div class="strategy_bottom" style="min-height: 160px">
          <div
            class="device_list"
            v-for="item in padDevices"
            :key="item.pdorder"
          >
            <div class="icon">
              <span :class="[item.icon]"></span>
            </div>
            <div class="title">{{ item.pdtype }}</div>
            <i-switch
              size="large"
              v-model="item.enabled"
              :disabled="curState === 1"
              :true-value="1"
              :false-value="2"
            >
              <span slot="open">开启</span>
              <span slot="close">关闭</span>
            </i-switch>
          </div>
        </div>
      </div>
      <div class="nodata" v-else>未设置设备策略</div>
    </div>
    <div class="strategy_list">
      <div class="strategy_title">
        <div>
          <span
            style="font-size: 18px"
            class="ivu-icon iconfont icon-wifi"
          ></span
          >Wifi白名单策略
        </div>
        <div>
          <Checkbox
            v-if="curState === 2"
            v-model="strategyInfo.haswifi"
            @on-change="HandleIsShowChange(strategyInfo.hastime, 4)"
            >启用</Checkbox
          >
        </div>
      </div>
      <div class="strategy_content" v-if="strategyInfo.haswifi">
        <div class="strategy_top">
          <span>SSID</span>
          <span v-if="curState === 2">
            <Input
              v-model.trim="ssidName"
              placeholder="请输入SSID"
              style="width: 260px; margin: 0 10px"
            />
            <Button type="primary" class="primary_btn" @click="AddWifi()"
              >添加</Button
            >
          </span>
        </div>
        <div class="strategy_bottom" style="min-height: 76px">
          <div
            class="padWifis"
            v-for="(item, index) in strategyInfo.padWifis"
            :key="index"
          >
            <div class="title">{{ item }}</div>
            <img
              v-if="curState === 2"
              @click="delWifi(item)"
              class="del"
              src="../../../assets/img/guanbi_red.png"
            />
          </div>
        </div>
      </div>
      <div class="nodata" v-else>未设置Wifi白名单</div>
    </div>
    <div class="strategy_list" style="padding-bottom: 16px">
      <div class="strategy_title">
        <div>
          <span class="ivu-icon iconfont icon-weiguiguanli"></span>违规处理
        </div>
        <div>
          <Checkbox
            v-if="curState === 2"
            v-model="strategyInfo.hasviolate"
            @on-change="HandleIsShowChange(strategyInfo.hastime, 5)"
            >启用</Checkbox
          >
        </div>
      </div>
      <Table
        v-if="strategyInfo.hasviolate"
        class="table"
        :columns="columns"
        :data="padViolates"
      >
        <template slot-scope="{ row }" slot="violationEvents">
          <Checkbox
            :disabled="curState === 1"
            class="checked"
            @on-change="headleStrategy(row, 'checked')"
            v-model="row.checked"
          ></Checkbox>
          <span style="display: inline-block; width: 120px; text-align: left">{{
            row.title
          }}</span>
        </template>
        <template slot-scope="{ row }" slot="noticed">
          <Checkbox
            :disabled="curState === 1"
            class="checked"
            v-model="row.noticed"
            @on-change="headleStrategy(row, 'noticed')"
            >通知管理员</Checkbox
          >
        </template>
        <template slot-scope="{ row }" slot="violationHandling">
          <RadioGroup
            v-model="row.handleMethod"
            @on-change="headleStrategy(row, 'handleMethod')"
          >
            <Radio
              style="margin-right: 20px"
              :disabled="curState === 1"
              label="锁定"
            ></Radio>
            <Radio :disabled="curState === 1" label="恢复出厂设置"></Radio>
          </RadioGroup>
        </template>
      </Table>
      <div class="nodata" v-if="!strategyInfo.hasviolate">未设置违规处理</div>
      <div
        class="footer"
        style="text-align: center; margin-top: 20px"
        v-if="curState === 2"
      >
        <Button
          type="primary"
          style="margin-right: 20px"
          class="primary_btn"
          @click="curState = 1"
          >取消</Button
        >
        <Button type="primary" class="primary_btn" @click="save()">保存</Button>
      </div>
    </div>
    <!-- 引用 -->
    <Modal
      class="modal1"
      :mask-closable="false"
      v-model="stPadInfo.show"
      title="引用"
    >
      <Table v-if="stPadInfo.show" :columns="columns1" :data="stPadInfo.list">
        <template slot-scope="{ row }" slot="active">
          <Radio @on-change="stPadChange(row)" v-model="row.checked"></Radio>
        </template>
      </Table>

      <div slot="footer" style="text-align: right">
        <Button @click="stPadInfo.show = false">关闭</Button>
        <Button type="primary" class="primary_btn" @click="saveStPadInfo()"
          >保存</Button
        >
      </div>
    </Modal>
    <Spin fix v-if="showLoading" style="background-color: transparent">
      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
      <div>加载中</div>
    </Spin>
  </div>
</template>

<script>
import {
  stPad_add,
  stPad_delete,
  stPad_add_quote,
  stPad_detail_obj,
  stPad_edit,
  stPad_list
} from "@/api/stPad";
import { app_list_sel } from "@/api/appgroup";
import TimeStrategy from "@/components/TimeStrategy/TimeStrategy";
import { padDevices, padViolates } from "@/utils";
export default {
  components: {
    TimeStrategy
  },
  props: ["curClass"],
  data() {
    return {
      showLoading: false,
      stPadInfo: {
        show: false,
        stPad: {},
        list: []
      },
      curState: 1, //1查看/2编辑
      strategyInfo: {
        sttype: null,
        padid: null,
        rversion: null,
        hastime: false, // 是否开启时间策略：0否 1是
        padTimes: [], // 平板策略时间
        hasapp: false, //是否开启应用策略：0否 1是
        padApps: [], //appid集合
        hasdevice: false, //是否开启设备策略：0否 1是
        padDevices: [], //授权应用
        haswifi: false, //是否开启wifi白名单策略：0否 1是
        padWifis: [], //wifi白名单
        hasviolate: false, //是否开启违规通知：0否 1是
        padViolates: [] //设备违规
      },
      padApps: [],
      padDevices,
      padViolates,
      columns: [
        {
          title: "违规事件",
          slot: "violationEvents",
          align: "center"
        },
        {
          title: "是否通知",
          slot: "noticed",
          align: "center"
        },
        {
          title: "违规处理",
          slot: "violationHandling",
          align: "center"
        }
      ],
      columns1: [
        {
          title: "操作",
          slot: "active",
          align: "center",
          width: 120
        },
        {
          title: "策略名称",
          key: "name",
          align: "center"
        },
        {
          title: "更新时间",
          key: "updatetime",
          align: "center"
        }
      ],
      weeks: [
        {
          title: "星期日",
          id: 7
        },
        {
          title: "星期一",
          id: 1
        },
        {
          title: "星期二",
          id: 2
        },
        {
          title: "星期三",
          id: 3
        },
        {
          title: "星期四",
          id: 4
        },
        {
          title: "星期五",
          id: 5
        },
        {
          title: "星期六",
          id: 6
        }
      ],
      ssidName: ""
    };
  },
  watch: {
    curClass: {
      handler() {
        this.init();
      },
      deep: true
    }
  },
  computed: {
    powerParams() {
      return this.$store.getters.powerParams;
    }
  },
  created() {
    this.curState = 1; //初始化查看状态
    this.init();
  },
  methods: {
    headleStrategy(row, key) {
      this.padViolates.forEach((item) => {
        if (item.violateType === row.violateType) {
          item[key] = row[key];
        }
      });
    },
    HandleIsShowChange(show, type) {
      if (!show) {
        if (type === 1) {
          this.strategyInfo.padTimes = []; // 平板策略时间
        } else if (type === 2) {
          this.padApps.forEach((item) => {
            item.checked = false;
          });
        } else if (type === 3) {
          this.padDevices.forEach((item) => {
            item.enabled = item.pdorder === 1 ? 1 : item.pdorder === 2 ? 1 : 2;
          });
        } else if (type === 4) {
          this.strategyInfo.padWifis = []; //wifi白名单
        } else if (type === 5) {
          this.padViolates.forEach((item) => {
            item.checked = false;
            item.noticed = false;
            item.handleMethod = "";
          });
        }
      }
    },
    stPadChange(row) {
      //切换选择
      this.stPadInfo.list.forEach((item) => {
        item.checked = item.padid === row.padid ? true : false;
      });
    },
    saveStPadInfo() {
      //保存引用策略
      let obj = this.stPadInfo.list.filter((v) => v.checked)[0] || null;
      if (!obj) {
        this.$Message.error("请选择引用策略!");
        return;
      }
      this.showLoading = true;
      stPad_add_quote({
        sttype: this.curClass.type,
        objectid: this.curClass.id,
        padid: obj.padid
      }).then((res) => {
        this.showLoading = false;
        if (res.code === 0) {
          if (document.querySelector(".user_list")) {
            document.querySelector(".user_list").scrollTop = 0;
          }
          //数据回显
          this.strategyInfo = res.obj;
          this.strategyInfo.hastime = this.strategyInfo.hastime ? true : false;
          this.strategyInfo.hasapp = this.strategyInfo.hasapp ? true : false;
          this.strategyInfo.hasdevice = this.strategyInfo.hasdevice
            ? true
            : false;
          this.strategyInfo.haswifi = this.strategyInfo.haswifi ? true : false;
          this.strategyInfo.hasviolate = this.strategyInfo.hasviolate
            ? true
            : false;
          if (this.strategyInfo.hasapp) {
            //回显应用策略
            this.padApps.forEach((item) => {
              let ishas = this.strategyInfo.padApps.some((v) => {
                return v === item.appid;
              });
              item.checked = ishas ? true : false;
            });
          }
          if (this.strategyInfo.hasdevice) {
            //回显设备策略
            this.padDevices.forEach((item) => {
              let obj = this.strategyInfo.padDevices.filter((v) => {
                return v.pdtype === item.pdtype;
              })[0] || { enabled: 2 };
              item.enabled = obj.enabled;
            });
          }
          if (this.strategyInfo.hasviolate) {
            //回显违规处理
            this.padViolates.forEach((item) => {
              let arr = this.strategyInfo.padViolates.filter((v) => {
                return v.violateType === item.violateType;
              });
              item.checked = arr.length > 0 ? true : false;
              item.noticed = arr.length > 0 && arr[0].noticed ? true : false;
              item.handleMethod = arr.length > 0 ? arr[0].handleMethod : "";
            });
          }
          //刷新左侧树
          this.$emit("refresh");
          this.curState = 2; //编辑状态
          this.stPadInfo.show = false;
        } else {
          this.$Message.error(res.msg);
        }
      });
    },
    getstPad_list() {
      this.showLoading = true;
      stPad_list({
        schoolid: this.curClass.schoolid
      }).then((res) => {
        this.showLoading = false;
        if (res.code === 0) {
          this.stPadInfo = {
            show: true,
            list: res.obj.data.map((v) => {
              v.checked = false;
              return v;
            }),
            stPad: {}
          };
        } else {
          this.$Message.error(res.msg);
        }
      });
      this.showLoading = false;
    },
    Reset() {
      //重置
      this.$Modal.confirm({
        title: "提示",
        content:
          "<div>确定要重置策略吗？</div><div style='color: #B50000;font-size: 12px'>注：重置后，所有应用都可以在任意时间内进行使用</div>",
        onOk: () => {
          this.showLoading = true;
          stPad_delete({
            padid: this.strategyInfo.padid,
            rversion: this.strategyInfo.rversion
          }).then((res) => {
            this.showLoading = false;
            if (res.code === 0) {
              //刷新左侧树
              this.$emit("refresh");
              this.detail();
            } else {
              this.$Message.error(res.msg);
            }
          });
        },
        onCancel: () => {}
      });
    },
    getTime(time) {
      return time;
    },
    getDay(id) {
      //获取当天时间
      let arr = this.strategyInfo.padTimes.filter((v) => v.week === id);
      return arr;
    },
    timesChange(times) {
      this.strategyInfo.padTimes = times;
    },
    save() {
      if (
        !this.strategyInfo.hastime &&
        !this.strategyInfo.hasapp &&
        !this.strategyInfo.hasdevice &&
        !this.strategyInfo.haswifi &&
        !this.strategyInfo.hasviolate
      ) {
        this.$Message.error("请选择策略!");
        return;
      }
      let padDevices = [],
        padViolates = [],
        padApps = [];
      //获取授权应用
      for (let item of this.padApps) {
        if (item.checked) {
          padApps.push(item.appid);
        }
      }
      //获取设备
      for (let item of this.padDevices) {
        padDevices.push({
          pdtype: item.pdtype,
          pdorder: item.pdorder,
          enabled: item.enabled
        });
      }

      //获取违规处理
      for (let item of this.padViolates) {
        if (item.checked) {
          padViolates.push({
            violateType: item.violateType,
            handleMethod: item.handleMethod || "",
            noticed: item.noticed ? 1 : 0
          });
        }
      }
      if (this.strategyInfo.hastime) {
        if (this.strategyInfo.padTimes.length === 0) {
          this.$Message.error("请选择时间限制!");
          return;
        }
      }
      if (this.strategyInfo.hasapp) {
        if (padApps.length === 0) {
          this.$Message.error("请选择授权应用!");
          return;
        }
      }
      if (this.strategyInfo.hasdevice) {
        if (padDevices.length === 0) {
          this.$Message.error("请选择设备!");
          return;
        }
      }
      if (this.strategyInfo.haswifi) {
        if (this.strategyInfo.padWifis.length === 0) {
          this.$Message.error("请输入SSID!");
          return;
        }
      }
      if (this.strategyInfo.hasviolate) {
        if (padViolates.length === 0) {
          this.$Message.error("请选择违规事件!");
          return;
        }
        //违规处理选项
        for (let item of padViolates) {
          if (!item.handleMethod) {
            this.$Message.error("请选择违规处理!");
            return;
          }
        }
      }
      let form = {
        sttype: this.curClass.type, //1学校策略 2班级策略 3个人策略
        objectid: this.curClass.id,
        hastime: this.strategyInfo.hastime ? 1 : 0,
        hasapp: this.strategyInfo.hasapp ? 1 : 0,
        hasdevice: this.strategyInfo.hasdevice ? 1 : 0,
        haswifi: this.strategyInfo.haswifi ? 1 : 0,
        hasviolate: this.strategyInfo.hasviolate ? 1 : 0,
        padTimes: this.strategyInfo.hastime ? this.strategyInfo.padTimes : [],
        padDevices: this.strategyInfo.hasdevice ? padDevices : [],
        padViolates: this.strategyInfo.hasviolate ? padViolates : [],
        padWifis: this.strategyInfo.haswifi ? this.strategyInfo.padWifis : [],
        padApps: this.strategyInfo.hasapp ? padApps : []
      };
      //true是自身的策略即编辑
      let hasSave =
        this.curClass.type === this.strategyInfo.sttype ? true : false;
      if (hasSave) {
        //编辑
        form.padid = this.strategyInfo.padid;
        form.rversion = this.strategyInfo.rversion;
      }
      let api = hasSave ? stPad_edit : stPad_add;
      api(form).then((res) => {
        if (res.code === 0) {
          this.$Message.success(res.msg);
          //刷新左侧树
          this.$emit("refresh");
          this.detail();
        } else {
          this.$Message.error(res.msg);
        }
      });
    },
    delWifi(val) {
      //删除wifi白名单
      this.strategyInfo.padWifis = this.strategyInfo.padWifis.filter(
        (v) => v != val
      );
    },
    AddWifi() {
      //添加wifi白名单
      if (!this.ssidName) {
        return;
      }
      this.strategyInfo.padWifis.push(this.ssidName);
      this.strategyInfo.padWifis = Array.from(
        new Set(this.strategyInfo.padWifis)
      );
      this.ssidName = "";
    },
    async detail() {
      this.showLoading = true;
      //获取学校/班级策略详情
      let res = await stPad_detail_obj({
        rtype: this.powerParams.rtype,
        objectid: this.curClass.id,
        sttype: this.curClass.type
      });
      this.showLoading = false;
      if (res.code === 0) {
        if (document.querySelector(".user_list")) {
          document.querySelector(".user_list").scrollTop = 0;
        }
        if (res.obj) {
          //数据回显
          this.strategyInfo = res.obj;
          this.strategyInfo.hastime = this.strategyInfo.hastime ? true : false;
          this.strategyInfo.hasapp = this.strategyInfo.hasapp ? true : false;
          this.strategyInfo.hasdevice = this.strategyInfo.hasdevice
            ? true
            : false;
          this.strategyInfo.haswifi = this.strategyInfo.haswifi ? true : false;
          this.strategyInfo.hasviolate = this.strategyInfo.hasviolate
            ? true
            : false;
          if (this.strategyInfo.hasapp) {
            //回显应用策略
            this.padApps.forEach((item) => {
              let ishas = this.strategyInfo.padApps.some((v) => {
                return v.appid === item.appid;
              });
              item.checked = ishas ? true : false;
            });
          }
          if (this.strategyInfo.hasdevice) {
            //回显设备策略
            this.padDevices.forEach((item) => {
              let obj = this.strategyInfo.padDevices.filter((v) => {
                return v.pdtype === item.pdtype;
              })[0] || { enabled: 2 };
              item.enabled = obj.enabled;
            });
          }
          if (this.strategyInfo.hasviolate) {
            //回显违规处理
            this.padViolates.forEach((item) => {
              let arr = this.strategyInfo.padViolates.filter((v) => {
                return v.violateType === item.violateType;
              });
              item.checked = arr.length > 0 ? true : false;
              item.noticed = arr.length > 0 && arr[0].noticed ? true : false;
              item.handleMethod = arr.length > 0 ? arr[0].handleMethod : "";
            });
          }
          this.strategyInfo.padWifis = res.obj.padWifis || [];
          this.strategyInfo.padTimes = res.obj.padTimes || [];
        } else {
          this.strategyInfo.hastime = false;
          this.strategyInfo.hasapp = false;
          this.strategyInfo.hasdevice = false;
          this.strategyInfo.haswifi = false;
          this.strategyInfo.hasviolate = false;
        }
        this.curState = 1; //查看状态
      } else {
        this.$Message.error(res.msg);
      }
    },
    async init() {
      //数据初始化
      this.strategyInfo.padTimes = []; // 平板策略时间
      this.strategyInfo.padApps = []; //appid集合
      this.strategyInfo.padDevices = []; //授权应用
      this.strategyInfo.padWifis = []; //wifi白名单
      this.strategyInfo.padViolates = []; //设备违规
      this.padDevices.forEach((item) => {
        item.enabled = item.pdorder === 1 ? 1 : item.pdorder === 2 ? 1 : 2;
      });
      this.padViolates.forEach((item) => {
        item.checked = false;
        item.noticed = false;
        item.handleMethod = "";
      });
      //获取应用列表
      this.showLoading = true;
      let res1 = await app_list_sel({
        rtype: this.powerParams.rtype,
        objectid: this.powerParams.objectid
      });
      this.showLoading = false;
      if (res1.code === 0) {
        this.padApps = res1.obj.map((v) => {
          v.checked = false;
          return v;
        });
      } else {
        this.$Message.error(res1.msg);
      }
      await this.detail();
    }
  }
};
</script>

<style lang="less" scoped>
.index1 {
  height: calc(100% - 40px);
  position: relative;
  .operation {
    position: absolute;
    right: 0;
    top: -30px;
    span {
      color: #7c8db5;
      margin-left: 20px;
      &:hover {
        color: #339dff;
        cursor: pointer;
      }
    }
  }
  .strategy_list {
    font-family: "SourceHanSansCN";
    .strategy_title {
      height: 40px;
      font-size: 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      div:first-of-type {
        font-weight: bold;
        span {
          font-size: 22px;
          color: #339dff;
          margin-right: 4px;
        }
      }
      div:last-of-type {
      }
    }
    .strategy_content {
      border-radius: 6px 6px 0 0;
      border: 1px solid #ced9f2;
      .strategy_top {
        display: flex;
        height: 46px;
        align-items: center;
        background: #edf3ff;
        padding-left: 20px;
        border-bottom: 1px solid #ced9f2;
        span {
          font-size: 16px;
          color: #253a70;
          font-weight: 400;
          font-family: "SourceHanSansCN";
        }
      }
      .strategy_bottom {
        display: flex;
        flex-wrap: wrap;
        padding: 20px;
        .app_list {
          margin: 0 16px 16px 0;
          width: 100px;
          height: 110px;
          border-radius: 10px;
          border: 1px solid #798cb51a;
          background: #ffffff;
          text-align: center;
          position: relative;
          img {
            margin: 16px 0;
            width: 40px;
            height: 40px;
            object-fit: cover;
          }
          .checked {
            position: absolute;
            right: 2px;
            top: 8px;
            /deep/ .ivu-checkbox-inner {
              border-radius: 50%;
            }
          }
          &:hover {
            cursor: pointer;
            box-shadow: 10px 10px 20px 0 #339dff26;
          }
        }
        .device_list {
          display: flex;
          height: 80px;
          align-items: center;
          margin-right: 40px;
          .icon {
            width: 56px;
            height: 56px;
            border-radius: 6px;
            border: 1px solid #e5e5e5;
            display: flex;
            align-items: center;
            justify-content: center;
            span {
              font-size: 28px;
              color: #339dff;
            }
          }
          .title {
            width: 92px;
            margin: 0 10px;
          }
        }
        .padWifis {
          border-radius: 5px;
          border: 1px solid #339dff;
          background: #eaf5ff;
          padding: 4px 20px 4px 16px;
          height: 26px;
          margin: 0 20px 10px 0;
          position: relative;
          img {
            width: 16px;
            height: 16px;
            object-fit: cover;
            position: absolute;
            right: -4px;
            top: -8px;
            cursor: pointer;
          }
        }
      }
    }
    .nodata {
      color: #798cb5;
      font-size: 16px;
      line-height: 40px;
      padding-left: 20px;
    }
  }
}
.showtime {
  .week {
    display: flex;
    width: 100%;
    .day {
      width: 14.2%;
      border: 1px solid #ced9f2;
      border-right: none;
      &:last-of-type {
        border-right: 1px solid #ced9f2;
      }
      .day_title {
        width: 100%;
        height: 40px;
        line-height: 40px;
        background: #edf3ff;
        border-bottom: 1px solid #ced9f2;
        text-align: center;
      }
      .day_content {
        min-height: 50px;
        padding: 10px;
        .time {
          height: 30px;
          line-height: 30px;
          border-radius: 6px;
          background: #dbeeff;
          text-align: center;
          color: #339dff;
          font-size: 14px;
          font-weight: 500;
          margin-top: 10px;
          font-family: "SourceHanSansCN";
        }
      }
    }
  }
}
.table {
}
.modal1 {
}
</style>
