<template>
  <div class="content-box">
    <div class="left">
      <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
      <span class="cameratxt">门锁管理</span>
    </div>
    <div>
      <div class="middle">
        <div class="filter">
          <div class="condition">
            <el-input
              :clearable="true"
              @clear="searchBtn"
              v-model="searchInput.keyWord"
              class="w-50 m-2"
              placeholder="请输入关键字查询"
              style="width: 230px"
            />
            <el-button
              style="margin-left: 20px"
              color="rgba(41, 109, 227, 1)"
              type="primary"
              class="search"
              @click="searchBtn"
              ><el-icon>
                <Search />
              </el-icon>
              <span>查询</span></el-button
            >
          </div>
        </div>
        <div class="changeItems">
          <div
            class="changeItem"
            :class="changeIndex == 1 ? 'changeItem_active' : ''"
            @click="changeItem(1)"
          >
            全部
          </div>
          <div
            class="changeItem"
            :class="changeIndex == 2 ? 'changeItem_active' : ''"
            @click="changeItem(2)"
          >
            大床房
          </div>
          <div
            class="changeItem"
            :class="changeIndex == 3 ? 'changeItem_active' : ''"
            @click="changeItem(3)"
          >
            小床房
          </div>
          <div
            class="changeItem"
            :class="changeIndex == 4 ? 'changeItem_active' : ''"
            @click="changeItem(4)"
          >
            单间
          </div>
        </div>
        <div class="changeItems">
          <el-button
            color="rgba(41, 109, 227, 1)"
            type="primary"
            class="search"
            @click="searchBtn"
          >
            重置管理员密码</el-button
          >
          <el-button
            color="rgba(41, 109, 227, 1)"
            type="primary"
            class="search"
            @click="addTemporaryCard"
          >
            添加总卡</el-button
          >
          <el-button
            color="rgba(41, 109, 227, 1)"
            type="primary"
            class="search"
            @click="searchBtn"
          >
            批量下发开门密码</el-button
          >
          <el-button
            color="rgba(41, 109, 227, 1)"
            type="primary"
            class="search"
            @click="searchBtn"
          >
            批量导入</el-button
          >
        </div>
      </div>
      <div class="footer" v-loading="loading">
        <div class="floor" v-for="item in roomList.list">
          <div class="title">
            <span class="t1">{{ item.title }}</span
            ><span class="t2">{{ item.roomlength }}</span>
          </div>
          <div class="roomList">
            <div class="room" v-for="i in item.children">
              <el-popover
                popper-class="roominfoPopper"
                placement="bottom-start"
                :width="460"
                trigger="click"
                effect="light"
                :visible="i.visible"
              >
                <template #reference>
                  <div @click="itemClick(i)">
                    <div class="roomNum">{{ i.roomNum }}</div>
                    <div class="rLock">房间锁</div>
                    <div class="wifi">
                      <img src="@/assets/icons/wifiOpen.png" alt="" />
                      <img src="@/assets/icons/wifiClose.png" alt="" />
                      {{ i.wifiMAC }}
                    </div>
                  </div>
                </template>
                <div class="roomInfo">
                  <div class="title">{{ item.title }} (房间锁)</div>
                  <div class="content">
                    <div class="lefts">
                      <div>
                        <span>设备型号</span>
                        <span>{{ i.shebei }}</span>
                      </div>
                      <div>
                        <span>网络类型</span>
                        <span>{{ i.wangluo }}</span>
                      </div>
                      <div>
                        <span>WIFI MAC</span>
                        <span>{{ i.wifiMAC }}</span>
                      </div>
                      <div>
                        <span>蓝牙MAC</span>
                        <span>{{ i.lanyaMAC }}</span>
                      </div>
                      <div>
                        <span>绑定时间</span>
                        <span>{{ i.time }}</span>
                      </div>
                      <div>
                        <span>电量</span>
                        <span>{{ i.dianliang }}</span>
                      </div>
                      <div>
                        <span>网络状态</span>
                        <span>{{ i.statu }}</span>
                      </div>
                      <div>
                        <span>设备状态</span>
                        <span>{{ i.shebeiStatu }}</span>
                      </div>
                      <div>
                        <span>上一次开锁</span>
                        <span>{{ i.lastLock }}</span>
                      </div>
                    </div>
                    <div class="rigths">
                      <div @click="forbiddenClick">
                        <img src="@/assets/icons/forbidden.png" alt="" />
                        <span>禁用门锁</span>
                      </div>
                      <div @click="keyClick">
                        <img src="@/assets/icons/key.png" alt="" />
                        <span>钥匙管理</span>
                      </div>
                      <div @click="newsClick">
                        <img src="@/assets/icons/news.png" alt="" />
                        <span>消息列表</span>
                      </div>
                      <div @click="unlockingClick">
                        <img src="@/assets/icons/unlocking.png" alt="" />
                        <span>远程开锁</span>
                      </div>
                      <div @click="resetPassClick">
                        <img src="@/assets/icons/resetPass.png" alt="" />
                        <span>重置管理员密码</span>
                      </div>
                      <div @click="deblockingClick">
                        <img
                          class="deblocking"
                          src="@/assets/icons/deblocking.png"
                          alt=""
                        />
                        <span>解绑设备</span>
                      </div>
                    </div>
                  </div>
                </div>
              </el-popover>
            </div>
          </div>
        </div>
      </div>
      <!-- 消息列表 -->
      <el-dialog
        class="newsDialog"
        v-model="newsVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="消息列表"
        align-center
        width="800"
        :before-close="cancelNews"
      >
        <div class="middle">
          <div class="changeItems">
            <div
              class="changeNews"
              :class="newsIndex == 1 ? 'changeNews_active' : ''"
              @click="changeNews(1)"
            >
              开锁记录
            </div>
            <div
              class="changeNews"
              :class="newsIndex == 2 ? 'changeNews_active' : ''"
              @click="changeNews(2)"
            >
              操作记录
            </div>
          </div>
        </div>
        <div v-if="newsIndex == 1">
          <div class="footers" v-loading="loading">
            <el-table
              :row-class-name="tableRowClassName2"
              :data="roomList.list"
              @selection-change="handleSelectionChange"
              style="width: 100%; height: 550px"
              :header-cell-style="{
                background: 'rgba(240, 243, 247, 1)',
                height: '50px',
                border: 0,
              }"
            >
              <el-table-column align="center" prop="houseName" label="姓名">
              </el-table-column>
              <el-table-column align="center" prop="setDate" label="角色" />
              <el-table-column align="center" prop="price" label="解锁类型" />
              <el-table-column
                align="center"
                prop="operationName"
                label="钥匙类型"
              />
              <el-table-column
                align="center"
                prop="operationTime"
                label="消息时间"
              >
              </el-table-column>
            </el-table>
          </div>
          <div class="pageSize">
            <span></span>
            <el-pagination
              background
              :current-page="newsPage"
              :page-size="newsSize"
              layout="total, prev, pager, next, jumper, slot"
              :total="newsTotal"
              @update:current-page="newsHandleCurrentChange"
            />
          </div>
        </div>
        <div v-if="newsIndex == 2">
          <div class="footers" v-loading="loading">
            <el-table
              :row-class-name="tableRowClassName2"
              :data="roomList.list"
              @selection-change="handleSelectionChange"
              style="width: 100%; height: 550px"
              :header-cell-style="{
                background: 'rgba(240, 243, 247, 1)',
                height: '50px',
                border: 0,
              }"
            >
              <el-table-column align="center" prop="houseName" label="操作编号">
              </el-table-column>
              <el-table-column align="center" prop="setDate" label="类型" />
              <el-table-column align="center" prop="price" label="操作人" />
              <el-table-column
                align="center"
                prop="operationName"
                label="操作时间"
              />
              <el-table-column
                align="center"
                prop="operationTime"
                label="操作内容"
              >
              </el-table-column>
            </el-table>
          </div>
          <div class="pageSize">
            <span></span>
            <el-pagination
              background
              :current-page="newsPage"
              :page-size="newsSize"
              layout="total, prev, pager, next, jumper, slot"
              :total="newsTotal"
              @update:current-page="newsHandleCurrentChange"
            />
          </div>
        </div>
      </el-dialog>

      <!-- 远程开锁 -->
      <el-dialog
        class="unlockingDialog"
        v-model="unlockingVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="远程开锁"
        align-center
        width="400"
        :before-close="cancelUnlocking"
      >
        <div class="middle">
          <div class="content">确定远程开锁吗？</div>
          <div class="options">
            <el-button
              color="rgba(41, 109, 227, 1)"
              class="queding"
              type="primary"
              @click="submitAdd(ruleFormRef)"
            >
              确定
            </el-button>
            <el-button @click="cancelUnlocking">取消</el-button>
          </div>
        </div>
      </el-dialog>

      <!-- 解绑设备 -->
      <el-dialog
        class="unlockingDialog"
        v-model="deblockingVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="解绑设备"
        align-center
        width="400"
        :before-close="cancelDeblocking"
      >
        <div class="middle">
          <div class="content">确定解绑设备吗？</div>
          <div class="options">
            <el-button
              color="rgba(41, 109, 227, 1)"
              class="queding"
              type="primary"
              @click="submitAdd(ruleFormRef)"
            >
              确定
            </el-button>
            <el-button @click="cancelDeblocking">取消</el-button>
          </div>
        </div>
      </el-dialog>

      <!-- 禁用门锁 -->
      <el-dialog
        class="unlockingDialog"
        v-model="forbiddenVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="禁用门锁"
        align-center
        width="400"
        :before-close="cancelForbidden"
      >
        <div class="middle">
          <div class="content">确定禁用吗？</div>
          <div class="options">
            <el-button
              color="rgba(41, 109, 227, 1)"
              class="queding"
              type="primary"
              @click="submitAdd(ruleFormRef)"
            >
              确定
            </el-button>
            <el-button @click="cancelForbidden">取消</el-button>
          </div>
        </div>
      </el-dialog>

      <!-- 重置密码 -->
      <el-dialog
        class="temporaryCardDialog"
        v-model="resetPassVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="重置密码"
        align-center
        width="400"
        :before-close="cancelResetPass"
      >
        <el-form
          ref="resetPassRef"
          :model="resetPassRuleForm"
          :rules="resetPassRules"
          label-width="100px"
          class="demo-ruleForm"
          :size="formSize"
          label-position="left"
          status-icon
        >
          <el-form-item label="密码 :" prop="password">
            <el-input
              v-model="resetPassRuleForm.password"
              placeholder="请输入密码"
              clearable
            />
          </el-form-item>
          <el-form-item label="确认密码 :" prop="againPass">
            <el-input
              v-model="resetPassRuleForm.againPass"
              placeholder="请再一次输入密码"
              clearable
            />
          </el-form-item>
          <el-form-item class="options">
            <el-button
              color="rgba(41, 109, 227, 1)"
              class="queding"
              type="primary"
              @click="submitAdd(resetPassRef)"
            >
              确认
            </el-button>
            <el-button @click="cancelResetPass(resetPassRef)">取消</el-button>
          </el-form-item>
        </el-form>
      </el-dialog>

      <!-- 设置临时总卡 -->
      <el-dialog
        class="temporaryCardDialog"
        v-model="temporaryCardVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="设置临时总卡"
        align-center
        width="550"
        :before-close="cancelTemporaryCard"
      >
        <el-form
          ref="temporaryCardRef"
          :model="temporaryCardRuleForm"
          :rules="temporaryCardRules"
          label-width="100px"
          class="demo-ruleForm"
          :size="formSize"
          label-position="left"
          status-icon
        >
          <el-form-item label="角色 :" prop="level">
            <el-select
              v-model="temporaryCardRuleForm.level"
              class="m-2"
              placeholder="请选择角色"
              style="width: 200px"
            >
              <el-option label="角色一" :value="1" />
              <el-option label="角色二" :value="2" />
            </el-select>
          </el-form-item>
          <el-form-item label="姓名 :" prop="name">
            <el-input
              v-model="temporaryCardRuleForm.name"
              placeholder="请输入姓名"
              clearable
              style="width: 200px"
            />
          </el-form-item>
          <el-form-item label="生效时间 :" prop="effectiveTime">
            <div class="block">
              <el-date-picker
                v-model="temporaryCardRuleForm.effectiveTime"
                type="datetime"
                placeholder="选择生效时间"
                style="width: 200px"
              />
            </div>
          </el-form-item>
          <el-form-item label="失效时间 :" prop="failureTime">
            <div class="block">
              <el-date-picker
                v-model="temporaryCardRuleForm.failureTime"
                type="datetime"
                placeholder="选择失效时间"
                style="width: 200px"
              />
            </div>
          </el-form-item>
          <el-form-item label="序号 :" prop="serialNumber">
            <el-select
              v-model="temporaryCardRuleForm.serialNumber"
              multiple
              placeholder="楼/栋/房间（可多选）"
              style="width: 240px"
            >
              <el-option label="101" value="1" />
              <el-option label="102" value="2" />
              <el-option label="103" value="3" />
            </el-select>
          </el-form-item>
          <el-form-item class="options">
            <el-button
              color="rgba(41, 109, 227, 1)"
              class="queding"
              type="primary"
              @click="submitAdd(temporaryCardRef)"
            >
              下一步
            </el-button>
            <el-button @click="cancelTemporaryCard(temporaryCardRef)"
              >取消</el-button
            >
          </el-form-item>
        </el-form>
      </el-dialog>

      <!-- 钥匙管理 -->
      <el-dialog
        class="keyDialog"
        v-model="keyVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="18#1单元-1层-201"
        align-center
        width="900"
        :before-close="cancelKey"
      >
        <div class="footers" v-loading="loading">
          <div class="title">
            <div class="keyTitle">
              <span class="txt">住客</span>
              <!-- <div class="dropdown">
                <el-dropdown trigger="click" :hide-on-click="false">
                  <el-button type="primary"> 添加电子钥匙 </el-button>
                  <template #dropdown>
                    <el-dropdown-menu>
                      <el-dropdown-item>指纹</el-dropdown-item>
                      <el-dropdown-item>卡片</el-dropdown-item>
                      <el-dropdown-item>身份证</el-dropdown-item>
                      <el-dropdown-item>密码</el-dropdown-item>
                    </el-dropdown-menu>
                  </template>
                </el-dropdown>
              </div> -->
            </div>
            <el-collapse>
              <el-collapse-item name="1">
                <!-- <template #title>
                  <div class="">
                    <span></span>
                  </div>
                </template> -->
                <div class="table">
                  <el-table
                    :row-class-name="tableRowClassName2"
                    :data="tableData.list"
                    @selection-change="handleSelectionChange"
                    style="width: 100%; height: 200px"
                    :header-cell-style="{
                      background: 'rgba(240, 243, 247, 1)',
                      height: '50px',
                      border: 0,
                    }"
                  >
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="姓名"
                    >
                    </el-table-column>
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="手机号"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="类型"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="时效"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="状态"
                    >
                    </el-table-column>
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="创建时间"
                    >
                    </el-table-column>
                    <el-table-column align="center" label="操作" width="140">
                      <template #default="scope">
                        <div class="options">
                          <div class="reset" @click="edit(scope.row)">修改</div>
                          <div class="reset" @click="forbidden(scope.row)">
                            禁用
                          </div>
                          <el-popconfirm
                            width="220"
                            confirm-button-text="确认"
                            cancel-button-text="取消"
                            :icon="InfoFilled"
                            icon-color="#f89626"
                            title="是否删除此账号?"
                            @confirm="del(scope.row)"
                            @cancel="cancelEvent"
                          >
                            <template #reference>
                              <div class="reset">删除</div>
                            </template>
                          </el-popconfirm>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
              </el-collapse-item>
            </el-collapse>
          </div>
          <div class="title titles">
            <div class="keyTitle">
              <span class="txt">系统用户</span>
              <div class="dropdown">
                <!-- <el-button type="primary" class="Addkey" @click="showBtn">
                  添加电子钥匙
                </el-button>
                <div class="square"></div>
                <ul v-if="showBtnList">
                  <li>指纹</li>
                  <li>卡片</li>
                  <li>身份证</li>
                  <li @click="passManagementClick">密码</li>
                </ul> -->
                <el-dropdown trigger="click" :hide-on-click="false">
                  <el-button type="primary"> 添加电子钥匙 </el-button>
                  <template #dropdown>
                    <el-dropdown-menu>
                      <el-dropdown-item @click="fingerprintClick"
                        >指纹</el-dropdown-item
                      >
                      <el-dropdown-item @click="identityCardClick"
                        >卡片</el-dropdown-item
                      >
                      <el-dropdown-item @click="identityCardClick"
                        >身份证</el-dropdown-item
                      >
                      <el-dropdown-item @click="passManagementClick"
                        >密码</el-dropdown-item
                      >
                    </el-dropdown-menu>
                  </template>
                </el-dropdown>
              </div>
            </div>
            <el-collapse>
              <el-collapse-item>
                <!-- <template #title>
                  <div class="">
                    <span></span>
                  </div>
                </template> -->
                <div class="table">
                  <el-table
                    :row-class-name="tableRowClassName2"
                    :data="tableData.list"
                    @selection-change="handleSelectionChange"
                    style="width: 100%; height: 200px"
                    :header-cell-style="{
                      background: 'rgba(240, 243, 247, 1)',
                      height: '50px',
                      border: 0,
                    }"
                  >
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="姓名"
                    >
                    </el-table-column>
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="手机号"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="类型"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="时效"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="状态"
                    >
                    </el-table-column>
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="创建时间"
                    >
                    </el-table-column>
                    <el-table-column align="center" label="操作" width="140">
                      <template #default="scope">
                        <div class="options">
                          <div class="reset" @click="edit(scope.row)">修改</div>
                          <div class="reset" @click="forbidden(scope.row)">
                            禁用
                          </div>
                          <el-popconfirm
                            width="220"
                            confirm-button-text="确认"
                            cancel-button-text="取消"
                            :icon="InfoFilled"
                            icon-color="#f89626"
                            title="是否删除此账号?"
                            @confirm="del(scope.row)"
                            @cancel="cancelEvent"
                          >
                            <template #reference>
                              <div class="reset">删除</div>
                            </template>
                          </el-popconfirm>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
              </el-collapse-item>
            </el-collapse>
          </div>
          <div class="title titles">
            <div class="keyTitle">
              <span class="txt">自定义用户</span>
              <div class="dropdown">
                <el-dropdown trigger="click" :hide-on-click="false">
                  <el-button type="primary">
                    添加电子钥匙
                    <!-- <el-icon class="el-icon--right"><arrow-down /></el-icon> -->
                  </el-button>
                  <template #dropdown>
                    <el-dropdown-menu>
                      <el-dropdown-item>指纹</el-dropdown-item>
                      <el-dropdown-item>卡片</el-dropdown-item>
                      <el-dropdown-item>身份证</el-dropdown-item>
                      <el-dropdown-item>密码</el-dropdown-item>
                    </el-dropdown-menu>
                  </template>
                </el-dropdown>
              </div>
            </div>
            <el-collapse>
              <el-collapse-item>
                <!-- <template #title>
                  <div class="">
                    <span></span>
                  </div>
                </template> -->
                <div class="table">
                  <el-table
                    :row-class-name="tableRowClassName2"
                    :data="roomList.list"
                    @selection-change="handleSelectionChange"
                    style="width: 100%; height: 200px"
                    :header-cell-style="{
                      background: 'rgba(240, 243, 247, 1)',
                      height: '50px',
                      border: 0,
                    }"
                  >
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="姓名"
                    >
                    </el-table-column>
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="手机号"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="类型"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="时效"
                    />
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="状态"
                    >
                    </el-table-column>
                    <el-table-column
                      align="center"
                      prop="roomlength"
                      label="创建时间"
                    >
                    </el-table-column>
                    <el-table-column align="center" label="操作" width="140">
                      <template #default="scope">
                        <div class="options">
                          <div class="reset" @click="edit(scope.row)">修改</div>
                          <div class="reset" @click="forbidden(scope.row)">
                            禁用
                          </div>
                          <el-popconfirm
                            width="220"
                            confirm-button-text="确认"
                            cancel-button-text="取消"
                            :icon="InfoFilled"
                            icon-color="#f89626"
                            title="是否删除此账号?"
                            @confirm="del(scope.row)"
                            @cancel="cancelEvent"
                          >
                            <template #reference>
                              <div class="reset">删除</div>
                            </template>
                          </el-popconfirm>
                        </div>
                      </template>
                    </el-table-column>
                  </el-table>
                </div>
              </el-collapse-item>
            </el-collapse>
          </div>
        </div>
      </el-dialog>

      <!-- 添加电子钥匙 密码管理 -->
      <el-dialog
        class="passManagementDialog"
        v-model="passManagementVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="密码管理"
        align-center
        width="650"
        :before-close="cancelPassManagement"
      >
        <el-tabs
          v-model="passManagementIndex"
          class="demo-tabs"
          @tab-change="passManagementHandleClick"
        >
          <el-tab-pane label="时效密码" :name="1"> </el-tab-pane>
          <el-tab-pane label="无网络密码" :name="2"> </el-tab-pane>
          <el-tab-pane label="临时密码" :name="3"> </el-tab-pane>
        </el-tabs>
        <el-form
          ref="passManagementRef"
          :model="passManagementRuleForm"
          :rules="passManagementRules"
          label-width="100px"
          class="demo-ruleForm"
          :size="formSize"
          label-position="left"
          status-icon
        >
          <el-form-item label="角色 :" prop="level">
            <el-select
              v-model="passManagementRuleForm.level"
              class="m-2"
              placeholder="请选择角色"
              style="width: 500px"
            >
              <el-option label="角色一" :value="1" />
              <el-option label="角色二" :value="2" />
            </el-select>
          </el-form-item>
          <el-form-item label="姓名 :" prop="name">
            <el-input
              v-model="passManagementRuleForm.name"
              placeholder="请输入姓名"
              clearable
              style="width: 500px"
            />
          </el-form-item>
          <el-form-item label="密码 :" prop="pass">
            <el-input
              v-model="passManagementRuleForm.pass"
              placeholder="请输入6-8位数密码或者点击随机生成"
              style="width: 500px"
            >
              <template #append>
                <div @click="randomCipher">随机生成</div>
              </template>
            </el-input>
          </el-form-item>
          <el-form-item label="生效时间 :" prop="effectiveTime">
            <div class="block">
              <el-date-picker
                v-model="passManagementRuleForm.effectiveTime"
                type="datetime"
                placeholder="选择生效时间"
                style="width: 500px"
              />
            </div>
          </el-form-item>
          <el-form-item label="失效时间 :" prop="failureTime">
            <div class="block">
              <el-date-picker
                v-model="passManagementRuleForm.failureTime"
                type="datetime"
                placeholder="选择失效时间"
                style="width: 500px"
              />
            </div>
          </el-form-item>
          <el-form-item class="options">
            <el-button
              color="rgba(41, 109, 227, 1)"
              class="queding"
              type="primary"
              @click="passManagementSend(passManagementRef)"
            >
              确定发送
            </el-button>
            <el-button @click="cancelPassManagement(passManagementRef)"
              >取消</el-button
            >
          </el-form-item>
        </el-form>
      </el-dialog>

      <!-- 添加电子钥匙 添加身份证 -->
      <el-dialog
        class="identityCard"
        v-model="identityCardVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="添加身份证"
        align-center
        width="550"
        :before-close="cancelIdentityCard"
      >
        <el-form
          ref="identityCardRef"
          :model="identityCardRuleForm"
          :rules="identityCardRules"
          label-width="100px"
          class="demo-ruleForm"
          :size="formSize"
          label-position="left"
          status-icon
        >
          <el-form-item label="角色 :" prop="level">
            <el-select
              v-model="identityCardRuleForm.level"
              class="m-2"
              placeholder="请选择角色"
              style="width: 200px"
            >
              <el-option label="角色一" :value="1" />
              <el-option label="角色二" :value="2" />
            </el-select>
          </el-form-item>
          <el-form-item label="姓名 :" prop="name">
            <el-input
              v-model="identityCardRuleForm.name"
              placeholder="请输入姓名"
              clearable
              style="width: 200px"
            />
          </el-form-item>
          <el-form-item label="生效时间 :" prop="effectiveTime">
            <div class="block">
              <el-date-picker
                v-model="identityCardRuleForm.effectiveTime"
                type="datetime"
                placeholder="选择生效时间"
                style="width: 200px"
              />
            </div>
          </el-form-item>
          <el-form-item label="失效时间 :" prop="failureTime">
            <div class="block">
              <el-date-picker
                v-model="identityCardRuleForm.failureTime"
                type="datetime"
                placeholder="选择失效时间"
                style="width: 200px"
              />
            </div>
          </el-form-item>
          <el-form-item class="options">
            <el-button
              color="rgba(41, 109, 227, 1)"
              class="queding"
              type="primary"
              @click="identityCardNext(identityCardRef)"
            >
              下一步
            </el-button>
          </el-form-item>
        </el-form>
      </el-dialog>

      <!-- 身份证读卡弹窗 -->
      <el-dialog
        class="addIdentityCard"
        v-model="addIdentityCardVisible"
        :close-on-click-modal="false"
        :close-on-press-escape="false"
        title="添加身份证"
        align-center
        width="650"
        :before-close="cancelAddIdentityCard"
      >
        <!-- <div class="el-footer">
          {{ identityCardTitle }}
        </div>
        <div class="el-footer">卡号 :{{ identityCardNum }}</div> -->
        <div class="steps">
          <el-steps
            :space="200"
            :active="identityCardIndex"
            finish-status="success"
          >
            <el-step title="环境准备" />
            <el-step title="配置" />
            <el-step title="完成" />
          </el-steps>
        </div>
        <div
          class="title"
          v-if="identityCardIndex == 0 || identityCardIndex == 1"
          style="color: #fc2307"
        >
          {{ identityCardTitle }}
        </div>
        <div class="title" v-else style="color: #68c23c">
          {{ identityCardTitle }}
        </div>
        <div class="icons">
          <img
            v-if="identityCardIndex == 0 || identityCardIndex == 1"
            src="@/assets/icons/error.png"
            alt=""
          />
          <img
            v-if="identityCardIndex == 2"
            class="loading"
            src="@/assets/icons/loading.png"
            alt=""
          />
          <img
            v-if="identityCardIndex == 3"
            src="@/assets/icons/success.png"
            alt=""
          />
        </div>
        <div class="retry">可以尝试<span @click="retry">重试</span></div>
      </el-dialog>
    </div>
  </div>
</template>

<script setup>
import {
  ref,
  reactive,
  nextTick,
  watch,
  onBeforeMount,
  onUnmounted,
} from "vue";
import { useRouter } from "vue-router";
import { ElMessage, ElMessageBox } from "element-plus";
import { Calendar } from "@element-plus/icons-vue";
import vidiconsApi from "@/api/vidicons.js";
import { dayjs } from "element-plus";
import lodash from "lodash";
import axios from "axios";
import { useStore } from "vuex";
const store = useStore();
const api = ref("");
const router = useRouter();

const nowDay = ref(dayjs().format("YYYY-MM-DD HH:mm:ss"));
// 表格数据
const loading = ref(false);
const tableData = reactive({
  list: [
    { roomlength: "/ 共3间" },
    { roomlength: "/ 共3间" },
    { roomlength: "/ 共3间" },
    { roomlength: "/ 共3间" },
    { roomlength: "/ 共3间" },
    { roomlength: "/ 共3间" },
    { roomlength: "/ 共3间" },
    { roomlength: "/ 共3间" },
    { roomlength: "/ 共3间" },
  ],
});

const searchInput = reactive({
  keyWord: "",
}); // 搜索按钮数据

const roomList = reactive({
  list: [
    {
      title: "18#1单元-2层",
      roomlength: "/ 共3间",
      children: [
        {
          roomNum: "201",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "202",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "203",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
      ],
    },
    {
      title: "18#1单元-3层",
      roomlength: "/ 共3间",
      children: [
        {
          roomNum: "201",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "202",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "203",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "204",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "205",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "206",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "207",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "208",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "209",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
      ],
    },
    {
      title: "18#1单元-4层",
      roomlength: "/ 共3间",
      children: [
        {
          roomNum: "201",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "202",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "203",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "204",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "205",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "206",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "207",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "208",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
        {
          roomNum: "209",
          shebei: "L6-VVIFI-QINGKE",
          wangluo: "WIFI",
          wifiMAC: "80A036AE239D",
          lanyaMAC: "F3F401122AF2",
          time: "2022年11月24日10:27:04",
          dianliang: "75%",
          statu: "在线",
          shebeiStatu: "启用",
          lastLock: "2023年11月02日 15:45:34",
          visible: false,
        },
      ],
    },
  ],
});

// 设置临时总卡 (头部按钮--------------------------------------------------------）
const temporaryCardVisible = ref(false);
const temporaryCardRef = ref();
const temporaryCardRuleForm = reactive({
  level: 1,
  name: "",
  effectiveTime: "",
  failureTime: "",
  serialNumber: "",
  id: "",
});
var checkFullName = (rule, value, callback) => {
  if (!value) {
    return callback(new Error("请输入姓名"));
  }

  var reg = /^[\u4e00-\u9fa5]{2,6}$/;
  if (!reg.test(value)) {
    callback(new Error("必须为2-6个汉字！"));
  } else {
    callback();
  }
};
// 表单验证
const temporaryCardRules = reactive({
  name: [
    { required: true, message: "姓名不能为空", trigger: "blur" },
    { validator: checkFullName, trigger: "blur" },
  ],
  level: [
    {
      required: true,
      message: "角色不能为空",
      trigger: "blur",
    },
  ],
  effectiveTime: [
    {
      required: true,
      message: "生效时间不能为空",
      trigger: "blur",
    },
  ],
  failureTime: [
    {
      required: true,
      message: "失效时间不能为空",
      trigger: "blur",
    },
  ],
  serialNumber: [
    {
      required: true,
      message: "至少选择一间房",
      trigger: "blur",
    },
  ],
});

// 消息列表弹窗(----------------------------------------------------)
const newsVisible = ref(false);
const newsIndex = ref(1);
const newsPage = ref(1); // 当前页
const newsSize = ref(7);
const newsTotal = ref(20); // 当前总数

// 远程开锁（--------------------------------------------------------）
const unlockingVisible = ref(false);
// 解绑设备 (--------------------------------------------------------）
const deblockingVisible = ref(false);
// 禁用门锁 (--------------------------------------------------------）
const forbiddenVisible = ref(false);
// 重置管理员密码 (--------------------------------------------------------）
const resetPassVisible = ref(false);
const resetPassRef = ref();
const resetPassRuleForm = reactive({
  password: "",
  againPass: "",
  id: "",
});
// 表单验证
const resetPassRules = reactive({
  password: [
    {
      required: true,
      message: "密码不能为空",
      trigger: "blur",
    },
    {
      min: 8,
      max: 20,
      pattern:
        /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$/,
      message: "请输入8-20位正确密码（大小写字母·字符·数字）",
      trigger: "blur",
    },
  ],
  againPass: [
    {
      required: true,
      message: "确认密码不能为空",
      trigger: "blur",
    },
    {
      min: 8,
      max: 20,
      pattern:
        /^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*,\._\+(){}])[0-9a-zA-Z!@#$%^&*,\\._\+(){}]{8,20}$/,
      message: "请输入8-20位正确密码（大小写字母·字符·数字）",
      trigger: "blur",
    },
  ],

  // desc: [{ required: true, message: "Please input activity form", trigger: "blur" }],
});
// 钥匙管理 (--------------------------------------------------------）
const keyVisible = ref(false);
const showBtnList = ref(true); //添加电子钥匙 控制按钮列表的显隐
// 钥匙管理 密码管理(--------------------------------------------------------）
const passManagementVisible = ref(false);
const passManagementIndex = ref(1); // 默认选中 时效密码
const passManagementRef = ref();
const passManagementRuleForm = reactive({
  level: 1,
  name: "",
  effectiveTime: "",
  failureTime: "",
  pass: "",
  id: "",
});
var passManagementName = (rule, value, callback) => {
  if (!value) {
    return callback(new Error("请输入姓名"));
  }

  var reg = /^[\u4e00-\u9fa5]{2,6}$/;
  if (!reg.test(value)) {
    callback(new Error("必须为2-6个汉字！"));
  } else {
    callback();
  }
};
// 表单验证
const passManagementRules = reactive({
  name: [
    { required: true, message: "姓名不能为空", trigger: "blur" },
    { validator: passManagementName, trigger: "blur" },
  ],
  level: [
    {
      required: true,
      message: "角色不能为空",
      trigger: "blur",
    },
  ],
  effectiveTime: [
    {
      required: true,
      message: "生效时间不能为空",
      trigger: "blur",
    },
  ],
  failureTime: [
    {
      required: true,
      message: "失效时间不能为空",
      trigger: "blur",
    },
  ],
  pass: [
    {
      required: true,
      message: "密码不能为空",
      trigger: "blur",
    },
  ],
});

// 钥匙管理 添加身份证(--------------------------------------------------------）
const identityCardVisible = ref(false);
const identityCardRef = ref();
const identityCardRuleForm = reactive({
  level: 1,
  name: "",
  effectiveTime: "",
  failureTime: "",
  id: "",
});
var identityCardName = (rule, value, callback) => {
  if (!value) {
    return callback(new Error("请输入姓名"));
  }

  var reg = /^[\u4e00-\u9fa5]{2,6}$/;
  if (!reg.test(value)) {
    callback(new Error("必须为2-6个汉字！"));
  } else {
    callback();
  }
};
// 表单验证
const identityCardRules = reactive({
  name: [
    { required: true, message: "姓名不能为空", trigger: "blur" },
    { validator: identityCardName, trigger: "blur" },
  ],
  level: [
    {
      required: true,
      message: "角色不能为空",
      trigger: "blur",
    },
  ],
  effectiveTime: [
    {
      required: true,
      message: "生效时间不能为空",
      trigger: "blur",
    },
  ],
  failureTime: [
    {
      required: true,
      message: "失效时间不能为空",
      trigger: "blur",
    },
  ],
});
// 添加身份证弹窗
const addIdentityCardVisible = ref(false);
// const wsidentityCard = ref("");
const identityCardTitle = ref("");
// const identityCardNum = ref(""); // 身份证卡号
const identityCardIndex = ref(0); // 读卡步骤

watch(
  () => searchInput.createTime,
  (newVal, oldVal) => {
    console.log("监听时间:", newVal);
    if (newVal == null) {
      getList();
    }
  }
);

// 点击房间查看面板操作
const itemClick = (i) => {
  roomList.list.forEach((item) => {
    item.children.forEach((ii) => {
      ii.visible = false;
    });
  });
  i.visible = true;
  // if (i.visible == true) {
  //   i.visible = false;
  // } else {
  //   i.visible = true;
  // }
};

// 查看员工列表
const getList = async () => {
  loading.value = true;
  let data = {
    page: currentPage.value, // 当前页
    rows: pageSize.value, // 一页数据条数
    ledgerParam: searchInput.keyWord,
    managerId: sessionStorage.getItem("token"),
  };
  if (searchInput.createTime) {
    data.payStartTime = searchInput.createTime[0];
    data.payEndTime = searchInput.createTime[1];
  }

  if (searchInput.status) {
    if (searchInput.status != 0) {
      data.orderStatus = searchInput.status;
    }
  }
  let res = await axios({
    method: "post",
    url: api.value + "/mhotel/bookquearyBookPage.action",
    headers: {
      // token: sessionStorage.getItem("token"),
      // user_head: sessionStorage.getItem("userhead"),
    },
    params: data,
  });
  console.log(res, "用户列表");
  if (res.data.code == 200) {
    loading.value = false;
    // 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 addTemporaryCard = () => {
  temporaryCardVisible.value = true;
};
const cancelTemporaryCard = () => {
  temporaryCardVisible.value = false;
};

// 消息列表 (---------------------------------------------------------------)
const newsClick = () => {
  newsVisible.value = true;
};
// 切换消息列表
const changeNews = (ind) => {
  newsIndex.value = ind;
  if (ind == 1) {
  } else if (ind == 2) {
  }
};
// 关闭弹窗列表
const cancelNews = () => {
  newsVisible.value = false;
};
// 消息列表分页
const newsHandleCurrentChange = (value) => {
  // console.log(value);
  newsPage.value = value;
};

// 远程开锁(-----------------------------------------------------------------)
const unlockingClick = () => {
  unlockingVisible.value = true;
};
const cancelUnlocking = () => {
  unlockingVisible.value = false;
};
// 解绑设备(-----------------------------------------------------------------)
const deblockingClick = () => {
  deblockingVisible.value = true;
};
const cancelDeblocking = () => {
  deblockingVisible.value = false;
};

// 禁用门锁(-----------------------------------------------------------------)
const forbiddenClick = () => {
  forbiddenVisible.value = true;
};
const cancelForbidden = () => {
  forbiddenVisible.value = false;
};
// 重置密码(-----------------------------------------------------------------)
const resetPassClick = () => {
  resetPassVisible.value = true;
};
const cancelResetPass = () => {
  resetPassVisible.value = false;
};
// 钥匙管理(-----------------------------------------------------------------)
const keyClick = () => {
  keyVisible.value = true;
};
const cancelKey = () => {
  keyVisible.value = false;
};
// 钥匙管理 密码管理(-----------------------------------------------------------------)
const passManagementClick = () => {
  passManagementVisible.value = true;
};
const cancelPassManagement = () => {
  passManagementVisible.value = false;
};
// 判断切换  时效密码  无网络密码  临时密码
const passManagementHandleClick = (value) => {
  console.log(value);
  passManagementRef.value.resetFields();
};
// 确定发送
const passManagementSend = (formEl) => {
  if (!formEl) return;
  formEl.validate(async (valid, fields) => {
    if (valid) {
    } else {
      console.log("error submit!", fields);
    }
  });
};
// 随机八位数密码
const randomCipher = () => {
  console.log(Math.random());

  let len = "";
  if (parseInt(Math.random() * 9) > 4) {
    len = 8;
  } else {
    len = 6;
  }
  var pwd = "";
  for (var idx = 0; idx < len; idx++) {
    var seed = parseInt(Math.random() * 9);
    pwd = pwd + seed;
  }
  passManagementRuleForm.pass = pwd;
};

// 钥匙管理 添加身份证(-----------------------------------------------------------------)
const identityCardClick = () => {
  identityCardVisible.value = true;
};
const cancelIdentityCard = () => {
  identityCardVisible.value = false;
  identityCardRef.value.resetFields();
};
const Card = () => {
  var wsUrl = "ws://localhost:8181/";
  let websocket = new WebSocket(wsUrl);
  // wsidentityCard.value = websocket;
  websocket.onopen = function (evt) {
    var params = { type: 104, data: null };
    websocket.send(JSON.stringify(params));
  };

  websocket.onmessage = function (evt) {
    let data = JSON.parse(evt.data);
    console.log(data);
    if (data.type == 141) {
      identityCardTitle.value = "请插入设备";
      identityCardIndex.value = 0;
    } else if (data.type == 150) {
      identityCardTitle.value = "配置失败，请检查卡片是否已放置设备上";
      identityCardIndex.value = 1;
    } else if (data.type == 140) {
      // identityCardNum.value = data.data.uid;

      identityCardIndex.value = 2;
      identityCardTitle.value = "读卡中";

      if (data.data.uid) {
        setTimeout(() => {
          identityCardIndex.value = 3;
          identityCardTitle.value = "读卡成功";
        }, 1500);
      }

      // ElMessage({
      //   type: "success",
      //   showClose: true,
      //   message: "添加卡片成功",
      //   center: true,
      // });

      // identityCardTitle.value = "获取卡号成功";

      // addIdentityCardVisible.value = false;
      // identityCardVisible.value = false;
      // identityCardRef.value.resetFields();

      // setTimeout(() => {
      //   _this.icCardShow = false;
      // }, 2000);
    }
  };
};
// 身份证读卡 下一步
const identityCardNext = (formEl) => {
  // if (!formEl) return;
  // formEl.validate(async (valid, fields) => {
  //   if (valid) {
  addIdentityCardVisible.value = true;
  // identityCardNum.value = "";
  Card();

  //   }
  // });
};
// 重试 身份卡
const retry = () => {
  // identityCardNum.value = "";
  Card();
};
const cancelAddIdentityCard = () => {
  addIdentityCardVisible.value = false;
  identityCardIndex.value = 0;
};

//导出功能
const importExcel = lodash.debounce(async () => {
  let data = {
    ledgerParam: searchInput.keyWord,
    managerId: sessionStorage.getItem("token"),
  };
  if (searchInput.createTime) {
    data.payStartTime = searchInput.createTime[0];
    data.payEndTime = searchInput.createTime[1];
  }
  if (searchInput.status) {
    data.orderStatus = searchInput.status;
  }
  let res = await axios({
    method: "post",
    url: api.value + "/mhotel/booktoBookExcel.action",
    headers: {
      // token: sessionStorage.getItem("token"),
    },
    params: data,
  });
  console.log(res, "导出订单管理");
  if (res.data.code == 200) {
    var downloadPath = res.data.downurl;
    // window.open(downloadPath);
    window.location.href = downloadPath;
    var downloadLink = document.createElement("a");
    downloadLink.style.display = "none"; // 使其隐藏
    downloadLink.href = downloadPath;
    downloadLink.download = "";
    downloadLink.click();
    document.body.appendChild(downloadLink);
    document.body.removeChild(downloadLink);
    ElMessage({
      type: "success",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  } else {
    ElMessage({
      type: "error",
      showClose: true,
      message: res.data.message,
      center: true,
    });
  }
}, 1000);

// 表格斑马纹颜色修改
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;
});
onUnmounted(() => {
  // document.removeEventListener("keyup", Enters);
});
</script>

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

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

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

      .search {
        color: #fff;
      }

      .condition {
        display: flex;
        align-items: center;
        margin: 10px 30px 10px 0;
      }
    }
    .changeItems {
      display: flex;
      margin: 5px 0 15px 0;
      .changeItem {
        padding: 0 15px;
        height: 30px;
        background-color: rgba(230, 230, 230, 1);
        text-align: center;
        line-height: 30px;
        font-size: 14px;
        margin-right: 15px;
        border-radius: 3px;
        color: rgba(166, 166, 166, 1);
        cursor: pointer;
      }
      .changeItem_active {
        background-color: rgba(222, 234, 252, 1);
        color: rgba(0, 97, 255, 1);
      }
      .search {
        margin-right: 5px;
      }
    }

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

      span {
        color: #fff;
      }
    }

    :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(100vh - 345px);
    margin: 10px auto 20px;
    color: #000;
    overflow: auto;
    .floor {
      .title {
        margin: 8px 0;
        .t1 {
          font-weight: 600;
          margin-right: 10px;
        }
        .t2 {
          font-size: 13px;
          color: rgba(102, 102, 102, 1);
        }
      }
      .roomList {
        display: flex;
        flex-wrap: wrap;
        font-size: 14px;
        .room {
          width: 193px;
          height: 114px;
          opacity: 1;
          border-radius: 4px;
          background: rgba(240, 243, 247, 1);
          margin: 5px 18px 18px 0;
          // padding-left: 15px;
          .roomNum {
            font-size: 16px;
            // height: 24px;
            font-weight: 600;
            padding: 15px 0 5px 15px;
          }
          .rLock {
            color: rgba(128, 128, 128, 1);
            padding: 0 0 0 15px;
          }
          .wifi {
            display: flex;
            align-items: center;
            padding: 10px 0 10px 15px;
            color: rgba(51, 51, 51, 1);
            img {
              width: 14px;
              padding-right: 5px;
            }
          }
        }
      }
    }

    // 添加员工弹窗样式
    :deep(.addStaff) {
      // height: 600px;
      overflow: hidden;
      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 {
        overflow: auto;
        padding: 0px 20px 10px 20px;

        .order_info {
          margin: 20px 0 15px 0;

          .title {
            display: flex;
            align-items: center;
            margin: 25px 0 10px 0;

            img {
              width: 20px;
              height: 20px;
              margin-right: 10px;
            }

            span {
              color: #000;
              font-size: 18px;
              font-weight: 800;
            }
          }

          // 排列模式样式
          .workNum {
            display: flex;
            align-items: center;
            margin-bottom: 12px;
            font-size: 16px;

            .titles {
              color: rgba(128, 128, 128, 1);
              margin-right: 12px;
              font-weight: 200;
              width: 80px;
            }

            span {
              color: #000;
              font-weight: 600;
            }

            ul {
              list-style: none;
              display: flex;
              flex-wrap: wrap;
              margin: 0;
              padding: 0;

              li {
                border: 1px solid rgba(166, 166, 166, 1);
                margin-right: 10px;
                padding: 1px 4px;
                border-radius: 6px;
                cursor: pointer;
              }

              li.is_active {
                background-color: rgba(9, 101, 98, 1);
                color: #fff;
              }
            }

            // .el-checkbox-button {
            //   margin-right: 10px;
            //   border: 1px solid #ccc;
            //   border-radius: 4px;
            //   box-sizing: border-box;
            //   .el-checkbox-button__inner {
            //     border: none;
            //     border-radius: 3px;
            //   }
            // }
            // .el-checkbox-button.is-focus {
            //   .el-checkbox-button__inner {
            //     color: #fff;
            //     background-color: rgba(9, 101, 98, 1);
            //   }
            // }
          }
        }

        .options {
          margin: 0 0 10px 0;
          width: 95%;
          display: flex;
          flex-direction: row-reverse;

          .queding {
            margin-left: 20px;
            color: #fff;
          }
        }

        .houseNumber {
          margin: 20px 0;

          // .el-checkbox-button {
          //   margin-right: 10px;
          //   border: 1px solid #ccc;
          //   border-radius: 4px;
          //   box-sizing: border-box;
          //   .el-checkbox-button__inner {
          //     border: none;
          //     border-radius: 3px;
          //   }
          // }
          // .el-checkbox-button.is-focus {
          //   .el-checkbox-button__inner {
          //     color: #fff;
          //     background-color: rgba(9, 101, 98, 1);
          //   }
          // }
          ul {
            list-style: none;
            display: flex;
            flex-wrap: wrap;
            margin: 0;
            padding: 0;

            li {
              border: 1px solid rgba(166, 166, 166, 1);
              margin-right: 10px;
              padding: 1px 4px;
              border-radius: 6px;
              cursor: pointer;
            }

            li.is_active {
              background-color: rgba(9, 101, 98, 1);
              color: #fff;
            }
          }
        }
      }
    }
  }
  .footer::-webkit-scrollbar-track {
    background-color: #daeeff;
  }

  .footer::-webkit-scrollbar {
    background-color: #0888f8;
    height: 3px;
    width: 4px;
  }

  .footer::-webkit-scrollbar-thumb {
    background: #57b2ff;
    border-radius: 4px;
    height: 3px;
    width: 4px;
  }

  .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(111, 182, 184, 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;
}

.firstLogin {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100vh);
  background-color: rgba(0, 0, 0, 0.2);
  z-index: 1000000;
  display: flex;
  justify-content: center;
  align-items: center;

  .goInfo {
    width: 655px;
    height: 408px;
    background-color: #fff;
    border-radius: 9px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #000;

    h2 {
      margin: 0;
      font-size: 28px;
    }

    p {
      margin: 60px 0;
      padding: 0;
      font-size: 18px;
    }
  }
}

// 弹出的信息框
.roominfoPopper {
  .roomInfo {
    border: 1px solid red;
    color: #fff;
    font-size: 14px;
    .title {
      font-size: 16px;
      padding: 7.5px 0;
      border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    }
    .content {
      display: flex;
      .lefts {
        border-right: 1px solid rgba(255, 255, 255, 0.5);
        span:nth-child(1) {
          text-align: right;
          display: inline-block;
          width: 72px;
          margin: 5px 15px 5px 0;
        }
        span:nth-child(2) {
          text-align: left;
          display: inline-block;
          width: 190px;
        }
      }
      .rigths {
        width: 140px;
        margin-left: 15px;
        div {
          display: flex;
          align-items: center;
          height: 30px;
          cursor: pointer;
          img {
            width: 18px;
            height: 18px;
            margin-right: 5px;
          }
          span {
            text-align: left;
            display: inline-block;
          }
          .deblocking {
            transform: translateX(3px);
          }
        }
      }
    }
  }
}
// 消息列表弹窗
:deep(.newsDialog) {
  // height: 600px;
  overflow: hidden;
  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 {
    overflow: auto;
    padding: 0px 20px 10px 20px;

    .middle {
      width: 96%;
      margin: 0 auto;

      color: #000;
      //   切换  消息记录  操作记录
      .changeItems {
        display: flex;
        margin: 15px 0 0 0;
        .changeNews {
          //   width: 80px;
          padding: 0 10px;
          height: 30px;
          background-color: rgba(230, 230, 230, 1);
          text-align: center;
          line-height: 30px;
          font-size: 14px;
          margin-right: 15px;
          border-radius: 3px;
          color: rgba(166, 166, 166, 1);
          cursor: pointer;
        }
        .changeNews_active {
          background-color: rgba(222, 234, 252, 1);
          color: rgba(0, 97, 255, 1);
        }
      }
      // border-bottom: 1px solid rgb(231, 231, 231);
      .filter {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        margin: 10px 0 0 0;
        justify-content: start;

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

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

        span {
          color: #fff;
        }
      }

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

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

      span {
        color: #000;
      }

      .el-pagination {
        // width: 1600px;
        .el-pagination__total {
          color: #000;
        }

        .el-pagination__goto {
          color: #000;
        }

        .el-pagination__classifier {
          color: #000;
        }

        .el-input__wrapper {
          border: 1px solid rgba(0, 0, 0, 1);
          border-radius: 5px;
          box-shadow: none;
        }

        .el-pager li {
          margin: 0 5px;
          border: 1px solid rgba(0, 0, 0, 1);
          border-radius: 5px;
          background-color: transparent;
        }

        .el-pager li.is-active {
          // background-color: rgba(111, 182, 184, 1);
          border: 1px solid rgba(0, 97, 255, 1);
          color: rgba(0, 97, 255, 1);
          // border: 1px solid red;
        }

        .btn-prev {
          margin-right: 5px;
          border: 1px solid rgba(0, 0, 0, 1);
          border-radius: 5px;
          background-color: transparent;
        }

        .btn-next {
          margin-left: 5px;
          border: 1px solid rgba(0, 0, 0, 1);
          border-radius: 5px;
          background-color: transparent;
        }
      }
    }

    .footers {
      width: 96%;
      // height: 402px;
      margin: 10px auto 20px;

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

        .el-table__header-wrapper {
          background-color: #000;
          font-size: 15px;

          tr {
            color: #000;
          }
        }

        .el-table__row {
          height: 50px;
          font-size: 15px;
          color: #000;

          .orderNum {
            color: rgba(111, 182, 184, 1);
            cursor: pointer;
          }
        }

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

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

        .el-button--primary {
          margin-left: 5px;
        }

        .el-table__body .even2 {
          background-color: #fff;
        }

        .el-table__body .odd2 {
          background-color: rgba(240, 243, 247, 1);
        }
      }
    }
  }
}
// 远程开锁弹窗
:deep(.unlockingDialog) {
  // height: 600px;
  overflow: hidden;
  border-radius: 11px;

  .el-dialog__header {
    border-radius: 11px 11px 0 0;
    background: rgba(245, 249, 255, 1);
    font-weight: 600;
    height: 60px;
    padding: 0 20px;
    line-height: 60px;
    margin: 0;
    border-bottom: 1px solid rgba(230, 230, 230, 1);

    .el-dialog__headerbtn {
      outline: none;
    }
  }

  .el-dialog__body {
    padding: 0px 20px 20px 20px;
    // height: 200px;
    // display: flex;
    // flex-direction: column-reverse;

    .middle {
      width: 96%;
      color: #000;
      .content {
        height: 100px;
        padding: 50px 0 0 20px;
        font-size: 16px;
        letter-spacing: 1px;
      }
      .options {
        display: flex;
        flex-direction: row-reverse;
        align-items: center;
        margin: 10px 0;

        .queding {
          margin-left: 20px;
        }
      }
      .item {
        display: flex;
        align-items: center;
        margin: 24px 0;

        .title {
          width: 100px;
          text-align: right;
          margin-right: 10px;
        }
      }
      .againPass {
        margin: 24px 0 40px 0;
      }
    }
  }
}
// 设置临时总卡
:deep(.temporaryCardDialog) {
  //   height: 420px;
  border-radius: 11px;
  .el-dialog__header {
    border-radius: 11px 11px 0 0;
    background: rgba(237, 241, 245, 1);
    font-weight: 600;
    margin: 0;
    .el-dialog__headerbtn {
      outline: none;
    }
  }
  .el-dialog__body {
    padding: 30px 20px 10px 20px;
    // .el-input {
    //   // width: 200px;
    //   .el-input__suffix-inner {
    //     color: rgba(61, 81, 232, 1);
    //   }
    // }
    .el-form-item__content {
      width: 200px;
    }

    .options {
      margin: 10px 20px 20px 0;
      width: 100%;
      .el-form-item__content {
        display: flex;
        flex-direction: row-reverse;
      }
      .queding {
        color: #fff;
        margin-left: 15px;
      }
    }
  }
}
// 钥匙管理
:deep(.keyDialog) {
  //   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 20px 10px 20px;
    max-height: 750px;
    overflow: auto;
    .el-form-item__content {
      width: 200px;
    }
    .title {
      // margin: 20px 0;
      // border: 1px solid rgba(229, 229, 229, 1);
      // border-radius: 5px;
      box-sizing: border-box;
      .keyTitle {
        width: 828px;
        height: 50px;
        background: rgba(235, 235, 235, 1);
        display: flex;
        justify-content: space-between;
        align-items: center;
        // border-radius: 5px 0 0 5px;
        position: relative;
        z-index: 99;
        .Addkey {
          width: 120px;
        }
        .txt {
          color: rgba(0, 0, 0, 1);
          margin-left: 25px;
          font-weight: 400;
        }
        // .dropdown {
        //   position: relative;
        //   .square {
        //     width: 10px;
        //     height: 10px;
        //     transform: rotate(45deg);
        //     background-color: #fff;
        //     position: absolute;
        //     left: 54px;
        //     top: 35px;
        //     box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.04),
        //       0px 8px 20px rgba(0, 0, 0, 0.08);
        //   }
        //   ul {
        //     list-style: none;
        //     width: 80px;
        //     padding: 0;
        //     margin: 0;
        //     position: absolute;
        //     top: 40px;
        //     z-index: 999;
        //     box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, 0.04),
        //       0px 8px 20px rgba(0, 0, 0, 0.08);
        //     li {
        //       width: 80px;
        //       margin: 0 auto;
        //       padding: 2px 0;
        //       text-align: center;
        //       background-color: #fff;
        //     }
        //   }
        // }
      }
      .el-collapse {
        border: none;
        position: relative;
        top: -50px;
        // z-index: 99999;
        // border: 1px solid red;
        // transform: translateY(-50px);
      }
      .el-collapse-item {
        // border-radius: 5px;
        .el-collapse-item__header {
          border: none;
          background: rgba(235, 235, 235, 1);
          width: 33px;
          height: 50px;
          transform: translateX(827px);
          // border-radius: 0 5px 5px 0;
        }
        .el-collapse-item__wrap {
          border: 1px solid rgba(229, 229, 229, 1);
        }
      }
      .el-collapse-item__content {
        padding: 0;
        .table {
          width: 820px;
          margin: 20px auto;
          .el-table--fit {
            .el-table__header-wrapper {
              font-size: 15px;

              tr {
                color: #000;
              }
            }
            .el-table__row {
              height: 50px;
              font-size: 15px;
              color: #000;
            }
            .el-table__row td {
              padding: 0;
              border: 0;
            }
          }
          .options {
            display: flex;
            justify-content: center;
            .reset {
              margin: 0 5px;
              color: rgba(0, 97, 255, 1);
              cursor: pointer;
            }
          }
        }
      }
    }
    .titles {
      margin: -30px 0;
    }
  }
}
// 钥匙管理 密码管理
:deep(.passManagementDialog) {
  //   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 20px 10px 20px;
    // .el-input {
    //   // width: 200px;
    //   .el-input__suffix-inner {
    //     color: rgba(61, 81, 232, 1);
    //   }
    // }
    .el-form-item__content {
      .el-input-group__append {
        background-color: rgba(222, 234, 252, 1);
        color: rgba(0, 97, 255, 1);
        cursor: pointer;
        user-select: none;
      }
    }

    .options {
      margin: 10px 20px 20px 0;
      width: 100%;
      .el-form-item__content {
        display: flex;
        flex-direction: row-reverse;
      }
      .queding {
        color: #fff;
        margin-left: 15px;
      }
    }
  }
}

// 钥匙管理 添加身份证
:deep(.identityCard) {
  //   height: 420px;
  border-radius: 11px;
  .el-dialog__header {
    border-radius: 11px 11px 0 0;
    background: rgba(237, 241, 245, 1);
    font-weight: 600;
    margin: 0;
    .el-dialog__headerbtn {
      outline: none;
    }
  }
  .el-dialog__body {
    padding: 30px 20px 10px 20px;
    .el-form-item__content {
      width: 200px;
    }
    .options {
      margin: 10px 20px 20px 0;
      width: 100%;
      .el-form-item__content {
        display: flex;
        flex-direction: row-reverse;
      }
      .queding {
        color: #fff;
        margin-left: 15px;
      }
    }
  }
}
// 身份证读取
:deep(.addIdentityCard) {
  //   height: 420px;
  border-radius: 11px;
  .el-dialog__header {
    border-radius: 11px 11px 0 0;
    background: rgba(237, 241, 245, 1);
    font-weight: 600;
    margin: 0;
    .el-dialog__headerbtn {
      outline: none;
    }
  }
  .el-dialog__body {
    padding: 30px 20px 10px 20px;
    height: 330px;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    .el-steps {
      width: 600px;
      transform: translateX(90px);
      margin: 0 0 40px 0;
    }
    .title {
      text-align: center;
    }
    .icons {
      display: flex;
      justify-content: center;
      img {
        width: 70px;
        margin: 40px 0;
      }
      .loading {
        animation: move 3s linear;
      }
      @keyframes move {
        0% {
          transform: rotate(0);
        }
        100% {
          transform: rotate(360deg);
        }
      }
    }
    .retry {
      text-align: center;
      span {
        color: red;
        padding: 0 8px;
        cursor: pointer;
      }
    }
  }
}
</style>
<style lang="scss">
.roominfoPopper {
  background: rgba(0, 0, 0, 0.8) !important;
  border: none !important;
  .el-popper__arrow::before {
    background: rgba(0, 0, 0, 0.8) !important;
  }
}
</style>
