<template>
  <div style="background-color:#f7f7f7;padding:10px 10px;">
    <div class="zhuti">
      <div style="height:58px;line-height:58px;">
        <div style="color:#0006"> <span>商铺租赁服务</span>   <span style="padding:0 5px;">></span>  <span style="color:#000000e6">出租管理</span></div>
      </div>
      <!-- 线上 -->
      <div>
        <!-- 搜索 -->
        <div class="formSearch">
          <el-form :inline="true" :model="formSel">
            <el-form-item label="商户名称">
              <el-input v-model="formSel.leaseName" placeholder="请输入" style="width:168px;" />
            </el-form-item>
            <el-form-item label="承租人">
              <el-input v-model="formSel.cereContractInformation.tenantName" placeholder="请输入" style="width:168px;" />
            </el-form-item>
            <!-- <el-form-item label="资源名称">
              <el-input v-model="formSel.cereContractInformation.shopName" placeholder="请输入" style="width:168px;" />
            </el-form-item> -->
            <el-form-item label="起租日期">
              <el-date-picker style="width:160px;margin-right:5px" v-model="leaseStartDate"
                value-format="yyyy-M-d"   type="daterange" range-separator="-" start-placeholder=""
                end-placeholder="" prefix-icon="none" >
              </el-date-picker>
            </el-form-item>
          </el-form>
          <div>
            <el-button  @click="onSubmit"  style="background-color: #3F9B6A;color: #fff">查询
            </el-button>
            <el-button  @click="resetting"  class="buttonHover"
              style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">重置
            </el-button>
          </div>
        </div>
        <div style="margin-bottom: 20px;">
          <div>
            <!-- <el-button
              style="background-color: #3F9B6A;color: #fff;padding:8px 15px;">批量导出</el-button> -->
            <el-button
              style="background-color: #3F9B6A;color: #fff;padding:8px 15px;" @click="daochu">导出</el-button>
          </div>
        </div>
        <!-- 表格 -->

        <el-table :data="tableData"
         :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}"
 >
 <el-table-column label="商户名称" min-width="150" >
   <template slot-scope="scope">
     {{scope.row.leaseName}}

   </template>
 </el-table-column>
         <el-table-column label="承租人" min-width="150" >
           <template slot-scope="scope">
             {{scope.row.cereContractInformation.tenantName}}

           </template>
         </el-table-column>
         <el-table-column label="租赁类型" min-width="150" >
           <template slot-scope="scope">
             {{scope.row.leaseType}}

           </template>
         </el-table-column>
         <el-table-column label="资源名称"  min-width="200">
           <template slot-scope="scope">
            {{scope.row.cereContractInformation.contractName}}

           </template>
         </el-table-column>
         <el-table-column label="合同编号" min-width="150" >
           <template slot-scope="scope">
             {{scope.row.cereContractInformation.contractNumber}}

           </template>
         </el-table-column>

         <el-table-column label="起租日期"  min-width="200">
           <template slot-scope="scope">
            {{scope.row.cereContractInformation.leaseStartDate}}

           </template>
         </el-table-column>

         <el-table-column label="租赁状态"  min-width="150">

         </el-table-column>


          <el-table-column label="操作"  min-width="400">
            <template slot-scope="scope">
              <div @click="outlook(scope.row)" class="tableBtn greens">出租单查看</div>
               <div @click="details(1,scope.row)" class="tableBtn greens">编辑</div>
               <div @click="addbuss(3,scope.row)" class="tableBtn greens">发送入驻单</div>
               <!-- <div @click="addbuss(3,scope.row)" class="tableBtn greens">出租状态更改</div> -->
               <div class="tableBtn greens" @click="delList(scope.row)">删除</div>
            </template>
          </el-table-column>
        </el-table>
        <div class="fenye">
          <el-pagination :hide-on-single-page='flag' background small size="mini" :current-page="currentPage"
            :page-sizes="[10, 20, 50, 100]"  layout="prev, pager, next,total"
            :total="total " @size-change="handleSizeChange" @current-change="handleCurrentChange" />
        </div>
      </div>

      </div>
      <el-dialog  :visible.sync="outdan" custom-class="tongyong_css" style="padding: 0;" width="60%"
        class="dialog_css_Xq" center :close-on-click-modal="false" :show-close="false">
        <div style="padding:20px;">
          <div style="font-size: 14px;padding-bottom: 20px;color: #000;">出租单</div>
          <div>
            <el-tabs v-model="xiangTabs">
              <el-tab-pane label="商户档案信息" name="first">
                <div style="width: 100%">
                <el-form ref="ruleForm" :model="ruleForm" label-width="130px">
                  <el-form-item label="商家类型" prop="intentCustomerName">
                    <el-select v-model="ruleForm.entityType" placeholder="线上商家" style="width:100%" disabled>
                      <el-option label="线上商家" value="线上商家" />
                      <el-option label="实体商家" value="实体商家" />
                    </el-select>
                  </el-form-item>
                  <el-form-item label="经营主体" prop="entityType">
                    <el-select v-model="ruleForm.entityType" placeholder="企业" style="width:100%" disabled>
                      <el-option label="企业" value="企业" />
                      <el-option label="个人" value="个人" />
                    </el-select>
                  </el-form-item>
                  <el-form-item label="经营范围" prop="玩偶的设计、生产、销售及网上销售;玩偶相关配件及服饰的设计、生产与销售;玩偶的定制服务玩偶的进出口业务;玩偶文化的推广与传播,:以及与玩偶相关的技术咨询、技术服务">
                    <el-input v-model="ruleForm.contactPhone" placeholder="请输入" disabled/>
                  </el-form-item>
                  <el-form-item label="开店名称" prop="成都火星">
                    <el-input v-model="ruleForm.contactPhone" placeholder="请输入" disabled/>
                  </el-form-item>
                  <el-form-item label="地址" prop="contactPhone">
                    <el-input v-model="ruleForm.contactPhone" placeholder="成都市金牛区万达广场1585号" disabled/>
                  </el-form-item>
                  <el-form-item label="主体名称" prop="contactPhone">
                    <el-input v-model="ruleForm.contactPhone" placeholder="成都火星科技有限公司" disabled/>
                  </el-form-item>
                  <el-form-item label="统一社会信用代码" prop="contactPhone">
                    <el-input v-model="ruleForm.contactPhone" placeholder="321564545" disabled/>
                  </el-form-item>
                  <el-form-item label="类型" prop="entityType">
                    <el-select v-model="ruleForm.entityType" placeholder="有限责任公司" style="width:100%" disabled>
                      <el-option label="有限责任公司" value="有限责任公司" />
                    </el-select>
                  </el-form-item>
                  <el-form-item label="法定代表人" prop="contactPhone">
                    <el-input v-model="ruleForm.contactPhone" placeholder="张三" disabled/>
                  </el-form-item>
                  <el-form-item label="注册资本" prop="registeredCapital">
                    <el-input v-model="ruleForm.registeredCapital" placeholder="请输入" disabled/>

                  </el-form-item>
                  <el-form-item label="成立日期" prop="establishmentDate">
                    <el-input v-model="ruleForm.establishmentDate" placeholder="请输入" disabled/>
                  </el-form-item>
                  <el-form-item label="住所" prop="address">
                    <el-input v-model="ruleForm.address" placeholder="请输入" disabled/>
                  </el-form-item>
                  <el-form-item label="邮箱地址" prop="emailAddress">
                    <el-input v-model="ruleForm.emailAddress" placeholder="请输入" disabled/>
                  </el-form-item>
                  <el-form-item label="营业期限" prop="idCardPhotoBack">
                    <el-date-picker v-model="businessStartTime" type="daterange" range-separator="至" disabled
                      start-placeholder="开始时间" end-placeholder="结束时间" value-format="yyyy-MM-dd" />
                  </el-form-item>
                  <el-form-item label="营业执照" prop="businessLicense">
                    <!-- <upimg v-model="ruleForm.businessLicense" :limit="1" :fileSize="1"></upimg> -->
                    <img :src="ruleForm.businessLicense" alt="">
                  </el-form-item>
                  <el-form-item label="经营者姓名" prop="registeredCapital">
                    <el-input v-model="ruleForm.registeredCapital" placeholder="请输入" disabled/>

                  </el-form-item>
                <el-form-item label="证件类型" prop="idCardType">
                  <el-select v-model="ruleForm.idCardType" placeholder="请选择" style="width:100%" disabled>
                    <el-option label="身份证" value="身份证" />
                  </el-select>
                </el-form-item>
                  <el-form-item label="身份证号" prop="idCardNumber">
                    <el-input v-model="ruleForm.idCardNumber" placeholder="请输入" disabled/>
                  </el-form-item>

                  <el-form-item label="身份证有效期" prop="idCardNumber">
                    <el-date-picker v-model="idCardValidStart" type="daterange" range-separator="至" start-placeholder="开始时间" disabled
                      end-placeholder="结束时间" value-format="yyyy-MM-dd" />
                  </el-form-item>
                  <el-form-item label="身份证照片(正面)" prop="idCardPhotoFront">
                    <!-- <upimg v-model="ruleForm.idCardPhotoFront" :limit="1" :fileSize="1"></upimg> -->
                    <img :src="ruleForm.idCardPhotoFront" alt="">
                  </el-form-item>
                  <el-form-item label="身份证照片(反面)" prop="idCardPhotoBack">
                    <!-- <upimg v-model="ruleForm.idCardPhotoBack" :limit="1" :fileSize="1"></upimg> -->
                    <img :src="ruleForm.idCardPhotoBack" alt="">
                  </el-form-item>
                  <el-form-item label="是否为法人" prop="isLegalPerson">
                    <el-select v-model="ruleForm.isLegalPerson" placeholder="请选择" style="width:100%" disabled>
                      <el-option label="否" value="0" />
                      <el-option label="是" value="1" />

                    </el-select>
                  </el-form-item>
                  <el-form-item label="企业授权书" prop="enterpriseAuthorization">
                    <!-- <upimg v-model="ruleForm.enterpriseAuthorization" :limit="1" :fileSize="1"></upimg> -->
                    <img :src="ruleForm.enterpriseAuthorization" alt="">
                  </el-form-item>
                </el-form>

                  </div>
              </el-tab-pane>
              <el-tab-pane label="商铺租赁信息" name="second">
                <div style="width: 100%">
                <!-- <div class="editcss">
                     <div class="titles">
                         资源类型
                     </div>
                     <div style="padding: 20px;">
                             <el-form :model="ruleForm"  ref="ruleForm" label-width="140px" class="demo-ruleForm">
                               <el-form-item label="商铺名称" prop="shopName">
                                 <el-input v-model="ruleForm.shopName" placeholder="请输入"  style="margin-top: 5px;" :disabled="edit"></el-input>
                               </el-form-item>
                               <el-form-item label="场地编号" prop="venueNumber">
                                 <el-input v-model="ruleForm.venueNumber" disabled  placeholder="将根据类型自动为资源编号"  style="margin-top:5px;" disabled></el-input>
                               </el-form-item>
                               <el-form-item label="门牌号" prop="houseNumber">
                                 <el-input v-model="ruleForm.houseNumber" placeholder="请输入"  style="margin-top:5px;" :disabled="edit"></el-input>
                               </el-form-item>

                               <el-form-item label="建筑形式" prop="architecturalForm">
                                 <el-select v-model="ruleForm.architecturalForm" placeholder="请选择"  style="margin-top:5px;width: 100%;" :disabled="edit">
                                   <el-option label="框剪结构" value="框剪结构"></el-option>
                                   <el-option label="区域二" value="区域二"></el-option>
                                 </el-select>
                               </el-form-item>
                               <el-form-item label="所属绿道段" prop="belongingGreenwaySection">
                <el-select v-model="ruleForm.belongingGreenwaySection" placeholder="请选择"  style="margin-top:5px;width: 100%;" :disabled="edit" >
                              <el-option :label="item.name" :value="item.code" v-for="(item,index) in lvdaoList" :key="index"></el-option>

                            </el-select>
                               </el-form-item>
                               <el-form-item label="所属公园/步道" prop="belongingParkTrail">
                                 <el-select v-model="ruleForm.belongingParkTrail" placeholder="请选择"  style="margin-top:5px;width: 100%;" :disabled="edit">
                                 <el-option :label="item.name" :value="item.code" v-for="(item,index) in biangongyuanList"></el-option>
                                 </el-select>
                               </el-form-item>
                               <el-form-item label="建筑面积" prop="floorSpace">
                                 <el-input v-model="ruleForm.floorSpace"   placeholder="请输入"  style="margin-top:5px;" :disabled="edit">
                                     <template slot="append">M<sup>2</sup></template>
                                 </el-input>
                               </el-form-item>
                                 <el-form-item label="实际使用面积" prop="actualUsableArea">
                                   <el-input v-model="ruleForm.actualUsableArea"   placeholder="请输入"  style="margin-top:5px;" :disabled="edit">
                                       <template slot="append">M<sup>2</sup></template>
                                   </el-input>
                                 </el-form-item>
                                 <el-form-item label="所属区域" prop="belongingRegion">
                                 <el-select v-model="ruleForm.belongingRegion" placeholder="请选择"  style="margin-top:5px;width: 100%;" :disabled="edit">
                                   <el-option label="成华区" value="成华区"></el-option>
                                   <el-option label="武侯区" value="武侯区"></el-option>
                                   <el-option label="锦江区" value="锦江区"></el-option>
                                   <el-option label="青羊区" value="青羊区"></el-option>
                                   <el-option label="金牛区" value="金牛区"></el-option>
                                   <el-option label="双流区" value="双流区"></el-option>
                                 </el-select>
                               </el-form-item>
                               <el-form-item label="归属部门" prop="belongingDepartment">
                                 <el-input v-model="ruleForm.belongingDepartment"   placeholder="请输入"  style="margin-top:5px;" :disabled="edit">
                                 </el-input>
                               </el-form-item>
                               <el-form-item label="负责人" prop="head">
                                  <el-input v-model="ruleForm.head"   placeholder="请输入"  style="margin-top:5px;" :disabled="edit">
                                    </el-input>
                               </el-form-item>
                               <el-form-item label="详细位置" prop="detailedLocation">
                                 <el-input v-model="ruleForm.detailedLocation"   placeholder="请输入"  style="margin-top:5px;" :disabled="edit">
                                 </el-input>
                               </el-form-item>
                               <el-form-item label="地图标点" prop="mapPunctuation">
                                   <div style="width: 100%;height: 100px;border: 1px solid #3F9B6A;">
                                     <MapXian :message="parentMessage"  :edit='edit' :sendMap='getChildDate'></MapXian>
                                   </div>
                               </el-form-item>
                               <el-form-item label="建筑图纸" prop="architecturalDrawings">

                     <img :src="ruleForm.architecturalDrawings" alt="" style="width:140px;height:140px;">
                               </el-form-item>
                                <el-form-item label="商铺描述" prop="shopDescription">
                                   <el-input type="textarea" v-model="ruleForm.shopDescription"  style="margin-top:5px;" placeholder="请输入" :disabled="edit" ></el-input>
                                 </el-form-item>
                               <el-form-item label="展示主图" prop="displayMainImage">

                                <img :src="ruleForm.displayMainImage" alt="" style="width:140px;height:140px;">
                               </el-form-item>
                               <el-form-item label="其他图片/视频" prop="displayMainVidio">

                                  <img :src="ruleForm.displayMainVidio" alt="" style="width:140px;height:140px;">
                               </el-form-item>
                             </el-form>
                          </div>
                   </div> -->

                        <div class="editcss">
                             <div class="titles">
                              租赁信息
                             </div>
                             <div style="margin-bottom: 10px;">
                               <el-descriptions class="margin-top" :column="3" border :labelStyle="labelStyle"
                                :contentStyle="contentStyle">
                                 <el-descriptions-item>
                                   <template slot="label">
                                     租赁人
                                   </template>
                                   {{xiangData.tenant}}
                                 </el-descriptions-item>
                                 <el-descriptions-item>
                                   <template slot="label">
                                     意向租期
                                   </template>
                                   {{xiangData.intendedLeaseTerm}}
                                 </el-descriptions-item>
                                 <el-descriptions-item>
                                   <template slot="label">
                                     意向租金
                                   </template>
                                   {{xiangData.intentionalRent}}
                                 </el-descriptions-item>
                                 <el-descriptions-item>
                                   <template slot="label">
                                     租赁主体
                                   </template>
                                   {{xiangData.leasingEntity}}
                                 </el-descriptions-item>
                                 <el-descriptions-item>
                                   <template slot="label">
                                     经营者
                                   </template>
                                   {{xiangData.operator}}
                                 </el-descriptions-item>
                                 <el-descriptions-item>
                                   <template slot="label">
                                     状态
                                   </template>
                                   {{xiangData.state}}
                                 </el-descriptions-item>
                               </el-descriptions>
                             </div>
                                 </div>
                                 <div class="editcss">
                                      <div class="titles">
                                       合同信息
                                      </div>
                                      <div>
                                        <el-descriptions class="margin-top" :column="3" border :labelStyle="labelStyle"
                                          :contentStyle="contentStyle">
                                          <el-descriptions-item>
                                            <template slot="label">
                                              合同编号
                                            </template>
                                            {{heData.contractNumber}}
                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              标段号
                                            </template>
                                            {{heData.sectionNumber}}
                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              合同名称
                                            </template>
                                            {{heData.contractName}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              合同金额
                                            </template>
                                            {{heData.contractAmount}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              保证金
                                            </template>
                                            {{heData.earnestMoney}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              合同签订日期
                                            </template>
                                            {{heData.contractSigningDate}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              合同终止日期
                                            </template>
                                            {{heData.contractTerminationDate}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              起租日期
                                            </template>
                                            {{heData.leaseStartDate}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              出租人名称
                                            </template>
                                            {{heData.lessorName}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              联系电话
                                            </template>
                                            {{heData.telephone}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              银行账号
                                            </template>
                                            {{heData.bankAccount}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              承租人名称
                                            </template>
                                            {{heData.tenantName}}

                                          </el-descriptions-item>
                                         <el-descriptions-item>
                                            <template slot="label">
                                              承租人联系电话
                                            </template>
                                            {{heData.tenantTelephone}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              承租人银行账号
                                            </template>
                                            {{heData.tenantBankAccount}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              商铺编号
                                            </template>
                                            {{heData.shopNumber}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              商铺名称
                                            </template>
                                            {{heData.shopName}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              商铺地址
                                            </template>
                                            {{heData.shopAddress}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              商铺面积
                                            </template>
                                            {{heData.shopArea}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              商品业态
                                            </template>
                                            {{heData.storeFormats}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              经营项目
                                            </template>
                                            {{heData.businessProjects}}

                                          </el-descriptions-item>
                                          <el-descriptions-item>
                                            <template slot="label">
                                              合同附件
                                            </template>
                                            {{heData.appendicesContract}}

                                          </el-descriptions-item>
                                        </el-descriptions>
                                      </div>
                                          </div>
                  </div>
              </el-tab-pane>
              <div style="margin-top: 20px;display: flex;justify-content: flex-end;">
                <el-button  @click="outdan =false"  class="buttonHover"
                     style="color: #000;border: 1px solid #DBDBDB;background-color: #fff;">返回</el-button>
                <!-- <el-button  @click="bianji"  style="background-color: #3F9B6A;color: #fff;">编辑</el-button> -->

              </div>
            </el-tabs>
          </div>
        </div>


      </el-dialog>
        <!-- 详情框 -->
            <el-dialog  :visible.sync="detbox" custom-class='bian_css' style="padding: 0;" width="75%"
                    center :close-on-click-modal="false"  :show-close="false">
                    <div style="padding:20px;">
                                       <div style="font-size: 14px;padding-bottom: 20px;color: #000;">租赁信息</div>
                                       <div style="margin-bottom: 10px;">
                                         <el-descriptions class="margin-top" :column="3"  border :labelStyle="labelStyle"
                                        :contentStyle="contentStyle">
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 租赁人
                                               </template>
                                               <span v-if="bianZt">{{xiangData.tenant}}</span>
                                          <el-input v-model="xiangData.tenant" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 意向租期
                                               </template>
                                               <span v-if="bianZt">{{xiangData.intendedLeaseTerm}}</span>
                                               <el-input v-model="xiangData.intendedLeaseTerm" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 意向租金
                                               </template>
                                               <span v-if="bianZt">{{xiangData.intentionalRent}}</span>
                                               <el-input v-model="xiangData.intentionalRent" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 租赁主体
                                               </template>
                                               <span v-if="bianZt">{{xiangData.leasingEntity}}</span>
                                               <el-input v-model="xiangData.leasingEntity" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 经营者
                                               </template>
                                               <span v-if="bianZt">{{xiangData.operator}}</span>
                                               <el-input v-model="xiangData.operator" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 状态
                                               </template>
                                               <span v-if="bianZt">{{xiangData.state}}</span>
                                               <el-input v-model="xiangData.state" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                           </el-descriptions>
                                       </div>
                                       <div style="">
                                          <el-descriptions class="margin-top" :column="3"  border :labelStyle="labelStyle"
                                          :contentStyle="contentStyle">
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 租赁类型
                                               </template>
                                               <span v-if="bianZt">{{xiangData.leaseType}}</span>
                                               <el-input v-model="xiangData.leaseType" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 编号
                                               </template>
                                               <span v-if="bianZt">{{xiangData.leaseCode}}</span>
                                               <el-input v-model="xiangData.leaseCode" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 名称
                                               </template>
                                             <span v-if="bianZt">{{xiangData.leaseName}}</span>
                                             <el-input v-model="xiangData.leaseName" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 行政区
                                               </template>
                                               <span v-if="bianZt">{{xiangData.administrativeRegion}}</span>
                                               <el-input v-model="xiangData.administrativeRegion" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 地址
                                               </template>
                                               <span v-if="bianZt">{{xiangData.leaseAddress}}</span>
                                               <el-input v-model="xiangData.leaseAddress" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 所属主体
                                               </template>
                                               <span v-if="bianZt">{{xiangData.owner}}</span>
                                               <el-input v-model="xiangData.owner" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 负责人
                                               </template>
                                               <span v-if="bianZt">{{xiangData.commander}}</span>
                                               <el-input v-model="xiangData.commander" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 联系电话
                                               </template>
                                               <span v-if="bianZt">{{xiangData.telephone}}</span>
                                               <el-input v-model="xiangData.telephone" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 范围
                                               </template>
                                               <span v-if="bianZt">{{xiangData.scope}}</span>
                                               <el-input v-model="xiangData.scope" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 面积
                                               </template>
                                               <span v-if="bianZt">{{xiangData.area}}</span>
                                               <el-input v-model="xiangData.area" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 建成时间
                                               </template>
                                               <span v-if="bianZt">{{xiangData.completionTime}}</span>
                                               <el-input v-model="xiangData.completionTime" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 房屋类型
                                               </template>
                                               <span v-if="bianZt">{{xiangData.houseType}}</span>
                                               <el-input v-model="xiangData.houseType" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 主要设施
                                               </template>
                                               <span v-if="bianZt">{{xiangData.mainFacilities}}</span>
                                               <el-input v-model="xiangData.mainFacilities" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 平面图
                                               </template>
                                               <span v-if="bianZt">{{xiangData.planeFigure}}</span>
                                               <el-input v-model="xiangData.planeFigure" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 收费标准
                                               </template>
                                               <span v-if="bianZt">{{xiangData.feeStandards}}</span>
                                               <el-input v-model="xiangData.feeStandards" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 标签
                                               </template>
                                               <span v-if="bianZt">{{xiangData.label}}</span>
                                               <el-input v-model="xiangData.label" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>

                                             <el-descriptions-item>
                                               <template slot="label">
                                                 宣传视频
                                               </template>
                                               <span v-if="bianZt">{{xiangData.promotionVideo}}</span>
                                               <el-input v-model="xiangData.promotionVideo" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 宣传图片
                                               </template>
                                               <span v-if="bianZt">{{xiangData.promotionImage}}</span>
                                               <el-input v-model="xiangData.promotionImage" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                             <el-descriptions-item>
                                               <template slot="label">
                                                 备注信息
                                               </template>
                                               <span v-if="bianZt">{{xiangData.notes}}</span>
                                               <el-input v-model="xiangData.notes" placeholder="请输入" style="width:100%;" v-else/>
                                             </el-descriptions-item>
                                           </el-descriptions>
                                       </div>
                                       <div style="font-size: 14px;padding: 20px 0;color: #000;">合同信息</div>
                                       <div>
                                         <el-descriptions class="margin-top" :column="3" border :labelStyle="labelStyle"
                                          :contentStyle="contentStyle">
                                           <el-descriptions-item>
                                             <template slot="label">
                                               合同编号
                                             </template>
                                             <div v-if="bianZt">{{heData.contractNumber}}</div>
                                             <el-input v-model="heData.contractNumber"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               标段号
                                             </template>
                                             <div v-if="bianZt">{{heData.sectionNumber}}</div>
                                             <el-input v-model="heData.sectionNumber"  style="width:100%;" v-else placeholder="请输入"/>

                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               合同名称
                                             </template>
                                             <div v-if="bianZt">{{heData.contractName}}</div>
                                             <el-input v-model="heData.contractName"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               合同金额
                                             </template>
                                             <div v-if="bianZt">{{heData.contractAmount}}</div>
                                             <el-input v-model="heData.contractAmount"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               保证金
                                             </template>
                                             <div v-if="bianZt">{{heData.contractAmount}}</div>
                                             <el-input v-model="heData.contractAmount"  style="width:100%;" v-else placeholder="请输入"/>

                                             <!-- <el-input v-model="heData.earnestMoney" placeholder="请输入" style="width:100%;" /> -->
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               合同签订日期
                                             </template>
                                             <div v-if="bianZt">{{heData.contractSigningDate}}</div>
                                             <el-input v-model="heData.contractSigningDate"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               合同终止日期
                                             </template>
                                             <div v-if="bianZt">{{heData.contractTerminationDate}}</div>
                                             <el-input v-model="heData.contractTerminationDate"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               起租日期
                                             </template>
                                             <div v-if="bianZt">{{heData.leaseStartDate}}</div>
                                             <el-input v-model="heData.leaseStartDate"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               出租人名称
                                             </template>
                                             <div v-if="bianZt">{{heData.lessorName}}</div>
                                             <el-input v-model="heData.lessorName"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               联系电话
                                             </template>
                                             <div v-if="bianZt">{{heData.telephone}}</div>
                                             <el-input v-model="heData.telephone"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               银行账号
                                             </template>
                                             <div v-if="bianZt">{{heData.bankAccount}}</div>
                                             <el-input v-model="heData.bankAccount"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               承租人名称
                                             </template>
                                             <div v-if="bianZt">{{heData.tenantName}}</div>
                                             <el-input v-model="heData.tenantName"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               承租人联系电话
                                             </template>
                                             <div v-if="bianZt">{{heData.tenantTelephone}}</div>
                                             <el-input v-model="heData.tenantTelephone"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               承租人银行账号
                                             </template>
                                             <div v-if="bianZt">{{heData.tenantBankAccount}}</div>
                                             <el-input v-model="heData.tenantBankAccount"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               商铺编号
                                             </template>
                                             <div v-if="bianZt">{{heData.shopNumber}}</div>
                                             <el-input v-model="heData.shopNumber"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               商铺名称
                                             </template>
                                             <div v-if="bianZt">{{heData.shopName}}</div>
                                             <el-input v-model="heData.shopName"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               商铺地址
                                             </template>
                                             <div v-if="bianZt">{{heData.shopAddress}}</div>
                                             <el-input v-model="heData.shopAddress"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               商铺面积
                                             </template>
                                             <div v-if="bianZt">{{heData.shopArea}}</div>
                                             <el-input v-model="heData.shopArea"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               商铺业态
                                             </template>
                                             <div v-if="bianZt">{{heData.storeFormats}}</div>
                                             <el-input v-model="heData.storeFormats"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               经营项目
                                             </template>
                                             <div v-if="bianZt">{{heData.businessProjects}}</div>
                                             <el-input v-model="heData.businessProjects"  style="width:100%;" v-else placeholder="请输入"/>
                                           </el-descriptions-item>
                                           <el-descriptions-item>
                                             <template slot="label">
                                               合同附件
                                             </template>
                                             <!-- <el-upload class="video-uploader" :action="uploadFileUrl" :on-remove="hefuRemove"
                                               :on-success="hefuSuccess" :auto-upload="true" :file-list="hefuData" v-if="index==1">
                                               <div slot="trigger" style="color:#3f9b6a"> +点击上传</div>
                                             </el-upload> -->
                                           </el-descriptions-item>
                                         </el-descriptions>
                                       </div>

                                       <div style="padding-top:20px;display:flex;justify-content: flex-end;">
                     <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;"  @click="closeFn(2)">返回</el-button>
                     <!-- <el-button class="buttonHover" style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;" >删除</el-button> -->
                              <!-- <el-button  @click="bianZt = false"  style="background-color: #3F9B6A;color: #fff">编辑</el-button> -->
                              <!-- <el-button  @click="addbuss(2)"  style="background-color: #3F9B6A;color: #fff">发送入驻手续单</el-button> -->
                              <el-button  @click="addbuss(2)"  style="background-color: #3F9B6A;color: #fff">确认</el-button>

                                                   </div>
                    </div>

        </el-dialog>

        <!-- 入驻单 -->
                <el-dialog title="入驻申请"  :visible.sync="ggXin" custom-class="diaslog_zhong" style="padding: 0;" width="60%" class="dialog_css_Xq"  center :close-on-click-modal="false" :show-close="false"	>
                            <div>
                                  <div style="margin-bottom: 20px;">
                                  <el-form ref="form" :model="zhong" label-width="120px">
                                      <el-form-item label="租金">
                                        <el-input v-model="zhong.intentionalRent"  ></el-input>
                                      </el-form-item>
                                      <el-form-item label="付款周期">
                                        <el-select v-model="zhong.belongingDepartment" placeholder="请选择" style="margin-top:5px;width: 100%;">
                                          <el-option label="按年" value="按年"></el-option>
                                          <el-option label="按月" value="按月"></el-option>
                                          <el-option label="按日" value="按日"></el-option>
                                          <el-option label="季度" value="季度"></el-option>
                                        </el-select>
                                      </el-form-item>
                                      <el-form-item label="付款日">
                                        <el-select v-model="zhong.name" placeholder="请选择" style="margin-top:5px;width: 100%;">
                                          <el-option :label="val+'号'" :value="val+'号'" v-for="val in 31"></el-option>
                                        </el-select>
                                      </el-form-item>
                                      <el-form-item label="支付类型">
                                        <el-select v-model="zhong.zhifu" placeholder="请选择" style="margin-top:5px;width: 100%;">
                                          <el-option label="线上支付" value="线上支付"></el-option>
                                          <el-option label="线下支付" value="线下支付"></el-option>
                                        </el-select>
                                      </el-form-item>


                                      <el-form-item label="支付方式说明">
                                        <wang-editor v-model="zhong.zhifushuo" ref="editor" :height="200"></wang-editor>
                                      </el-form-item>
                                      <el-form-item label="装修与改造规定">
                                        <wang-editor v-model="zhong.gaizao" ref="editor" :height="200"></wang-editor>
                                      </el-form-item>
                                      <el-form-item label="其他备注信息">
                                        <wang-editor v-model="zhong.noto" ref="editor" :height="200"></wang-editor>
                                      </el-form-item>
                                  </el-form>

                                  </div>
                                  <div style="display: flex;justify-content: flex-end;">
                                    <el-button  @click="closeFn(1)" class="buttonHover"
                      style="color: #606266;border: 1px solid #dddfe5;background-color: #fff;">返回</el-button>
                                  <!-- <el-button  @click="addCheck(4)" style="background-color: #3F9B6A;color: #fff">保存</el-button> -->
                                  <el-button  @click="yulan =true" style="background-color: #3F9B6A;color: #fff">预览</el-button>
                                    </div>
                            </div>
                            <el-dialog :visible.sync="yulan" custom-class="actSpye_dialog" style="padding: 0;" width="50%"   center :close-on-click-modal="false" 	append-to-body>
                                    <div style="padding:20px 0">
                                          <div class="form-container" ref="contentToConvert" style="background-color:#fff;">
                                                  <div class="form-header">入驻单</div>
                                                  <div class="form-group">
                                                      <label for="rentAmount">租金：</label>
                                                      <input type="text" id="rentAmount" v-model="zhong.intentionalRent" disabled>
                                                  </div>
                                                  <div class="form-group">
                                                      <label for="paymentMethod">付款周期：</label>
                                                      <input type="text" id="paymentMethod"  v-model="zhong.belongingDepartment"  disabled>
                                                  </div>
                                                  <div class="form-group">
                                                      <label>付款日：</label>
                                                      <input type="text" id="paymentDate"  v-model="zhong.name" disabled>
                                                  </div>
                                                  <div class="form-group">
                                                      <label for="depositAmount">支付类型：</label>
                                                      <input type="text" id="depositAmount" v-model="zhong.zhifu" disabled>
                                                  </div>

                                                  <div class="form-group">
                                                      <label for="renovationRules">支付方式说明：</label>
                                                      <div style="padding:20px;width:100%;border: 1px solid #ccc;" v-html="zhong.zhifushuo"></div>
                                                  </div>
                                                  <div class="form-group">
                                                      <label for="renovationRules">装修与改造规定：</label>
                                                      <div style="padding:20px;width:100%;border: 1px solid #ccc;" v-html="zhong.gaizao"></div>
                                                  </div>
                                                  <div class="form-group">
                                                      <label for="remarks">其他备注信息：</label>
                                                      <div style="padding:20px;width:100%;border: 1px solid #ccc;" v-html="zhong.noto"></div>
                                                  </div>
                                              </div>

                                          <div style="justify-content:flex-end;margin:20px 20px 0 0;display:flex;">
                                            <el-button @click="downloadPdf" style="background-color: #3F9B6A;color: #fff">下载</el-button>
                                            <!-- <el-button  style="background-color: #3F9B6A;color: #fff">打印</el-button> -->
                                            <!-- <el-button  style="background-color: #3F9B6A;color: #fff">发送</el-button> -->

                                          </div>
                                    </div>
                                                </el-dialog>
                </el-dialog>

      </div>


</template>

<script>
  import {
    async
  } from 'q'
  import axios from 'axios'
  import {
  rentalGetAll,
  rentalDel,
  rentalAdd,
  excelRentOutQueryByPage
  } from '../../../api/rentalMan.js'
import {
  businessListGetAll,
  businessListSave,
  businessListGetById,
  businessListUpdate,
  businessListStart,
  delBusinessById
} from '@/api/business'
  import upimg from "@/components/ImageUpload/index"
  import wangEditor from "@/components/editor/index"
  import html2canvas from 'html2canvas'
  import jsPDF from 'jspdf'
  export default {
    components: { wangEditor,upimg},
    data() {
      return {
        hetongBox:false,//合同
        detbox:false,//详情
        leixing:true,//切换
        yulan:false,//预览
        index:1,
        currentPage: 1,
        total: 100,
        flag: false,
        pageSize: 10,
        ggXin: false,
        formInline: {
         contractNumber:'',
         sectionNumber:'',
         contractName:'',
         contractAmount:'',
         earnestMoney:'',
         contractSigningDate:'',
         contractTerminationDate:'',
         leaseStartDate:'',
         lessorName:'',
         telephone:'',
         bankAccount:'',
         tenantName:'',
         tenantTelephone:'',
         tenantBankAccount:'',
         shopNumber:'',
         shopName:'',
         shopAddress:'',
         shopArea:'',
         storeFormats:'',
         businessProjects:'',
         appendicesContract:'',
        },
        tableData: [],
        leaseStartDate:[],
        formSel: {
          leaseName:'',
          cereContractInformation:{
            tenantName:'',
            shopName:'',
            leaseStartDate:'',
          },
        pageNumber: 1,
        pageSize: 10,
        },
        pageindex: {
          pageNumber: 1,
          pageSize: 10,
        },
        zhong:{
              intentionalRent:'',
              belongingDepartment:'',
              name:'',
              zhifu:'',
              zhifushuo:'',
              gaizao:'',
              noto:'',
                },
                detaiList:{},
                bianZt:true,//编辑切换
                outdan:false,
                xiangTabs:'first',
                ruleForm:{},
                edit:true,
                businessStartTime:[],
                idCardValidStart:[],
                lvdaoList:[],
                biangongyuanList:[],
                xiangData:{},
                heData:{},
                contentStyle:{
                  width:'20%',
                  height:'42px',
                },
                labelStyle:{
                  width:'150px',
                  height:'42px',
                  color:'#000',
                },
      }
    },
    created() {
        this.getAll()
    },
    computed: {

    },
    methods: {
      chenge(val){
        this.formSel={
          leaseName:'',
          cereContractInformation:{
            tenantName:'',
            shopName:'',
            leaseStartDate:'',
          },
        pageNumber: 1,
        pageSize: 10,
        }
        this.leixing  = !this.leixing

      },
      async getAll(val) {
       const res = await rentalGetAll(this.pageindex)
   this.total = res.data.numberOfElements
   this.tableData = res.data.content
      },

      // 新增确定按钮
      async addCheck(val) {

            this.ggXin = false
             this.getAll()
      },
       // 获取时间
     currentTime(){
     let date = new Date();
     let year = date.getFullYear();//月份从0~11，所以加一
     let month= date.getMonth();
     let dateArr = [date.getMonth()+1,date.getDate(),date.getHours()]
     for(let i=0;i<dateArr.length;i++){
       if(dateArr[i] >=1 &&dateArr[i]<=9){
         dateArr[i] = '0' + dateArr[i]
       }
     }
     let strDate= year +'-' + dateArr[0] +'-' + dateArr[1]
     return strDate
     },

      //详情
       details(val,item){
         this.xiangData = item
         this.heData = item.cereContractInformation
        if(val == 1){
          this.bianZt = false
        }else{
          this.bianZt = true
        }

          this.detbox = true

      },
      addbuss(val,item) {
        this.index = val
        this.detbox = false
        this.ggXin = true
        this.zhong.lessorName = item.cereContractInformation.lessorName
        this.zhong.tenantName = item.cereContractInformation.tenantName
        this.zhong.leaseAddress = item.leaseAddress
        this.zhong.leaseName = item.leaseName
        this.zhong.completionTime = item.completionTime
        this.zhong.intendedLeaseTerm = item.intendedLeaseTerm
        this.zhong.intentionalRent = item.intentionalRent
      },
      handleSizeChange(val) {
        this.pageSize = val
      },
      handleCurrentChange(val) {
        this.currentPage = val
      },

      closeFn(val) {

       if(val == 1){
          this.ggXin = false
       }else{
         this.detbox = false
       }
      },
      // 详情编辑
     async bianji(){

          this.detbox = false
      },
      //查看合同
      lookHetong(val){
       this.hetongBox = true
      },
      // 查询按钮
    async  onSubmit() {
      if(this.leaseStartDate.length !=0){
        this.formSel.cereContractInformation.leaseStartDate = this.leaseStartDate.join(',')
      }
      const res = await rentalGetAll(this.formSel)
      this.total = res.data.numberOfElements
      this.tableData = res.data.content
      },
      //重置按钮
      resetting(){
        this.formSel={
          leaseName:'',
          cereContractInformation:{
            tenantName:'',
            shopName:'',
            leaseStartDate:'',
          },
        pageNumber: 1,
        pageSize: 10,
        },
        this.leaseStartDate = []
          this.getAll()
      },
// 下载
 async downloadPdf() {
      const content = this.$refs.contentToConvert;

      // 使用 html2canvas 将 div 渲染为画布
      const canvas = await html2canvas(content);

      // 获取画布的图像数据
      const imgData = canvas.toDataURL('image/png');

      // 创建一个新的 PDF 文档
      const pdf = new jsPDF('p', 'mm', 'a4');

      // 添加图像到 PDF，第二个参数是图像格式，第三个参数是缩放比例
      const imgWidth = 190; // 图像的宽度（mm）
      const imgHeight = (canvas.height * imgWidth) / canvas.width; // 保持图像的宽高比

      pdf.addImage(imgData, 'PNG', 10, 10, imgWidth, imgHeight); // 10, 10 是图像在 PDF 中的位置（mm）

      // 保存 PDF 文件
      pdf.save('downloaded.pdf');
    },
    // 出租单查看
    outlook(item){
      this.xiangData = item
      this.heData = item.cereContractInformation
      this.outdan = true
    },
    delList(){

              const h = this.$createElement;
                      this.$msgbox({
                        title: '消息',
                        message: h('p', null, [
                          h('span', null, '是否删除当前记录 '),
                        ]),
                        showCancelButton: true,
                        showClose:false,
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        customClass:'oe-dialog-btn',
                        beforeClose: (action, instance, done) => {
                          if (action === 'confirm') {

                          done();
                          } else {
                            done();
                          }
            }
            })

    },
   async daochu(){
      let res = await excelRentOutQueryByPage(this.pageindex)
         if(!res){
           return
         }
         const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
         const fileName = '出租管理列表.xls'
         if ('download' in document.createElement('a')) {
            // 非IE下载
            const elink = document.createElement('a')
            elink.download = fileName
            elink.style.display = 'none'
            elink.href = URL.createObjectURL(blob)
            document.body.appendChild(elink)
            elink.click()
            URL.revokeObjectURL(elink.href) // 释放URL 对象
            document.body.removeChild(elink)
          } else {
           // IE10+下载
           navigator.msSaveBlob(blob, fileName)
         }
         this.$message({
           message: '导出成功',
           type: 'success'
         })

    },
    }
  }
</script>

<style scoped>
  .zhuti {
    padding: 0  20px 20px 20px;
    min-height: calc(100vh - 50px - 20px);
    background-color: #Fff;

  }
  .chengeXia{
    border-bottom: 6px solid #3F9B6A;padding-bottom: 4px;color: #3F9B6A;
  }

  /deep/ .el-form-item__content {
    line-height: 0;
  }

  .tableBtn {
    display: inline-block;
    margin-right: 10px;
    color:#ACACAC;
  }

  .formSearch {
    display: flex;
    width: 100%;
    font-size: 14px;
    justify-content: space-between;
  }

  .greens {
    color: #3F9B6A;
  }

  /deep/ .el-table__row {
    font-size: 14px;
    color:#000000e6;
    height:42px;
  }

  .fenye {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
  }

  /deep/ .el-pagination.is-background .el-pager li:not(.disabled).active {
    background-color: #3F9B6A;
  }

  .el-row {
    margin-bottom: 20px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .el-col {
    border-radius: 4px;
  }

  .bg-purple-dark {
    background: #99a9bf;
  }

  .bg-purple {
    background: #d3dce6;
  }

  .bg-purple-light {
    background: #e5e9f2;
  }

  .grid-content {
    border-radius: 4px;
    min-height: 36px;
  }

  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }

  /deep/ .bg-purple[data-v-0e3fe4ec] {
    background: #fff;
    height: 50px;
  }
    /deep/ .bg-purple[data-v-3bebae82]{
    background: #fff;
    height: 50px;
  }

::v-deep .bg-purple{
    background: #fff;
    height: 50px;
  }
  /deep/ .el-form--label-top .el-form-item__label {
    padding: 0;
  }
::v-deep .el-form-item{
  margin-bottom:16px;
}
  .device-form .el-form-item__label::after {
    content: "*";
    color: #1A1A1A;
    margin-left: 5px;
    font-size: 16px;
  }


  ::v-deep .el-dialog__wrapper {
    .el-dialog__header {
      background-color: #FAFAFA;
    }
  }
 ::v-deep .el-input__inner:focus {
      border: #3F9B6A 1px solid;
   }
  .dialog-footer {
    display: flex;
    justify-content: flex-end;
    border-top: solid rgba(209, 209, 209, 0.2) 2px;
    padding-top: 20px;
  }
 ::v-deep .el-input__inner:focus {
      border: #3F9B6A 1px solid;
   }
   ::v-deep .el-input__inner:hover {
        border: #3F9B6A 1px solid;
     }
     ::v-deep .el-select .el-input.is-focus .el-input__inner{
         border-color:#3F9B6A
     }

.el-select-dropdown__item.selected{
    color: #3F9B6A;
}

.el-pagination__sizes .el-input .el-input__inner:hover{
    border-color: #3F9B6A;
}
::v-deep .el-dialog__wrapper{

  .dialog_css{
      margin-right: 12px;
      margin-top:61px !important;
      .el-dialog__title {
        font-size: 16px !important;
        font-weight: 600;
        color: #000;
      }
  }
  .diaslog_zhong{
     margin-left: 20%;
     margin-top:61px !important;

  }

}
 ::v-deep .diaslog_zhong{
     margin-left: 20%;
     margin-top:61px !important;
     max-height:600px;
     overflow-y: auto;
     .el-dialog__header{
       background-color:#fff;
       border-bottom:1px solid #EFEFEF;
       .el-dialog__title{
         font-size: 14px;
          color: #000000e6;
       }
     }
     .el-dialog__body{
       padding:10px 20px 30px 20px
     }
  }

 /deep/ .el-table_1_column_8 .hetong{
   color:#7DBB9A;
   text-decoration: underline;
}
/deep/ .first-column-bg {
    background-color: #FAFAFA !important;
  }

::v-deep .textarea{
  width: 85%;
   .el-textarea__inner{
    width: 100%;
  }
}

::v-deep .pass_input{
    width: 100%;
    .el-input__inner {
      border: none;
       padding:0;
       }
  }
::v-deep .pass_select{
  width: 100%;
 .el-input__inner {
   border: none;
   padding:0;
    }
  .el-icon-arrow-up:before{
    content:''
  }

}
 /deep/ .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell{
  background-color: #fff;
}
  .form-container {
            max-width: 600px;
            margin: 0px auto;
            padding: 20px;
            border: 1px solid #ccc;
            border-radius: 5px;
            background-color:#fff;
        }
        .form-group {
            margin-bottom: 15px;
            display:flex;
            align-items: center
        }
        .form-group label {
            display: block;
            font-weight: bold;
            margin-bottom: 5px;
            width: 152px;
        }
        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 8px;
            box-sizing: border-box;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        .form-group textarea {
            resize: vertical;
        }
        .form-header {
            text-align: center;
            margin-bottom: 20px;
            font-size: 1.5em;
            font-weight: bold;
        }
        .jianju{
          margin-bottom:10px;
        }
        .titles{
          position: relative;
          padding-left: 10px;

        }

        .titles::before{
          content: '';
          width: 2px;
          height: 10px;
          background-color: #3F9B6A;
            position: absolute;
            top: 2px;
            left: 0;
        }
</style>
<style lang="scss" scoped>
  ::v-deep .bian_css{
    .el-dialog__header{
      padding:0px;
    }
    .el-input__inner{
       height: 18px;
       border: 0px;
       margin-top:0px;
     }
     .el-input__inner:hover{
       border: 0px;
     }
    .el-input__inner:focus {
      border: 0px;
    }
  }
  ::v-deep .buttonHover:hover{
    color:#3f9b6a !important;
    border-color: #c5e1d2 !important;
    background-color: #ecf5f0 !important;
    outline: none;
  }
  ::v-deep .el-pagination__total{
        position: absolute;
        left: 33px;
  }
  ::v-deep .diaslog_zhong{
    .el-dialog__body{
      padding:10px 20px 20px 20px;
    }
    .el-upload--picture-card{
      width:130px;
      height:130px;
    }
  }
::v-deep .editcss{
  font-size: 14px;
     .el-form-item__label{
       // color: #AEAEAE;
     }
}
</style>
