<template>
  <div class="homeProject">
    <div class="ProjectMain">
      <div class="CRTop">
        <div>
          <span>大修管理</span>
        </div>
        <div style="text-align:right">
          <el-button type="primary" round @click="addProject">创建大修</el-button>
        </div>
      </div>
      <el-row>
        <el-tabs class="BCtabs" v-model="activeName" type="border-card" @tab-click="changeProject">
          <el-tab-pane :label="'施工中('+textNum.firstText+')'" name="first"></el-tab-pane>
          <el-tab-pane :label="'已完成('+textNum.secondText+')'" name="second"></el-tab-pane>
          <el-tab-pane :label="'尚未开始('+textNum.thirdText+')'" name="third"></el-tab-pane>
          <el-tab-pane :label="'待审核('+textNum.fourthText+')'" name="fourth"></el-tab-pane>
          <el-tab-pane :label="'停止服务('+textNum.firthText+')'" name="fifth"></el-tab-pane>
          <p class="SearchTitle" >
            项目{{detailProject.projectNum}}个，电梯
            <span style="color:red">{{detailProject.LiftNum}}</span>台，其中停保电梯
            <span style="color:red">{{detailProject.StopNum}}</span>台
          </p>
          <div class="TableSelectMain">
            <el-form :model="ProjectSearch" :inline="true" label-position="left">
              <el-row>
                <el-form-item style="width:15%">
                  <el-select
                    v-model="ProjectSearch.provinceCode"
                    clearable filterable
                    placeholder="请选择省"
                    @change="showProvince(2,ProjectSearch.provinceCode)"
                  >
                    <el-option
                      v-for="item in ProvinceList"
                      :key="item.code"
                      :label="item.name"
                      :value="item.code"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item style="width:15%">
                  <el-select
                    v-model="ProjectSearch.cityCode"
                    clearable filterable
                    placeholder="请选择市"
                    @change="showProvince(3,ProjectSearch.cityCode)"
                  >
                    <el-option
                      v-for="item in CityList"
                      :key="item.code"
                      :label="item.name"
                      :value="item.code"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item style="width:15%">
                  <el-select v-model="ProjectSearch.districtCode" clearable filterable placeholder="请选择区">
                    <el-option
                      v-for="item in DistrictList"
                      :key="item.code"
                      :label="item.name"
                      :value="item.code"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item style="width:20%">
                  <el-select v-model="ProjectSearch.regionId" 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:25%">
                  <el-select v-model="ProjectSearch.userId" clearable filterable placeholder="请选择区域主管">
                    <el-option
                      v-for="item in RegionListRole"
                      :key="item.userId"
                      :label="item.name"
                      :value="item.userId"
                    ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item class="itemInput">
                  <el-input
                    placeholder="项目名称、甲方名称、项目地址"
                    v-model="ProjectSearch.condition"
                  ></el-input>
                </el-form-item>
                <el-form-item style="width:25%">
                  <el-button type="primary" round @click="searchProject">查询</el-button>
                  <el-button type="info" plain round @click=resetProject>重置</el-button>
                </el-form-item>
              </el-row>
            </el-form>
          </div>
          <div class="ProjectTable">
            <el-table
              ref="multipleTable"
              :data="tableData"
              style="width: 100%"
              tooltip-effect="dark"
              border
              class="PJTable"
              :row-class-name="tableRowClassName"
              :header-cell-style="{'background-color':'rgba(250,250,250,1)'}"
              v-loading="ProjectTableLoad"
            >
              <!-- <el-table-column prop="projectCode" label="项目编号" min-width="50px;"></el-table-column> -->
              <el-table-column prop="projectName" label="项目名称" min-width="150px;" :show-overflow-tooltip="true"></el-table-column>
              <!-- <el-table-column prop="province" label="省" min-width="50px;"></el-table-column>
              <el-table-column prop="city" label="市" min-width="50px;"></el-table-column>
              <el-table-column prop="district" label="区" min-width="50px;"></el-table-column> -->
              <el-table-column prop="regionName" label="区域" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
              <!-- <el-table-column prop="num" label="台量/系统台量" min-width="150px;" sortable :show-overflow-tooltip="true">
                <template slot-scope="props">
                  <span>{{props.row.num+"/"+props.row.actualNum}}</span>
                </template>
              </el-table-column> -->
              <!-- <el-table-column
                prop="actualNum"
                label="系统台量"
                min-width="50px;"
                sortable
                show-overflow-tooltip="true"
              ></el-table-column> -->
              <el-table-column prop="userName" label="区域主管" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
              <el-table-column prop="companyName" label="甲方名称" min-width="150px;" :show-overflow-tooltip="true"></el-table-column>
              <el-table-column prop="projectAddress" label="项目地址" min-width="100px;" :show-overflow-tooltip="true"></el-table-column>
              <el-table-column v-if="ProjectStatus==3" prop="startWorkDateTime" label="开工时间" min-width="100px;"></el-table-column>
              <el-table-column prop="endDate" label="竣工时间" min-width="100px;"></el-table-column>
              <el-table-column label="操作" min-width="200px;" fixed="right">
                <template slot-scope="props">
                  <el-button
                    size="mini"
                    type="primary"
                    plain
                    round
                    class
                    style="margin-left: 5px;"
                    @click="handleClick(props.row)"
                    v-if="ProjectStatus==2||ProjectStatus==1"
                  >维保工</el-button>

                  <el-button
                    size="mini"
                    type="primary"
                    plain
                    round
                    class
                    style="margin-left: 5px;"
                    @click="handlecompleted(props.row)"
                    v-if="ProjectStatus==3&&!props.row.overdueFlag"
                  >竣工审核</el-button>
                  <el-button
                    size="mini"
                    type="primary"
                    plain
                    round
                    class
                    style="margin-left: 5px;"
                    @click="handleoverdue(props.row)"
                    v-if="ProjectStatus==3&&props.row.overdueFlag"
                  >逾期审核</el-button>

                  <el-button size="mini" type="primary" plain round @click="showLiftList(props.row)" v-if="ProjectStatus!=3||ProjectStatus!=4">电梯信息</el-button>

                  <el-button
                    size="mini"
                    type="primary"
                    plain
                    class
                    round
                    @click="handleSignInClick(props.row,1,10,'','')"
                    style="margin-left:5px"
                    v-if="ProjectStatus==2"
                  >签到记录</el-button>
                  <el-button
                    size="mini"
                    type="primary"
                    plain
                    class
                    round
                    style="margin-left:5px"
                    v-if="ProjectStatus==4"
                    @click="handleshowCompleted(props.row)"
                  >查看</el-button>

                  <el-dropdown trigger="hover" slot="label" @command="handleCommand">
                    <el-button class="el-dropdown-link" type="primary" plain round>
                      更多
                      <i class="el-icon-arrow-down el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                      <!-- <el-dropdown-item
                        v-if="ProjectStatus!=3&&props.row.locked==0"
                        :command="composeValue('Update',props.row)"
                      >编辑</el-dropdown-item> -->

                      <el-dropdown-item
                        :command="composeValue('Update',props.row)" v-if="ProjectStatus==2||ProjectStatus==1"
                      >编辑</el-dropdown-item>
                      <!-- <el-dropdown-item
                        v-if="ProjectStatus!=2&&ProjectStatus!=4"
                        :command="composeValue('Delete',props.row)"
                      >删除</el-dropdown-item> -->
                      <el-dropdown-item
                        v-if="ProjectStatus==5"
                        :command="composeValue('Re',props.row)"
                      >恢复服务</el-dropdown-item>
                      <el-dropdown-item
                        v-if="ProjectStatus==2"
                        :command="composeValue('Stop',props.row)"
                      >停止服务</el-dropdown-item>
                      <!-- <el-dropdown-item
                        :command="composeValue('Stop',props.row)"
                      >停止服务</el-dropdown-item> -->
                      <!-- <el-dropdown-item
                        v-if="ProjectStatus==4"
                        :command="composeValue('Start',props.row)"
                      >继续服务</el-dropdown-item> -->
                      <el-dropdown-item :command="composeValue('Hestory',props.row)"  v-if="ProjectStatus!=3||ProjectStatus!=4">操作记录</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="ProjectTotal"
                  @current-change="click"
                  @size-change="handleSizeChange"
                  :page-sizes="[5, 10, 15, 20]"
                  :page-size="pagesize"
                ></el-pagination>
              </span>
            </div>
            <!-- 穿梭模态框 -->
            <div>
              <el-dialog
                title="班组成员列表"
                :visible.sync="dialogVisible"
                width="60%"
                :before-close="handleClose"
              >
                <div style="text-align: center">
                  <p class="VisibleP">
                    <!-- <i class="el-icon-user-solid" style="color: #399afb;"></i>区域主管 -->
                    <i class="el-icon-star-on" style="color: #f1123b;"></i>大修班长
                  </p>
                  <el-transfer
                    style="text-align: left; display: inline-block"
                    v-model="Visiblevalue"
                    v-loading="VisiblevalueLoad"
                    filterable
                    :left-default-checked="[]"
                    :right-default-checked="[]"
                    :render-content="renderFunc"
                    :titles="['团队成员', '班组成员']"
                    :format="{
                      noChecked: '${total}',
                      hasChecked: '${checked}/${total}'
                    }"
                    @change="handleChange"
                    :data="data"
                  >
                    <!-- <el-button class="transfer-footer" slot="left-footer" size="small">操作</el-button>
                    <el-button class="transfer-footer" slot="right-footer" size="small">操作</el-button> -->
                  </el-transfer>
                </div>
                <span slot="footer" class="dialog-footer">
                  <el-button @click="dialogVisible = false">取 消</el-button>
                  <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
                </span>
              </el-dialog>
            </div>
            <!-- motal -->
            <!-- 新增/编辑项目模态框 -->
            <div>
              <el-dialog
                :title='addPro==1?"创建大修":"修改大修"'
                :visible.sync="projectFormDialog"
                width="80%"
                :before-close="handleClose"
                class="addProject"
              >
                <el-dialog
                  width="30%"
                  title="添加甲方"
                  :visible.sync="addPpcDialog"
                  append-to-body
                  top="10%"
                >
                  <el-form :inline="true" label-position="left" :model="addPpc" :rules="addPpcRule" ref="addPpc">
                    <el-form-item label="输入甲方名称" xs="24" :sm="24" :md="24" :lg="24" prop="ppc_name">
                      <el-input placeholder="输入甲方名称" v-model="addPpc.ppc_name"></el-input>
                    </el-form-item>
                  </el-form>
                  <div slot="footer" class="dialog-footer">
                    <el-button @click="addPpcDialog = false">取 消</el-button>
                    <el-button type="primary" @click="submitppcName('addPpc')">确 定</el-button>
                  </div>
                </el-dialog>

                <el-dialog
                  width="30%"
                  title="添加甲方联系人"
                  :visible.sync="addPpmDialog"
                  append-to-body
                  top="10%"
                >
                  <el-form :inline="true" label-position="left" :model="addPpm" :rules="addPpmRule" ref="addPpm">
                    <el-row>
                      <el-form-item label="输入甲方联系人名称" xs="24" :sm="24" :md="24" :lg="24">
                        <el-input placeholder="输入甲方联系人名称" v-model="addPpm.ppm_name"></el-input>
                      </el-form-item>
                    </el-row>

                    <el-row>
                      <el-form-item label="输入甲方联系人电话" xs="24" :sm="24" :md="24" :lg="24">
                        <el-input placeholder="输入甲方联系人电话" v-model="addPpm.ppm_tel"></el-input>
                      </el-form-item>
                    </el-row>
                  </el-form>
                  <div slot="footer" class="dialog-footer">
                    <el-button @click="addPpmDialog = false">取 消</el-button>
                    <el-button type="primary" @click="submitPpm('addPpm')">确 定</el-button>
                  </div>
                </el-dialog>

                <el-form
                  :model="projectForm"
                  :inline="true"
                  label-position="right"
                  :rules="projectFormRule"
                  ref="projectForm"
                >

                  <el-row justify="space-around">
                    <el-form-item label="项目名称" prop="projectName" style="width:41.6%">
                      <el-input v-model="projectForm.projectName"></el-input>
                    </el-form-item>
                    <!-- <el-col :xs="6" :sm="6" :md="6" :lg="6">
                      <el-row>
                        <el-col :sm="10" :md="10" :lg="10" class="selectUp">
                          <span>项目名称<i class="FontRed">﹡</i></span>
                        </el-col>
                        <el-col :sm="12" :md="12" :lg="12">
                          <el-input v-model="projectForm.name"></el-input>
                        </el-col>
                      </el-row>
                    </el-col>-->

                    <el-form-item label="项目用途" prop="projectUsage" class="projectUsageInstant">
                      <el-select placeholder="请选择" v-model="projectForm.projectUsage" clearable filterable class="siteel-select">
                        <el-option
                          v-for="item in PUsageoptions"
                          :key="item.value"
                          :label="item.label"
                          :value="item.value"
                        ></el-option>
                      </el-select>
                    </el-form-item>

                    <!-- <el-col :xs="6" :sm="6" :md="6" :lg="6">
                      <el-row>
                        <el-col :sm="10" :md="10" :lg="10" class="selectUp">
                          <span>项目地址<i class="FontRed">﹡</i></span>
                        </el-col>
                        <el-col :sm="12" :md="12" :lg="12">
                          <el-input v-model="projectForm.address"></el-input>
                        </el-col>
                      </el-row>
                    </el-col>-->
                  </el-row>
                  <el-row justify="space-around">
                    <el-form-item label="开始时间" prop="startDate" style="width:41.6%">
                      <el-date-picker
                        type="date"
                        placeholder="选择项目开始时间时间"
                        v-model="projectForm.startDate"
                        value-format="yyyy-MM-dd"
                        :picker-options="compant0"
                      ></el-date-picker>
                    </el-form-item>

                    <el-form-item label="计划竣工时间" prop="endDate" class="ww50">
                      <el-date-picker
                        type="date"
                        placeholder="选择计划竣工时间"
                        v-model="projectForm.endDate"
                        value-format="yyyy-MM-dd"
                        :picker-options="compant1"
                      ></el-date-picker>
                    </el-form-item>
                  </el-row>

                  <el-row justify="space-around" >
                    <el-form-item label="区域名称" prop="regionId" style="width:41.6%">
                      <el-select v-model="projectForm.regionId" filterable placeholder="选择区域" @change="getDistrict">
                        <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 label="区" prop="districtCode" class="districtInstant">
                      <el-select v-model="projectForm.districtCode" filterable placeholder="选择区" @change="changeDis">
                        <el-option
                          v-for="item in DistrictList"
                          :key="item.code"
                          :label="item.name"
                          :value="item.code"
                        ></el-option>
                      </el-select>
                      <!-- <el-input type="hidden" v-model="projectForm.district"></el-input> -->
                    </el-form-item>
                  </el-row>
                    

                 

                  <el-row justify="space-around">
                    <el-col :xs="10" :sm="10" :md="10" :lg="10">
                      <el-row>
                        <el-form-item label="甲方名称" prop="ppCompanyId" class="ppCompanyIdInstant" >
                          <el-select placeholder="选择甲方" v-model="projectForm.ppCompanyId" class="siteel-select" @change="getCompanyUser">
                            <el-option
                              v-for="item in ppcOptions"
                              :key="item.id"
                              :label="item.name"
                              :value="item.id"
                            ></el-option>
                          </el-select>
                        </el-form-item>

                        <!-- <el-col :sm="6" :md="6" :lg="6" class="selectUp">
                          <span>甲方名称<i class="FontRed">﹡</i></span>
                        </el-col>
                        <el-col :sm="12" :md="12" :lg="12">
                          <el-select placeholder="选择甲方" v-model="projectForm.ppc_id" class="siteel-select">
                            <el-option
                              v-for="item in ppcOptions"
                              :key="item.MTCompanyID"
                              :label="item.Name"
                              :value="item.MTCompanyID"
                            ></el-option>
                          </el-select>
                        </el-col>-->

                        <el-button type="primary" style="border-radius: 5px;font-size: 28px;padding: 0 5px;" plain round @click="addPpcDialog = true">+</el-button>
                      </el-row>
                    </el-col>

                    <el-col :xs="12" :sm="12" :md="12" :lg="12">
                      <el-row>
                        <el-form-item
                          label="甲方联系人"
                          prop="ppContactId"
                          class="ppContactIdInstant"
                        
                        >
                          <el-select
                            placeholder="选择甲方联系人"
                            v-model="projectForm.ppContactId"
                            class="siteel-select"
                          >
                            <el-option
                              v-for="item in ppmOptions"
                              :key="item.id"
                              :label='item.name+"("+item.telephone+")"'
                              :value="item.id"
                            ></el-option>
                          </el-select>
                        </el-form-item>

                        <!-- <el-col :sm="6" :md="6" :lg="6" class="selectUp">
                          <span>甲方联系人<i class="FontRed">﹡</i></span>
                        </el-col>
                        <el-col :sm="12" :md="12" :lg="12">
                          <el-select
                            placeholder="选择甲方联系人"
                            v-model="projectForm.ppm_id"
                            class="siteel-select"
                          >
                            <el-option
                              v-for="item in ppmOptions"
                              :key="item.CreatorID"
                              :label='item.Name+"("+item.Telephone+")"'
                              :value="item.CreatorID"
                            ></el-option>
                          </el-select>
                        </el-col>-->
                        <el-button type="primary" style="border-radius: 5px;font-size: 28px;padding: 0 5px;" plain round @click="addPpmDialog = true">+</el-button>
                      </el-row>
                    </el-col>
                  </el-row>

                  <!-- <el-row justify="space-around">
                    <el-form-item label="急修是否推送物管评价录入完成后进行保存：">
                      <el-radio-group v-model="projectForm.save">
                        <el-radio v-model="projectForm.save" label="1">是</el-radio>
                        <el-radio v-model="projectForm.save" label="2">否</el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-row> -->

                  <el-row justify="space-around">
                    <el-col style="width:41.6%">
                      <el-form-item
                        label="区域主管："
                      >
                        <span>{{RegionWorkerName}}</span>
                      </el-form-item>
                      <!-- <el-row>
                        <el-col :sm="10" :md="10" :lg="10" class="selectUp">
                          <span>区域主管：</span>
                        </el-col>
                        <el-col :sm="12" :md="12" :lg="12" class="selectUp">
                          <span>{{RegionWorkerName}}</span>
                        </el-col>
                      </el-row> -->
                    </el-col>

                    <el-col class="ww50">
                      <el-form-item
                        label="文员：" class="CleckInstant"
                      >
                        <el-select
                          placeholder="选择文员"
                          v-model="ClerkName"
                        >
                          <el-option
                            v-for="item in ClerkNameList"
                            :key="item.userId"
                            :label='item.name'
                            :value="item.userId"
                          ></el-option>
                        </el-select>
                      </el-form-item>
                      <!-- <el-row>
                        <el-col :sm="10" :md="10" :lg="10" class="selectUp">
                          <span>文员：</span>
                        </el-col>
                        <el-col :sm="12" :md="12" :lg="12" class="selectUp">
                          <span>{{ClerkName}}</span>
                        </el-col>
                      </el-row> -->
                    </el-col>

                    <!-- <el-form-item label="维保班长﹡" :xs="8" :sm="8" :md="8" :lg="8"  style="margin-left:80px;" >

                          <el-select placeholder="请选择维保班长">
                            <el-option label="区域一" ></el-option>
                            <el-option label="区域二" ></el-option>
                          </el-select>
                    </el-form-item>-->
                  </el-row>



                 
                    
                      <!-- <el-input v-model="projectForm.address"></el-input> -->
                   

                  <!-- <el-row justify="space-around"  style="margin-left:30px;">
                      <el-form-item :xs="8" :sm="8" :md="8" :lg="8" >维保工  
                        <div  style="display:inline-block;" ><span>未设置</span>/<span>已设置</span></div><el-button type="primary" size="small"   @click="projectForm.relatedMaintenanceWorkers = true"    >设置维保工</el-button>
                      </el-form-item>
                  </el-row>-->
                </el-form>
                <p>
                  <span style="display: inline-block;margin-top: 12px;color: #F56C6C;">*</span>选择项目地址：
                  <span style="display: inline-block;margin-right: 15px;">{{projectForm.projectAddress}}</span><el-button type="primary" @click="onSearch">搜索地址</el-button>
                </p> 
                <div class="amap-page-container" v-if="IsonSearch">
                  <el-amap-search-box  class="search-box" :search-option="searchOption" :on-search-result="onSearchResult"></el-amap-search-box>
                  <el-amap vid="amapDemo" :center="mapCenter" :zoom="12" class="amap-demo">
                    <el-amap-marker :position="marker" ></el-amap-marker>
                  </el-amap>
                </div>


                <div slot="footer" class="dialog-footer">
                  <el-button @click="projectFormDialog = false">取 消</el-button>
                  <el-button v-if="addPro==1" type="primary" @click="submitAddPro('projectForm')">确 定</el-button>
                  <el-button v-if="addPro==2" type="primary" @click="submitEditPro('projectForm')">确 定</el-button>
                </div>
              </el-dialog>
            </div>
            <!--修改电梯维保间隔-->
            <!-- <div class="UpdateInterval">
              <el-dialog
                title="修改维保间隔"
                :visible.sync="dialogInterval"
                width="30%"
                :before-close="handleClose"
              >
                <div>
                  <p class="TXc">
                    <i class="el-icon-warning"></i>提示
                  </p>
                  <p class="mb20 mt10">
                    维保计划间隔
                    <span style="color:red">默认为15天</span>，修改间隔会重新生成相应电梯的维保计划。请谨慎操作。
                  </p>
                  <el-select v-model="PlanInterval" multiple>
                    <el-option
                      v-for="item in PlanIntervalss"
                      :key="item.value"
                      :label="item.label"
                      :value="item.value"
                    ></el-option>
                  </el-select>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogInterval = false">取 消</el-button>
                  <el-button type="primary">确 定</el-button>
                </div>
              </el-dialog>
            </div>-->

            <!--停止服务-->
            <div class="StopProject">
              <el-dialog
                title="停止服务"
                :visible.sync="dialogStopProject"
                width="40%"
                :before-close="handleClose"
              >
                <div>
                  <p class="TXc">
                    <i class="el-icon-warning"></i>提示
                  </p>
                  <p class="mb20 mt10">
                    选择停止服务后，项目状态将显示为
                    <span style="color:red">停止服务</span>，本项目相关的电梯也将全部停保，不再生成维保计划。
                  </p>
                  <el-form :model="StopProject" :inline="true" label-position="left">
                    <el-row>
                      <span style="display: inline-block;margin-top: 12px;color: #F56C6C;">*</span>
                      <el-form-item label="停止服务描述：" :xs="24" :sm="24" :md="24" :lg="24">
                        <el-input placeholder="请输入描述" v-model="StopProject.endRemarks"></el-input>
                      </el-form-item>
                    </el-row>
                    <el-row>
                      <span style="display: inline-block;margin-top: 12px;color: #F56C6C;">*</span>
                      <el-form-item label="停止服务时间：" :xs="24" :sm="24" :md="24" :lg="24">
                        <el-date-picker
                          type="date"
                          placeholder="选择停止服务时间"
                          v-model="StopProject.stopTime"
                          value-format="yyyy-MM-dd"
                        ></el-date-picker>
                      </el-form-item>
                    </el-row>
                  </el-form>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogStopProject = false">取 消</el-button>
                  <el-button type="primary" @click="StopProjectSubmit">确 定</el-button>
                </div>
              </el-dialog>
            </div>

            <!--恢复服务-->
            <div class="ReProject">
              <el-dialog
                title="恢复服务"
                :visible.sync="dialogReProject"
                width="40%"
                :before-close="handleClose"
              >
                <div>
                  <el-form :model="ReProject" :inline="true" label-position="left">
                    <el-row>
                      <span style="display: inline-block;margin-top: 12px;color: #F56C6C;">*</span>
                      <el-form-item label="新开始时间" :xs="24" :sm="24" :md="24" :lg="24">
                        <el-date-picker
                          type="date"
                          placeholder="选择新开始时间"
                          v-model="ReProject.startDate"
                          value-format="yyyy-MM-dd"
                          :picker-options="Recompant0"
                        ></el-date-picker>
                      </el-form-item>
                    </el-row>
                    <el-row>
                      <span style="display: inline-block;margin-top: 12px;color: #F56C6C;">*</span>
                      <el-form-item label="新结束时间" :xs="24" :sm="24" :md="24" :lg="24">
                        <el-date-picker
                          type="date"
                          placeholder="选择新结束时间"
                          v-model="ReProject.endDate"
                          value-format="yyyy-MM-dd"
                          :picker-options="Recompant1"
                        ></el-date-picker>
                      </el-form-item>
                    </el-row>
                  </el-form>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogReProject = false">取 消</el-button>
                  <el-button type="primary" @click="ReProjectSubmit">确 定</el-button>
                </div>
              </el-dialog>
            </div>

            

            <!--删除项目-->
            <div class="DeleteProject">
              <el-dialog
                title="删除项目"
                :visible.sync="dialogDeleteProject"
                width="30%"
                :before-close="handleClose"
              >
                <p>
                  确定将
                  <span class="FontRed">{{DeleteProName}}</span> 删除吗？
                </p>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogDeleteProject = false">取 消</el-button>
                  <el-button type="primary">确 定</el-button>
                </div>
              </el-dialog>
            </div>

            

            <!--锁定项目-->
            <div class="Monitor">
              <el-dialog
                title="维保班长"
                :visible.sync="dialogMonitor"
                width="30%"
                :before-close="handleClose"
              >
                <p v-if="Monitor==0">确定将{{MonitorName}}设为维保班长？</p>
                <p v-if="Monitor==1">确定取消将{{MonitorName}}设为维保班长？</p>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button type="primary" @click="submitMonitor">确 定</el-button>
                  <el-button @click="dialogMonitor = false">取 消</el-button>
                </div>
              </el-dialog>
            </div>

            

            <!--操作记录-->
            <div class="ProjectHestory">
              <el-dialog
                title="大修操作记录"
                :visible.sync="dialogProjectHestory"
                width="80%"
                :before-close="handleClose"
              >
                <el-table :data="Hestorytable" border style="width: 100%;color:#101010" v-loading="PHestorytableLoad">
                  <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="Hestorytable.length"
                      @current-change="Hestoryclick"
                      @size-change="HestoryhandleSizeChange"
                      :page-sizes="[5, 10, 15, 20]"
                      :page-size="PHestorypagesize"
                    ></el-pagination>
                  </span>
                </div>
              </el-dialog>
            </div>

            <!--恢复电梯-->
            <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="StopLiftOne">
              <el-dialog
                title="恢复电梯"
                :visible.sync="dialogStopLiftOne"
                width="30%"
                :before-close="handleClose"
              >
                <p>确定将停保该电梯吗？</p>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogStopLiftOne = false">取 消</el-button>
                  <el-button type="primary" @click="StopLiftOne">确 定</el-button>
                </div>
              </el-dialog>
            </div>
            <!--停保电梯-->
            <div class="StopLiftOne">
              <el-dialog
                title="删除电梯"
                :visible.sync="dialogDeteleLiftOne"
                width="30%"
                :before-close="handleClose"
              >
                <p>确定将删除该电梯吗？</p>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogDeteleLiftOne = false">取 消</el-button>
                  <el-button type="primary" @click="DeteleLiftOne">确 定</el-button>
                </div>
              </el-dialog>
            </div>

            <!--绑定物联设备-->
            <div class="BindingDvice">
              <el-dialog
                title="绑定物联设备"
                :visible.sync="dialogBindingDvice"
                width="35%"
                :before-close="handleClose"
              >
                <div>
                  <el-form :model="BindingDvice" :inline="true" label-position="left">
                    <el-row class="mb20">
                      <el-col :sm="8" :md="8" :lg="8" class="selectUp">
                        <span>
                          物联设备类型
                          <i class="FontRed">﹡</i>
                        </span>
                      </el-col>
                      <el-col :sm="16" :md="16" :lg="16">
                        <el-select v-model="BindingDvice.Usage" filterable placeholder="选择物联设备类型">
                          <el-option
                            v-for="item in Usages"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                          ></el-option>
                        </el-select>
                      </el-col>
                    </el-row>
                    <el-row>
                      <el-col :sm="8" :md="8" :lg="8" class="selectUp">
                        <span>
                          物联设备ID
                          <i class="FontRed">﹡</i>
                        </span>
                      </el-col>
                      <el-col :sm="16" :md="16" :lg="16">
                        <el-input placeholder="输入物联设备ID" v-model="BindingDvice.deviceID"></el-input>
                      </el-col>
                    </el-row>
                  </el-form>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogBindingDvice = false">取 消</el-button>
                  <el-button type="primary">确 定</el-button>
                </div>
              </el-dialog>
            </div>

            <div class="Showcompleted">
              <el-dialog
                title="查看"
                :visible.sync="dialogShowcompleted"
                width="40%"
                :before-close="handleClose"
              >
                <div class="block">
                  <el-carousel height="350px">
                    <el-carousel-item v-for="item in ShowcompletedData" :key="item.id">
                      <el-image :src="item.imageUrl" fit="fill"></el-image>
                    </el-carousel-item>
                  </el-carousel>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogShowcompleted=false">取 消</el-button>
                </div>
              </el-dialog>
            </div>


            <!--竣工审核-->
            <div class="completed">
              <el-dialog
                :title="auditRepair==1?'竣工审核':'逾期审核'"
                :visible.sync="dialogcompleted"
                width="40%"
                :before-close="handleClose"
              >
                <div class="block" v-if="auditRepair==1">
                  <el-carousel height="350px">
                    <el-carousel-item v-for="item in completedData" :key="item.id">
                      <el-image :src="item.imageUrl" fit="fill"></el-image>
                    </el-carousel-item>
                  </el-carousel>
                </div>
                <div v-else>
                  <el-form :model="overdueFrom" :inline="true" label-position="left">
                    <el-row>
                      <el-form-item label="申请逾期时间：">
                        <span>{{overdueFrom.overdueDate}}</span>
                      </el-form-item>
                    </el-row>
                    <el-row>
                      <el-form-item label="申请逾期原因：">
                        <span>{{overdueFrom.overdueReason}}</span>
                      </el-form-item>
                    </el-row>
                  </el-form>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button type="primary" @click="Subaudit(1)">通过</el-button>
                  <el-button @click="Subaudit(0)">不通过</el-button>
                </div>
              </el-dialog>
            </div>

            <!--锁定电梯-->
            <div class="LockProject">
              <el-dialog
                title="批量锁定"
                :visible.sync="dialogLockLift"
                width="30%"
                :before-close="handleClose"
              >
                <p>确认批量锁定<span style="color:red">{{LockLiftLength}}</span>台电梯吗？</p>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button type="primary" @click="submitLockLift">确 认</el-button>
                  <el-button  @click="dialogLockLift = false">取 消</el-button>
                </div>
              </el-dialog>
            </div>

            <!--解锁电梯-->
            <div class="unLockProject">
              <el-dialog
                title="批量解锁"
                :visible.sync="dialogunLockLift"
                width="30%"
                :before-close="handleClose"
              >
                <p>确认批量解锁<span style="color:red">{{unLockLiftLength}}</span>台电梯吗？</p>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button type="primary" @click="submitUnLockLift">确 认</el-button>
                  <el-button  @click="dialogunLockLift = false">取 消</el-button>
                </div>
              </el-dialog>
            </div>

            <!--批量移动-->
            <div class="LiftMoveS">
              <el-dialog
                title="批量移动"
                :visible.sync="dialogLiftMoveS"
                width="35%"
                :before-close="handleClose"
              >
                <div>
                  <el-form :model="LiftMove" :inline="true" label-position="left">
                    <el-row class="mb20">
                      <el-col :sm="10" :md="10" :lg="10" class="selectUp">
                        <span>
                          将电梯移动到
                          <i class="FontRed">﹡</i>
                        </span>
                      </el-col>
                      <el-col :sm="14" :md="14" :lg="14">
                        <el-select v-model="LiftMove.projectId" filterable placeholder="请选择项目">
                          <el-option
                            v-for="item in projectList"
                            :key="item.projectId"
                            :label="item.projectName"
                            :value="item.projectId"
                          ></el-option>
                        </el-select>
                      </el-col>
                    </el-row>
                  </el-form>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogLiftMoveS = false">取 消</el-button>
                  <el-button type="primary" @click="LiftMoveS">确 定</el-button>
                </div>
              </el-dialog>
            </div>

            <!--批量停保-->
            <div class="StopLift">
              <el-dialog
                title="批量停保"
                :visible.sync="dialogStopLift"
                width="30%"
                :before-close="handleClose"
              >
                <p>
                  确定停保
                  <span class="FontRed">{{StopLiftNum}}</span> 台电梯吗？
                </p>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogStopLift = false">取 消</el-button>
                  <el-button type="primary" @click="StopLifts">确 定</el-button>
                </div>
              </el-dialog>
            </div>

            <!--地理位置-->
            <div class="LiftPosition">
              <el-dialog
                title="地理位置"
                :visible.sync="dialogLiftPosition"
                width="60%"
                :before-close="handleClose"
              >
                <div>
                  <v-bmap ref="child"></v-bmap>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogLiftPosition = false">关 闭</el-button>
                </div>
              </el-dialog>
            </div>

            <!--电梯操作记录-->
            <div class="LiftHestory">
              <el-dialog
                title="操作记录"
                :visible.sync="dialogLiftHestory"
                width="50%"
                :before-close="handleClose"
              >
                <el-table :data="LiftHestorytable" border style="width: 100%;color:#101010">
                  <el-table-column prop="Code" label="电梯编号"></el-table-column>
                  <el-table-column prop="Description" label="操作方式"></el-table-column>
                  <el-table-column prop="Content" label="变更内容"></el-table-column>
                  <el-table-column prop="Name" label="操作人"></el-table-column>
                  <el-table-column prop="OperateDate" label="操作时间"></el-table-column>
                </el-table>
                <div class="pagenation">
                  <span>
                    <el-pagination
                      background
                      layout="prev, pager, next, sizes, total, jumper"
                      :total="LiftHestorytable.length"
                      @current-change="click"
                      @size-change="handleSizeChange"
                      :page-sizes="[5, 10, 15, 20]"
                      :page-size="pagesize"
                    ></el-pagination>
                  </span>
                </div>
              </el-dialog>
            </div>


            <!--大修签到记录-->
            <div class="SignIn">
              <el-dialog title="大修签到记录" :visible.sync="dialogSignIn" width="70%" :before-close="handleClose">
                <div class="policyTop" style="margin-bottom: 10px;">
                  <el-row>
                    <el-col :sm="12" :md="12" :lg="12" class="mb5">
                      <el-row>
                        <el-col style="width:30%">大修编号：</el-col>
                        <el-col :title="policyRow.projectCode" style="width:55%;white-space: nowrap;overflow: hidden;">{{policyRow.projectCode}}</el-col>
                      </el-row>
                    </el-col>
                    <el-col :sm="12" :md="12" :lg="12" class="mb5">
                      <el-row>
                        <el-col :sm="12" :md="12" :lg="12" style="width:30%">项目名称：</el-col>
                        <el-col :sm="12" :md="12" :lg="12" :title="policyRow.projectName" style="width:55%;white-space: nowrap;overflow: hidden;">{{policyRow.projectName}}</el-col>
                      </el-row>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :sm="12" :md="12" :lg="12" class="mb5">
                      <el-row>
                        <el-col :sm="12" :md="12" :lg="12" style="width:30%">开机时间：</el-col>
                        <el-col :sm="12" :md="12" :lg="12" style="width:55%" :title="policyRow.startDate"
                        >{{policyRow.startDate}}</el-col>
                      </el-row>
                    </el-col>
                    <el-col :sm="12" :md="12" :lg="12" class="mb5">
                      <el-row>
                        <el-col :sm="12" :md="12" :lg="12" style="width:30%">竣工时间：</el-col>
                        <el-col :sm="12" :md="12" :lg="12" style="width:55%">{{policyRow.endDate}}</el-col>
                      </el-row>
                    </el-col>
                  </el-row>
                  <el-row>
                    <el-col :sm="10" :md="10" :lg="10" class="mb5">
                      <el-row>
                        <el-col :sm="6" :md="6" :lg="6" style="height: 30px;
    line-height: 30px;">选择日期：</el-col>
                        <el-col :sm="15" :md="15" :lg="15">
                          <el-date-picker
                            type="date"
                            placeholder="选择签到日期"
                            v-model="policyRow.signDate"
                            value-format="yyyy-MM-dd" @change="changeUser"
                          ></el-date-picker>
                        </el-col>
                      </el-row>
                    </el-col>
                    <el-col :sm="10" :md="10" :lg="10" class="mb5">
                      <el-row>
                        <el-col :sm="8" :md="8" :lg="8" style="height: 30px;
    line-height: 30px;">选择维保员：</el-col>
                        <el-col :sm="15" :md="15" :lg="15">
                          <el-select
                            v-model="policyRow.userId"
                            filterable
                            placeholder="选择维保员"
                            @change="changeUser"
                          >
                            <el-option
                              v-for="item in userListSign"
                              :key="item.userId"
                              :label="item.userName"
                              :value="item.userId"
                            ></el-option>
                          </el-select>
                        </el-col>
                      </el-row>
                    </el-col>
                    <!-- <el-form-item
                      label="选择日期："
                    >
                      <el-date-picker
                        type="date"
                        placeholder="选择签到日期"
                        v-model="policyRow.signDate"
                        value-format="yyyy-MM-dd"
                      ></el-date-picker>
                    </el-form-item> -->
                    <!-- <el-form-item
                      label="选择维保员："
                    >
                      <el-select
                        v-model="policyRow.userId"
                        filterable
                        placeholder="选择维保员"
                        @change="changeUser"
                      >
                        <el-option
                          v-for="item in userListSign"
                          :key="item.userId"
                          :label="item.userName"
                          :value="item.userId"
                        ></el-option>
                      </el-select>
                    </el-form-item> -->
                  </el-row>
                </div>
                <el-table
                  :data="policytable"
                  border
                  style="width: 100%;color:#101010"
                >
                   <template v-for="(item,index) in signHeader">
                      <el-table-column v-if="item.comment=='日期'"
                          :prop="item.name1"
                          :label="item.comment"
                          >
                      </el-table-column>
                      <el-table-column v-else :label="item.comment" :key="index">
                        <el-table-column
                          :prop="item.name1"
                          label="签到"
                          >
                        </el-table-column>
                        <el-table-column
                          :prop="item.name2"
                          label="签退"
                          >
                        </el-table-column>
                      </el-table-column>
                   </template>
                </el-table>
                <div class="pagenation">
                  <span>
                    <el-pagination
                      background
                      layout="prev, pager, next, sizes, total, jumper"
                      :total="policytableTotal"
                      @current-change="Signclick"
                      @size-change="SignhandleSizeChange"
                      :page-sizes="[5, 10, 15, 20]"
                      :page-size="SignpageSize"
                    ></el-pagination>
                  </span>
                </div>
                <div slot="footer" class="dialog-footer" style="text-align: center;">
                  <el-button @click="dialogSignIn = false">关 闭</el-button>
                </div>
              </el-dialog>
            </div>




            <!-- 新增/编辑电梯模态框 -->
            <div>
              <el-dialog
                :title='addLi==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="addLi==1?false:true" @blur="preJudgment" maxlength="20" />
                      </div>
                      <!-- <el-input v-model="AddLift.registrationCode" :disabled="addLi==1?false:true" placeholder="输入注册代码" @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="addLi==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="addLi==1" type="primary" @click="submitAddLift('LiftForm')">确 定</el-button>
                  <el-button v-if="addLi==2" type="primary" @click="submitEditLift('LiftForm')">确 定</el-button>
                </div>
              </el-dialog>
            </div>

           
            <div class="ChooseHestory">
              <el-dialog
                title="选取电梯"
                :visible.sync="dialogChooseHestory"
                width="70%"
                :before-close="handleClose"
              >
                <el-table :data="ChooseHestorytable" border style="width: 100%;color:#101010" @selection-change="ChoosehandleSelectionChange" v-loading="ChooseHestorytableLoad">
                  <el-table-column type="selection"></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 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="100px" :show-overflow-tooltip="true"></el-table-column>
                  <el-table-column prop="liftBrand" label="品牌" :show-overflow-tooltip="true"></el-table-column>
                  <el-table-column prop="workerName" label="维保工"></el-table-column>
                  <el-table-column prop="annualInspectionDate" label="年检日期"></el-table-column>
                  <el-table-column prop="liftStatus" label="电梯状态">
                    <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 prop="DeviceID" label="物联设备"></el-table-column>
                </el-table>
                <div class="pagenation">
                  <span>
                    <el-pagination
                      background
                      layout="prev, pager, next, sizes, total, jumper"
                      :total="ChooseHestorytableTotal"
                      @current-change="Chooseclick"
                      @size-change="ChoosehandleSizeChange"
                      :page-sizes="[5, 10, 15, 20]"
                      :page-size="Choosepagesize"
                    ></el-pagination>
                  </span>
                </div>
                <div slot="footer" class="dialog-footer Txc">
                  <el-button @click="dialogChooseHestory = false">取 消</el-button>
                  <el-button type="primary" @click="ChooseSubmit">确 定</el-button>
                </div>
              </el-dialog>
            </div>

            <!-- 电梯信息模态框 -->
            <div class="LiftList">
              <el-dialog
                title="电梯信息"
                :visible.sync="dialogLiftList"
                width="80%"
                :before-close="handleClose"
              >
                <el-row style="padding-bottom:15px">
                  <el-col :xs="16" :sm="16" :md="16" :lg="16">
                    <el-button type="primary" plain @click="addLiftOne">
                      <i class="el-icon-plus"></i>添加电梯
                    </el-button>
                    <!-- <el-button type="primary" plain @click="LockLift">批量锁定</el-button>
                    <el-button type="primary" plain @click="unLockLift">批量解锁</el-button> -->
                    <el-button type="primary" plain @click="ChooseLift">选取电梯</el-button>
                    <!-- <el-button type="primary" plain @click="StopLift">批量停保</el-button> -->
                    <el-button type="primary" plain @click="MoveLift">批量移动</el-button>
                    
                  </el-col>
                  <el-col :xs="8" :sm="8" :md="8" :lg="8">
                    <el-input placeholder="模糊搜索" suffix-icon="el-icon-search" v-model="SearchFor"></el-input>
                  </el-col>
                </el-row>
                <el-table :data="LiftData" border style="width: 100%" @selection-change="handleSelectionChange" v-loading="LiftDataLoad">
                  <el-table-column type="selection"></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">
                    <template slot-scope="props">
                      <span :style="{color:props.row.liftLocked==1?'#9B9B9B':'#333'}">{{props.row.registrationCode}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column label="电梯类型">
                    <template slot-scope="props">
                      <span :style="{color:props.row.liftLocked==1?'#9B9B9B':'#333'}">{{props.row.liftType==1?'直梯':(props.row.liftType==2?'扶梯':'')}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column prop="devicePosition" label="设备内部编号" min-width="100px" :show-overflow-tooltip="true">
                    <template slot-scope="props">
                    <span :style="{color:props.row.liftLocked==1?'#9B9B9B':'#333'}">{{props.row.devicePosition}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column prop="liftBrand" label="品牌" :show-overflow-tooltip="true">
                    <template slot-scope="props">
                    <span :style="{color:props.row.liftLocked==1?'#9B9B9B':'#333'}">{{props.row.liftBrand}}</span>
                    </template>
                  </el-table-column>
                  <!-- <el-table-column prop="workerName" label="维保工">
                    <template slot-scope="props">
                    <span :style="{color:props.row.liftLocked==1?'#9B9B9B':'#333'}">{{props.row.workerName}}</span>
                    </template>
                  </el-table-column> -->
                  <el-table-column prop="annualInspectionDate" label="年检日期">
                    <template slot-scope="props">
                      <span :style="{color:props.row.liftLocked==1?'#9B9B9B':'#333'}">{{props.row.annualInspectionDate}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column prop="liftStatus" label="电梯状态">
                    <template slot-scope="props">
                      <span :style="{color:props.row.liftLocked==1?'#9B9B9B':'#333'}">{{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 prop="DeviceID" label="物联设备">
                    <template slot-scope="props">
                      <span :style="{color:props.row.liftLocked==1?'#9B9B9B':'#333'}">{{props.row.DeviceID}}</span>
                    </template>
                  </el-table-column>
                  <el-table-column label="操作" min-width="200px;" fixed="right">
                    <template slot-scope="props">
                      <el-button
                        v-if="props.row.coordinate==''||props.row.coordinate==null"
                        size="mini"
                        class="mr5"
                      >未定位</el-button>
                      <el-button v-else size="mini" class="mr5" @click="LiftPosition(props.row)">地理位置</el-button>
                      <el-dropdown trigger="hover" slot="label" @command="handleCommandLift">
                        <el-button class="el-dropdown-link" size="mini" type="primary">
                          更多
                          <i class="el-icon-arrow-down el-icon--right"></i>
                        </el-button>
                        <el-dropdown-menu slot="dropdown">
                          <!-- <el-dropdown-item
                            v-if="!props.row.DeviceID"
                            :command="composeValue('BindIOT',props.row)"
                          >绑定物联设备</el-dropdown-item>
                          <el-dropdown-item
                            v-if="props.row.DeviceID"
                            :command="composeValue('UnBindIOT',props.row)"
                          >解绑物联设备</el-dropdown-item> -->
                          <!-- v-if="props.row.liftLocked==0&&props.row.liftStatus==2" -->
                          <el-dropdown-item
                            :command="composeValue('LiftUpdate',props.row)"
                          >编辑</el-dropdown-item>
                          <!-- <el-dropdown-item
                            v-if="props.row.liftStatus==2"
                            :command="composeValue('LiftUpdate',props.row)"
                          >编辑</el-dropdown-item> -->

                          <!-- <el-dropdown-item :command="composeValue('UpdateIn',props.row)">修改间隔</el-dropdown-item> -->
                          <!-- v-if="props.row.liftLocked==0&&props.row.liftStatus==2" -->
                          <el-dropdown-item
                         
                            :command="composeValue('LiftDelete',props.row)"
                          >删除</el-dropdown-item>
                           <!-- v-if="props.row.liftStatus==1" -->
                          <el-dropdown-item
                           
                            :command="composeValue('LiftRecover',props.row)"
                          >恢复</el-dropdown-item>
                            <!-- v-if="props.row.IsLocked==0" -->
                          <!-- <el-dropdown-item v-else :command="composeValue('LiftStop',props.row)">停保</el-dropdown-item> -->
                          <el-dropdown-item
                          
                            :command="composeValue('addCopy',props.row)"
                          >复制添加</el-dropdown-item>
                          <el-dropdown-item :command="composeValue('LiftHestory',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>
              </el-dialog>
            </div>


         
            <!-- motal -->
          </div>
        </el-tabs>
      </el-row>
    </div>
  </div>
</template>

<script>
import header from "../../components/header/header.vue";
import leftside from "../../components/header/leftside.vue";
import Bmap from "../../components/home/amaps.vue";
// 引入高德使用高德
import aMap from "vue-amap";
import { lazyAMapApiLoaderInstance } from "vue-amap";
// 初始化高德
aMap.initAMapApiLoader({
  key: "937eb4405db2a8895695506871c3a1d5",
  plugin: [
    "AMap.Autocomplete",
    "AMap.PlaceSearch",
    "AMap.Scale",
    "AMap.OverView",
    "AMap.ToolBar",
    "AMap.MapType",
    "AMap.PolyEditor",
    "AMap.CircleEditor"
  ],
  v: "1.4.4",
  uiVersion: "1.0.11"
});
export default {
  components: {
    appHeader: header,
    leftSide: leftside,
    vBmap: Bmap
  },
  name: "project",
  props: {
    codeLength: {
      default: 20,
      type: Number
    }
  },
  data() {
    //表格
    var validateTiltAngle = (rule, value, callback) => {
      if (value > 360) {
        return callback(new Error("输入最大倾斜度值不能超过360"));
      } else {
        return callback();
      }
    };
    //手机号码
    var validatePhone = (rule, value, callback) => {
      if (value === "") {
        return callback(new Error("甲方联系人电话不能为空"));
      } else if (!/^\d{3,4}-\d{7,8}|1[3,4,5,7,8,9]\d{9}$/.test(value)) {
        return callback(new Error("甲方联系人联系电话格式不正确"));
      } else {
        return callback();
      }
    };

    
    //编辑项目赋值
    const _initProjectForm = Project => {
      const _ProjectForm = {
        startDate: "",
        endDate: "",
        regionId:"",
        districtCode: "",
        district:"",
        projectName:"",
        projectUsage:"",
        ppCompanyId:"",
        ppContactId:"",
        province:"",
        provinceCode:"",
        city:"",
        cityCode:"",
        coordinate:"",
        projectAddress:"",

      };
      if(Project){
        _ProjectForm.startDate = Project.startDate;
        _ProjectForm.endDate = Project.endDate;
        _ProjectForm.regionId = Project.regionId;
        _ProjectForm.districtCode = Project.districtCode;
        _ProjectForm.coordinate = Project.coordinate;
        _ProjectForm.projectAddress = Project.projectAddress;
        _ProjectForm.district = Project.district;
        _ProjectForm.projectName = Project.projectName;
        _ProjectForm.projectUsage = parseInt(Project.projectUsage);
        _ProjectForm.ppCompanyId = Project.ppCompanyId;
        _ProjectForm.ppContactId = Project.ppContactId;
      }else{
        _ProjectForm.startDate = ""
        _ProjectForm.endDate = ""
        _ProjectForm.regionId = ""
        _ProjectForm.districtCode = ""
        _ProjectForm.district = ""
        _ProjectForm.projectName = ""
        _ProjectForm.projectUsage = ""
        _ProjectForm.ppCompanyId =""
        _ProjectForm.ppContactId = ""
        _ProjectForm.coordinate =""
        _ProjectForm.projectAddress = ""
      }
      
      //console.log(_ProjectForm);
      return _ProjectForm;
    };

    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:"",//品种
        workerId:""
      };

      _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;
      _AddLift.workerId = Lift.workerId;

      //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 {
      //map
      // map
      codeList: [],
      code: "",
      projectAddress:"",
      marker: 
        []
      ,
      searchOption: {
        city: '武汉',
        citylimit: false
      },
      mapCenter: [114.305252, 30.592762],
      IsonSearch:false,

      //
      dialogChooseHestory:false,
      ChooseHestorytable:[],
      ChooseHestorytableLoad:false,
      ChooseHestorytableTotal:10,
      Choosepagesize:10,
      Choosecurrpage:1,
      activeName: "first",
      textNum: {
        firstText: "",
        secondText: "",
        thirdText: "",
        fourthText: "",
        firthText:"",
      },
      compant0:{
        disabledDate:time=>{
          if(this.projectForm.endDate!=""){
            return time.getTime()>new Date(this.projectForm.endDate.replace(/-/g,'/')).getTime()
          }
        }
      },
      compant1:{
        disabledDate:time=>{
          if(this.projectForm.startDate!=""){
            return time.getTime()<new Date(this.projectForm.startDate.replace(/-/g,'/')).getTime()
          }
        }
      },
      Recompant0:{
        disabledDate:time=>{
          if(this.ReProject.endDate!=""){
            return time.getTime()>new Date(this.ReProject.endDate.replace(/-/g,'/')).getTime()
          }
        }
      },
      Recompant1:{
        disabledDate:time=>{
          if(this.ReProject.startDate!=""){
            return time.getTime()<new Date(this.ReProject.startDate.replace(/-/g,'/')).getTime()
          }
        }
      },
      detailProject:{
        projectNum:"",
        LiftNum:"",
        StopNum:"",
      },
      car1: true,
      tableId: "",

      //下拉框数据
      options: [
        {
          value: 1,
          label: "湖北省"
        },
        {
          value: 2,
          label: "浙江省"
        },
        {
          value: 3,
          label: "江苏省"
        },
        {
          value: 4,
          label: "广东省"
        },
        {
          value: 5,
          label: "福建省"
        }
      ],
      RegionList:[],
      RegionListRole:[],
      DistrictList:[],
      ProjectSearch:{
        provinceCode: "",
        cityCode: "",
        districtCode:"",
        regionId:"",
        userId:"",
        condition:"",
      },
      
      CityOptions: [],
      ProvinceList:[],
      CityList:[],


      //表格
      PlanIntervalss: [
        {
          value: 1,
          label: 1
        },
        {
          value: 2,
          label: 2
        },
        {
          value: 3,
          label: 3
        },
        {
          value: 4,
          label: 4
        },
        {
          value: 5,
          label: 5
        },
        {
          value: 6,
          label: 6
        },
        {
          value: 7,
          label: 7
        },
        {
          value: 8,
          label: 8
        },
        {
          value: 9,
          label: 9
        },
        {
          value: 10,
          label: 10
        },
        {
          value: 11,
          label: 11
        },
        {
          value: 12,
          label: 12
        },
        {
          value: 13,
          label: 13
        },
        {
          value: 14,
          label: 14
        },
        {
          value: 15,
          label: 15
        }
      ],

      options: [
        {
          value: 1,
          label: "湖北省"
        },
        {
          value: 2,
          label: "浙江省"
        },
        {
          value: 3,
          label: "江苏省"
        },
        {
          value: 4,
          label: "广东省"
        },
        {
          value: 5,
          label: "福建省"
        }
      ],
      Usages: [
        {
          value: 1,
          label: "中盛"
        },
        {
          value: 2,
          label: "核歌"
        },
        {
          value: 3,
          label: "中秀"
        },
        {
          value: 4,
          label: "海康"
        }
      ],
      ppcOptions: [
        {
          Name: "哇哈哈",
          MTCompanyID: 1
        },
        {
          Name: "泛海物业",
          MTCompanyID: 2
        }
      ],
      ppmOptions: [],
      projectList: [
        {
          ID: 1001104125705,
          Name: "香海园"
        },
        {
          ID: 1001104125706,
          Name: "云海园"
        },
        {
          ID: 1001104125707,
          Name: "测试项目"
        },
        {
          ID: 1001104125708,
          Name: "测试项目2"
        }
      ],
      VisibleProject:"",
      //电梯操作记录数据
      LiftHestorytable: [
        {
          Code: "ZT000015",
          Content: "恢复电梯",
          Description: "恢复电梯",
          ID: 0,
          LiftID: 1001105202148,
          MTCompanyID: 1001102110557,
          Name: "彭丹",
          OperateDate: "2019-08-16 05:39:46",
          RegistrationCode: null
        },
        {
          Code: "ZT000015",
          Content: "停保电梯",
          Description: "停保电梯",
          ID: 0,
          LiftID: 1001105202148,
          MTCompanyID: 1001102110557,
          Name: "彭丹",
          OperateDate: "2019-08-16 05:39:44",
          RegistrationCode: null
        }
      ],
      //安全钳类型
      safetyClampTypes: [
        {
          value: 1,
          label: "瞬时式安全钳"
        },
        {
          value: 2,
          label: "渐进式安全钳"
        }
      ],
      //电梯维保负责人
      selWorker: [
        {
          value: 1001101131069,
          label: "彭丹"
        },
        {
          value: 1001101131132,
          label: "黄龙山"
        }
      ],
      //品牌列表
      BrandList: [
        {
          value: 1,
          label: "武汉东菱富士"
        },
        {
          value: 2,
          label: "华升富士达"
        }
      ],
      LiftData: [],
      LiftDataLoad:false,
      LiftTotal: 10,
      Liftpagesize: 10,
      Liftcurrpage: 1,
      tableData: [],
      ProjectTableLoad:false,
      ProjectStatus:2,
      ProjectTotal: 10,

      Hestorytable: [
      ],
      multipleSelection: [],
      pagesize: 10,
      currpage: 1,
      //模态框状态值
      dialogVisible: false,
      dialogLiftList: false,
      projectFormDialog: false,
      addPpmDialog:false,
      ClerkName:"",
      ClerkNameList:[],
      RegionWorkerName:"",
      RegionWorkerNameId:"",
      addPpcDialog:false,
      dialogInterval: false,
      dialogStopProject: false,
      StopProjectID:"",
      dialogLockProject: false,
      dialogMonitor:false,
      MoveMonitorId:0,
      AddMonitorId:0,
      Monitor:0,
      MonitorName:"",
      dialogProjectHestory: false,
      PHestorytableLoad: false,
      ProHestoryId:"",
      PHestorypagesize:10,
      PHestorytableTotal:10,
      PHestorycurrpage:1,
      dialogStartProject: false,
      StartProjectID:"",
      StartProject:{endDate:""},
      ReProjectID:"",
      dialogReProject: false,
      dialogDeleteProject: false,
      dialogcompleted:false,
      dialogoverdue:false,
      auditRepair:0,
      completedData:[
        {
          imageUrl:
            "",
          mtRecordId: 10011091049211,
          id: 1
        }
      ],
      dialogShowcompleted:false,
      ShowcompletedData:[
        {
          imageUrl:
            "",
          mtRecordId: 10011091049211,
          id: 1
        }
      ],
      overdueFrom:{
        overdueDate:'',
        overdueReason:'',
      },
      completedId:'',
      overdueId:'',
      dialogoverdue:false,
      dialogunLockProject: false,
      dialogBindingDvice: false,
      dialogLockLift: false,
      dialogunLockLift: false,
      dialogLiftMoveS: false,
      dialogStopLift: false,
      dialogAddLift: false,
      dialogSignIn:false,
      userListSign:[],
      policyRow:{
        projectCode:'',
        projectName:'',
        startDate:'',
        endDate:'',
        signDate:'',
        userId:''
      },
      SignId:'',
      SignpageSize:10,
      SignpageNum:1,
      policytableTotal:10,
      policytable:[],
      signHeader:[{
        comment:'日期',
        name1:'signDate'
      }],
      dialogLiftPosition: false,
      dialogReLift: false,
      ReLiftId:"",
      dialogStopLiftOne: false,
      dialogDeteleLiftOne:false,
      DeteleLiftOneId:"",
      dialogLiftHestory: false,
      handleClose: null,
      //绑定值
      DeleteProName: "",
      overTime: "",
      SearchFor: "",
      PlanInterval: 15,
      //电梯选中值
      liftChoose: [],
      liftChoose1:[],
      //新增、编辑电梯值
      AddLift: {},
      initLiftForm(Lift) {
        this.AddLift = _initLiftForm(Lift);
      },
      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"
          }
        ],
        ratedLoad: [
          { required: true, message: "电梯载重不能为空", trigger: "blur" },
          {
            pattern: /^[+-]?(0|([1-9]\d*))(\.\d+)?$/,
            message: "输入值必须是数字",
            trigger: "blur"
          }
        ],
        layerStationDoor: [
          { required: true, message: "层站门不能为空", trigger: "blur" }
        ],
        clampType: [
          { 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" }
        ],
        // workerId:[
        //   { 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" }],
      },
      //电梯类型
      Type: [
        {
          value: 1,
          label: "直梯"
        },
        {
          value: 2,
          label: "扶梯"
        }
      ],
      //电梯类别
      Lifttype: [],
      //控制电梯类别出来
      LiftTypeShow: false,
      //控制电梯框出来
      InputShow: false,
      InputShowBtn: false,
      //控制不同类型的框出来
      CategoryShow: "",
      //控制直梯扶梯出来
      LiftBoxShow: "",
      //停保电梯数量
      StopLiftNum: "",
      relevanceId:"",
      RerelevanceId:"",
      StopLiftOneId:"",
      //用途列表
      PUsageoptions: [
        {
          value: 1,
          label: "住宅"
        },
        {
          value: 2,
          label: "办公楼"
        },
        {
          value: 3,
          label: "医院"
        },
        {
          value: 4,
          label: "商场"
        },
        {
          value: 5,
          label: "工厂"
        },
        {
          value: 6,
          label: "酒店"
        },
        {
          value: 7,
          label: "交通枢纽"
        },
        {
          value: 8,
          label: "学校"
        },
        {
          value: 9,
          label: "剧场"
        },
        {
          value: 10,
          label: "其他"
        }
      ],
      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: "人行道"
        }
      ],
      projectForm: {},
      projectStatus:2,
      addPro:"",
      addLi:"",
      preSumbitID:"",
      //项目规则

      projectFormRule: {
        startDate: [
          { required: true, message: "请输入开始时间", trigger: "blur" }
        ],
        endDate: [
          { required: true, message: "请输入结束时间", trigger: "blur" }
        ],
        province: [{ required: true, message: "请输入省", trigger: "blur" }],
        city: [{ required: true, message: "请输入市", trigger: "blur" }],
        districtCode: [{ required: true, message: "请输入区", trigger: "blur" }],
        regionId: [
          { required: true, message: "请输入区域名称", trigger: "blur" }
        ],
        projectName: [
          { required: true, message: "请输入项目名称", trigger: "blur" },
          { max: 30, message: "输入最大长度不能超过30个汉字", trigger: "blur" }
        ],
        address: [
          { required: true, message: "请输入项目地址", trigger: "blur" },
          {
            max: 100,
            message: "输入最大长度不能超过100个汉字",
            trigger: "blur"
          }
        ],
        projectUsage: [{ required: true, message: "请输入项目用途", trigger: "blur" }],
     
        ppCompanyId: [
          { required: true, message: "请输入甲方名称", trigger: "blur" }
        ],
        ppContactId: [
          { required: true, message: "请输入甲方联系人", trigger: "blur" }
        ]
      },
      addPpc:{
        ppc_name:""
      },
      addPpm:{
        ppm_name:"",
        ppm_tel:""
      },
      //甲方名称规则
      addPpcRule:{
        ppc_name: [
          { required: true, message: "公司名称不能为空", trigger: "blur" },
          { max: 50, message: "最大输入长度50个字符，请修改输入", trigger: "blur" }
        ]
      },
      //甲方联系人
      addPpmRule:{
        ppm_name:[
          { required: true, message: "甲方联系人不能为空", trigger: "blur" },
          { max: 30, message: "最大输入长度30个字符，请修改输入", trigger: "blur" }
        ],
        ppm_tel: [
          [{ validator: validatePhone, trigger: "blur" }],
        ],
      },

      initProjectForm(project) {
        this.projectForm = _initProjectForm(project);
      },
      StopProject: {
        endRemarks: "",
        stopTime: ""
      },
      ReProject: {
        endDate: "",
        StartDate: ""
      },
      BindingDvice: {
        Usage: "",
        deviceID: ""
      },
      LiftMove: {
        projectId: ""
      },
      data:[],
      Visiblevalue: [],
      VisiblevalueLoad:false,
      RegionNumvalue:"",
      isMonitorValue:"",
      
      ProjectCheck:"",
      EditProjectID:"",
      preLiftID:"",
      LockId:"",
      UnLockId:"",
      LockLiftLength:"",
      unLockLiftLength:"",

    };
  },
  created(){
    //下拉框
    this.showProvince(1,0)
    this.getRegionList()
    this.getRegionListRole()
    this.getcountAll(2)

    //表格
    this.LiftData = [
    ];

    this.showProjectData(this.ProjectStatus,1,10)
  },
  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);
      }
    }
  },
  methods: {
    getCode() {
      return this.AddLift.registrationCode;
    },
    changeProject(tab, event) {
      if (tab.$el.id == "pane-first") {
        this.ProjectStatus = 2;
        this.showProjectData(2,1,10)
        this.getcountAll(2)
      } else if (tab.$el.id == "pane-second") {
        this.ProjectStatus = 4;
        this.showProjectData(4,1,10)
        this.getcountAll(4)
      } else if (tab.$el.id == "pane-third") {
        this.ProjectStatus = 1;
        this.showProjectData(1,1,10)
        this.getcountAll(0)
      } else if (tab.$el.id == "pane-fourth") {
        this.ProjectStatus = 3;
        this.showProjectData(3,1,10)
        this.getcountAll(3)
      } else if (tab.$el.id == "pane-fifth") {
        this.ProjectStatus = 5;
        this.showProjectData(5,1,10)
        this.getcountAll(5)
      } 
    },
    //下拉框
    //省市区
    showProvince(type,code){
      var data = "";
      var url = "business/common/area/list";
      var param = {
          code:code
        };
        this.axios.post(url, param).then(result => {
        data = result.data;
        //console.log(result)
        if(type==1){
          this.ProvinceList = data
        }else if(type==2){
          // data.map((item) => {
          //     if(item.code==this.ProjectSearch.provinceCode){
          //       this.CityList = item.children;
          //     }
          // })
          this.CityList = data
        }else if(type==3){
          // this.CityList.map((item) => {
          //     if(item.code==this.ProjectSearch.cityCode){
          //       this.DistrictList = item.children;
          //     }
          // })
          this.DistrictList = data
        }
      });
    },
    changeDis(){
      this.DistrictList.map((item)=>{
        if(item.code==this.projectForm.districtCode){
          this.projectForm.district = item.name
        }
      })
    },
    //添加项目
    addProject(){
      this.addPro=1;
      this.handleCommand({ button: "Update", row: "" });
    },
    getRegionListRole(){
      var url = "system/companyuser/getCompanyMembers";
      var param = {
        companyId: JSON.parse(sessionStorage.getItem('mtCompanyId')),
        roleCode:"REGION_DIRECTOR"
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"||data.statusCode==="9"){
          this.RegionListRole = data.data?data.data:[]
        }else{
          this.$message.error(data.message);
        }
      })
    },
    //获取区域下拉框数据
    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"||data.statusCode==="9"){
          this.RegionList = data.data
        }else{
          this.$message.error(data.message);
        }
       
        //console.log(data.data)
      })
    },

    //表格

    //项目列表数据
    showProjectData(projectStatus,pageNum,pageSize) {
      this.ProjectTableLoad = true;
      var url = "business/capital/repair/list";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        projectStatus: projectStatus,
        pageNum: pageNum,
        pageSize: pageSize
      };
      this.ProjectSearch.provinceCode?(param.provinceCode=this.ProjectSearch.provinceCode):""
      this.ProjectSearch.cityCode?(param.cityCode=this.ProjectSearch.cityCode):""
      this.ProjectSearch.districtCode?(param.districtCode=this.ProjectSearch.districtCode):""
      this.ProjectSearch.regionId?(param.regionId=this.ProjectSearch.regionId):""
      this.ProjectSearch.condition?(param.condition=this.ProjectSearch.condition):""
      this.ProjectSearch.userId?(param.userId=this.ProjectSearch.userId):""

      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.ProjectTableLoad=false;
        if(data.statusCode==="1"){
          this.tableData = data.data?data.data.rows:[]
          this.ProjectTotal = data.data?data.data.total:0;
        }else if(data.statusCode==="9"){
          this.tableData = []
          this.ProjectTotal = 0;
        }else{
          this.$message.error(data.message);
        }
      });
    },
    // 模态框调用
    handleClick(a) {
      this.VisibleProject = a
      this.getCompanyMembers(a)
      this.dialogVisible = true;
    },
    handleSignInClick(a,pageNum,pageSize,signDate,userId){
      this.SignId=a
      this.showUserIdSign(a.id)
      this.policyRow = {}
      this.policytable=[]
      this.signHeader=[{
        comment:'日期',
        name1:'signDate'
      }]
      var url = "business/capital/repair/signIn/record";
      var param = {
        id:a.id,
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        pageNum: pageNum,
        pageSize: pageSize,
        signDate:signDate,
        userId:userId,
      };

      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
            this.policyRow = data.data?data.data.capitalRepair:{}
            if(data.data.resultPage){
              this.policytableTotal = data.data.resultPage?data.data.resultPage.total:0
              data.data.resultPage?data.data.resultPage.rows[0].signRecords.map((item,index)=>{
                this.signHeader.push({
                  comment:item.userName,name1:'approachTime'+(index+1),name2:'leavingTime'+(index+1)
                })
              }):''
              data.data.resultPage?data.data.resultPage.rows.map((item,index)=>{
                var i=data.data.resultPage.rows[0].signRecords.length
                var json={
                  signDate:item.signDate,
                }
                for(var j=1;j<=i;j++){
                  json['approachTime'+j] = item.signRecords[j-1].approachTime
                  json['leavingTime'+j] = item.signRecords[j-1].leavingTime
                }

                this.policytable.push(json)
                
              }):''
              //console.log(this.signHeader)
            }
          
        }else{
          this.$message.error(data.message);
        }
      });
      this.dialogSignIn = true;
    },
    // 分页页码
    click(val) {
      this.currpage = val;
      this.showProjectData(this.ProjectStatus,val,this.pagesize)
      //console.log(1)
    },
    Signclick(val) {
      this.SignpageNum = val;
      this.handleSignInClick(this.SignId,this.SignpageNum,this.SignpageSize,this.policyRow.signDate,this.policyRow.userId)
     
    },
    // 分页显示条数
    handleSizeChange(val) {
      this.pagesize = val;
      this.showProjectData(this.ProjectStatus,this.currpage,val)
      //console.log(2)
    },
    SignhandleSizeChange(val) {
      this.SignpageSize = val;
      this.handleSignInClick(this.SignId,this.SignpageNum,this.SignpageSize,this.policyRow.signDate,this.policyRow.userId)
    },
    Chooseclick(val){
      this.Choosecurrpage = val;
      this.getChooseLiftData(val,this.Choosepagesize)
    },
    ChoosehandleSizeChange(val) {
      this.Choosepagesize = val;
      this.getChooseLiftData(this.Choosecurrpage,val)
    },
    Liftclick(val) {
      this.Liftcurrpage = val;
      this.ProjectshowLift(val,this.Liftpagesize)
      //console.log(1)
    },
    LifthandleSizeChange(val){
      this.Liftpagesize = val;
      this.ProjectshowLift(this.Liftcurrpage,val)
    },
    HestoryhandleSizeChange(val){
      this.PHestorypagesize = val;
      this.showPHestorytable(this.PHestorycurrpage,this.PHestorypagesize)
    },
    Hestoryclick(val) {
      this.PHestorycurrpage = val;
      this.showPHestorytable(this.PHestorycurrpage,this.PHestorypagesize)
    },
    //项目下的电梯数据
    ProjectshowLift(currpage,pagesize){
      this.LiftDataLoad = true;
      var url = "business/capital/repair/lift/list";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        projectId:this.ProjectCheck,
        pageNum:currpage,
        pageSize:pagesize
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.LiftDataLoad = false
        if(data.statusCode==="1"){
          this.LiftData = data.data?data.data.rows:[]
          this.LiftTotal = data.data?data.data.total:0;
        }else if(data.statusCode==="9"){
          this.LiftData = []
          this.LiftTotal = 0;
        }else{
          this.$message.error(data.message);
        }

      })

    },
    handleChange(value, direction, movedKeys) {
      //console.log(value);
      //console.log(direction);
      //console.log(movedKeys);
      var addList=[]
      movedKeys.map(a=>{
        addList.push({
          userId:a
        })
      })
      if(direction=="right"){
        var url = "business/project/user/batch/add";
        var param = {
          mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
          projectId:this.VisibleProject.id,
          userList:addList
        };
        this.axios.post(url, param).then(result => {
          var data = result;
          if(data.statusCode==="1"){
            this.getCompanyMembers(this.VisibleProject);
          }else{
            this.$message.error(data.message);
          }
        })
      }else if(direction=="left"){
        var url = "business/project/user/batch/remove";
        var param = {
          mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
          projectId:this.VisibleProject.id,
          userList:addList
        };
        this.axios.post(url, param).then(result => {
          var data = result;
          if(data.statusCode==="1"){
            this.getCompanyMembers(this.VisibleProject);
          }else{
            this.$message.error(data.message);
          }
        })
      }
    },
    // 电梯信息模态框
    showLiftList(a) {
      this.showBrandList()
      this.getWorkList()
      this.dialogLiftList = true;
      this.ProjectCheck = a.id
      this.ProjectshowLift(1,10)
    },
  
    // 电梯信息选中
    handleSelectionChange(val) {
      this.liftChoose = val;
      //console.log(val);
    },
    ChoosehandleSelectionChange(val){
      this.liftChoose1 = val;
      //console.log(val);
    },
    ChooseSubmit(){
      var list = [];
      for(var i=0;i<this.liftChoose1.length;i++){
        list.push(
          {
            projectId:this.ProjectCheck,
            workerId:this.liftChoose1[i].workerId,
            mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
            liftId:this.liftChoose1[i].id,
            // relevanceId:this.liftChoose1[i].companyRelevanceId
          }
        )
      }
      var url = "business/capital/repair/batch/insert";
      var param = {
        list:list
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.$message.success(data.message);
          this.dialogChooseHestory = false;
          this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
        }else{
          this.$message.error(data.message);
        }
      })
    },
    // 电梯信息表头颜色
    tableHeaderColor({ row, column, rowIndex, columnIndex }) {
      if (rowIndex === 0) {
        return "background-color:pink;color:#fff";
      }
    },
    //新增编辑项目
    handleCommand(command) {
      // if (projectId) {
      //   this.initForm(projectId);
      // }
      if (command.button == "Update") {
        this.getCompanyList()
        this.IsonSearch = false
        this.initProjectForm("");
        this.initProjectForm(command.row);
        if(command.row){
          this.addPro=2;
          this.EditProjectID = command.row.id;
          var url = "business/capital/repair/detail";
          var param = {
            id:command.row.id
          };
          this.axios.post(url, param).then(result => {
            var data = result;
            if(data.statusCode==="1"||data.statusCode==="9"){
              if(data.data){
                this.initProjectForm(data.data.capitalRepair);
                data.data.userList.map((item)=>{
                  if(item.userRole=="CLERK"){
                    this.ClerkName = item.userId
                  }
                })
                this.getDistrict()
                this.getCompanyUser()
                this.projectForm.districtCode = data.data.capitalRepair.districtCode
                this.projectForm.ppContactId = data.data.capitalRepair.ppContactId
                this.marker = data.data.capitalRepair.coordinate?data.data.capitalRepair.coordinate.split(','):''
                this.marker = this.marker.map((item)=>{
                  return parseFloat(item)
                })
                //console.log(this.marker)
              }else{
                this.$message.error('数据空！');
              }
              
              // this.ClerkName = data.data.userId
            }else{
              this.$message.error(data.message);
            }
          })
        }else{
          this.initProjectForm("");
        }
        this.projectFormDialog = true;
      } else if (command.button == "UpdateIn") {
        this.dialogInterval = true;
      } else if (command.button == "Stop") {
        this.StopProjectID = command.row.id;
        this.dialogStopProject = true;
      } else if (command.button == "Lock") {
        this.LockId = command.row.id
        this.dialogLockProjectLockProject = true;
      } else if (command.button == "unLock") {
        this.UnLockId = command.row.id
        this.dialogunLockProject = true;
      } else if (command.button == "Hestory") {
        this.ProHestoryId = command.row.id
        this.showPHestorytable(1,10)
        this.dialogProjectHestory = true;
      } else if (command.button == "Start") {
        this.overTime = command.row.endDate;
        this.StartProjectID = command.row.id;
        this.dialogStartProject = true;
      } else if (command.button == "Re") {
        this.ReProjectID = command.row.id;
        this.dialogReProject = true;
      } else if (command.button == "Delete") {
        this.dialogDeleteProject = true;
        this.DeleteProName = command.row.Name;
      } 
    },
    handlecompleted(a){
      
      this.auditRepair = 1
      this.completedId = a.id;
      var url = "business/capital/repair/detail";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        id:a.id
      }
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.completedData = data.data.imageUrlList?data.data.imageUrlList:''
        }else{
          this.$message.error(data.message);
        }
      });
      this.dialogcompleted = true;
      
    },
    handleoverdue(a){
      this.auditRepair = 0
      this.overdueId = a.id;
      var url = "business/capital/repair/detail";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        id:a.id
      }
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.overdueFrom.overdueDate = data.data.capitalRepair.overdueDate?data.data.capitalRepair.overdueDate:''
          this.overdueFrom.overdueReason = data.data.capitalRepair.overdueReason?data.data.capitalRepair.overdueReason:''
        }else{
          this.$message.error(data.message);
        }
      });
      this.dialogcompleted = true;
    },
    handleshowCompleted(a){
      var url = "business/capital/repair/detail";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        id:a.id
      }
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.ShowcompletedData = data.data.imageUrlList?data.data.imageUrlList:''
        }else{
          this.$message.error(data.message);
        }
      });
      this.dialogShowcompleted = true;
    },
    //新增项目提交
    submitAddPro(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          var userList = []
          var url = "business/capital/repair/add";
          var param = {};
          var project = this.projectForm;
          if(this.marker.length!=0){
            var coordinate = this.marker
          
            //console.log(coordinate)
            project.coordinate = coordinate[0].toFixed(6)+","+coordinate[1].toFixed(6)
          
            if(this.ClerkName){
              userList.push({
                userId:this.ClerkName,
                mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
                userRole:"CLERK",
              })
            }
            if(this.RegionWorkerNameId){
              userList.push({
                userId:this.RegionWorkerNameId,
                mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
                userRole:"REGION_DIRECTOR",
              })
            }
            project.mtCompanyId = JSON.parse(sessionStorage.getItem('mtCompanyId'))
            param.capitalRepair = project
            param.userList = userList
            //console.log(param);
            this.axios.post(url, param).then(result => {
              var data = result;
              if(data.statusCode==="1"){
                this.$message.success(data.message);
                this.showProjectData(this.ProjectStatus,1,10)
                this.projectFormDialog = false;
              }else{
                this.$message.error(data.message);
              }
            });
          }else{
            this.$message({
              message: "请输入项目地址！",
              type: "warning"
            });
          }
          
        } else {
          this.$message({
            message: "请输入正确信息！",
            type: "warning"
          });
          return;
        }
      });
    },
    //编辑项目提交
    submitEditPro(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          var url = "business/capital/repair/modify";
          var param =  this.projectForm;
          //console.log(this.marker)
          var coordinate = this.marker
          param.coordinate = coordinate[0].toFixed(6)+","+coordinate[1].toFixed(6)
          param.mtCompanyId = JSON.parse(sessionStorage.getItem('mtCompanyId'))
          // var param = this.projectForm;
          // project.coordinate = this.marker[0].toFixed(6)+","+this.marker[1].toFixed(6)
          // param.mtCompanyId = JSON.parse(sessionStorage.getItem('mtCompanyId'))
          param.id = this.EditProjectID
          //console.log(param);
          this.axios.post(url, param).then(result => {
            var data = result;
            if(data.statusCode==="1"){
              this.$message.success(data.message);
              this.showProjectData(this.ProjectStatus,1,10)
              this.projectFormDialog = false;
            }else{
              this.$message.error(data.message);
            }
          });
        } else {
          this.$message({
            message: "请输入正确信息！",
            type: "warning"
          });
          return;
        }
      });
    },
    //新增甲方公司
    submitppcName(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          var url = "enterprise/property-company/project/custom/add";
          var param = {
            mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
            name:this.addPpc.ppc_name,
            creatorId:sessionStorage.getItem('user'),
          }
          this.axios.post(url, param).then(result => {
            var data = result;
            if(data.statusCode==="1"){
              this.$message.success(data.message);
              this.getCompanyList()
              this.projectForm.ppCompanyId = data.data
              this.addPpcDialog = false;
            }else{
              this.$message.error(data.message);
            }
          });
        } else {
          this.$message({
            message: "请输入正确信息！",
            type: "warning"
          });
          return;
        }
      });
    },
    //新增甲方联系人
    submitPpm(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          var url = "enterprise/property-contact/project/contact/add";
          var param = {
            ppCompanyId:this.projectForm.ppCompanyId,
            name:this.addPpm.ppm_name,
            telephone:this.addPpm.ppm_tel,
            creatorId:sessionStorage.getItem('user'),
          }
          this.axios.post(url, param).then(result => {
            var data = result;
            if(data.statusCode==="1"){
              this.$message.success(data.message);
              this.addPpmDialog = false;
              this.getCompanyUser()
              this.projectForm.ppContactId = data.data
            }else{
              this.$message.error(data.message);
            }
          });
        } else {
          this.$message({
            message: "请输入正确信息！",
            type: "warning"
          });
          return;
        }
      });
    },
    //电梯更多按钮
    handleCommandLift(command) {
      if (command.button == "BindIOT") {
        this.dialogBindingDvice = true;
      } else if (command.button == "LiftUpdate") {
        this.preSumbitID = command.row.id
        //console.log(command.row);
        if(command.row){
          this.addLi=2
          this.InputShowBtn = false
          var url = "business/lift/detail";
          var param = {
            id:command.row.id
          };
          this.axios.post(url, param).then(result => {
            var data = result;
            if(data.statusCode==="1"){
              if(data.data){
                this.initLiftForm(data.data);
                var re = data.data.registrationCode
                if(re.length>=4){
                  let a=re.substring(0,4)
                this.AddLift.DevKind = a=="3110"?'曳引驱动乘客电梯':a=="3120"?"强制式客梯":a=="3130"?"无机房客梯":a=="3140"?"消防电梯":a=="3150"?"观光电梯":a=="3160"?"防爆客梯":a=="3170"?"病床电梯":a=="3210"?"曳引式货梯":a=="3220"?"强制式货梯":a=="3230"?"无机房货梯":a=="3240"?"汽车电梯":a=="3250"?"防爆货梯":a=="3310"?"液压客梯":a=="3320"?"防爆液压客梯":a=="3330"?"液压货梯":a=="3340"?"防爆液压货梯":a=="3400"?"杂物电梯":a=="3500"?"自动扶梯":a=="3600"?"自动人行道":a=="3010"?"乘客电梯(含液压乘客电梯)":a=="3011"?"客货电梯(含液压客货电梯)":a=="3012"?"病床电梯(含液压病床电梯)":a=="3013"?"载货电梯(含液压载货电梯)":a=="3020"?"自动扶梯":a=="3021"?"自动人行道":"其它电梯"
                  // this.AddLift.DevKind = re.substring(0,4)=="3110"?'曳引驱动乘客电梯':(re.substring(0,4)=="3120"?'曳引驱动载货电梯':(re.substring(0,4)=="3130"?'强制驱动载货电梯':(re.substring(0,4)=="3210"?'液压乘客电梯':(re.substring(0,4)=="3220"?'液压载货电梯':(re.substring(0,4)=="3310"?'自动扶梯':(re.substring(0,4)=="3320"?'自动人行道':(re.substring(0,4)=="3410"?'防爆电梯':(re.substring(0,4)=="3420"?'消防员电梯':(re.substring(0,4)=="3430"?'杂物电梯':'')))))))))
                }
                this.dialogAddLift = true;
              }else{
                this.$message.error('数据空！');
              }
              
            }else{
              this.$message.error(data.message);
            }
          })
        }
        this.getWorkList()
      } else if (command.button == "LiftStop") {
        this.dialogStopLiftOne = true;
        this.StopLiftOneId = command.row.id;
        this.relevanceId = command.row.companyRelevanceId
      } else if (command.button == "LiftRecover") {
        this.ReLiftId = command.row.id;
        this.RerelevanceId  = command.row.companyRelevanceId
        this.dialogReLift = true;
      } else if (command.button == "Stop") {
        this.dialogAddLift = true;
      } else if (command.button == "LiftHestory") {
        this.dialogLiftHestory = true;
      } else if(command.button=="LiftDelete"){
        this.dialogDeteleLiftOne = true;
        this.DeteleLiftOneId  = command.row.projectRelevanceId;
      } else if (command.button == "addCopy") {
        this.addLi=1
        this.preSumbitID=""
        this.initLiftForm("");
        this.LiftTypeShow = false;
        this.getWorkList()
        this.showBrandList()
        this.InputShow = false;
        this.CategoryShow = "";
        var url = "business/lift/detail";
        var param = {
          id:command.row.id,
          projectId:this.ProjectCheck
        };
        this.axios.post(url, param).then(result => {
          var data = result;
          if(data.statusCode==="1"){
            if(data.data){
              this.initLiftForm(data.data);
              var re = data.data.registrationCode
              if(re.length>=4){
                let a=re.substring(0,4)
                this.AddLift.DevKind = a=="3110"?'曳引驱动乘客电梯':a=="3120"?"强制式客梯":a=="3130"?"无机房客梯":a=="3140"?"消防电梯":a=="3150"?"观光电梯":a=="3160"?"防爆客梯":a=="3170"?"病床电梯":a=="3210"?"曳引式货梯":a=="3220"?"强制式货梯":a=="3230"?"无机房货梯":a=="3240"?"汽车电梯":a=="3250"?"防爆货梯":a=="3310"?"液压客梯":a=="3320"?"防爆液压客梯":a=="3330"?"液压货梯":a=="3340"?"防爆液压货梯":a=="3400"?"杂物电梯":a=="3500"?"自动扶梯":a=="3600"?"自动人行道":a=="3010"?"乘客电梯(含液压乘客电梯)":a=="3011"?"客货电梯(含液压客货电梯)":a=="3012"?"病床电梯(含液压病床电梯)":a=="3013"?"载货电梯(含液压载货电梯)":a=="3020"?"自动扶梯":a=="3021"?"自动人行道":"其它电梯"
                // this.AddLift.DevKind = re.substring(0,4)=="3110"?'曳引驱动乘客电梯':(re.substring(0,4)=="3120"?'曳引驱动载货电梯':(re.substring(0,4)=="3130"?'强制驱动载货电梯':(re.substring(0,4)=="3210"?'液压乘客电梯':(re.substring(0,4)=="3220"?'液压载货电梯':(re.substring(0,4)=="3310"?'自动扶梯':(re.substring(0,4)=="3320"?'自动人行道':(re.substring(0,4)=="3410"?'防爆电梯':(re.substring(0,4)=="3420"?'消防员电梯':(re.substring(0,4)=="3430"?'杂物电梯':'')))))))))
              }
              this.relevanceIdLift = data.data.relevanceId
              this.dialogAddLift = true;
            }else{
              this.$message.error('数据空！');
            }
            
          }else{
            this.$message.error(data.message);
          }
        })
        this.dialogAddLift = true;
      }
    },
    addLiftOne() {
      this.addLi=1
      this.InputShowBtn = false
      this.initLiftForm("");
      this.dialogAddLift = true;
      this.LiftTypeShow = false;
      this.getWorkList()
      this.showBrandList()
      this.InputShow = false;
      this.CategoryShow = "";
    },
    //新增电梯提交
    submitAddLift(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          var url = "business/lift/add";
          var data = this.AddLift;
          var param = {}
          param.lift = data
          param.id = this.preSumbitID;
          param.projectId = this.ProjectCheck
          param.source = 2
          param.mark = this.mark
          param.workerId = data.workerId
          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.dialogAddLift = false;
              this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
              
            }else{
              this.$message.error(data.message);
            }
          });
          //console.log(param);
        } else {
          this.$message({
            message: "请输入正确信息！",
            type: "warning"
          });
          return;
        }
      });
    },
    //电梯品牌列表
    showBrandList(){
      var url = "business/common/brand/list";
      this.axios.post(url).then(result => {
        var data = result.data
        this.BrandList = data
        //console.log(data)
      });
    },
    //编辑电梯提交
    submitEditLift(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          var url = "business/lift/modify";
          var data = this.AddLift;
          // 要删的年检精确到月
          // data.annualInspectionDate = this.AddLift.annualInspectionDate?this.AddLift.annualInspectionDate+" 00:00:00":this.AddLift.annualInspectionDate
          // data.reformDate = this.AddLift.reformDate?this.AddLift.reformDate+" 00:00:00":this.AddLift.reformDate
          // data.installDate = this.AddLift.installDate?this.AddLift.installDate+" 00:00:00":this.AddLift.installDate
          // data.manufactureDate = this.AddLift.manufactureDate?this.AddLift.manufactureDate+" 00:00:00":this.AddLift.manufactureDate
          var param = {}
          param.lift = data
          param.lift.id = this.preSumbitID
          param.workerId = data.workerId
          param.relevanceId = data.relevanceId
          param.id = this.preSumbitID
          param.projectId = this.ProjectCheck
          this.axios.post(url,param).then(result => {
            var data = result
            if(data.statusCode==="1"){
              this.$message.success(data.message);
              this.dialogAddLift = false;
              this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
            }else{
              this.$message.error(data.message);
            }
          });
          //console.log(param);
        } else {
          this.$message({
            message: "请输入正确信息！",
            type: "warning"
          });
          return;
        }
      });
    },
    //获取项目组成员
    getWorkList(){
      var url = "business/capital/repair/userList";
      var param = {
        id:this.ProjectCheck,
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId'))
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"||data.statusCode==="9"){
          this.selWorker = data.data?data.data:[]
        }
      });
    },
    getCompanyMembers(a){
      this.VisiblevalueLoad = true;
      var url = "business/project/user/list";
      var param = {
        id:a.id,
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId'))
      };
      this.axios.post(url, param).then(result => {
        var data3 = [];
        var data2 = [];
        var data1 = result;
        if(data1.statusCode==="1"||data1.statusCode==="9"){
          this.VisiblevalueLoad = false;
        }
        if(data1.statusCode==="1"||data1.statusCode==="9"){
            data2 = data1.data?data1.data:[]
            for (var i = 0; i <data2.length; i++) {
            
              data3.push(data2[i].userId);
              if(data2[i].userRole=="REGION_DIRECTOR"){
                this.RegionNumvalue = data2[i].userId 
              }
              if(data2[i].isMonitor==1){
                this.isMonitorValue = data2[i].userId
                // //console.log(this.isMonitorValue)
              }
            }
            this.Visiblevalue = data3
            // //console.log(this.Visiblevalue)
            var url = "system/companyuser/getCompanyMembers";
            var param = {
              companyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
              roleCode:"ROLEMTWORK"
            };
            this.axios.post(url, param).then(result => {
              // //console.log(this.isMonitorValue)
              var data = [];
              var data2 = [];
              var data1 = result;
              if(data1.statusCode==="1"||data1.statusCode==="9"){
                if(data1.data){
                  data2 = data1.data
                  for (var i = 0; i <data2.length; i++) {
                    data.push({
                      key: data2[i].userId,
                      label: data2[i].name,
                      role:data2[i].userRole,
                      disabled:data2[i].userId==this.RegionNumvalue,
                      right:false,
                      // right:this.rightValue(this.Visiblevalue,data2[i].userId),
                      isMonitor:false
                    });
                  }
                  data.map(item=>{
                    this.Visiblevalue.map((a)=>{
                      if(a==item.key){
                        item.right=true
                      }
                    })
                    ////console.log(item.key,this.isMonitorValue)
                    if(item.key==this.isMonitorValue){
                      item.isMonitor=true
                    }
                  })
                  this.data = data
                  this.VisiblevalueLoad = false;
                }else{
                  this.data=[]
                }
              }
              //console.log(this.Visiblevalue)
            });
            if(!data1.data){
              this.Visiblevalue = []
            }
          
        }
      });
      
    },
    renderFunc(h, option) {
        //console.log(h ,option,option.label)
        if(option.disabled){
          // return (
          //   <span><span>
          //     {option.label}
          //   </span><i class="el-icon-user-solid"></i></span>
          // );
        }else{
          if(option.right){
            if(option.isMonitor){
              var _this = this;
              return h(
                'span', [h('span',option.label),h('i',{
                  attrs: {
                    class: 'el-icon-star-on'
                  },
                  style:{
                    color:"#f1123b"
                  },
                  on: {
                    click: function(event) {
                      event.preventDefault();
                      _this.IsMonitor(option)
                    }
                  }
                })]
                // <span><span>
                //   {option.label}
                // </span><i class="el-icon-star-on" style="color:#399afb"></i></span>
              );
            }else{
              var _this = this;
                return h(
                  'span', [h('span',option.label),h('i',{
                    attrs: {
                      class: 'el-icon-star-on'
                    },
                    style:{
                      color:"#606266"
                    },
                    on: {
                      click: function(event) {
                        event.preventDefault();
                        _this.IsMonitor(option)
                      }
                    }
                  })]
                  // <span><span>
                  //   {option.label}
                  // </span><i class="el-icon-star-on"></i></span>
                );
            }  
          }else{
            return (
              <span>
                {option.label}
              </span>
            );
          }
        }
        
      },
    rightValue(a,b){
      for(var i=0;i<a.length;i++){
        if(a[i]==b){
          return true;
          //console.log(b)
        }
      }
    },
    //构造多参数
    composeValue(item, row) {
      return {
        button: item,

        row: row
      };
    },
    //table行锁定时背景色
    tableRowClassName({ row, rowIndex }) {
      if (row.IsLocked === 1) {
        return "Lock-row";
      }
      return "";
    },
    StopProjectSubmit(){
      //console.log(this.StopProject)
      if(!this.StopProject.endRemarks&&!this.StopProject.stopTime){
        this.$message.error("请填写正确的信息！");
      }else{
        var url = "business/capital/repair/service/operate";
        var param = {
          mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
          projectId:this.StopProjectID,
          endRemarks:this.StopProject.endRemarks,
          stopTime:this.StopProject.stopTime+" 00:00:00",
          operate:2
        };
        this.axios.post(url, param).then(result => {
          var data = result;
          if(data.statusCode==="1"){
            this.showProjectData(this.ProjectStatus,this.currpage,this.pagesize)
            this.dialogStopProject = false;
            this.$message.success(data.message);
          }else{
            this.$message.error(data.message);
          }
        });
      }
      
    },
    ReProjectSubmit(){
      if(!this.ReProject.startDate&&!this.ReProject.endDate){
        this.$message.error("请填写正确的信息！");
      }else{
        var url = "business/capital/repair/service/operate";
        var param = {
          mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
          projectId:this.ReProjectID,
          startDate:this.ReProject.startDate,
          endDate:this.ReProject.endDate,
          operate:1
        };
        this.axios.post(url, param).then(result => {
          var data = result;
          if(data.statusCode==="1"){
            this.showProjectData(this.ProjectStatus,this.currpage,this.pagesize)
            this.dialogReProject = false;
            this.$message.success(data.message);
          }else{
            this.$message.error(data.message);
          }
        });
      }
    },
    //批量锁定
    LockLift() {
      if (this.liftChoose.length == 0) {
        this.$message({
          message: "请先选择电梯",
          type: "warning"
        });
      } else {
        this.LockLiftLength = this.liftChoose.length
        this.dialogLockLift = true;
      }
    },
    unLockLift() {
      if (this.liftChoose.length == 0) {
        this.$message({
          message: "请先选择电梯",
          type: "warning"
        });
      } else {
        this.unLockLiftLength = this.liftChoose.length
        this.dialogunLockLift = true;
      }
    },
    getprojectIDList(){
      var url = "business/capital/repair/projectIDList";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.projectList = data.data?data.data:[]
        }
      });

    },
    LiftMoveS(){
      var list = [];
      for(var i=0;i<this.liftChoose.length;i++){
        list.push({
          id:this.liftChoose[i].projectRelevanceId,
          liftId:this.liftChoose[i].id
        })
      }
      var url = "business/capital/repair/batch/move";
      var param = {
        projectId:this.LiftMove.projectId,
        list:list
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
          this.dialogLiftMoveS = false;
          this.$message.success(data.message);
        }
      });
    },
    //批量移动
    MoveLift() {
      this.getprojectIDList()
      if (this.liftChoose.length == 0) {
        this.$message({
          message: "请先选择电梯",
          type: "warning"
        });
      } else {
        this.dialogLiftMoveS = true;
      }
    },
    //批量停保
    StopLift() {
      if (this.liftChoose.length == 0) {
        this.$message({
          message: "请先选择电梯",
          type: "warning"
        });
      } else {
        this.StopLiftNum = this.liftChoose.length;
        this.dialogStopLift = true;
      }
    },
    //选择电梯类型切换电梯类别
    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 = ""; 
      this.AddLift.workerId = ""; 
    },
    //点击电梯类别切换
    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;
      }
    },
    LiftPosition(row) {
      setTimeout(() => {
        this.$refs.child.emitEventPro(row);
      }, 20);
      this.dialogLiftPosition = true;
    },
    searchProject(){
      this.showProjectData(this.ProjectStatus,1,10)
    },
    resetProject(){
      this.ProjectSearch.provinceCode=""
      this.ProjectSearch.cityCode=""
      this.ProjectSearch.districtCode=""
      this.ProjectSearch.regionId=""
      this.ProjectSearch.condition=""
      this.ProjectSearch.userId=""
      this.showProjectData(this.ProjectStatus,1,10)
    },
    //获取区域下面的区
    getDistrict(){
      var url = "enterprise/region/project/areas";
      var param = {
        id:this.projectForm.regionId
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"||data.statusCode==="9"){
          this.DistrictList = data.data?data.data:[]
        }
      });

      var url = "enterprise/region/user";
      var param = {
        id:this.projectForm.regionId
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.RegionWorkerName = data.data.regionUser.name
          this.RegionWorkerNameId = data.data.regionUser.userId
          this.ClerkNameList = data.data.regionClerk
        }else if(data.statusCode==="9"){
          this.RegionWorkerName = ""
          this.RegionWorkerNameId =""
          this.ClerkNameList = []
        }else{
          this.$message.error(data.message);
        }
      });

      var url = "enterprise/region/project/areaInfo";
      var param = {
        id:this.projectForm.regionId
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        //console.log(data.data[0].city)
        if(data.statusCode==="1"){
          this.projectForm.city = data.data[0].city?data.data[0].city:''
          this.projectForm.cityCode = data.data[0].cityCode?data.data[0].cityCode:''
          this.projectForm.province = data.data[0].province?data.data[0].province:''
          this.projectForm.provinceCode = data.data[0].provinceCode?data.data[0].provinceCode:''
        }else if(data.statusCode==="9"){
          this.projectForm.city = ""
          this.projectForm.cityCode = ""
          this.projectForm.province = ""
          this.projectForm.provinceCode = ""
        }else{
          this.$message.error(data.message);
        }
      });
    },
    StopLiftOne(){
      var url = "business/lift/stop/recover";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftId:this.StopLiftOneId,
        relevanceId:this.relevanceId,
        operate:1
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
          this.dialogStopLiftOne = false;
          this.$message.success(data.message);
        }
      });
    },
    showUserIdSign(a){
      var url = "business/capital/repair/userList";
      var param = {
        id:a,
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.userListSign = data.data?data.data:[]
        }
      });
    },
    changeUser(){

    },
    showPHestorytable(pageNum,pageSize){
      this.PHestorytableLoad = true;
      var url = "business/project/history/list";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        projectId: this.ProHestoryId,
        pageNum: pageNum,
        pageSize: pageSize
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.PHestorytableLoad=false;
        if(data.statusCode==="1"){
          this.Hestorytable = data.data?data.data.rows:[]
          this.PHestorytableTotal = data.data?data.data.total:0
        }else if(data.statusCode==="9"){
          this.Hestorytable = []
          this.PHestorytableTotal = 0
        }else{
          this.$message.error(data.message);
        }
      });
    },
    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.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
          this.dialogReLift = false;
          this.$message.success(data.message);
        }
      });
    },
    DeteleLiftOne(){
      var url = "business/lift/logicDelete";
      var param = {
        id:this.DeteleLiftOneId
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
          this.dialogDeteleLiftOne = false;
          this.$message.success(data.message);
        }
      });
    },
    StopLifts(){
      var liftList = [];
      var relevanceIdList = [];
      //console.log(this.liftChoose)
      for(var i=0;i<this.liftChoose.length;i++){
        liftList.push(this.liftChoose[i].id)
        relevanceIdList.push(this.liftChoose[i].companyRelevanceId)
      }
      var url = "business/lift/batch/stop/insurance";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftList:liftList,
        relevanceIdList:relevanceIdList,
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
          this.dialogStopLift = false;
          this.$message.success(data.message);
        }
      });
    },
    //获取甲方公司名称
    getCompanyList(){
      var url = "enterprise/property-company/project/customs";
      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.ppcOptions = data.data?data.data:[]
        }
      });
    },

    //获取甲方联系人列表
    getCompanyUser(){
      var url = "enterprise/property-contact/project/contacts";
      var param = {
        ppCompanyId:this.projectForm.ppCompanyId
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"||data.statusCode==="9"){
          this.ppmOptions = data.data?data.data:[]
        }
      });
    },
    getChooseLiftData(pageNum,pageSize){
      this.ChooseHestorytableLoad = true;
      var url = "business/capital/repair/choose";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        pageNum:pageNum,
        pageSize:pageSize
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode) this.ChooseHestorytableLoad=false;
        if(data.statusCode==="1"||data.statusCode==="9"){
          this.ChooseHestorytable = data.data?data.data.rows:[]
          this.ChooseHestorytableTotal = data.data?data.data.total:0;
        }
      });
    },
    getcountAll(projectStatus){
      var url = "business/capital/repair/countAll";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        projectStatus:projectStatus
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        //console.log(data.data)
        if(data.statusCode==="1"){
          this.detailProject.projectNum = data.data.projectCount?data.data.projectCount:0
          this.detailProject.LiftNum = data.data.liftCount?data.data.liftCount:0
          this.detailProject.StopNum = data.data.stopLiftCount?data.data.stopLiftCount:0
          this.textNum.firstText = data.data.totalCount.inService?data.data.totalCount.inService:0
          this.textNum.secondText = data.data.totalCount.complete?data.data.totalCount.complete:0;
          this.textNum.thirdText = data.data.totalCount.notStart?data.data.totalCount.notStart:0;
          this.textNum.fourthText = data.data.totalCount.checkPending?data.data.totalCount.checkPending:0;
          this.textNum.firthText = data.data.totalCount.stopService?data.data.totalCount.stopService:0;
          //console.log(data.data)
        }else{
          this.$message.error(data.message);
        }
      });
    },
    Subaudit(a){
      var url = "business/capital/repair/audit";
      var param = {
        id:this.auditRepair==1?this.completedId:this.overdueId,
        type:this.auditRepair==1?1:0,
        pass:a
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.$message.success(data.message);
          this.showProjectData(this.ProjectStatus,this.currpage,this.pagesize)
          this.dialogcompleted=false
        }else{
          this.$message.error(data.message);
        }
      });
    },
    ChooseLift(){
      this.dialogChooseHestory = true
      this.getChooseLiftData(this.Choosecurrpage,this.Choosepagesize)
    },
    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){
            let a=re.substring(0,4)
            this.AddLift.DevKind = a=="3110"?'曳引驱动乘客电梯':a=="3120"?"强制式客梯":a=="3130"?"无机房客梯":a=="3140"?"消防电梯":a=="3150"?"观光电梯":a=="3160"?"防爆客梯":a=="3170"?"病床电梯":a=="3210"?"曳引式货梯":a=="3220"?"强制式货梯":a=="3230"?"无机房货梯":a=="3240"?"汽车电梯":a=="3250"?"防爆货梯":a=="3310"?"液压客梯":a=="3320"?"防爆液压客梯":a=="3330"?"液压货梯":a=="3340"?"防爆液压货梯":a=="3400"?"杂物电梯":a=="3500"?"自动扶梯":a=="3600"?"自动人行道":a=="3010"?"乘客电梯(含液压乘客电梯)":a=="3011"?"客货电梯(含液压客货电梯)":a=="3012"?"病床电梯(含液压病床电梯)":a=="3013"?"载货电梯(含液压载货电梯)":a=="3020"?"自动扶梯":a=="3021"?"自动人行道":"其它电梯"
          }
        }else{
          this.$message.error(data.message);
        }
      });
    },
    submitMonitor(){
      var url = "business/project/user/modify";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        projectId:this.VisibleProject.id,
        userId:this.Monitor==1?this.MoveMonitorId:this.AddMonitorId,
        isMonitor:this.Monitor==1?0:1
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.getCompanyMembers(this.VisibleProject);
          this.dialogMonitor = false
        }else{
          this.$message.error(data.message);
        }
      })
    },
    IsMonitor(option){
      var url = "business/project/user/modify";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        projectId:this.VisibleProject.id,
        userId:option.key
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.isMonitorValue = ""
          if(option.isMonitor){
            this.$message("已将"+option.label+"取消设置为大修班长")
          }else{
            this.$message.success("已将"+option.label+"成功设置为大修班长")
          }
          this.getCompanyMembers(this.VisibleProject);
        }else{
          this.$message.error(data.message);
        }
      })
    },
    submitUnLockLift(){
      var liftList = [];
      for(var i=0;i<this.liftChoose.length;i++){
        liftList.push(this.liftChoose[i].id)
      }
      var url = "business/lift/lockOrUnlock";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftList:liftList,
        lock:0,
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.$message.success(data.message)
          this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
          this.dialogunLockLift = false
        }else{
          this.$message.error(data.message);
        }
      });
    },
    submitLockLift(){
      var liftList = [];
      for(var i=0;i<this.liftChoose.length;i++){
        liftList.push(this.liftChoose[i].id)
      }
      var url = "business/lift/lockOrUnlock";
      var param = {
        mtCompanyId:JSON.parse(sessionStorage.getItem('mtCompanyId')),
        liftList:liftList,
        lock:1,
      };
      this.axios.post(url, param).then(result => {
        var data = result;
        if(data.statusCode==="1"){
          this.$message.success(data.message)
          this.ProjectshowLift(this.Liftcurrpage,this.Liftpagesize)
          this.dialogLockLift = false
        }else{
          this.$message.error(data.message);
        }
      });
    },
    //map
    addMarker: function() {
      let lng = 121.5 + Math.round(Math.random() * 1000) / 10000;
      let lat = 31.197646 + Math.round(Math.random() * 500) / 10000;
      // this.markers.push([lng, lat]);
    },
    onSearch(){
      this.IsonSearch = true
    },
    onSearchResult(pois) {
      let latSum = 0;
      let lngSum = 0;
      if (pois.length > 0) {
        pois.forEach(poi => {
          let {lng, lat} = poi;
          lngSum += lng;
          latSum += lat;
          this.marker=[poi.lng, poi.lat];
        });
        let center = {
          lng: lngSum / pois.length,
          lat: latSum / pois.length
        };
        this.mapCenter = [center.lng, center.lat];
        this.marker=this.mapCenter
      }
      this.projectForm.projectAddress = pois[0].name
      this.IsonSearch = false
      //console.log(this.mapCenter,this.projectForm.projectAddress)
    }

  }
};
</script>
<style lang="stylus">
.homeProject {
  height: 100%;

  .ProjectMain {
    height: 100%;
    background: #fff;

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

    .el-container {
      height: 100%;
    }

    
  }
}
/**下拉框**/
$ft14 = 14px;



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


/**表格**/
.ProjectTable {
  padding: 0 20px;

  .el-table .Lock-row {
    background: #FFE3E3;
  }

  .PJTable {
    .el-dropdown-link {
      cursor: pointer;
      color: #409EFF;
    }

    .el-button {
      padding: 5px;
      width: 45%;
      display: inline-block;
      margin-bottom: 5px;
    }

    .el-dropdown {
      width: 45%;
      margin-left: 10px;
    }

    .el-dropdown .el-button {
      width: 100%;
    }
  }

  .addProject {
    .addPrHr {
      height: 4px;
      background: rgba(187, 187, 187, 1);
    }

    .ProjectWidth70 {
      .el-form-item__content {
        width: 70%;
      }
    }

    .ProjectWidth60 {
      .el-form-item__content {
        width: 60%;
      }
    }

    .ProjectWidth50 {
      .el-form-item__content {
        width: 50%;
      }
    }

    .el-button {
      padding: 8px 10px;
      margin-top: 5px;
    }

    .el-dialog__footer {
      .el-button {
        padding: 10px 30px;
      }
    }
    .districtInstant .el-form-item__label{
      margin-left: 70px;
    }
    .projectUsageInstant {
      width:50%
      .el-form-item__label{
        margin-left: 28px;
      }
    }
    .CleckInstant .el-form-item__label{
      margin-left: 64px;
    }
    .ppCompanyIdInstant{
      .el-form-item__content{
          width:200px
        }
    }
    .ppContactIdInstant{ 
      .el-form-item__content{
          width:200px
        }
        .el-form-item__label{
          margin-left: 28px;
        }

    }
  }

  .UpdateInterval, .StopProject {
    .el-dialog__body {
      text-align: center;
      padding: 15px 20px;

      .el-form {
        text-align: left;
        padding-left: 5%;
      }
    }

    .el-dialog__footer {
      text-align: center;
    }

    p {
      font-size: 16px;

      .el-icon-warning {
        color: #FF9800;
      }
    }
  }

  .unLockProject,.LockProject, .ProjectHestory {
    .el-dialog__body {
      padding: 10px 20px;
      font-size: 18px;
    }
  }

  .ReProject {
    .el-dialog__body {
      text-align: center;
      padding: 10px;
    }

    .el-dialog__footer {
      text-align: center;
    }
  }

  .StartProject {
    .el-dialog__body {
      font-size: 16px;
      padding: 10px 25px;
    }
  }

  .BindingDvice, .LiftMoveS {
    .el-dialog__footer {
      text-align: center;
    }
  }

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

      .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-icon-arrow-down {
  font-size: 12px;
}

.LiftList {
  .el-dialog__body {
    padding: 15px 20px;
  }

  .el-row .el-col .el-button {
    padding: 10px;
  }
}

/**公共**/
.ww50{
  width:45%
}
.VisibleP{
  text-align: left;
  margin-left: 65%;
  font-size: 16px;
  margin-bottom: 5px;
}
.el-transfer {
  width: 100%;
  .el-transfer-panel{
    width:35%
  }
  .el-transfer__buttons{
    width:30%
    text-align: center;
  }
}
.el-checkbox{
  width:100%
  i{
    position: absolute;
    right: 10px;
    top: 10px;
  }
  i.el-icon-user-solid{
    color: #f1123b;
  }
}
.homeProject .ProjectTable .el-tooltip {
    white-space: nowrap;
}
.el-dropdown .el-button--primary.is-plain:focus,.el-dropdown .el-button--primary.is-plain:hover {
    background: #ffffff;
}
.amap-demo {
  height: 300px;
}

.search-box {
  position: absolute;
  top: 25px;
  left: 20px;
}

.amap-page-container {
  position: relative;
}
.search-box {
    position: absolute;
    top: 30px;
    left: 60%;
}
.el-vue-amap-container.amap-demo {
    height: 300px;
    margin-top: -30px;
}
.el-tabs--border-card.BCtabs .el-tabs__header.is-top{
  margin: 15px 20px;
}
</style>
  

