<template>
  <div class="Lift">
    <div class="CProTop">
      <div>
        <span>电梯管理 / 电梯档案</span>
      </div>
      <div style="text-align:right">
        <el-button type="primary" v-if="LiftBtn.LiftBtn79" round @click="addLiftOne">新增电梯</el-button>
      </div>
    </div>
    <el-row>
      <el-tabs class="BCtabs" v-model="activeName" type="border-card" @tab-click="handleClick">
        <el-tab-pane label="服务中电梯" name="first"></el-tab-pane>
        <el-tab-pane label="停止服务电梯" name="second"></el-tab-pane>
        <p class="SearchTitle">
          总记录条数{{LiftTotal}}个
        </p>
        <el-form class="TableSelectMain" :model="LiftSearch" :inline="true" label-position="left">
          <el-row>
            <el-form-item style="width:15%">
              <el-select v-model="LiftSearch.Region" clearable filterable placeholder="请选择区域">
                <el-option
                  v-for="item in RegionList"
                  :key="item.id"
                  :label="item.areaName"
                  :value="item.id"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item style="width:15%">
              <el-select v-model="LiftSearch.RegionProject" clearable filterable placeholder="请选择项目">
                <el-option
                  v-for="item in RegionProjectList"
                  :key="item.projectId"
                  :label="item.projectName"
                  :value="item.projectId"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item style="width:15%">
              <el-select v-model="LiftSearch.ProjectLift" clearable filterable placeholder="请选择类型">
                <el-option label="直梯" value="1"></el-option>
                <el-option label="扶梯" value="2"></el-option>
              </el-select>
            </el-form-item>

            <el-form-item style="width:15%">
              <el-select v-model="LiftSearch.liftBrand" clearable filterable placeholder="请选择品牌">
                <el-option
                  v-for="item in BrandList"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                ></el-option>
              </el-select>
            </el-form-item>

            <el-form-item style="width:25%">
              <el-input placeholder="请输入电梯注册代码" v-model="LiftSearch.registrationCode"></el-input>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" round style="margin-left:10px" @click="searchLift">查询</el-button>
              <el-button type="info" plain round @click="setLift">重置</el-button>
              <el-button type="primary" v-if="LiftBtn.LiftBtn80" plain round @click="exportExcel">导出excel</el-button>
              <el-button type="primary" v-if="LiftBtn.LiftBtn81" plain round @click="GetQrCodes">批量生成二维码</el-button>
            </el-form-item>
          </el-row>
        </el-form>
        <div class="LiftTable">
          <el-table
            ref="multipleTable"
            :data="LiftData"
            style="width: 100%"
            tooltip-effect="dark"
            @selection-change="LifthandleSelectionChange"
            class="LiftTable"
            border
            v-loading="LiftDataLoad"
          >
            <el-table-column type="selection"></el-table-column>
            <!-- <el-table-column prop="liftCode" label="梯号" min-width="70px" :show-overflow-tooltip="true"></el-table-column> -->
            <el-table-column prop="registrationCode" label="注册代码" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
            <el-table-column prop="projectName" label="项目名称" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
            <el-table-column prop="liftBrand" label="品牌" min-width="80px" :show-overflow-tooltip="true"></el-table-column>
            <el-table-column label="电梯类型">
              <template slot-scope="props">
                <span>{{props.row.liftType==1?'直梯':(props.row.liftType==2?'扶梯':'')}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="devicePosition" label="设备使用地点" min-width="110px" :show-overflow-tooltip="true"></el-table-column>
            <el-table-column v-if="activeName=='first'" prop="firstMaintenanceTime" label="首保时间"></el-table-column>
            <el-table-column v-if="activeName=='first'" prop="annualInspectionDate" label="年检时间"></el-table-column>
            <el-table-column v-if="activeName=='first'" label="电梯维保状态" min-width="120px" :show-overflow-tooltip="true">
              <template slot-scope="props">
                <span>{{props.row.liftStatus==1?'停保':(props.row.liftStatus==2?'正常':(props.row.liftStatus==3?'保养中':(props.row.liftStatus==4?'维修中':(props.row.liftStatus==5?'年检中':(props.row.liftStatus==6?'大修中':'')))))}}</span>
              </template>
            </el-table-column>
            <el-table-column label="操作" :width="activeName=='first'?'240px':'200px'" fixed="right">
              <template slot-scope="props">
                <el-button
                  type="primary"
                  plain
                  round
                  style="margin-left: 5px;"
                  @click="editLift(props.row)"
                >编辑电梯</el-button>
                
                <el-button
                  type="warning"
                  plain
                  round
                  style="margin-left: 5px;"
                  v-if="LiftBtn.LiftBtn86"
                >物联监控</el-button>
                <el-button
                  type="primary"
                  plain
                  round
                  style="margin-left: 5px;"
                  v-if="activeName!='first'"
                  @click="Relift(props.row)"
                >恢复电梯</el-button>
                <!-- <el-button
                  type="warning"
                  plain
                  round
                  style="margin-left: 5px;"
                  @click="showEmergencyHestory(props.row)"
                >急修记录</el-button>
                <el-button
                  type="success"
                  plain
                  round
                  style="margin-left: 5px;"
                  @click="showInspectionHestory(props.row)"
                >年检信息</el-button> -->

                <el-dropdown trigger="hover" slot="label" @command="handleCommandHestory">
                    <el-button class="el-dropdown-link" type="primary" plain round style="margin-left: 5px;">
                      记录
                      <i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                      <el-dropdown-item v-if="LiftBtn.LiftBtn82"
                        :command="composeValue('showMaintenanceHestory',props.row)"
                      >维保记录</el-dropdown-item>

                      <!-- <el-dropdown-item :command="composeValue('UpdateIn',props.row)">修改间隔</el-dropdown-item> -->
                      <el-dropdown-item v-if="LiftBtn.LiftBtn84"
                        :command="composeValue('showEmergencyHestory',props.row)"
                      >急修记录</el-dropdown-item>
                      <!-- <el-dropdown-item
                        v-if="props.row.locked == 0&&ProjectStatus!=3&&ProjectStatus!=1"
                        :command="composeValue('Stop',props.row)"
                      >停止服务</el-dropdown-item> -->
                      <el-dropdown-item v-if="LiftBtn.LiftBtn85"
                        :command="composeValue('showInspectionHestory',props.row)"
                      >年检信息</el-dropdown-item>
                      <el-dropdown-item
                        :command="composeValue('Hestory',props.row)"
                      >操作记录</el-dropdown-item>

                      
                    </el-dropdown-menu>
                  </el-dropdown>
                
                
              </template>
            </el-table-column>
          </el-table>
          <div class="pagenation">
            <span>
              <el-pagination
                background
                layout="prev, pager, next, sizes, total, jumper"
                :total="LiftTotal"
                @current-change="LiftClick"
                @size-change="LifthandleSizeChange"
                :page-sizes="[5, 10, 15, 20]"
                :page-size="Liftpagesize"
              ></el-pagination>
            </span>
          </div>
        </div>
      </el-tabs>
    </el-row>

    <div class="ReLift">
      <el-dialog title="恢复电梯" :visible.sync="dialogReLift" width="30%" :before-close="handleClose">
        <p>确定将恢复该电梯吗？</p>
        <div slot="footer" class="dialog-footer Txc">
          <el-button @click="dialogReLift = false">取 消</el-button>
          <el-button type="primary" @click="ReLiftSubmit">确 定</el-button>
        </div>
      </el-dialog>
    </div>

    <!--维保记录-->
    <div class="MaintenanceHestory">
      <el-dialog
        title="维保记录"
        :visible.sync="dialogMaintenanceHestory"
        width="70%"
        :before-close="handleClose"
      >
        <el-table :data="MaintenanceHestorytable" border style="width: 100%;color:#101010" v-loading="MaintenanceHestorytableLoad">
          <!-- <el-table-column prop="code" label="保养单编号"></el-table-column> -->
          <el-table-column prop="useCompanyCode" label="梯号" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="registrationCode" label="注册代码" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="planDate" label="计划日期" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="workDate" label="执行日期" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="type" label="保养类型" min-width="100px;" :show-overflow-tooltip="true">
            <template slot-scope="props">
              <span>{{props.row.type==1?'半月':(props.row.type==2?'季度':(props.row.type==3?'半年':(props.row.type==4?'全年':'')))}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="maintenanceAdvice" label="保养建议" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="workerName" label="维保工" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="isRegular" label="是否正常" min-width="100px;" :show-overflow-tooltip="true">
            <template slot-scope="props">
              <span>{{props.row.isRegular==0?'正常':(props.row.isRegular==1?'提前':(props.row.isRegular==2?'延期':''))}}</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" min-width="100px;" fixed="right">
            <template slot-scope="props">
              <el-button type="primary" v-if="LiftBtn.LiftBtn83" plain round @click="showMaintenance(props.row)">查看保养单</el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="pagenation">
          <span>
            <el-pagination
              background
              layout="prev, pager, next, sizes, total, jumper"
              :total="MaintenanceHestorytableTotal"
              @current-change="Maintenanceclick"
              @size-change="MaintenancehandleSizeChange"
              :page-sizes="[5, 10, 15, 20]"
              :page-size="Maintenancepagesize"
            ></el-pagination>
          </span>
        </div>
        <div slot="footer" class="dialog-footer Txc">
          <el-button @click="dialogMaintenanceHestory = false">关 闭</el-button>
        </div>
      </el-dialog>
    </div>

    <!--电梯操作记录-->
    <div class="LiftHestory">
      <el-dialog
        title="操作记录"
        :visible.sync="dialogLiftHestory"
        width="80%"
        :before-close="handleClose"
      >
        <el-table :data="LiftHestorytable" border style="width: 100%;color:#101010" v-loading="LiftHestoryLoad">
          <el-table-column prop="code" label="电梯编号" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="description" label="操作方式" min-width="100px" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="beforeContent" label="变更前内容" min-width="200px" :show-overflow-tooltip="true">
            <template slot-scope="props">
              <span v-html="props.row.beforeContent">{{props.row.beforeContent}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="afterContent" label="变更后内容" min-width="200px" :show-overflow-tooltip="true">
            <template slot-scope="props">
              <span v-html="props.row.afterContent">{{props.row.afterContent}}</span>
            </template>
          </el-table-column>
          <el-table-column prop="operatorName" label="操作人" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="operateDate" label="操作时间" :show-overflow-tooltip="true"></el-table-column>
        </el-table>
        <div class="pagenation">
          <span>
            <el-pagination
              background
              layout="prev, pager, next, sizes, total, jumper"
              :total="LiftHestorytableTotal"
              @current-change="LiftHestoryclick"
              @size-change="LiftHestoryhandleSizeChange"
              :page-sizes="[5, 10, 15, 20]"
              :page-size="LiftHestorypagesize"
            ></el-pagination>
          </span>
        </div>
      </el-dialog>
    </div>

    <!--保养单-->
    <div class="policy">
      <el-dialog title="保养单" :visible.sync="dialogpolicy" width="70%" :before-close="handleClose">
        <div id="BYDPrintId">
          <div>
            <div class="policyTop" style="font-size: 12px;">
              <p style="text-align: center;font-size: 16px;font-weight: bold;" class="policyTopCompany">{{policyRow.mtCompanyName}}</p>
              <p style="text-align: center;margin-bottom: 5px;" class="mb5">
                {{policyRow.category==1?'曳引与强制驱动电梯维护'
                :(policyRow.category==2?'液压驱动电梯维护'
                :(policyRow.category==3?'杂物电梯维护'
                :(policyRow.category==4?'自动扶梯与自动人行道维护'
                :(policyRow.category==5?'自动扶梯与自动人行道维护'
                :''))))}}保养单(编号：{{policyRow.code}}) — 设备编号：{{policyRow.useCompanyCode}}
              </p>
              <div>
                <div style="width:33%;display: inline-block;font-size: 12px;">
                    <div :sm="12" :md="12" :lg="12" style="width:30%;text-align: left;display: inline-block;">注册代码</div>
                    <div :sm="12" :md="12" :lg="12" :title="policyRow.registrationCode" style="width:70%;display: inline-block;text-align: left;white-space: nowrap;overflow: hidden;">{{policyRow.registrationCode}}</div>
                  
                </div>
                <div style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div :sm="12" :md="12" :lg="12" style="width:30%;text-align: left;display: inline-block;">电梯位置</div>
                    <div :sm="12" :md="12" :lg="12" :title="policyRow.devicePosition" style="width:70%;white-space: nowrap;overflow: hidden;text-align: left;display: inline-block;">{{policyRow.devicePosition}}</div>
                  </div>
                </div>
                <div style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div style="width:30%;text-align: left;display: inline-block;">保养类型</div>
                    <div
                      style="width:70%;text-align: left;display: inline-block;"
                    >{{policyRow.type==1?'半月':(policyRow.type==2?'季度':(policyRow.type==3?'半年 ':(policyRow.type==4?'全年':'')))}}</div>
                  </div>
                </div>
                <div style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div style="width:40%;text-align: left;display: inline-block;">保养时间</div>
                    <div style="width:60%;text-align: left;display: inline-block;">{{policyRow.workDate}}</div>
                  </div>
                </div>
                <div style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div style="width:30%;text-align: left;display: inline-block;" >项目编号</div>
                    <div style="width:70%;text-align: left;display: inline-block;" >{{policyRow.projectCode}}</div>
                  </div>
                </div>
                <div style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div style="width:30%;text-align: left;display: inline-block;">项目名称</div>
                    <div :title="policyRow.projectName" style="width:70%;white-space: nowrap;overflow: hidden;text-align: left;display: inline-block;">{{policyRow.projectName}}</div>
                  </div>
                </div>
                <div style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div style="width:40%;text-align: left;display: inline-block;">计划保养时间</div>
                    <div style="width:60%;text-align: left;display: inline-block;">{{policyRow.planDate}}</div>
                  </div>
                </div>
                <div v-if="IsshowTime" style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div style="width:30%;text-align: left;display: inline-block;" >停梯时间</div>
                    <div style="width:70%;text-align: left;display: inline-block;" >{{policyRow.stopDate}}</div>
                  </div>
                </div>
                <div v-if="IsshowTime" style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div :sm="12" :md="12" :lg="12" style="width:30%;text-align: left;display: inline-block;">恢梯时间</div>
                    <div :sm="12" :md="12" :lg="12" :title="policyRow.recoveryDate" style="width:70%;white-space: nowrap;overflow: hidden;text-align: left;display: inline-block;">{{policyRow.recoveryDate}}</div>
                  </div>
                </div>
                <div style="width:33%;display: inline-block;font-size: 12px;">
                  <div>
                    <div style="width:40%;text-align: left;display: inline-block;">保养时长</div>
                    <div style="width:60%;text-align: left;display: inline-block;">{{policyRow.repairDuration}}</div>
                  </div>
                </div>
              </div>
            </div>
            <table style="width:100%;color: rgb(16, 16, 16);border: 1px solid #ebeef5;font-size: 12px;">
              <tr>
                <th style="width:35px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">序号</th>
                <th style="text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">维保项目(内容)</th>
                <th style="text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">维保基本要求</th>
                <th style="width:35px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);">结果</th>
              </tr>
              <tr v-for="(item,index) in policytable" :key="item.id">
                <td style="width:35px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">{{index+1}}</td>
                <td style="text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">{{item.item}}</td>
                <td style="text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">{{item.content}}</td>
                <td style="width:35px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);">{{item.opt==0?'/':(item.opt==1?'√':'×')}}</td>
              </tr>
            </table>
            <div style="width:100%;color: rgb(16, 16, 16);font-size: 12px;">
              <div>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">保养建议</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">{{this.policyRow.maintenanceAdvice}}</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">客户意见</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);">{{this.policyRow.advice}}</span>
              </div>
              <div>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">工作标记</span>
                <span style="width:60%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);">√：已保养项   / ：无需保养项   ×：需修理项目</span>
              </div>
              <div>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">配件费</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">{{this.policyRow.partsCost}}</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">更换配件</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);">{{this.policyRow.sparepart}}</span>
              </div>
              <div>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">维保人员</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">{{this.policyRow.workerName}}</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">工时费</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);">{{this.policyRow.manCost}}</span>
              </div>
              <div>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">服务态度</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">{{this.policyRow.evaluation?
              (this.policyRow.evaluation.serviceLevel == 1
                ? "★☆☆☆☆"
                : this.policyRow.evaluation.serviceLevel == 2
                ? "★★☆☆☆"
                : this.policyRow.evaluation.serviceLevel == 3
                ? "★★★☆☆"
                : this.policyRow.evaluation.serviceLevel == 4
                ? "★★★★☆"
                : this.policyRow.evaluation.serviceLevel == 5
                ? "★★★★★"
                : ""):''}}</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);border-right: 1px solid rgb(235, 238, 245);">维保质量</span>
                <span style="width:20%;display:inline-block;vertical-align: top;height: 20px;text-align: center;border-bottom: 1px solid rgb(235, 238, 245);">{{this.policyRow.evaluation?
              (this.policyRow.evaluation.starLevel == 1
                ? "★☆☆☆☆"
                : this.policyRow.evaluation.starLevel == 2
                ? "★★☆☆☆"
                : this.policyRow.evaluation.starLevel == 3
                ? "★★★☆☆"
                : this.policyRow.evaluation.starLevel == 4
                ? "★★★★☆"
                : this.policyRow.evaluation.starLevel == 5
                ? "★★★★★"
                : ""):''}}</span>
              </div>
              <div>
                <div style="width:20%;display:inline-block;vertical-align: top;text-align: center;border-right: 1px solid rgb(235, 238, 245);">维保签名</div>
                <div style="width:20%;display:inline-block;vertical-align: top;text-align: center;border-right: 1px solid rgb(235, 238, 245);">
                  <img
                    style="display:inline-block"
                    :src="this.policyBottom[4].policyBottom2[0]?this.policyBottom[4].policyBottom2[0]:''"
                    width="50%"
                    height="100"
                  />
                  <img
                    style="display:inline-block"
                    :src="this.policyBottom[4].policyBottom2[1]?this.policyBottom[4].policyBottom2[1]:''"
                    width="50%"
                    height="100"
                  />
                </div>
                <div style="width:20%;display:inline-block;vertical-align: top;text-align: center;border-right: 1px solid rgb(235, 238, 245);">客户签名</div>
                <div style="width:20%;display:inline-block;vertical-align: top;text-align: center;">
                  <img
                  :src="this.policyBottom[4].policyBottom4?this.policyBottom[4].policyBottom4:''"
                  width="50%"
                  height="100"
                />
                </div>
              </div>

            </div>
          <!-- <el-table :data="policytable" border style="width: 100%;color:#101010;border: 1px solid #EBEEF5;">
            <el-table-column type="index" label="序号" width="60px;"></el-table-column>
            <el-table-column prop="item" label="维保项目(内容)"></el-table-column>
            <el-table-column prop="content" label="维保基本要求"></el-table-column>
            <el-table-column prop="opt" label="结果">
              <template slot-scope="props">
                <i v-if="props.row.opt==0" class="iconfont iconjinzhi1" style="color: #666"></i>
                <i v-if="props.row.opt==1" class="el-icon-success" style="color: rgb(25, 137, 250)"></i>
                <i v-if="props.row.opt==2" class="el-icon-error" style="color: rgb(235, 57, 65)"></i>
              </template>
            </el-table-column>
          </el-table> -->
          </div>
        </div>
        <!-- <el-table
          :data="policyBottom"
          :show-header="unshowHeader"
          :span-method="arraySpanMethod"
          border
          style="width: 100%;color:#101010"
          class="policyBottom"
        >
          <el-table-column prop="policyBottom1"></el-table-column>
          <el-table-column prop="policyBottom2">
            <template slot-scope="scope">
              <p v-if="scope.row.policyBottom1=='维保签名'">
                <img
                  style="display:inline-block"
                  :src="scope.row.policyBottom2[0]?scope.row.policyBottom2[0]:''"
                  width="50%"
                  height="100"
                />
                <img
                  style="display:inline-block"
                  :src="scope.row.policyBottom2[1]?scope.row.policyBottom2[1]:''"
                  width="50%"
                  height="100"
                />
              </p>
              <p v-else>{{scope.row.policyBottom2}}</p>
            </template>
          </el-table-column>
          <el-table-column prop="policyBottom3"></el-table-column>
          <el-table-column prop="policyBottom4">
            <template slot-scope="scope">
              <img
                v-if="scope.row.policyBottom1=='维保签名'"
                :src="scope.row.policyBottom4?scope.row.policyBottom4:''"
                width="50%"
                height="100"
              />
              <p v-else>{{scope.row.policyBottom4}}</p>
            </template>
          </el-table-column>
          <el-table-column prop="policyBottom5"></el-table-column>
          <el-table-column prop="policyBottom6"></el-table-column>
        </el-table> -->
        <div slot="footer" class="dialog-footer Txc">
          <el-button @click="dialogpolicy = false">取 消</el-button>
          <el-button type="primary" @click="BYDPrint">打 印</el-button>
        </div>
      </el-dialog>
    </div>
    <!--急修记录-->
    <div class="EmergencyHestory">
      <el-dialog
        title="急修记录"
        :visible.sync="dialogEmergencyHestory"
        width="70%"
        :before-close="handleClose"
      >
        <el-table :data="EmergencyHestorytable" border style="width: 100%;color:#101010" v-loading="EmergencyHestorytableLoad">
          <el-table-column prop="id" label="急修单编号" min-width="150px;" :show-overflow-tooltip="true"></el-table-column>
          <!-- <el-table-column prop="liftCode" label="梯号"></el-table-column> -->
          <el-table-column prop="registrationCode" label="注册代码" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="callerFaultDescription" label="临修原因" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="stopDate" label="停梯时间" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="recoveryDate" label="恢复时间" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="workerName" label="维保工" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column label="操作" min-width="100px;" fixed="right">
            <template slot-scope="props">
              <el-button type="primary" plain round @click="showEmergency(props.row)">查看急修单</el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="pagenation">
          <span>
            <el-pagination
              background
              layout="prev, pager, next, sizes, total, jumper"
              :total="EmergencyHestorytableTotal"
              @current-change="Emergencyclick"
              @size-change="EmergencyhandleSizeChange"
              :page-sizes="[5, 10, 15, 20]"
              :page-size="Emergencypagesize"
            ></el-pagination>
          </span>
        </div>
        <div slot="footer" class="dialog-footer Txc">
          <el-button @click="dialogEmergencyHestory = false">关 闭</el-button>
        </div>
      </el-dialog>
    </div>

    <!--电梯急修单-->
    <div class="Repairpolicy">
      <el-dialog
        title="电梯急修单"
        :visible.sync="dialogRepairpolicy"
        width="70%"
        :before-close="handleClose"
      >
        <div class="RepairpolicyContent">
          <div class="RepairpolicyContentTop">
            <el-row>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >项目编号：{{RepairpolicyData.projectCode}}</el-col>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >项目名称：{{RepairpolicyData.projectName}}</el-col>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >注册代码：{{RepairpolicyData.registrationCode}}</el-col>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >项目地址：{{RepairpolicyData.position}}</el-col>
              <el-col
                :xs="8"
                :sm="8"
                :md="8"
                :lg="8"
                class="pb10"
              >报修时间：{{RepairpolicyData.callerDate}}</el-col>
              <el-col
                :xs="8"
                :sm="8"
                :md="8"
                :lg="8"
                class="pb10"
              >派工时间：{{RepairpolicyData.assignTime}}</el-col>
              <el-col
                :xs="8"
                :sm="8"
                :md="8"
                :lg="8"
                class="pb10"
              >接单时间：{{RepairpolicyData.takingTime}}</el-col>
              <el-col
                :xs="8"
                :sm="8"
                :md="8"
                :lg="8"
                class="pb10 bB mb5"
              >到达时间：{{RepairpolicyData.arriveTime}}</el-col>
              <el-col
                :xs="8"
                :sm="8"
                :md="8"
                :lg="8"
                class="pb10 bB mb5"
              >停梯时间：{{RepairpolicyData.stopDate}}</el-col>
              <el-col
                :xs="8"
                :sm="8"
                :md="8"
                :lg="8"
                class="pb10 bB mb5"
              >恢复时间：{{RepairpolicyData.recoveryDate}}</el-col>
            </el-row>
            <el-row>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >故障部位：{{splitObj(RepairpolicyData.faultParts,2)}}</el-col>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >故障原因：{{splitObj(RepairpolicyData.faultReasons,2)}}</el-col>
            </el-row>
            <el-row>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >故障处理：{{splitObj(RepairpolicyData.faultHandles,1)}}</el-col>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >故障性质：{{splitObj(RepairpolicyData.faultNatures,1)}}</el-col>
            </el-row>
            <el-row>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10 bB mb5"
              >故障责任：{{splitObj(RepairpolicyData.faultDuties,1)}}</el-col>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10 bB mb5"
              >现场描述：{{RepairpolicyData.fieldDescription}}</el-col>
            </el-row>
            <el-row>
              <el-col :xs="12" :sm="12" :md="12" :lg="12" class="pb10">
                <el-row>更换配件：{{RepairpolicyData.sparepart}}</el-row>
                <el-row>配件费&nbsp&nbsp&nbsp&nbsp：{{RepairpolicyData.partsCost}}</el-row>
                <el-row>工时费&nbsp&nbsp&nbsp&nbsp：{{RepairpolicyData.charge}}</el-row>
              </el-col>
              <el-col :xs="12" :sm="12" :md="12" :lg="12" class="pb10">
                <el-row>
                  <el-col :xs="6" :sm="6" :md="6" :lg="6">维保签名：</el-col>
                  <el-col :xs="8" :sm="8" :md="6" :lg="6">
                    <img :src="RepairpolicyData.mainSign" width="100%" height="50" />
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="6" :lg="6">
                    <img :src="RepairpolicyData.secondSign" width="100%" height="50" />
                  </el-col>
                </el-row>
              </el-col>
            </el-row>
          </div>
          <div class="RepairpolicyContentBottom">
            <el-row class="mt10">
              <el-col
                :xs="6"
                :sm="6"
                :md="6"
                :lg="6"
                class="pb10"
              >急修负责人：{{RepairpolicyData.workerName}}</el-col>
              <el-col
                :xs="6"
                :sm="6"
                :md="6"
                :lg="6"
                class="pb10"
              >联系电话：{{RepairpolicyData.workerTel}}</el-col>
              <el-col :xs="6" :sm="6" :md="6" :lg="6" class="pb10">
                服务态度：{{RepairpolicyData.serviceLevel == 1
                ? "★☆☆☆☆"
                : this.RepairpolicyData.serviceLevel == 2
                ? "★★☆☆☆"
                : this.RepairpolicyData.serviceLevel == 3
                ? "★★★☆☆"
                : this.RepairpolicyData.serviceLevel == 4
                ? "★★★★☆"
                : this.RepairpolicyData.serviceLevel == 5
                ? "★★★★★"
                : ""}}
              </el-col>
              <el-col :xs="6" :sm="6" :md="6" :lg="6" class="pb10">
                急修满意度：{{RepairpolicyData.starLevel == 1
                ? "★☆☆☆☆"
                : this.RepairpolicyData.starLevel == 2
                ? "★★☆☆☆"
                : this.RepairpolicyData.starLevel == 3
                ? "★★★☆☆"
                : this.RepairpolicyData.starLevel == 4
                ? "★★★★☆"
                : this.RepairpolicyData.starLevel == 5
                ? "★★★★★"
                : ""}}
              </el-col>
            </el-row>
            <el-row>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >急修意见：{{RepairpolicyData.advice}}</el-col>
              <el-col :xs="12" :sm="12" :md="12" :lg="12" class="pb10">
                <el-row>
                  <el-col :xs="6" :sm="6" :md="6" :lg="6">客户签名：</el-col>
                  <el-col :xs="10" :sm="8" :md="6" :lg="6">
                    <img :src="RepairpolicyData.customerSign" width="100%" height="50" />
                  </el-col>
                </el-row>
              </el-col>
            </el-row>
            <el-row>
              <el-col
                :xs="12"
                :sm="12"
                :md="12"
                :lg="12"
                class="pb10"
              >电梯位置：{{RepairpolicyData.devicePosition}}</el-col>
            </el-row>
          </div>
        </div>
        <div slot="footer" class="dialog-footer Txc">
          <el-button @click="dialogRepairpolicy = false">取 消</el-button>
          <el-button type="primary">打 印</el-button>
        </div>
      </el-dialog>
    </div>

    <!--年检记录-->
    <div class="InspectionHestory">
      <el-dialog
        title="年检记录"
        :visible.sync="dialogInspectionHestory"
        width="70%"
        :before-close="handleClose"
      >
        <el-table :data="InspectionHestorytable" border style="width: 100%;color:#101010">
          <el-table-column prop="id" label="年检编号" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="liftCode" label="梯号" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="registrationCode" label="注册代码" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="planDate" label="年检时间" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
          <el-table-column prop="isCheckGoverner" label="是否检查限速器" min-width="160px;" :show-overflow-tooltip="true">
            <template slot-scope="props">
              <span>{{props.row.isCheckGoverner==1?'是':'否'}}</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" min-width="100px;" fixed="right">
            <template slot-scope="props">
              <el-button type="primary" plain round @click="showInspection(props.row)">查看合格证</el-button>
            </template>
          </el-table-column>
        </el-table>
        <div class="pagenation">
          <span>
            <el-pagination
              background
              layout="prev, pager, next, sizes, total, jumper"
              :total="InspectionHestorytableTotal"
              @current-change="Inspectionclick"
              @size-change="InspectionhandleSizeChange"
              :page-sizes="[5, 10, 15, 20]"
              :page-size="Inspectionpagesize"
            ></el-pagination>
          </span>
        </div>
        <div slot="footer" class="dialog-footer Txc">
          <el-button @click="dialogInspectionHestory = false">关 闭</el-button>
        </div>
      </el-dialog>
    </div>

    <!--合格证-->
    <div class="InspectionPic">
      <el-dialog
        title="急修图片"
        :visible.sync="dialogInspectionPic"
        width="40%"
        :before-close="handleClose"
      >
        <div class="block">
          <el-carousel height="350px">
            <el-carousel-item>
              <el-image :src="CertificateImgUrl" fit="fill"></el-image>
            </el-carousel-item>
          </el-carousel>
        </div>
        <div slot="footer" class="dialog-footer Txc">
          <el-button @click="dialogInspectionPic = false">关 闭</el-button>
        </div>
      </el-dialog>
    </div>

    <!--二维码-->
    <div class="QRCodeSContent">
      <el-dialog
        title="二维码打印"
        :visible.sync="dialogQRCodeSContent"
        width="70%"
        :before-close="handleClose"
      >
        <div class="CodeSContent" id="printQRCodeSContent">
          <div
            style="padding-right:10px;width:45%;display:inline-block;margin-bottom: 20px;"
            v-for="item in ContentList"
            :key="item.LiftID"
          >
            <p style="text-align: center;font-size: 20px;margin-bottom: 5px;margin: 0;">维保标签</p>
            <div>
              <div style="width:50%;display:inline-block;vertical-align: top;">
                <div style="border:1px solid #ebeef5;"
                >
                  <p style="border-bottom: 1px solid rgb(235,238,245);height: 50px; line-height: 50px;text-align: center;margin: 0;">{{item.Agency[0].Content}}</p>
                  <p style="border-bottom: 1px solid rgb(235,238,245);height: 50px; line-height: 50px;text-align: center;margin: 0;">{{item.Agency[1].Content}}</p>
                  <p style="border-bottom: 1px solid rgb(235,238,245);height: 50px; line-height: 50px;text-align: center;margin: 0;">{{item.Agency[2].Content}}</p>
                  <p style="border-bottom: 1px solid rgb(235,238,245);height: 50px; line-height: 50px;text-align: center;margin: 0;">{{item.Agency[3].Content}}</p>
                </div>
                <p style="font-size: 12px;text-align: center;margin: 10px 0;">维保公司：{{CompanyNameCode}}</p>
                <p style="font-size: 14px;text-align: center;margin: 0;">联系电话：{{CompanyNamePhone}}</p>
              </div>
              <div style="width:50%;display:inline-block">
                <img :src="ContentImgURL" fit="fill" style="width:100%;height:200px">
                <p style="text-align: center;margin: 0;">更多信息请扫描二维码</p>
              </div>
            </div>
          </div>
        </div>
        <div slot="footer" class="dialog-footer Txc">
          <el-button @click="dialogQRCodeSContent = false">取 消</el-button>
          <el-button type="primary" @click="printCode">打 印</el-button>
        </div>
      </el-dialog>
    </div>

    <!-- 新增/编辑电梯模态框 -->
    <div>
      <el-dialog
      :title='addLift==1?"添加电梯":"编辑电梯"'
    
        :visible.sync="dialogAddLift"
        width="85%"
        :before-close="handleClose"
        class="AddLift"
      >
        <el-form
          :model="AddLift"
          :inline="true"
          label-position="right"
          class="AddLiftFrom"
          :rules="LiftFormRule"
          ref="LiftForm"
        >
          <el-row justify="space-around" class="mb20">
            <el-form-item label="电梯类型" prop="liftType" class="LiftRow">
              <el-select
                v-model="AddLift.liftType"
                filterable
                placeholder="选择电梯类型"
                @change="TypeChange"
              >
                <el-option
                  v-for="item in Type"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>

            <el-form-item v-if="LiftTypeShow" label="电梯类别" prop="category" class="LiftRow">
              <el-select
                v-model="AddLift.category"
                filterable
                placeholder="选择电梯类别"
                @change="LiftTypeChange"
              >
                <el-option
                  v-for="item in Lifttype"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备安装地址"
              prop="devicePosition"
              class="LiftRow"
            >
              <el-input v-model="AddLift.devicePosition" placeholder="输入安装地址"></el-input>
            </el-form-item>
          </el-row>

          <el-row justify="space-around" class="mb20">
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备注册代码"
              prop="registrationCode"
              class="LiftRow"
            >
              <div class="code-input-main">
                <div
                  class="code-input-main-item"
                  v-for="(item,index) in codeList"
                  :key="index" 
                  :style="{borderBottomColor:(index<4)?'red':(index<10?'#9C27B0':(index<16?'blue':'#323232'))}"
                >{{AddLift.registrationCode[index] ||''}}</div>
                <input class="code-input-input" v-model="AddLift.registrationCode" :disabled="addLift==1?false:true" @blur="preJudgment" maxlength="20" />
              </div>
              <!-- <el-input v-model="AddLift.registrationCode" placeholder="输入注册代码" :disabled="addLift==1?false:true" @blur="preJudgment"></el-input> -->
            </el-form-item>
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备品种"
              prop="DevKind"
              class="LiftRow"
            >
              <span v-text="AddLift.DevKind"></span>
            </el-form-item>
            <el-form-item
              v-if="LiftTypeShow&&InputShow" 
              label="设备内部编号"
              prop="useCompanyCode"
              class="LiftRow"
            >
              <el-input v-model="AddLift.useCompanyCode" placeholder="输入设备内部编号 "></el-input>
            </el-form-item>
          </el-row>

          <el-row v-if="addLift==1" justify="space-around" class="mb20" >
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="确认注册代码"
              prop="registrationCodes"
              class="LiftRow"
            >
              <el-input v-model="AddLift.registrationCodes" placeholder="再次输入注册代码"></el-input>
            </el-form-item>

            <el-form-item v-if="LiftTypeShow&&InputShow" label="设备用途" prop="deviceUsage" class="LiftRow">
              <el-select placeholder="选择设备用途" v-model="AddLift.deviceUsage" class="siteel-select">
                <el-option
                filterable
            clearable
                  v-for="item in Usageoptions"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
            

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备安装日期"
              prop="installDate"
              class="LiftRow"
            >
              <el-date-picker
                type="date"
                placeholder="选择设备安装日期"
                v-model="AddLift.installDate"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>
            
            
          </el-row>

          <el-row justify="space-around" class="mb20">
                    
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="电梯载重(kg)"
              prop="ratedLoad"
              class="LiftRow"
            >
              <el-input v-model="AddLift.ratedLoad" placeholder="输入电梯载重"></el-input>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="提升高度m"
              prop="promoteHeight"
              class="LiftRow"
            >
              <el-input v-model="AddLift.promoteHeight" placeholder="输入提升高度"></el-input>
            </el-form-item>
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="额定速度(m/s)"
              prop="ratedSpeed"
              class="LiftRow"
            >
              <el-input v-model="AddLift.ratedSpeed" placeholder="输入额定速度"></el-input>
            </el-form-item>

            

            
          </el-row>

          <el-row
            justify="space-around"
            class="mb20"
            v-if="LiftTypeShow&&InputShow&&LiftBoxShow==2"
          >
            <el-form-item label="梯级宽度" prop="stepWidth" class="LiftRow">
              <el-input v-model="AddLift.stepWidth" placeholder="输入梯级宽度"></el-input>
            </el-form-item>

            <el-form-item label="人行道长度m" prop="sidewalkLength" class="LiftRow">
              <el-input v-model="AddLift.sidewalkLength" placeholder="输入人行道长度"></el-input>
            </el-form-item>

            <el-form-item label="倾斜角度 °" prop="tiltAngle" class="LiftRow">
              <el-input v-model="AddLift.tiltAngle" placeholder="输入倾斜角度"></el-input>
            </el-form-item>
          </el-row>

          <el-row justify="space-around" class="mb20" v-if="LiftTypeShow&&InputShow&&LiftBoxShow==1">
            <el-form-item  label="层站门" prop="layerStationDoor" class="LiftRow">
              <el-input v-model="AddLift.layerStationDoor" placeholder="输入层站门"></el-input>
            </el-form-item>

            <el-form-item  label="安全钳类型" prop="clampType" class="LiftRow">
              <el-select placeholder="选择安全钳类型" v-model="AddLift.clampType" class="siteel-select">
                <el-option
                  v-for="item in safetyClampTypes"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-row>

          <el-row justify="space-around" class="mb20">
            <el-form-item v-if="LiftTypeShow&&InputShow" label="品牌" prop="liftBrand" class="LiftRow">
              <el-select
                placeholder="选择品牌"
                filterable
                v-model="AddLift.liftBrand"
                class="siteel-select"
              >
                <el-option
                filterable
            clearable
                  v-for="item in BrandList"
                  :key="item.code"
                  :label="item.name"
                  :value="item.code"
                ></el-option>
              </el-select>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="年检日期"
              prop="annualInspectionDate"
              class="LiftRow"
            >
              <el-date-picker
                type="month"
                placeholder="选择年检日期"
                v-model="AddLift.annualInspectionDate"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>
          </el-row>

          <el-row v-if="LiftTypeShow&&InputShow" justify="space-around" class="mb20">
            <el-form-item  class="LiftRowBtn">
              <el-button style="padding:5px 10px" type="primary" :icon="InputShowBtn?'el-icon-arrow-down':'el-icon-arrow-up'" @click="InputShowBtn=!InputShowBtn">{{InputShowBtn?'收起':'显示更多'}}</el-button>
            </el-form-item>
          </el-row>
          <el-row v-if="InputShowBtn" justify="space-around" class="mb20">
            <el-form-item v-if="LiftTypeShow&&InputShow" label="设备型号" prop="liftModel" class="LiftRow">
              <el-input v-model="AddLift.liftModel" placeholder="输入设备型号"></el-input>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备出厂编号"
              prop="factoryCode"
              class="LiftRow"
            >
              <el-input v-model="AddLift.factoryCode" placeholder="输入出厂编号"></el-input>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备位置码"
              prop="devicePositionCode"
              class="LiftRow"
            >
              <el-input v-model="AddLift.devicePositionCode" placeholder="输入设备位置码"></el-input>
            </el-form-item>

            

            
          </el-row>

          <el-row v-if="InputShowBtn" justify="space-around" class="mb20">
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备制造商"
              prop="factory"
              class="LiftRow"
            >
              <el-input v-model="AddLift.factory" placeholder="输入设备制造商 "></el-input>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="进口设备代理商"
              prop="agency"
              class="LiftRow"
            >
              <el-input v-model="AddLift.agency" placeholder="输入进口设备代理商 "></el-input>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备安装单位"
              prop="installCompany"
              class="LiftRow"
            >
              <el-input v-model="AddLift.installCompany" placeholder="输入设备安装单位 "></el-input>
            </el-form-item>

            
          </el-row>

          <el-row v-if="InputShowBtn" justify="space-around" class="mb20">
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备出厂日期"
              prop="manufactureDate"
              class="LiftRow"
            >
              <el-date-picker
                type="date"
                placeholder="选择设备出厂日期"
                v-model="AddLift.manufactureDate"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备改造单位"
              prop="reformCompany"
              class="LiftRow"
            >
              <el-input v-model="AddLift.reformCompany" placeholder="输入设备改造单位"></el-input>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="设备改造日期"
              prop="reformDate"
              class="LiftRow"
            >
              <el-date-picker
                type="date"
                placeholder="选择设备改造日期"
                v-model="AddLift.reformDate"
                value-format="yyyy-MM-dd"
              ></el-date-picker>
            </el-form-item>
          </el-row>

          

          <el-row v-if="LiftTypeShow&&InputShow&&LiftBoxShow==1&&InputShowBtn" justify="space-around" class="mb20">
            <el-form-item
              
              label="显示楼层"
              prop="innerFloor"
              class="LiftRow"
            >
              <el-input type="number" v-model="AddLift.innerFloor" placeholder="输入显示楼层 "></el-input>
            </el-form-item>

            <el-form-item
              
              label="控制方式"
              prop="controlType"
              class="LiftRow"
            >
              <el-input v-model="AddLift.controlType" placeholder="输入控制方式"></el-input>
            </el-form-item>

            <el-form-item  label="门锁型号" prop="lockModel" class="LiftRow">
              <el-input v-model="AddLift.lockModel" placeholder="输入门锁型号 "></el-input>
            </el-form-item>

            
          </el-row>

          <el-row v-if="InputShowBtn" justify="space-around" class="mb20">
            <el-form-item v-if="LiftTypeShow&&InputShow" label="自定义编号" prop="customNumber" class="LiftRow">
              <el-input v-model="AddLift.customNumber" placeholder="输入自定义编号 "></el-input>
            </el-form-item>
            

            
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="电动机功率kw"
              prop="motorPower"
              class="LiftRow"
            >
              <el-input v-model="AddLift.motorPower" placeholder="输入电动机功率"></el-input>
            </el-form-item>
            <el-form-item
              :xs="8"
              :sm="8"
              :md="8"
              :lg="8"
              v-if="LiftTypeShow&&InputShow&&(CategoryShow==1||CategoryShow==3)"
              label="钢带"
              prop="steelBelt"
              class="LiftRow"
            >
              <el-input v-model="AddLift.steelBelt" type="number" placeholder="输入钢带"></el-input>
            </el-form-item>
            <el-form-item
              v-if="LiftTypeShow&&InputShow&&CategoryShow==2"
              label="液压满负荷值(MPa)"
              prop="mpa"
              class="LiftRow"
            >
              <el-input v-model="AddLift.mpa" type="number" placeholder="输入液压满负荷值"></el-input>
            </el-form-item>
          </el-row>

          
          <el-row
            justify="space-around"
            class="mb20"
            v-if="LiftTypeShow&&InputShow&&CategoryShow==2&&InputShowBtn"
          >
            <el-form-item label="油缸型式" prop="cylinderType" class="LiftRow">
              <el-input v-model="AddLift.cylinderType" placeholder="输入油缸型式"></el-input>
            </el-form-item>

            <el-form-item label="油缸数量" prop="cylinderNum" class="LiftRow">
              <el-input v-model="AddLift.cylinderNum" type="number" placeholder="输入油缸数量"></el-input>
            </el-form-item>

            <el-form-item label="顶升型式" prop="topType" class="LiftRow">
              <el-input v-model="AddLift.topType" placeholder="输入顶升型式"></el-input>
            </el-form-item>
          </el-row>

          <el-row v-if="InputShowBtn" justify="space-around" class="mb20">

            <el-form-item
              v-if="LiftTypeShow&&InputShow&&CategoryShow==1"
              label="曳引轮直径"
              prop="pulleyDiameter"
              class="LiftRow"
            >
              <el-input v-model="AddLift.pulleyDiameter" placeholder="输入曳引轮直径 "></el-input>
            </el-form-item>

            <el-form-item
              v-if="LiftTypeShow&&InputShow&&CategoryShow==1"
              label="曳引绳根数"
              prop="ropeNum"
              class="LiftRow"
            >
              <el-input v-model="AddLift.ropeNum" type="number" placeholder="输入曳引绳根数"></el-input>
            </el-form-item>
            <el-form-item
              v-if="LiftTypeShow&&InputShow"
              label="备注"
              prop="remarks"
              class="LiftRowRemark"
            >
              <el-input type="textarea" v-model="AddLift.remarks"></el-input>
            </el-form-item>
          </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogAddLift = false">取 消</el-button>
          <el-button v-if="addLift==1" type="primary" @click="submitLift('LiftForm')">确 定</el-button>
          <el-button v-if="addLift==2" type="primary" @click="submitEditLift('LiftForm')">确 定</el-button>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import QRCode from 'qrcode'
export default {
  components: {},
  name: "Lift",
  props: {
    codeLength: {
      default: 20,
      type: Number
    }
  },
  data() {
    var validateTiltAngle = (rule, value, callback) => {
      if (value > 360) {
        return callback(new Error("输入最大倾斜度值不能超过360"));
      } else {
        return callback();
      }
    };

    const _initLiftForm = Lift => {
      const _AddLift = {
        liftType: "",
        category: "",
        registrationCode: "",
        registrationCodes:"",
        devicePositionCode: "",
        liftModel: "",
        useCompanyCode: "",
        agency: "",
        reformDate: "",
        installDate: "",
        innerFloor: "",
        controlType: "",
        deviceUsage: "",
        promoteHeight: "",
        clampType: "",
        lockModel: "",
        layerStationDoor: "",
        pulleyDiameter: "",
        ropeNum: "",
        steelBelt: "",
        cylinderType: "",
        cylinderNum: "",
        topType: "",
        mpa: "",
        stepWidth: "",
        tiltAngle: "",
        sidewalkLength: "",
        liftBrand: "",
        ratedLoad: "",
        devicePosition: "",
        annualInspectionDate: "",
        ratedSpeed: "",
        motorPower: "",
        factoryCode: "",
        manufactureDate: "",
        reformCompany: "",
        installCompany: "",
        factory: "",
        customNumber: "",
        remarks: "",
        DevKind:""//品种
      };

      _AddLift.liftType = Lift.liftType;
      this.TypeChange(Lift.liftType);
      _AddLift.category = Lift.category;
      this.LiftTypeChange(Lift.category);
      _AddLift.registrationCode = Lift.registrationCode;
      _AddLift.devicePositionCode = Lift.devicePositionCode;
      _AddLift.liftModel = Lift.liftModel;
      _AddLift.useCompanyCode = Lift.useCompanyCode;
      _AddLift.agency = Lift.agency;
      _AddLift.reformDate = Lift.reformDate?Lift.reformDate.substring(0, 10):Lift.reformDate;
      _AddLift.installDate = Lift.installDate?Lift.installDate.substring(0, 10):Lift.installDate;
      _AddLift.innerFloor = Lift.innerFloor;
      _AddLift.controlType = Lift.controlType;
      _AddLift.deviceUsage = Lift.deviceUsage;
      _AddLift.promoteHeight = Lift.promoteHeight;
      _AddLift.clampType = Lift.clampType;
      _AddLift.lockModel = Lift.lockModel;
      _AddLift.layerStationDoor = Lift.layerStationDoor;
      _AddLift.pulleyDiameter = Lift.pulleyDiameter;
      _AddLift.ropeNum = Lift.ropeNum;
      _AddLift.steelBelt = Lift.steelBelt;
      _AddLift.cylinderType = Lift.cylinderType;
      _AddLift.cylinderNum = Lift.cylinderNum;
      _AddLift.topType = Lift.topType;
      _AddLift.mpa = Lift.mpa;
      _AddLift.stepWidth = Lift.stepWidth;
      _AddLift.tiltAngle = Lift.tiltAngle;
      _AddLift.sidewalkLength = Lift.sidewalkLength;
      _AddLift.liftBrand = Lift.liftBrand;
      _AddLift.ratedLoad = Lift.ratedLoad;
      _AddLift.devicePosition = Lift.devicePosition;
      _AddLift.annualInspectionDate = Lift.annualInspectionDate;
      _AddLift.ratedSpeed = Lift.ratedSpeed;
      _AddLift.motorPower = Lift.motorPower;
      _AddLift.factoryCode = Lift.factoryCode;
      _AddLift.manufactureDate = Lift.manufactureDate?Lift.manufactureDate.substring(0, 10):Lift.manufactureDate;
      _AddLift.reformCompany = Lift.reformCompany;
      _AddLift.installCompany = Lift.installCompany;
      _AddLift.factory = Lift.factory;
      _AddLift.customNumber = Lift.customNumber;
      _AddLift.remarks = Lift.remarks;
      _AddLift.DevKind = Lift.DevKind;

      console.log(_AddLift);
      return _AddLift;
    };

    var checkRe = (rule, value, callback) => {
      if (value === "") {
        callback(new Error("请再次输入注册代码"));
      } else if (value !== this.AddLift.registrationCode) {
        callback(new Error("两次输入注册代码不一致!"));
      } else {
        callback();
      }
    };

    return {
      codeList: [],
      code: "",
      LiftFormRule: {
       registrationCode: [
          { required: true, message: "注册代码不能为空", trigger: "blur" },
          { min: 10, message: "注册代码至少为10个字符", trigger: "blur" }
        ],
        registrationCodes:[{ validator: checkRe, trigger: "blur" }],
        lockModel: [
          { max: 20, message: "输入最大长度不能超过20个字符", trigger: "blur" }
        ],
        tiltAngle: [
          { required: true, message: "倾斜角度不能为空", trigger: "blur" },
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          },
          // { validator: validateTiltAngle, trigger: "blur" }
        ],
        stepWidth: [
          { required: true, message: "梯级宽度不能为空", trigger: "blur" },
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          }
        ],
        sidewalkLength: [
          { required: true, message: "人行道长度不能为空", trigger: "blur" },
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          },
          // { max: 20, message: "输入最大长度不能超过20个字符", trigger: "blur" }
        ],
        // ropeNum: [
        //   {
        //     pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
        //     message: "输入值必须是数字",
        //     trigger: "blur"
        //   }
        // ],
        pulleyDiameter: [
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          }
        ],
        clampType: [
          { required: true, message: "请至少选择一项", trigger: "blur" }
        ],
        ratedLoad: [
          { required: true, message: "电梯载重不能为空", trigger: "blur" },
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          }
        ],
        layerStationDoor: [
          { required: true, message: "层站门不能为空", trigger: "blur" }
        ],
        factoryCode: [
          { max: 20, message: "最多只能输入20位字符", trigger: "blur" }
        ],
        promoteHeight: [
          { required: true, message: "提升高度不能为空", trigger: "blur" },
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          }
        ],
        motorPower: [
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          }
        ],
        deviceUsage: [
          { required: true, message: "设备用途不能为空", trigger: "blur" }
        ],
        devicePosition: [
          { required: true, message: "设备安装地址不能为空", trigger: "blur" }
        ],
        annualInspectionDate: [
          { required: true, message: "日期不能为空", trigger: "blur" }
        ],
        remarks: [
          {
            max: 200,
            message: "最大输入长度200个字符，请修改输入",
            trigger: "blur"
          }
        ],
        installDate:[
          { required: true, message: "设备安装日期不能为空", trigger: "blur" }
        ],
        liftType: [{ required: true, message: "请至少选择一项", trigger: "blur" }],
        category: [
          { required: true, message: "请至少选择一项", trigger: "blur" }
        ],
        // cylinderNum: [
        //   {
        //     pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
        //     message: "输入值必须是数字",
        //     trigger: "blur"
        //   }
        // ],
        // mpa: [
        //   {
        //     pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
        //     message: "输入值必须是数字",
        //     trigger: "blur"
        //   }
        // ],
        // steelBelt: [
        //   {
        //     pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
        //     message: "输入值必须是数字",
        //     trigger: "blur"
        //   }
        // ],
        useCompanyCode: [
          { required: true, message: "设备内部编号不能为空", trigger: "blur" }
        ],
        ratedSpeed:[
          { required: true, message: "额定速度不能为空", trigger: "blur" },
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          }
        ],
        liftBrand: [{ required: true, message: "请至少选择一项", trigger: "blur" }],
      },
      activeName: "first",
      relevanceIdLift:"",
      handleClose: null,
      pagesize: 10,
      currpage: 1,
      Emergencypagesize: 10,
      Emergencycurrpage: 1,
      
      LiftSearch: {
        Region: "",
        RegionProject: "",
        ProjectLift: "",
        Worker: "",
        registrationCode:"",
        liftBrand:""
      },
      RegionList: [
        {
          ID: 10011312844,
          Name: "泛海国际"
        },
        {
          ID: 10011312847,
          Name: "测试-武汉光谷"
        }
      ],
      RegionProjectList: [
        {
          ID: 1001104125705,
          Name: "香海园"
        },
        {
          ID: 1001104125706,
          Name: "云海园"
        }
      ],
      ProjectLiftList: [
        {
          ID: 1001105202111,
          Name: "二栋一楼(9876543210)"
        },
        {
          ID: 1001105202112,
          Name: "二栋十楼(8888888888)"
        }
      ],
      preLiftID:"",
      preSumbitID:"",
      WorkerList: [
        {
          Name: "李清",
          UserID: 1001101131068
        },
        {
          Name: "彭丹",
          UserID: 1001101131069
        }
      ],
      BrandList: [],
      LiftData: [],
      LiftDataLoad:false,
      liftStatus: 1,
      //电梯分页
      Liftpagesize: 10,
      Liftcurrpage: 1,
      LiftTotal: 10,
      //维保，急修，年检记录
      dialogMaintenanceHestory: false,
      MHEID:'',
      MHEProjectId:'',
      MaintenanceHestorytableTotal:10,
      dialogEmergencyHestory: false,
      EHID:'',
      EHProjectid:'',
      EmergencyHestorytableTotal:10,
      dialogInspectionHestory: false,
      IHID:'',
      IHProjectId:'',
      dialogLiftHestory: false,
      LiftHestoryId:'',
      LiftHestorytable:[],
      LiftHestoryLoad:false,
      LiftHestorypagesize:10,
      LiftHestorytableTotal:10,
      LiftHestorycurrpage:1,
      MaintenanceHestorytable: [
        {
          CreateDate: "/Date(1565268787000)/",
          DealDate: null,
          DealName: null,
          IsPass: 0,
          IsRegular: 0,
          IsRepair: 0,
          IsStandard: 0,
          LiftCode: "ZT000020",
          LiftID: 1001105202183,
          LiftPosition: "1",
          LiftStatus: 2,
          LiftType: 0,
          LiftWorkerID: 0,
          LiftWorkerName: null,
          MRStatus: 0,
          MRTime: "0天0小时0分钟",
          MTAdvice: "123456",
          MTCode: "ZT0000200000",
          MTCompanyID: 1001102110557,
          MTType: 1,
          MaintenancePlanID: 0,
          MaintenanceRecordID: 10011091049211,
          PlanDate: "/Date(1565193600000)/",
          Position: "江夏区杨桥湖大道保利清能·西海岸",
          PrevWorkDate: null,
          ProjectCode: "XM000014",
          ProjectID: 1001104125725,
          ProjectName: "测试流程003-X",
          Reason: null,
          RecoveryDate: "2019/8/8 20:53:58",
          RegistrationCode: "1234567890",
          Status: 4,
          StopDate: "2019/8/8 20:53:07",
          WorkDate: "/Date(1565268838000)/",
          WorkerID: 1001101131139,
          WorkerName: "杨"
        }
      ],
      EmergencyHestorytable: [
        {
          ArriveTime: "/Date(1565087700000)/",
          AssignTime: "/Date(1565105700000)/",
          CallerDate: "/Date(1565073300000)/",
          CallerFaultDescription: "",
          CallerName: "1111",
          CallerTel: "1111       ",
          Coordinate: "114.417563,30.406007",
          CreateDate: "/Date(1565073337000)/",
          CreatorName: "黄龙山",
          EmergencyRepairID: 1001111107968,
          IsCritical: 0,
          IsTrapped: 0,
          LiftCode: "ZT000015",
          LiftID: 1001105202148,
          LiftStatus: 2,
          Position: "光谷",
          ProjectName: "鑫伴月测试",
          ProjectUser: null,
          RecoveryDate: "/Date(1565159760000)/",
          RecoveryTime: null,
          RegionID: 10011312847,
          RegionName: "测试-武汉光谷",
          RegistrationCode: "34rehd53453",
          RepairReason: 0,
          Source: 2,
          Status: 4,
          StopDate: "/Date(1565076900000)/",
          StopTime: null,
          TakingTime: "/Date(1565105700000)/",
          WorkerID: 1001101131132,
          WorkerName: "黄龙山"
        }
      ],
      EmergencyHestorytableLoad:false,
      MaintenanceHestorytableLoad:false,
      InspectionHestorytableLoad:false,
      Maintenancepagesize:10,
      Maintenancecurrpage:1,
      Inspectionpagesize:10,
      InspectionHestorytableTotal:10,
      Inspectioncurrpage:1,
      InspectionHestorytable: [
        {
          AdminName: "彭丹",
          AnnualInspectionDate: null,
          AnnualInspectionID: 1001112228260,
          CertificateImgUrl:
            "http://edtyun.cc/AnnualInspection/201908/6/mr_201908061747061936d3c70e914274a283e5c7f086d33b.jpg?x-oss-process=image/quality,q_60/auto-orient,0",
          CreateDate: "2019-08",
          CreateId: 0,
          FileUrl: null,
          FinishTime: "2019-08",
          GovernerID: null,
          GovernerVersion: null,
          InspectUrl: "",
          Inspector: "111",
          IsCheckGoverner: 1,
          IsLoad: 0,
          IsPass: 0,
          LiftCode: "ZT000017",
          LiftID: 1001105202177,
          LiftPosition: "武汉市江夏区",
          LiftStatus: 2,
          MTCompanyID: 1001102110557,
          NextInspectionTime: "2020-08",
          NextIsCheckGoverner: 0,
          NextIsLoad: 0,
          Operator: "222",
          PlanDate: "2019-08",
          ProjectCode: "XM000011",
          ProjectName: "流程测试",
          RegionName: "测试-武汉光谷",
          RegistrationCode: "1111111111111",
          SelfUrl: "",
          Status: 1,
          Telephone: "333333",
          Type: 0,
          UseCompanyCode: "23232424142423",
          WorkerName: null
        }
      ],
      dialogpolicy: false,
      unshowHeader: false,
      IsshowTime:'',
      policyRow: {
        EAdvice: "132",
        EImgUrl:
          "http://edtyun.cc/Evaluation/10011091049211/file1.jpg?x-oss-process=image/quality,q_60/auto-orient,0",
        EType: 2,
        EUserName: "",
        EUserPhone: "",
        IsRepair: 0,
        LiftCategory: 2,
        LiftCode: "ZT000020",
        LiftPosition: "1",
        LiftType: 1,
        MTAdvice: "123456",
        MTCode: "ZT0000200000",
        MTCompanyName: "科技团队",
        MTImgList: null,
        MTOption:
          "278:1,279:1,280:1,281:1,282:1,283:1,284:1,289:1,307:1,285:1,286:1,287:1,290:1,291:1,292:1,293:1,294:1,295:1,296:1,297:1,299:1,300:1,301:1,302:1,303:1,288:1,298:1,304:1,305:1,306:1",
        MTType: 1,
        MaintenanceRecordID: 10011091049211,
        ManCost: 0,
        ManCostAll: "",
        PartsCost: "0.00",
        PartsCostAll: "",
        PlanDate: "2019-08-08",
        PlanItem: null,
        ProjectCode: "XM000014",
        ProjectID: 1001104125725,
        ProjectName: "测试流程003-X",
        RecoveryDate: "2019-08-08 20:53:58",
        RegistrationCode: "1234567890",
        SafetyConfirm: "1,1,1,1,1,1",
        ServiceLevel: "5",
        SignatureImg1:
          "http://edtyun.cc/MaintenanceRecord/10011091049211/80.jpg?x-oss-process=image/quality,q_60/auto-orient,0",
        SignatureImg2: "",
        Sparepart: "",
        SparepartAll: "",
        StarLevel: "5",
        Status: 4,
        StopDate: "2019-08-08 20:53:07",
        UseCompanyCode: "123",
        WorkDate: "2019-08-08",
        WorkerID: 0,
        WorkerName: "杨",
        WorkerTel: "15135779005"
      },
      policytable: [
        {
          Content: "清洁，室温符合要求，门窗完好，照明正常",
          Option: "机房环境",
          MTOption: "√"
        },
        {
          Content: "齐全，在指定位置",
          Option: "机房内手动泵操作装置",
          MTOption: "√"
        },
        {
          Content: "油量、油温正常，无杂质、无漏油现象",
          Option: "油箱",
          MTOption: "√"
        },
        {
          Content: "运行时无异常振动和异常声响",
          Option: "电动机",
          MTOption: "√"
        },
        {
          Content: "工作正常",
          Option: "层门和轿门旁路装置",
          MTOption: "√"
        },
        {
          Content: "无漏油现象",
          Option: "阀、泵、消音器、油管、表、接口等部件",
          MTOption: "√"
        }
      ],
      policyBottom: [
        {
          policyBottom1: "",
          policyBottom2: "",
          policyBottom3: "",
          policyBottom4: "",
          policyBottom5: "",
          policyBottom6: ""
        },
        {
          policyBottom1: "",
          policyBottom2: ""
        },
        {
          policyBottom1: "",
          policyBottom2: "",
          policyBottom3: "",
          policyBottom4: "",
          policyBottom5: "",
          policyBottom6: ""
        },
        {
          policyBottom1: "",
          policyBottom2: "",
          policyBottom3: "",
          policyBottom4: ""
        },
        {
          policyBottom1: "",
          policyBottom2: "",
          policyBottom3: "",
          policyBottom4: ""
        }
      ],
      dialogReLift:false,
      ReLiftId:"",
      RerelevanceId:"",
      //电梯急修单
      dialogRepairpolicy: false,
      RepairpolicyData: {
        Address: "武汉市洪山区光谷",
        Advice: "66666",
        ArriveTime: "2019/8/6 18:21:00",
        AssignTime: "2019/8/6 18:19:11",
        CallerDate: "2019/8/7 18:15:47",
        CallerFaultDescription: "电梯停止故障",
        CallerID: 0,
        CallerName: "离现身",
        CallerTel: "15387610613",
        Charge: "0.00",
        CreateDate: "2019/8/6 18:19:05",
        EImg1:
          "http://edtyun.cc/EmergencyRepair/1001111107972/80.jpg?x-oss-process=image/watermark,image_d2F0ZXJtYXJrLnBuZz94LW9zcy1wcm9jZXNzPWltYWdlL3Jlc2l6ZSxQXzMw,t_60/quality,q_60/auto-orient,0",
        EImg2:
          "http://edtyun.cc/EmergencyRepair/1001111107972/90.jpg?x-oss-process=image/watermark,image_d2F0ZXJtYXJrLnBuZz94LW9zcy1wcm9jZXNzPWltYWdlL3Jlc2l6ZSxQXzMw,t_60/quality,q_60/auto-orient,0",
        EType: 0,
        EUserName: "",
        EUserPhone: "",
        EmergencyRepairID: 1001111107972,
        FaultNature: "",
        FaultNatureObj: [
          {
            Code: "400000001",
            Code1: 0,
            Description1: "故障性质",
            Description2: "一般处理",
            Description3: null,
            Id: 101,
            LiftCatagory: 0
          }
        ],
        FaultParts: "",
        FaultPartsObj: [
          {
            Code: "100000101",
            Code1: 0,
            Description1: "故障部位和现象↵",
            Description2: "门系统",
            Description3: "异物卡阻导致开关门受阻，使电梯停止运行",
            Id: 1,
            LiftCatagory: 0
          }
        ],
        FaultReason: "",
        FaultReasonObj: [
          {
            Code: "200000304",
            Code1: 0,
            Description1: "故障原因",
            Description2: "其他原因",
            Description3: "垃圾、积垢",
            Id: 88,
            LiftCatagory: 0
          }
        ],
        FaultResponsibility: "",
        FaultResponsibilityObj: [
          {
            Code: "300000008",
            Code1: 0,
            Description1: "故障处理",
            Description2: "客户处理",
            Description3: null,
            Id: 98,
            LiftCatagory: 0
          }
        ],
        FieldDescription: "",
        ImgList: null,
        ImgUrl:
          "http://edtyun.cc/Evaluation/1001111107972/file1.jpg?x-oss-process=image/quality,q_60/auto-orient,0",
        IsCritical: 1,
        IsOnesely: 0,
        IsTrapped: 1,
        LiftCode: "ZT000019",
        LiftID: 1001105202179,
        LiftPosition: "武汉光谷",
        LiftType: 1,
        LiftUsage: "货梯",
        PartsCost: "0.00",
        PostDate: "2019/8/6 18:26:22",
        Procedure: "",
        ProcedureObj: [
          {
            Code: "300000002",
            Code1: 0,
            Description1: "故障处理",
            Description2: "清除",
            Description3: null,
            Id: 92,
            LiftCatagory: 0
          }
        ],
        ProjectCode: "XM000013",
        ProjectID: 1001104125720,
        ProjectName: "hy测试001-急修项目",
        ReadTime: "2019/8/6 18:19:11",
        RecoveryDate: "2019/8/6 18:24:00",
        RegistrationCode: "hy123456789",
        RepairReason: 99,
        SafetyConfirm: "1,1,1,1,1,1",
        ServiceLevel: 5,
        Source: 4,
        Sparepart: "",
        StarLevel: 5,
        Status: 5,
        StopDate: "2019/8/6 18:22:00",
        TakingTime: "2019/8/6 18:23:00",
        WebNum: 0,
        WorkerFaultDescription: null,
        WorkerID: 1001101131069,
        WorkerName: "彭丹",
        WorkerTel: "15927431528"
      },

      //年检合格证
      dialogInspectionPic: false,
      ContentList: [],
      CertificateImgUrl: "",
      LiftChoose: "",
      dialogQRCodeSContent: false,
      ContentData: [
        {
          Content: "12313213131231"
        },
        {
          Content: "泛海"
        },
        {
          Content: "李清,18627725857"
        },
        {
          Content: "打印时间： 2019-08-29"
        }
      ],
      ContentImgURL:'',
      // ContentImgURL:
      //   "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAACMCAYAAACuwEE+AAAKk0lEQVR4Xu2d23brOAxD0///6M7ymukcW46oDYTOSRP0NbIuJAiClJN+3W6379uFf9/f8+m/vr7+X5mOc7dK56fjtn3Mxu7PNY6jn7n7GOd37TV7bvNYAGMCN4DphmMRhdtSYZgjS7n22AP3qQxT0SDFEqVcl6rpPpRxHQanc4w2njmYjlPsqNhkP3a/x0NKCmCOrKcYOIBRrLUbG4apQUeZg44Lw/wHPhqxJq4Pj3WsReegQKDjXgowVEBVxlLKw5nz6RyVkekc4x5omq4Eq2PHcR/PFMSVHUsN4xy0SkmVESqmoM4OYM7pkDLf3v4BjFDeh2HODUlcJV3NMLPSze2iVizlUrqjkSgjrvTHLOq7CgsqAQIYeF3hgKUC+9isDGCG7u3KeGGYeae3So1hGAFoiqieAVJJGQ7LKPNTUUorUQVMvy4ldWgkt7qiYKJ7rKqMbiZVQEEB+bZVkuLAZ/ZQApg7aYJQmJIyqPOdKHH1k9JhJfZY9Z5moO5iEcd2dh/Gyd/uQelaFcgoo1ROVJp/FPAu+1wJSGrvsbJ7mdtqeoAAZv6m36pspzauAiqAWbzI1XFH9LYM4yKQVipuuqJOo+mkYx9V043uY2SEZ5bOrq+f+k5vh6NeyRkzB7/SHl1gzJ4LYIaLyXcDdQAz3AM56aoDFB+bkr7dWtSAbpejjKUPj1x9ZKfcXp3p6j2v1v/5/CuAoabi4wIYbqtyZBjGN+SvZxgnijqqh8rkdE/KPvbrKdceFBqzPXftkfaA6DntlESdU23YEawBjNbpDWAKxFAQd0VvR5oIwxQOVRxVsc+0qbT7Uj3tPlfd1nGOpKTbrUxJ1Gk0tYwOoBHqXji6jEMBSfdf6QMnZayAPJuT2rEaF8AsvoJCxeCjInd73gHgyJBVUAYwD3zfyInsjpREnUYB+HTA7H9QqENj0DQwRpTSo6GUSyO2O6UqNpgBo9r735wff1WWgkk5jHudH8D8+ak3hYkoq5YaJgxT/xKWk0KUoAnDwNI2Kanmhl+Rktyy16XF7ui9wshXzElSaiUBFD/N9Jki4PdjyxeoqGgMYFwL8B9FdIKrakoGME0lthu9LmSc1zzdPdIio2oM2gzjCDuFsRwqdaOQOts5s9KQu3r/9JzVuABGsGIAc7sFMAGMYIHh8rGj21rlP2lnu8E09ypCbr8XeslK96+kFrq2y260z0PnP1w+BjD+BeAMgCuBGsAMFqLIraI3DOP/QnkYZugkUzCVyh/+N5OkpAdEr0PBbsqjjqroX9EV9GxO9NJLXArwlW2qgNo/S8fZVRI1KmWAjtQVwJzhQ4FAxwUwF3SIFRahopcGaEfQ4NcblMU6WtozSnTpWOkkOw7ouIh05+g4m8v2h+eqf+HnLKDcsgYwx9BwdRYNMMef29wBjFn6u+xAAyOAMX+Jk0bMqim2qiB+PqeCO4B5oKymRqbRRUHiprxqH5XwdEQpPQsF9COB4dz6l/unGmacJIDx3O3YLYARbU0ZgE57ddn71gyz/0Eh5bZ3FilK+ecAQUlJyl5mTn7FPXawFA2uU2YJYGrTBTBD6R/ABDAK2+D3Ya4QvbQCof0Jl6ppueyOc/ZF1xoba5Wf3BS9338AI9wlUScqOmsW3XStAOaOBcMwg44o3gkKwyy6xfRavsrTNJrdcW+Vkmjjjr78pPQ49k6kRnXzMO2NuPO7+3efo0KV6kRqH/w+TADDqymFzQIY4X8BhGH4y90dzNcxh/3fTGaLd3SLK+VPBbDSBqCG7FibpmxlLdpcpOesbBfACD9GqDhxxp4BzADHMMxZwTgMoIDTmZ+K5m3coXFXVUmKePsZG8C8OWDoXZJbJdFyTUH8fiztjTjgH6NrnINqAoUtiB2oL0Yt6FZk1tUA3SQ14soZxHCVOFbmd0FHzxrAFP8nkRpRcegV7NDBUvSsbwsYGtWjs69oz8+EnKuRKIvQcS7dV2mNdmVpalH8WQXQNCUpC1CH0jndcpM6uHtcAEM9+9+4AGb+C5iKKWfsTAGurEXHVsHb8h/ZkpJ4i/+tUlK3OBuNo+iP/bO0MUWdQSOta5wTUFWUu+d0Rfph/1UfhlYS1LABDGeiAObOi1AO4q8wJAW8O+4jGcalQcpStDHY4bQqVSpi0xGs1f6pJFCYmpbq1K7lS+DVJB1RM9MpXSWrA9YApoZOADOkygBGAIxLl1Uku5RIn6MVlAKE2Xloh/WKtSpGdz5TtOAhE+yrpADmbIGrUy8FpwOKKrUHMHfenHNY6tniPoAxXwLvqFzofVS1VgDzgIahEVpVO7RSoWVdh7MVOqapwK34nNKcaqkxJVEbV/OXd0kBTH3BOBO3Sk8pgCn+qyzt7NJI2MY5za4wzCLtFD7E33ykFZQCCoVaZ+s7KcNNa/Q5paymDOMEhqLHqN8CGIGlApgHfnZ1JvIoUlfphKalMAx/kavFVvTXG5KSzhaYpYmPTUlVSUz1h8I4pDzvnq/K8ysWpPqDBls1roMdKGuX+6XffFQqi47eixO93Y4JYO6wagBzNIoSGB/PMErupSziNP9Wke1Qq5vKHNZyryjoWspZHKYuO717hglgNChSZ7hBc2Ul6vr60IdxJ6HPdUSG5tI/o5W16RofCRj3fZhKtVODXwG02dodnVJaxdDUso2jOsh9UcwBdbn/AIY3vgKY2w1/81G5gQ3DzC1A7agIZ8o+HX21AKZICxT4Y2pJSmq6oFN6HIqzfsZSTTTO3f0cZRHnjKtn6FmUImB/HpthOvow9HphZaQAhlWDbnkfwAwIpFFJmemtGYZeDVTGokyhpCRablK94ILCEYquYKVVGLU3ZeaqvD99FsD0/6JCAHMHqk7jLgxz7PlsZqVs4dg7DCP8zPvojKSkGj4VIA+f0U6vgtbZWBpNil5SykNyBnqFQLXTak1Hq1WiumtfUx8GMEfTBDA1xHEfZhUp5PMwzNlKv45h3CqJAGRVrlUl6/4z2nC6mqo7dJDby3FLbgpIeh9l/7+kAIanMursWZCsbI0F6+4bjW7pH8CYpe3oxI50G8AIN8GU7um4MR12VA/K2itW+Pl8NqcCwL/GMB0lqnuP4jqDPkfHUY2hMAxdm9q/Q6vRPZ3OSV8CpxETwNSVUAW0AOaClKQwgFtd0eqNag4azb8eMDSPOjl0pTGcl5epY5SqhZab1AYuw1Bf0Eyg2Opwtiol0U1SYym5N4DpKdtnAApgFheTDvg3Y4dhhm9VPJNhKF1Wjnr2XY+yZ2dsxc4zLeUyNV2rbEEEMI6b+56hTqRpn2okyrhSWU0ndQ9Dm2mOUencfa73ZnLOFoa5Y+uZdkhKOr+lRwUsBefLpiTqfEd4Kp1Ypcye9V4oy1J2oOyu9KWqvhEFU/nrDXTT1FiKE2dzjtHU0ZwLYPj3ywOYhfTooHsnoGiwvhTDODKOUu6Kbdw2OdlzxVIK21B2q1JBd2ONVkluUYB/UIg4YhsTwNSWosxBmW1bjY7tCMIA5oEXqMIww/86oqxC1bdCgx3RQOnejfqPB4wDkNUzlC67xBsByRXv7KzsQD6n7QNXZ+2fU/wyva0mh1LHKBujB3pURAYwXPeMGumpL4GvKqMAZnPHv39XVHLUvlVA/QMzFFGIiDLnEgAAAABJRU5ErkJggg==",

      ////新增电梯
      //安全钳类型
      safetyClampTypes: [
        {
          value: 1,
          label: "瞬时式安全钳"
        },
        {
          value: 2,
          label: "渐进式安全钳"
        }
      ],
      //电梯维保负责人
      selWorker: [
        {
          value: 1001101131069,
          label: "彭丹"
        },
        {
          value: 1001101131132,
          label: "黄龙山"
        }
      ],
      //品牌列表
      BrandList: [
        {
          value: 1,
          label: "武汉东菱富士"
        },
        {
          value: 2,
          label: "华升富士达"
        }
      ],
      liftChoose: [],
      AddLift: {},
      dialogAddLift: false,
      initLiftForm(Lift) {
        this.AddLift = _initLiftForm(Lift);
      },
      
      //电梯类型
      Type: [
        {
          value: 1,
          label: "直梯"
        },
        {
          value: 2,
          label: "扶梯"
        }
      ],
      //电梯类别
      Lifttype: [],
      //控制电梯类别出来
      LiftTypeShow: false,
      //控制电梯框出来
      InputShow: false,
      InputShowBtn: false,
      //控制不同类型的框出来
      CategoryShow: "",
      //控制直梯扶梯出来
      LiftBoxShow: "",
      //停保电梯数量
      StopLiftNum: "",
      //用途列表
      Usageoptions: [
        {
          value: 11,
          label: "货梯"
        },
        {
          value: 12,
          label: "客梯"
        },
        {
          value: 13,
          label: "医梯"
        },
        {
          value: 14,
          label: "观光梯"
        },
        {
          value: 15,
          label: "杂物梯"
        },
        {
          value: 16,
          label: "别墅梯"
        },
        {
          value: 21,
          label: "扶梯"
        },
        {
          value: 22,
          label: "人行道"
        }
      ],
      mark:0,
      addLift:"",
      CompanyNameCode:JSON.parse(sessionStorage.getItem("companyID")).name,
      CompanyNamePhone:JSON.parse(sessionStorage.getItem("companyID")).telephone,
      LiftBtn:{
        LiftBtn79:0,
        LiftBtn80:0,
        LiftBtn81:0,
        LiftBtn82:0,
        LiftBtn83:0,
        LiftBtn84:0,
        LiftBtn85:0,
        LiftBtn86:0,
      }
    };
  },
  mounted() {
    console.log(this.$store);
    // 定义一个数组用于循环
    this.codeList = new Array(this.codeLength).fill("");

  },
  watch: {
    // 截取字符长度
    code() {
      if (this.AddLift.registrationCode.length > this.codeLength) {
        this.AddLift.registrationCode = this.AddLift.registrationCode.substring(0, this.codeLength);
      }
    }
  },
  created() {
    this.getRegionList()
    this.getprojectList()
    this.showBrandList()
    this.showLiftList(1, 1, 10);
    this.LiftData = [
      
    ];

    var LiftBtn = {}
    this.getButton(77).then(result => {
      if (result.data.statusCode==="1") {
        LiftBtn = result.data.data
        LiftBtn.map((item)=>{
          if(item.id==79){
            this.LiftBtn.LiftBtn79 = item.checked?1:0 
          }else if(item.id==80){
            this.LiftBtn.LiftBtn80 = item.checked?1:0  
          }else if(item.id==81){
            this.LiftBtn.LiftBtn81 = item.checked?1:0  
          }else if(item.id==82){
            this.LiftBtn.LiftBtn82 = item.checked?1:0  
          }else if(item.id==83){
            this.LiftBtn.LiftBtn83 = item.checked?1:0  
          }else if(item.id==84){
            this.LiftBtn.LiftBtn84 = item.checked?1:0  
          }else if(item.id==85){
            this.LiftBtn.LiftBtn85 = item.checked?1:0  
          }else if(item.id==86){
            this.LiftBtn.LiftBtn86 = item.checked?1:0  
          }
        })
        console.log(this.LiftBtn.LiftBtn56)
      }
    });
  },
  methods: {
    getCode() {
      return this.AddLift.registrationCode;
    },
    //显示电梯列表
    showLiftList(liftStatus, pageNum, pageSize) {
      this.LiftDataLoad = true;
      var url = "business/lift/list";
      var param = {
        liftStatus: liftStatus,
        pageNum: pageNum,
        pageSize: pageSize,
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId'))
      };
      this.LiftSearch.Region?(param.regionId=this.LiftSearch.Region):""
      this.LiftSearch.RegionProject?(param.projectId=this.LiftSearch.RegionProject):""
      this.LiftSearch.ProjectLift?(param.liftType=this.LiftSearch.ProjectLift):""
      this.LiftSearch.liftBrand?(param.liftBrand=this.LiftSearch.liftBrand):""
      this.LiftSearch.registrationCode?(param.registrationCode=this.LiftSearch.registrationCode):""
      
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.LiftDataLoad = false
        if(data.statusCode==="1"){
          this.LiftData = data.data.rows
          this.LiftTotal = data.data.total;
        }else if(data.statusCode==="9"){
          this.LiftData = []
          this.LiftTotal = 0;
        }else{
          this.$message.error(data.message);
        }
      
      }).catch((e) => {
          console.log(e)
          
        });
    },
    //获取区域下拉框数据
    getRegionList(){
      var url = "enterprise/region/project/regions";
      var param = {
        mtCompanyId: JSON.parse(sessionStorage.getItem('mtCompanyId'))
        // mtCompanyId:1001102100031
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.RegionList = data.data?data.data:[]
        }
       
        console.log(data.data)
      })
    },
    //电梯分页
    // 分页页码
    LiftClick(val) {
      this.Liftcurrpage = val;
      this.showLiftList(this.liftStatus, val, this.Liftpagesize);
      console.log(1);
    },
    // 分页显示条数
    LifthandleSizeChange(val) {
      this.Liftpagesize = val;
      this.showLiftList(this.liftStatus, this.Liftcurrpage, val);
      console.log(2);
    },
    handleClick(tab, event) {
      console.log(tab.$el.id, event);
      if (tab.$el.id == "pane-first") {
        this.liftStatus = 1;
        this.showLiftList(this.liftStatus, this.Liftcurrpage, this.Liftpagesize);
      } else if (tab.$el.id == "pane-second") {
        this.liftStatus = 0;
        this.showLiftList(this.liftStatus, this.Liftcurrpage, this.Liftpagesize);
      }
    },
    // 保养电梯信息选中
    LifthandleSelectionChange(val) {
      this.LiftChoose = val;
      console.log(val.length, this.LiftChoose);
    },
    // 分页页码
    click(val) {
      this.currpage = val;
    },
    // 分页显示条数
    handleSizeChange(val) {
      this.pagesize = val;
    },
    // 分页页码
    Emergencyclick(val) {
      this.Emergencycurrpage = val;
      this.EmergencyHestoryList(this.Emergencypagesize,this.Emergencycurrpage)
    },
    // 分页显示条数
    EmergencyhandleSizeChange(val) {
      this.Emergencypagesize = val;
      this.EmergencyHestoryList(this.Emergencypagesize,this.Emergencycurrpage)
    },
    // 分页页码
    Maintenanceclick(val) {
      this.Maintenancecurrpage = val;
      this.MaintenanceHestoryList(this.Maintenancepagesize,this.Maintenancecurrpage)
    },
    // 分页显示条数
    MaintenancehandleSizeChange(val) {
      this.Maintenancepagesize = val;
      this.MaintenanceHestoryList(this.Maintenancepagesize,this.Maintenancecurrpage)
    },
    LiftHestoryhandleSizeChange(val){
      this.LiftHestorypagesize = val;
      this.showLiftHestorytable(this.LiftHestorycurrpage,this.LiftHestorypagesize)
    },
    LiftHestoryclick(val) {
      this.LiftHestorycurrpage = val;
      this.showLiftHestorytable(this.LiftHestorycurrpage,this.LiftHestorypagesize)
    },
    showLiftHestorytable(pageNum,pageSize){
      this.LiftHestoryLoad = true;
      var url = "business/lift/history/list";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftId: this.LiftHestoryId,
        pageNum: pageNum,
        pageSize: pageSize
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.LiftHestoryLoad=false;
        if(data.statusCode==="1"){
          this.LiftHestorytable = data.data?data.data.rows:[]
          this.LiftHestorytableTotal = data.data?data.data.total:0
        }else if(data.statusCode==="9"){
          this.LiftHestorytable = []
          this.LiftHestorytableTotal = data.data?data.data.total:0
        }else{
          this.$message.error(data.message);
        }
      });
    },
    // 分页页码
    Inspectionclick(val) {
      this.Inspectioncurrpage = val;
      this.InspectionHestoryList(this.Inspectionpagesize,this.Inspectioncurrpage)
    },
    // 分页显示条数
    InspectionhandleSizeChange(val) {
      this.Inspectionpagesize = val;
      this.InspectionHestoryList(this.Inspectionpagesize,this.Inspectioncurrpage)
    },
    exportExcel() {
      if (this.LiftChoose.length == 0) {
        this.$message({
          message: "请先选择电梯",
          type: "warning"
        });
      } else {
        var list = [];
        for(var i=0;i<this.LiftChoose.length;i++){
          list.push(this.LiftChoose[i].id,)
        }
        var url = "business/lift/export";
        var param = {
          ids: list
        };
        this.axios.post(url, param, { responseType: "arraybuffer" }).then(res => {
          const aLink = document.createElement("a");
          let blob = new Blob([res], { type: "application/vnd.ms-excel" });
          aLink.href = URL.createObjectURL(blob);
          aLink.setAttribute("download", "电梯列表" + ".xlsx");
          aLink.click();
        });
      }
      
    },
    
    //维保记录
    showMaintenanceHestory(row) {
      this.MHEID = row.id
      this.MHEProjectId = row.projectId
      this.MaintenanceHestoryList(10,1)
      this.dialogMaintenanceHestory = true;
    },
    MaintenanceHestoryList(pageSize,pageNum){
      this.MaintenanceHestorytableLoad = true
      var url = "business/maintenance/record/pageByLift";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftId:this.MHEID,
        projectId:this.MHEProjectId,
        pageSize:pageSize,
        pageNum:pageNum,
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.MaintenanceHestorytableLoad = false;
        if(data.statusCode==="1"){
          this.MaintenanceHestorytable = data.data.rows
          this.MaintenanceHestorytableTotal = data.data.total
        }else{
          this.$message.error(data.message);
        }
      })
    },
    //保养单中行列内容
    arraySpanMethod({ row, column, rowIndex, columnIndex }) {
      if (rowIndex === 1) {
        if (columnIndex === 1) {
          return [1, 5];
        }
      } else if (rowIndex === 3) {
        if (columnIndex === 1) {
          return [1, 2];
        } else if (columnIndex === 3) {
          return [1, 2];
        }
      } else if (rowIndex === 4) {
        if (columnIndex === 1) {
          return [1, 2];
        } else if (columnIndex === 3) {
          return [1, 2];
        }
      }
    },
    Relift(row){
      this.ReLiftId = row.id;
      this.RerelevanceId  = row.companyRelevanceId
      this.dialogReLift = true;
    },
    ReLiftSubmit(){
      var url = "business/lift/stop/recover";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftId:this.ReLiftId,
        relevanceId:this.RerelevanceId,
        operate:0
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.showLiftList(this.liftStatus, this.Liftcurrpage, this.Liftpagesize);
          this.dialogReLift = false;
          this.$message.success(data.message);
        }else{
          this.$message.error(data.message);
        }
      });
    },
    getSetList(){
      var url = "system/set/list";
      var param = {
        companyId:JSON.parse(sessionStorage.getItem('mtCompanyId'))
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if (data.statusCode === "1") {
          this.IsshowTime = data.data.sets.showTime;
        }
      });
    },
    //查看保养单
    showMaintenance(row) {
      this.getSetList()
      var url = "business/maintenance/record/one";
      var param = {
        id:row.id
      };
     
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.policyRow = data.data
          this.policyBottom[0].policyBottom1 = "保养建议";
          this.policyBottom[0].policyBottom2 = this.policyRow.maintenanceAdvice;
          this.policyBottom[0].policyBottom3 = "客户意见";
          this.policyBottom[0].policyBottom4 = this.policyRow.advice;
          this.policyBottom[0].policyBottom5 = "更换配件";
          this.policyBottom[0].policyBottom6 = this.policyRow.sparepart;
          this.policyBottom[1].policyBottom1 = "工作标记";
          this.policyBottom[1].policyBottom2 =
            "√：已保养项   / ：无需保养项   ×：需修理项目";
          this.policyBottom[2].policyBottom1 = "配件费";
          this.policyBottom[2].policyBottom2 = this.policyRow.partsCost;
          this.policyBottom[2].policyBottom3 = "维保人员";
          this.policyBottom[2].policyBottom4 = this.policyRow.workerName;
          this.policyBottom[2].policyBottom5 = "工时费";
          this.policyBottom[2].policyBottom6 = this.policyRow.manCost;
          this.policyBottom[3].policyBottom1 = "服务态度";
          this.policyBottom[3].policyBottom2 =this.policyRow.evaluation?
            (this.policyRow.evaluation.serviceLevel == 1
              ? "★☆☆☆☆"
              : this.policyRow.evaluation.serviceLevel == 2
              ? "★★☆☆☆"
              : this.policyRow.evaluation.serviceLevel == 3
              ? "★★★☆☆"
              : this.policyRow.evaluation.serviceLevel == 4
              ? "★★★★☆"
              : this.policyRow.evaluation.serviceLevel == 5
              ? "★★★★★"
              : ""):'';
          this.policyBottom[3].policyBottom3 = "维保质量";
          this.policyBottom[3].policyBottom4 =this.policyRow.evaluation?
            (this.policyRow.evaluation.starLevel == 1
              ? "★☆☆☆☆"
              : this.policyRow.evaluation.starLevel == 2
              ? "★★☆☆☆"
              : this.policyRow.evaluation.starLevel == 3
              ? "★★★☆☆"
              : this.policyRow.evaluation.starLevel == 4
              ? "★★★★☆"
              : this.policyRow.evaluation.starLevel == 5
              ? "★★★★★"
              : ""):'';
          this.policyBottom[4].policyBottom1 = "维保签名";
          var SignatureImg = [];
          SignatureImg[0] = this.policyRow.signatureImg1?this.policyRow.signatureImg1:'';
          SignatureImg[1] = this.policyRow.signatureImg2?this.policyRow.signatureImg2:'';
          this.policyBottom[4].policyBottom2 = SignatureImg;

          this.policyBottom[4].policyBottom3 = "客户签名";
          this.policyBottom[4].policyBottom4 = this.policyRow.evaluation?(this.policyRow.evaluation.imgUrl?this.policyRow.evaluation.imgUrl:''):'';
          this.policytable = this.policyRow.mtOptions
          this.dialogpolicy = true;
        }else if(data.statusCode==="9"){
          this.policyRow={}
        }else{
          this.$message.error(data.message);
        }
      });
    },
    //急修记录
    showEmergencyHestory(row) {
      this.EHID = row.id;
      this.EHProjectid = row.projectId
      this.EmergencyHestoryList(10,1)
      this.dialogEmergencyHestory = true;
    },
    EmergencyHestoryList(pageSize,pageNum){
      this.EmergencyHestorytableLoad = true
      var url = "business/emergency/emergency-repair/listRepair";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftId:this.EHID,
        projectId:this.EHProjectid,
        pageSize:pageSize,
        pageNum:pageNum,
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.EmergencyHestorytableLoad = false;
        if(data.statusCode==="1"){
          this.EmergencyHestorytable = data.data.rows
          this.EmergencyHestorytableTotal = data.data.total
        }else{
          this.$message.error(data.message);
        }
      })

    },

    //查看急修单
    showEmergency(row) {
      var url = "business/emergency/emergency-repair/findOne";
      var param = {
        id:row.id
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"||data.statusCode==="9"){
          this.RepairpolicyData = data.data
          console.log(this.RepairpolicyData)
        }
      });
      this.dialogRepairpolicy = true;
    },
    //年检记录
    showInspectionHestory(row) {
      this.IHID = row.id
      this.IHProjectId = row.projectId
      this.InspectionHestoryList(10,1)
      this.dialogInspectionHestory = true;
    },
    InspectionHestoryList(pageSize,pageNum){
      this.InspectionHestorytableLoad = true
      var url = "business/annualinspection/annual-inspection/pageByLift";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftId:this.IHID,
        projectId:this.IHProjectId,
        pageSize:pageSize,
        pageNum:pageNum,
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.InspectionHestorytableLoad = false;
        if(data.statusCode==="1"){
          this.InspectionHestorytable = data.data.rows
          this.InspectionHestorytableTotal = data.data.total
        }else{
          this.$message.error(data.message);
        }
      })

    },

    //年检合格证
    showInspection(row) {
      this.dialogInspectionPic = true;
      this.CertificateImgUrl = row.certificateImgUrl;
    },

    splitObj(obj, index) {
      var html = "";
      if (obj) {
        if (index == 1) {
          for (var i = 0; i < obj.length; i++) {
            html += i + 1 + "." + obj[i].Description2 + ",";
          }
        } else if (index == 2) {
          for (var i = 0; i < obj.length; i++) {
            html += i + 1 + "." + obj[i].Description3 + ",";
          }
        }
        html = html.substring(0, html.length - 1);
        return html;
      } else {
        return html;
      }
    },
    handleCommandHestory(command){
      if (command.button == "showMaintenanceHestory") {
        this.showMaintenanceHestory(command.row)
      } else if (command.button == "showEmergencyHestory") {
        this.showEmergencyHestory(command.row)
      } else if (command.button == "showInspectionHestory") {
        this.showInspectionHestory(command.row)
      } else if (command.button == "Hestory") {
        this.LiftHestoryId = command.row.id;
        this.showLiftHestorytable(1,10)
        this.dialogLiftHestory = true;
      }
    },
    //构造多参数
    composeValue(item, row) {
      return {
        button: item,

        row: row
      };
    },
    //批量生成二维码
    GetQrCodes() {
      var that = this;
      if (this.LiftChoose.length==0) {
        this.$message({
          message: "请先选择电梯",
          type: "warning"
        });
      } else {
        this.ContentList = this.LiftChoose;
        console.log(this.ContentList);
        // for(var i=0;i<this.LiftChoose.length;i++){
        //   var tableCon = []
        //   for(var j=0;j<this.LiftChoose.lengt;j++){

        //   }
        // }
        this.LiftChoose.forEach(function(value, index, array) {
          var tableCon = [
            {
              Content: ""
            },
            {
              Content: ""
            },
            {
              Content: ""
            },
            {
              Content: ""
            }
          ];
          var date = new Date();
          date = that.pattern(date)
          tableCon[0].Content = array[index].registrationCode?array[index].registrationCode:'';
          tableCon[1].Content = array[index].devicePosition?array[index].devicePosition:'';
          tableCon[2].Content =
            (array[index].workerName?array[index].workerName:'')  + (array[index].mobile?("("+array[index].mobile+')'):'');
          tableCon[3].Content = "打印时间：" + date;
          that.ContentList[index].Agency = tableCon;
          console.log(that.ContentList[index].Agency)
          var canvas = document.createElement("canvas");
          // 将获取到的数据（val）画到msg（canvas）上
          QRCode.toCanvas(canvas, "https://sp.edtyun.com/"+(array[index].id?array[index].id:'')+'-'+(array[index].registrationCode?array[index].registrationCode:''), function (error) {
                console.log(error)
          })
          that.ContentImgURL = canvas.toDataURL("image/png")
        });
        console.log(this.ContentList);
        this.dialogQRCodeSContent = true;
      }
    },
    printCode(){
      var dom = document.getElementById('printQRCodeSContent');
        let newContent =dom.innerHTML;
        var win = window.open()
        // let oldContent = win.document.body.innerHTML;
        win.document.body.innerHTML = newContent;
        win.print();
        win.close();
    },
    pattern(date) {         
        const yyyy = date.getFullYear().toString(); 
        const mm = (date.getMonth() + 1).toString();
        const dd = date.getDate().toString();
        return yyyy + '-' + (mm[1] ? mm : `0${mm[0]}`)
          + '-' + (dd[1] ? dd : `0${dd[0]}`);
    },  
    //新增电梯
    addLiftOne() {
      this.addLift=1;
      this.InputShowBtn = false
      this.preSumbitID=""
      this.initLiftForm("");
      this.dialogAddLift = true;
      this.showBrandList()
      this.LiftTypeShow = false;

      this.InputShow = false;
      this.CategoryShow = "";
    },
    //编辑电梯
    editLift(row){
      this.addLift=2;
      this.InputShowBtn = false
      var url = "business/lift/detail";
      var param = {
        id:row.id,
        projectId:row.projectId
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.initLiftForm(data.data);
          this.preSumbitID = data.data.id
          var re = data.data.registrationCode
         if(re.length>=4){
          var liftName; 
          switch (parseInt(re.substring(0,4))){
            case 3110:
              liftName="曳引驱动乘客电梯";
              break;
            case 3120:
              liftName="强制式客梯";
              break;
            case 3130:
              liftName="无机房客梯";
              break;
            case 3140:
              liftName="消防电梯";
              break;
            case 3150:
              liftName="观光电梯";
              break;
            case 3160:
              liftName="防爆客梯";
              break;
            case 3170:
              liftName="病床电梯";
              break;
            case 3210:
              liftName="曳引式货梯";
              break;
            case 3220:
              liftName="强制式货梯";
              break;
            case 3230:
              liftName="无机房货梯";
              break;
            case 3240:
              liftName="汽车电梯";
              break;
            case 3250:
              liftName="防爆货梯";
              break;
            case 3310:
              liftName="液压客梯";
              break;
            case 3320:
              liftName="防爆液压客梯";
              break;
             case 3330:
              liftName="液压货梯";
              break;
             case 3340:
              liftName="防爆液压货梯";
              break;
            case 3400:
              liftName="杂物电梯";
              break;
             case 3500:
              liftName="自动扶梯";
              break;
             case 3600:
              liftName="自动人行道";
              break;
             case 3010:
             liftName="乘客电梯(含液压乘客电梯)";
             break;
             case 3011:
              liftName="客货电梯(含液压客货电梯)";
              break;
              case 3012:
              liftName="病床电梯(含液压病床电梯)";
              break;
              case 3013:
              liftName="载货电梯(含液压载货电梯)";
              break;
              case 3020:
              liftName="自动扶梯";
              break;
              case 3021:
              liftName="自动人行道";
              break;
            default:
              liftName="其它电梯";
              break;
          };
          this.AddLift.DevKind=liftName;
        }
          this.relevanceIdLift = data.data.relevanceId
          this.dialogAddLift = true;
        }else{
          this.$message.error(data.message);
        }
      })
      
    },
    //选择电梯类型切换电梯类别
    TypeChange(event, item) {
      if (event == 1) {
        this.Lifttype = [
          {
            value: 1,
            label: "曳引梯"
          },
          {
            value: 2,
            label: "液压梯"
          },
          {
            value: 3,
            label: "杂物梯"
          }
        ];
        this.LiftTypeShow = true;
        this.InputShow = false;
      } else if (event == 2) {
        this.Lifttype = [
          {
            value: 4,
            label: "自动扶梯"
          },
          {
            value: 5,
            label: "自动人行道"
          }
        ];
        this.LiftTypeShow = true;
        this.InputShow = false;
      }

      this.AddLift.category = "";
      this.AddLift.registrationCode = ""; 
      this.AddLift.devicePositionCode = ""; 
      this.AddLift.liftModel = ""; 
      this.AddLift.useCompanyCode = ""; 
      this.AddLift.agency = ""; 
      this.AddLift.reformDate = ""; 
      this.AddLift.installDate = ""; 
      this.AddLift.innerFloor = ""; 
      this.AddLift.controlType = ""; 
      this.AddLift.deviceUsage = ""; 
      this.AddLift.promoteHeight = ""; 
      this.AddLift.clampType = ""; 
      this.AddLift.lockModel = ""; 
      this.AddLift.layerStationDoor = ""; 
      this.AddLift.pulleyDiameter = ""; 
      this.AddLift.ropeNum = ""; 
      this.AddLift.steelBelt = ""; 
      this.AddLift.cylinderType = ""; 
      this.AddLift.cylinderNum = ""; 
      this.AddLift.topType = ""; 
      this.AddLift.mpa = ""; 
      this.AddLift.stepWidth = ""; 
      this.AddLift.tiltAngle = ""; 
      this.AddLift.sidewalkLength = "";
      this.AddLift.liftBrand = ""; 
      this.AddLift.ratedLoad = ""; 
      this.AddLift.devicePosition = ""; 
      this.AddLift.annualInspectionDate = ""; 
      this.AddLift.ratedSpeed = ""; 
      this.AddLift.motorPower = ""; 
      this.AddLift.factoryCode = ""; 
      this.AddLift.manufactureDate = ""; 
      this.AddLift.reformCompany = ""; 
      this.AddLift.installCompany = ""; 
      this.AddLift.factory = ""; 
      this.AddLift.customNumber = ""; 
      this.AddLift.remarks = ""; 
      this.AddLift.DevKind = ""; 
    },
    //点击电梯类别切换
    LiftTypeChange(event, item) {
      if (event == 1) {
        this.CategoryShow = 1;
        this.LiftBoxShow = 1;
        this.InputShow = true;
      } else if (event == 2) {
        this.CategoryShow = 2;
        this.LiftBoxShow = 1;
        this.InputShow = true;
      } else if (event == 3) {
        this.CategoryShow = 3;
        this.LiftBoxShow = 1;
        this.InputShow = true;
      } else if (event == 4) {
        this.CategoryShow = 4;
        this.LiftBoxShow = 2;
        this.InputShow = true;
      } else if (event == 5) {
        this.CategoryShow = 5;
        this.LiftBoxShow = 2;
        this.InputShow = true;
      }
    },
    //电梯品牌列表
    showBrandList(){
      var url = "business/common/brand/list";
      this.axios.post(url).then(result => {
        var data = result.data
        this.BrandList = data
        console.log(data)
      });
    },
    //新增电梯提交
    submitLift(formName) {
      console.log(this.$refs[formName])
      this.$refs[formName].validate(valid => {
        if (valid) {
          var url = "business/lift/add";
          var data = this.AddLift;
          // 要删的年检精确到月
          var param = {}
          param.lift = data
          param.lift.id = this.preSumbitID
          param.id = this.preSumbitID;
          param.projectId = ""
          // param.annualInspectionDate = data.annualInspectionDate
          param.source = 0
          param.mark = this.mark
          param.mtCompanyId = JSON.parse(sessionStorage.getItem('mtCompanyId'))
          this.axios.post(url,param).then(result => {
            var data = result
            if(data.statusCode==="1"){
              this.$message.success(data.message);
              this.showLiftList(this.liftStatus, this.Liftcurrpage, this.Liftpagesize);
              this.dialogAddLift = false;
            }else{
              this.$message.error(data.message);
            }
          });
          console.log(param);
        } else {
          this.$message({
            message: "请输入正确信息！",
            type: "warning"
          });
          return;
        }
      });
    },
    //编辑电梯提交
    submitEditLift(formName){
      this.$refs[formName].validate(valid => {
        if (valid) {
          var url = "business/lift/modify";
          var data = this.AddLift;
          // 要删的年检精确到月
          var param = {}
          param.lift = data
          param.lift.id = this.preSumbitID
          param.relevanceId = this.relevanceIdLift
          
        
          // param.annualInspectionDate = data.annualInspectionDate
          this.axios.post(url,param).then(result => {
            var data = result
            if(data.statusCode==="1"){
              this.$message.success(data.message);
              this.showLiftList(this.liftStatus, this.Liftcurrpage, this.Liftpagesize);
              this.dialogAddLift = false;
            }else{
              this.$message.error(data.message);
            }
          });
          console.log(param);
        } else {
          this.$message({
            message: "请输入正确信息！",
            type: "warning"
          });
          return;
        }
      });
    },
    //查询电梯
    searchLift(){
      this.showLiftList(this.liftStatus, this.Liftcurrpage,this.Liftpagesize)
    },
    setLift(){
      this.LiftSearch.Region=""
      this.LiftSearch.RegionProject=""
      this.LiftSearch.ProjectLift=""
      this.LiftSearch.liftBrand=""
      this.LiftSearch.registrationCode=""
      this.showLiftList(this.liftStatus, this.Liftcurrpage,this.Liftpagesize)
    },
    getprojectList(){
      var url = "business/project/projectIDList";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"||data.statusCode==="9"){
          this.RegionProjectList = data.data
        }
      });
    },
    BYDPrint(){
       var dom = document.getElementById('BYDPrintId');
        let newContent =dom.innerHTML;
        var win = window.open()
        // let oldContent = win.document.body.innerHTML;
        win.document.body.innerHTML = newContent;
        win.print();
        win.close();
        // window.location.reload();
        // document.body.innerHTML = oldContent;
    },
    preJudgment(){
      var url = "business/lift/preJudgment";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        code:this.AddLift.registrationCode,
        id:this.preLiftID
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        console.log(data)
        if(data.statusCode==="1"){
          if(data.data){
            this.mark = 1
            this.preSumbitID = data.data.id
            this.initLiftForm(data.data)
          }else{
            this.mark=0
          }
          var re = this.AddLift.registrationCode
        if(re.length>=4){
          var liftName; 
           switch (parseInt(re.substring(0,4))){
            case 3110:
              liftName="曳引驱动乘客电梯";
              break;
            case 3120:
              liftName="强制式客梯";
              break;
            case 3130:
              liftName="无机房客梯";
              break;
            case 3140:
              liftName="消防电梯";
              break;
            case 3150:
              liftName="观光电梯";
              break;
            case 3160:
              liftName="防爆客梯";
              break;
            case 3170:
              liftName="病床电梯";
              break;
            case 3210:
              liftName="曳引式货梯";
              break;
            case 3220:
              liftName="强制式货梯";
              break;
            case 3230:
              liftName="无机房货梯";
              break;
            case 3240:
              liftName="汽车电梯";
              break;
            case 3250:
              liftName="防爆货梯";
              break;
            case 3310:
              liftName="液压客梯";
              break;
            case 3320:
              liftName="防爆液压客梯";
              break;
             case 3330:
              liftName="液压货梯";
              break;
             case 3340:
              liftName="防爆液压货梯";
              break;
            case 3400:
              liftName="杂物电梯";
              break;
             case 3500:
              liftName="自动扶梯";
              break;
             case 3600:
              liftName="自动人行道";
              break;
             case 3010:
             liftName="乘客电梯(含液压乘客电梯)";
             break;
             case 3011:
              liftName="客货电梯(含液压客货电梯)";
              break;
              case 3012:
              liftName="病床电梯(含液压病床电梯)";
              break;
              case 3013:
              liftName="载货电梯(含液压载货电梯)";
              break;
              case 3020:
              liftName="自动扶梯";
              break;
              case 3021:
              liftName="自动人行道";
              break;
            default:
              liftName="其它电梯";
              break;
          };
          this.AddLift.DevKind=liftName;
        }
        }else{
          this.$message.error(data.message);
        }
      });
      
    }
  }
};
</script>
<style lang="stylus">
$ft14 = 14px;

.Lift {
  background: #fff;
  padding: 10px 0;
  height: 100%;

  .CProTop {
    border-bottom: 2px solid #f0f3f4;
    padding: 8px 10px;
    div {
      display: inline-block;
      width: 50%;
      span {
        font-size: 16px;
        font-weight: bold;
      }

      .el-button {
        padding: 5px 10px;

        span {
          font-size: 12px;
        }
      }
    }
  }

  .cell {
    text-align: center;
  }

  .el-tabs__header.is-top {
    margin: 15px 20px;
  }


  .LiftTable, .MaintenanceHestory, .EmergencyHestory, .InspectionHestory {
    .el-button {
      padding: 8px;
      font-size: 12px;
      border-radius: 10px;
      margin-bottom: 5px;
    }
  }

  .policy {
    .el-dialog__body {
      padding-top: 0px;
    }

    .policyTop {
      font-size: 12px;

      p {
        text-align: center;
      }

      .policyTopCompany {
        font-size: 16px;
        font-weight: bold;
      }

      .el-row {
        .el-col {
          text-align: center;
        }
      }
    }

    .policyBottom {
      width: 100%;
    }
  }

  .policyPic {
    .el-image {
      width: 100%;
      height: 100%;
    }
  }

  .Repairpolicy {
    .el-dialog__body {
      padding: 5px 20px;
    }

    .RepairpolicyContent {
      .RepairpolicyContentTop {
        border: 1px solid #dfdfdf;
        padding: 10px;
      }

      .RepairpolicyContentBottom {
      }
    }
  }

  .InspectionPic {
    .el-image {
      width: 100%;
      height: 100%;
    }
  }

  .CodeSContent .el-col {
    p {
      text-align: center;
      font-size: 20px;
      margin-bottom: 5px;
    }

    .el-row .el-col p {
      font-size: 12px;
    }

    .el-image {
      width: 100%;
      height: 100%;
    }
  }

  .AddLift {
    .AddLiftFrom {
      input::-webkit-outer-spin-button,
      input::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
        margin: 0;
      }
      .code-input-main {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
        position: relative;
      }
      
      .code-input-input {
        height: 44px;
        width: 100%;
        position: absolute;
        border: none;
        outline: none;
        color: transparent;
        background-color: transparent;
        text-shadow: 0 0 0 transparent;
      }
      
      .code-input-main-item {
        width: 25px;
        height: 28px;
        margin: 0 2px;
        padding-bottom: 0;
        opacity: 0.8;
        border-bottom: solid #323232 2px;
        text-align: center;
        font-size: 14px;
        color: #323232;
      }
      .selectUp >span, .el-input {
        font-size: 12px;
      }

      .LiftRow {
        width: 33%;
        margin: 0;

        .el-form-item__label {
          width: 41%;
          text-align: center;
        }

        .el-form-item__content {
          width: 59%;
        }
      }
      .LiftRowBtn{
        width: 100%;
        margin: 0;
        .el-form-item__content {
          width: 100%;
          text-align: center;
        }
      }

      .LiftRowRemark {
        width: 100%;

        .el-form-item__label {
          width: 13.5%;
          text-align: center;
        }

        .el-form-item__content {
          width: 85%;
        }
      }

      .el-date-editor.el-input, .el-date-editor.el-input__inner {
        width: 100%;
      }
    }
  }
}
.el-dropdown .el-button--primary.is-plain:focus, .el-dropdown .el-button--primary.is-plain:hover {
  
    color: #409EFF;
    background: #fff;
}
</style>

