<template>
  <div style="background-color:#f7f7f7;padding:10px 10px;">
    <div class="zhuti" v-if="onaction == '1'">
      <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">
            <el-form-item label="资源名称" prop="name">
              <el-input v-model="name" placeholder="请输入" maxlength="50"></el-input>
            </el-form-item>
            <el-form-item label="策略名称" prop="clName">
              <el-input v-model="clName" placeholder="请输入" maxlength="50"></el-input>
            </el-form-item>
            <el-form-item label="审核状态" prop="publishStatus">
              <el-select v-model="publishStatus" placeholder="请选择" style="width: 168px;margin-right: 15px">
                <el-option label="待审核" value="3"></el-option>
              </el-select>
            </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 style="display: flex;font-size: 14px">
            <div style="margin-right: 25px;cursor: pointer;" @click="chenge('1')" :class="ontype=='1'?'chengeXia':''">商铺
            </div>
            <div style="margin-right: 25px;cursor: pointer;" @click="chenge('2')" :class="ontype=='2'?'chengeXia':''">
              广告位</div>
            <div style="margin-right: 25px;cursor: pointer;" @click="chenge('3')" :class="ontype=='3'?'chengeXia':''">场地
            </div>
          </div>
        </div>
        <!-- 表格 -->
        <el-table v-if="ontype=='1'" :span-method="tableSpanMethod" :data="tableData"
          :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
          <el-table-column label="商铺名称" prop="shopName" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereBasicInformationShop.shopName}}
            </template>
          </el-table-column>
          <el-table-column prop="detailedLocation" label="详细地址" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereBasicInformationShop.detailedLocation}}
            </template>
          </el-table-column>
          <el-table-column label="商铺类型" prop="shopType" show-overflow-tooltip>
            <template slot-scope="scope">
              <div class="duiqi">
                {{scope.row.cereBasicInformationShop.shopType=='1'?'移动铺位':scope.row.cereBasicInformationShop.shopType=='2'?'固定铺位':'无'}}
              </div>
            </template>
          </el-table-column>
          <el-table-column label="策略名称" prop="policyName" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.policyName}}
            </template>
          </el-table-column>
          <el-table-column label="租金/周期" prop="rentalPrice" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.rentalPrice}} /{{ scope.row.shopinfo.leaseTerm }}
            </template>
          </el-table-column>
          <el-table-column label="付款日" prop="payDay" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.payDay}}
            </template>
          </el-table-column>
          <el-table-column label="状态" prop="publishStatus" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereBasicInformationShop.publishStatus=='0'?'空置中':scope.row.cereBasicInformationShop.publishStatus=='1'?'待审核':scope.row.cereBasicInformationShop.publishStatus=='2'?'已发布':scope.row.cereBasicInformationShop.publishStatus=='3'?'不通过':'-'}}
            </template>
          </el-table-column>
          <el-table-column label="操作" fixed="right" prop="sh">
            <template slot-scope="scope">
              <div @click="details(scope.row.cereBasicInformationShop,'1')" class="tableBtn greens">查看</div>
              <div v-if="scope.row.cereBasicInformationShop.publishStatus=='1'"
                @click="details(scope.row.cereBasicInformationShop,'2')" class="tableBtn greens">审核</div>
            </template>
          </el-table-column>
        </el-table>
        <el-table v-if="ontype=='2'" :span-method="tableSpanMethod" :data="tableData"
          :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
          <el-table-column label="广告位名称" prop="advertisingName" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereAdvertisingInformation.advertisingName}}
            </template>
          </el-table-column>
          <el-table-column prop="advertisingType" label="广告位类型" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereAdvertisingInformation.advertisingType}}
            </template>
          </el-table-column>
          <el-table-column label="所属端" prop="affiliation" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereAdvertisingInformation.affiliation}}
            </template>
          </el-table-column>
          <el-table-column label="策略名称" prop="policyName" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.policyName}}
            </template>
          </el-table-column>
          <el-table-column label="租金/周期" prop="rentalPrice" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.rentalPrice}} /{{ scope.row.shopinfo.leaseTerm }}
            </template>
          </el-table-column>
          <el-table-column label="付款日" prop="payDay" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.payDay}}
            </template>
          </el-table-column>
          <el-table-column label="状态" prop="publishStatus" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereAdvertisingInformation.publishStatus=='0'?'空置中':scope.row.cereAdvertisingInformation.publishStatus=='1'?'待审核':scope.row.cereAdvertisingInformation.publishStatus=='2'?'已发布':scope.row.cereAdvertisingInformation.publishStatus=='3'?'不通过':'-'}}
            </template>
          </el-table-column>
          <el-table-column label="操作" fixed="right" prop="sh">
            <template slot-scope="scope">
              <div @click="details(scope.row.cereAdvertisingInformation,'1')" class="tableBtn greens">查看</div>
              <div v-if="scope.row.cereAdvertisingInformation.publishStatus=='1'"
                @click="details(scope.row.cereAdvertisingInformation,'2')" class="tableBtn greens">审核</div>
            </template>
          </el-table-column>
        </el-table>
        <el-table v-if="ontype=='3'" :span-method="tableSpanMethod" :data="tableData"
          :header-cell-style="{fontSize: '14px',color:'#0009',fontWeight: 'normal',backgroundColor:'#F2F3F5'}">
          <el-table-column label="场地名称" prop="venueName" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereBasicInformationVenue.venueName}}
            </template>
          </el-table-column>
          <el-table-column prop="venueType" label="场地类型" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereBasicInformationVenue.venueType}}
            </template>
          </el-table-column>
          <el-table-column label="实际使用面积" prop="actualUsableArea" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereBasicInformationVenue.actualUsableArea}}
            </template>
          </el-table-column>
          <el-table-column label="策略名称" prop="policyName" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.policyName}}
            </template>
          </el-table-column>
          <el-table-column label="租金/周期" prop="rentalPrice" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.rentalPrice}} /{{ scope.row.shopinfo.leaseTerm }}
            </template>
          </el-table-column>
          <el-table-column label="付款日" prop="payDay" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.shopinfo.payDay}}
            </template>
          </el-table-column>
          <el-table-column label="状态" prop="publishStatus" show-overflow-tooltip>
            <template slot-scope="scope">
              {{scope.row.cereBasicInformationVenue.publishStatus=='0'?'空置中':scope.row.cereBasicInformationVenue.publishStatus=='1'?'待审核':scope.row.cereBasicInformationVenue.publishStatus=='2'?'已发布':scope.row.cereBasicInformationVenue.publishStatus=='3'?'不通过':'-'}}
            </template>
          </el-table-column>
          <el-table-column label="操作" fixed="right" prop="sh">
            <template slot-scope="scope">
              <div @click="details(scope.row.cereBasicInformationVenue,'1')" class="tableBtn greens">查看</div>
              <div v-if="scope.row.cereBasicInformationVenue.publishStatus=='1'"
                @click="details(scope.row.cereBasicInformationVenue,'2')" class="tableBtn greens">审核</div>
            </template>
          </el-table-column>
        </el-table>
        <div v-if="false" style="display: flex;justify-content: space-between;" class="bom">
          <div style="font-size: 14px;">共 <span style="color: #3F9B6A;">{{total}}</span> 项数据</div>
          <!-- <el-pagination :current-page="pagequery.pageNumber+1" :page-sizes="[10, 20, 50, 100]" :page-size="10"
            background small layout="prev, pager, next" :total="total" @size-change="handleSizeChange"
            @current-change="handleCurrentChange">
          </el-pagination> -->
        </div>

      </div>

    </div>






    <div class="zhuti" v-if="onaction == '2'">
      <div style="height:58px;line-height:58px;">
        <div style="color:#0006">
          <span>{{onaction == '1'?'商铺基本信息':onaction == '2'?'广告位基本信息管理':onaction == '3'?'场地基本信息管理':'-'  }}</span> <span
            style="padding:0 5px;">></span> <span style="color:#000000e6">新增</span>
        </div>
      </div>
      <div style="margin: 20px 0;">
        <div style="display: flex;font-size: 14px">
          <div style="margin-right: 25px;cursor: pointer;" @click="chenge('1')" :class="ontype=='1'?'chengeXia':''">商铺
          </div>
          <div style="margin-right: 25px;cursor: pointer;" @click="chenge('2')" :class="ontype=='2'?'chengeXia':''">
            广告位</div>
          <div style="margin-right: 25px;cursor: pointer;" @click="chenge('3')" :class="ontype=='3'?'chengeXia':''">场地
          </div>
        </div>
      </div>
      <div v-if="ontype == '1'" style="padding: 20px 20px 20px 0;">
        <add @removeonaction="removeonaction"></add>
      </div>
      <div v-if="ontype == '2'" style="padding: 20px 20px 20px 0;">
        <addmap @removeonaction="removeonaction" :leixing="leixing"></addmap>
      </div>
      <div v-if="ontype == '3'" style="padding: 20px 20px 20px 0;">
        <addcd @removeonaction="removeonaction"></addcd>
      </div>
    </div>
    <div class="zhuti" v-if="onaction == '3'">
      <div style="height:58px;line-height:58px;">
        <div style="color:#0006">
          <span>{{onaction == '1'?'商铺基本信息':onaction == '2'?'广告位基本信息管理':onaction == '3'?'场地基本信息管理':'-'  }}</span> <span
            style="padding:0 5px;">></span> <span style="color:#000000e6">查看</span>
        </div>
      </div>
      <div v-if="ontype == '1'">
        <resourceCommodity :issp="issp" :editbgid="detailsinfo" @removeonaction="removeonaction"></resourceCommodity>
      </div>
      <div v-if="ontype == '2'">
        <chakanmap :issp="issp" :editbgid="detailsinfo" @removeonaction="removeonaction" :leixing="leixing"></chakanmap>
      </div>
      <div v-if="ontype == '3'">
        <chakancd :issp="issp" :editbgid="detailsinfo" @removeonaction="removeonaction"></chakancd>
      </div>
    </div>
    <div class="zhuti" v-if="onaction == '4'">
      <div style="height:58px;line-height:58px;">
        <div style="color:#0006">
          <span>{{onaction == '1'?'商铺基本信息':onaction == '2'?'广告位基本信息管理':onaction == '3'?'场地基本信息管理':'-'  }}</span> <span
            style="padding:0 5px;">></span> <span style="color:#000000e6">{{contractChangeReason}}</span>
        </div>
      </div>
      <div v-if="ontype == '1'" style="padding: 20px 20px 20px 0;">
        <add :info="detailsinfo" @removeonaction="removeonaction"></add>
      </div>
      <div v-if="ontype == '2'" style="padding: 20px 20px 20px 0;">
        <addmap :info="detailsinfo" @removeonaction="removeonaction" :leixing="leixing"></addmap>
      </div>
      <div v-if="ontype == '3'" style="padding: 20px 20px 20px 0;">
        <addcd :info="detailsinfo" @removeonaction="removeonaction"></addcd>
      </div>
    </div>
    <el-dialog :visible.sync="addcl" style="padding: 0px;" width="65%" append-to-body center
      :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false">
      <cl @minSev="minSev" @mingClose="mingClose"></cl>
    </el-dialog>
  </div>


</template>

<script>
  import {
    cereResourceStrategy,
    getResourceStrategy
  } from '@/api/newly.js'
  import {
    ceGetAll
  } from '@/api/sam.js'
  import * as information from '@/api/information';
  import * as map1 from '@/api/map1';
  import {
    likeGet,
  } from '@/api/map1'
  import {
    getAlls,
    changAlls
  } from '@/api/information';
  import add from '@/components/add/addinformation'
  import resourceCommodity from '@/components/resourceCommodity/index'
  import MapContainer from "@/components/MapContainer/MapContainer"
  import addmap from '@/components/add/addmap'
  import addcd from '@/components/add/addcd'
  import chakanmap from '@/components/chakan/map'
  import chakancd from '@/components/chakan/cd'
  import cl from '@/components/change/cl.vue'
  import {
    on
  } from 'screenfull';
  export default {
    data() {
      return {
        issp: '1',
        publishStatus: '',
        clName: '',
        name: '',
        oninfo: {},
        celueData: [],
        clData: [],
        multipleSelection: [],
        addcl: false,
        leixing: true,
        //传地图数据
        parentMessage: [],
        ontype: '1',
        contractChangeReason: '',
        detailsinfo: {},
        pagequery: {
          publishStatus: '1',
          pageNumber: 0,
          pageSize: 10,
        },
        tableData: [],
        total: 0,
        onaction: '1',
        formInline: {},
        pageindex: {
          pageNumber: 1,
          pageSize: 10,
        },
      }
    },
    components: {
      cl,
      chakancd,
      addcd,
      addmap,
      chakanmap,
      MapContainer,
      add,
      resourceCommodity,
    },
    created() {
      this.getAll()
    },
    methods: {
            /**
       * 表格行合并逻辑
       */
      tableSpanMethod({ row, column, rowIndex }) {
        if (["shopName", "detailedLocation", "shopType", "publishStatus", "sh","advertisingName","advertisingType","affiliation","venueName","venueType","actualUsableArea"].includes(column.property)) {
          // 判断 num 是否相同，合并行
          const num = row.num;
          const startRowIndex = this.findStartRowIndex(rowIndex, num);
          
          return startRowIndex === rowIndex 
            ? { rowspan: num, colspan: 1 } 
            : { rowspan: 0, colspan: 0 };
        }
      },
      /**
       * 查找当前行的 num 对应的起始行索引
       */
      findStartRowIndex(rowIndex, num) {
        let startRowIndex = rowIndex;
        for (let i = rowIndex - 1; i >= 0; i--) {
          if (this.tableData[i].num === num) {
            startRowIndex = i;
          } else {
            break;
          }
        }
        return startRowIndex;
      },
      minSev(e) {
        this.multipleSelection = e
        console.error(this.multipleSelection)
        let ids = []
        for (let index = 0; index < this.multipleSelection.length; index++) {
          ids.push(this.multipleSelection[index].id)
        }
        console.error(this.oninfo)
        let c1 = {
          resourcesId: this.oncetype + this.oninfo.id,
          rentalPoliciesIds: ids,
          // resources:this.oninfo
          // rentalPoliciesId: 28,
          // resourcesId: "sp65"
        }
        console.error(c1)
        cereResourceStrategy(c1).then(res => {
          if (res.code == 200) {
            this.addcl = false
            this.$message({
              message: '绑定成功',
              type: 'success'
            })
          } else {
            this.$message({
              message: '绑定失败',
              type: 'error'
            })
          }
        })
      },
      mingClose() {
        this.multipleSelection = []
        this.addcl = false
      },
      async opencl(row, e) {
        this.oncetype = e
        this.oninfo = row
        this.multipleSelection = []
        this.addcl = true
      },
      handleSelectionChange(val) {
        this.multipleSelection = val
      },
      chenge(e) {
        this.ontype = e
        this.pagequery.pageNumber = 0
        this.getAll()
      },
      gettime() {
        // 获取当前时间
        let currentTime = new Date();

        // 获取年份
        let year = currentTime.getFullYear();

        // 获取月份（注意月份是从0开始计数的，所以需要加1）
        let month = currentTime.getMonth() + 1;

        // 获取日期
        let day = currentTime.getDate();

        // 获取小时
        let hours = currentTime.getHours();

        // 获取分钟
        let minutes = currentTime.getMinutes();

        // 获取秒数
        let seconds = currentTime.getSeconds();

        // 获取毫秒数
        let milliseconds = currentTime.getMilliseconds();

        // 格式化时间为 YYYY-MM-DD
        let formattedDate = `${year}-${month.toString().padStart(2, '0')}-${day.toString().padStart(2, '0')}`;

        // 格式化时间为 HH:MM:SS
        let formattedTime =
          `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;

        // 格式化时间为 YYYY-MM-DD HH:MM:SS
        let formattedDateTime = `${formattedDate} ${formattedTime}`;
        return formattedDateTime

      },
      removeinfozz(row, e, tit) {
        let that = this
        this.$confirm('确定要' + tit + '吗？', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
          if (this.ontype == '1') {
            information.editList({
              ...row,
              publishStatus: e
            }).then(res => {
              console.error(res)
              if (res.code == 200) {
                this.$message({
                  message: tit + '成功',
                  type: 'success'
                })
                this.removeonaction('1')
              } else {
                this.$message({
                  message: res.msg,
                  type: 'error'
                })
              }
            })
          } else if (this.ontype == '2') {
            map1.editList({
              ...row,
              publishStatus: e
            }).then(res => {
              console.error(res)
              if (res.code == 200) {
                this.$message({
                  message: tit + '成功',
                  type: 'success'
                })
                this.removeonaction('1')
              } else {
                this.$message({
                  message: res.msg,
                  type: 'error'
                })
              }
            })
          } else if (this.ontype == '3') {
            information.changedit({
              ...row,
              publishStatus: e
            }).then(res => {
              console.error(res)
              if (res.code == 200) {
                this.$message({
                  message: tit + '成功',
                  type: 'success'
                })
                this.removeonaction('1')
              } else {
                this.$message({
                  message: res.msg,
                  type: 'error'
                })
              }
            })
          }

        })
      },
      details(row, e) {
        this.issp = e
        this.detailsinfo = row
        this.onaction = '3'
      },
      removeinfo(row, e) {
        this.contractChangeReason = e
        this.detailsinfo = row
        this.onaction = '4'
      },
      async getAll() {
        this.tableData = []
        let list = []
        if (this.ontype == '1') {
          const res = await getResourceStrategy({
            ...this.pagequery,
            resourcesId: 'sp',
            shopName: this.name,
            publishStatus: '1'
          })
          let c1 = []
          for (let index = 0; index < res.data.length; index++) {
            const element = res.data[index];
            if (element.cereBasicInformationShop.id) {
              for (let i = 0; i < element.cereRentalPolicies.length; i++) {
                var element1 = element.cereRentalPolicies[i];

                var obj = {
                  cereBasicInformationShop: element.cereBasicInformationShop,
                  num: element.cereRentalPolicies.length,
                  shopinfo: element1
                };
                c1.push(obj);
              }
            }
          }
          list = c1
          // 已审核
          const res1 = await getResourceStrategy({
            ...this.pagequery,
            resourcesId: 'sp',
            shopName: this.name,
            publishStatus: '2',
          })
          let c2 = []
          for (let index = 0; index < res1.data.length; index++) {
            const element = res1.data[index];
            if (element.cereBasicInformationShop.id) {
              for (let i = 0; i < element.cereRentalPolicies.length; i++) {
                var element1 = element.cereRentalPolicies[i];

                var obj = {
                  cereBasicInformationShop: element.cereBasicInformationShop,
                  num: element.cereRentalPolicies.length,
                  shopinfo: element1
                };
                c2.push(obj);
              }
            }
          }
          list = [...list, ...c2]
          this.tableData = list
          console.log(this.tableData);
        } else if (this.ontype == '2') {
          const res = await getResourceStrategy({
            ...this.pagequery,
            resourcesId: 'gg',
            advertisingName: this.name,
            publishStatus: '1'
          })
          let c1 = []
          for (let index = 0; index < res.data.length; index++) {
            const element = res.data[index];
            if (element.cereAdvertisingInformation.id) {
              for (let i = 0; i < element.cereRentalPolicies.length; i++) {
                var element1 = element.cereRentalPolicies[i];

                var obj = {
                  cereAdvertisingInformation: element.cereAdvertisingInformation,
                  num: element.cereRentalPolicies.length,
                  shopinfo: element1
                };
                c1.push(obj);
              }
            }
          }

          list = c1
          // 已审核
          const res1 = await getResourceStrategy({
            ...this.pagequery,
            resourcesId: 'gg',
            advertisingName: this.name,
            publishStatus: '2',
          })
          let c2 = []
          for (let index = 0; index < res1.data.length; index++) {
            const element = res1.data[index];
            if (element.cereAdvertisingInformation.id) {
              for (let i = 0; i < element.cereRentalPolicies.length; i++) {
                var element1 = element.cereRentalPolicies[i];

                var obj = {
                  cereAdvertisingInformation: element.cereAdvertisingInformation,
                  num: element.cereRentalPolicies.length,
                  shopinfo: element1
                };
                c2.push(obj);
              }
            }
          }
          list = [...list, ...c2]
          this.tableData = list
          console.log(this.tableData);
        } else if (this.ontype == '3') {
          const res = await getResourceStrategy({
            ...this.pagequery,
            resourcesId: 'cd',
            venueName:this.name,
            publishStatus: '1'
          })
          let c1 = []
          for (let index = 0; index < res.data.length; index++) {
            const element = res.data[index];
            if (element.cereBasicInformationVenue.id) {
              for (let i = 0; i < element.cereRentalPolicies.length; i++) {
                var element1 = element.cereRentalPolicies[i];

                var obj = {
                  cereBasicInformationVenue: element.cereBasicInformationVenue,
                  num: element.cereRentalPolicies.length,
                  shopinfo: element1
                };
                c1.push(obj);
              }
            }
          }
          list = c1
          // 已审核
          const res1 = await getResourceStrategy({
            ...this.pagequery,
            resourcesId: 'cd',
            venueName:this.name,
            publishStatus: '2'
          })
          let c2 = []
          for (let index = 0; index < res1.data.length; index++) {
            const element = res1.data[index];
            if (element.cereBasicInformationVenue.id) {
              for (let i = 0; i < element.cereRentalPolicies.length; i++) {
                var element1 = element.cereRentalPolicies[i];

                var obj = {
                  cereBasicInformationVenue: element.cereBasicInformationVenue,
                  num: element.cereRentalPolicies.length,
                  shopinfo: element1
                };
                c2.push(obj);
              }
            }
          }
          list = [...list, ...c2]
          this.tableData = list
          console.log(this.tableData);
        }

      },
      removeonaction(e) {
        console.error(e)
        this.onaction = e
        this.pagequery.pageNumber = 0
        this.getAll()
      },
      handleCurrentChange(val) {
        this.pagequery.pageNumber = val - 1
        this.getAll()
      },
      handleSizeChange(val) {
        this.pagequery.pageSize = val
      },
      // 查询按钮
      async onSubmit() {
        this.pagequery.pageNumber = 0
        this.getAll()
      },
      //重置按钮
      resetting() {
        this.pagequery = {
            pageNumber: 0,
            pageSize: 10,
            dataStatus: '1',
            contractName: ''
          },
          this.getAll()
      },
      //删除
      closemsg(item) {
        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') {
              if (this.ontype == '1') {
                information.delList({
                  id: item.id
                }).then(res => {
                  this.$message({
                    message: '删除成功',
                    type: 'success'
                  })
                  this.getAll()
                  done();
                })
              } else if (this.ontype == '2') {
                map1.delList({
                  id: item.id
                }).then(res => {
                  this.$message({
                    message: '删除成功',
                    type: 'success'
                  })
                  this.getAll()
                  done();
                })
              } else if (this.ontype == '3') {
                information.changDel({
                  id: item.id
                }).then(res => {
                  this.$message({
                    message: '删除成功',
                    type: 'success'
                  })
                  this.getAll()
                  done();
                })
              }
            } else {
              done();
            }
          }
        })
      },
      //地图详细
      HandMapItem(item) {
        console.log(item)


        // if (this.activeName == 'first') {
        //   this.editbgid = item
        //   this.restype = '商铺'

        //   this.showBian = true
        //   if (typeof this.editbgid.mapPunctuation == 'string') {
        //     this.parentMessage = JSON.parse(this.editbgid.mapPunctuation)
        //   }

        // } else if (this.activeName == 'second') {
        //   this.editbgid = item
        //   this.restype = '广告位'

        //   this.showBian = true
        //   if (item.advertisingType == '线上广告位') {
        //     this.leixing = true
        //   } else {
        //     this.leixing = false
        //   }

        //   if (typeof this.editbgid.mapMarker == 'string') {
        //     this.parentMessage = JSON.parse(this.editbgid.mapMarker)
        //   }
        // } else if (this.activeName == 'third') {
        //   this.editbgid = item
        //   this.restype = '场地'

        //   this.showBian = true
        //   if (typeof this.editbgid.mapMarker == 'string') {
        //     this.parentMessage = JSON.parse(this.editbgid.mapMarker)
        //   }
        // } else if (this.activeName == 'fourth') {

        // }


      },
    }

  }
</script>

<style scoped>
  .el-table {
    /* height: calc(100vh - 330px); */
  }

  .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: space-between;
  }

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



  .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-dialog__wrapper {
    .el-dialog__header {
      background-color: #fff;
    }
  }



  .dialog-footer {
    display: flex;
    justify-content: flex-end;
    border-top: solid rgba(209, 209, 209, 0.2) 2px;
    padding-top: 20px;
  }




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

  ::v-deep .el-dialog__title {
    color: #000;
  }

  ::v-deep .el-dialog__wrapper {

    .dialog_css {
      margin-right: 12px;
      margin-top: 61px !important;

    }

    .diaslog_zhong {
      margin-left: 222px;
      margin-top: 61px !important;
    }

  }

  /deep/ .el-table_1_column_8 .hetong {
    color: #7DBB9A;
    text-decoration: underline;
  }

  /deep/ .first-column-bg {
    background-color: #FAFAFA !important;
  }

  .el-table tr {
    height: 56px;
  }

  ::v-deep .table3 {
    .el-table__empty-block {
      display: none;
    }
  }

  ::v-deep .textarea {
    width: 85%;

    .el-textarea__inner {
      width: 100%;
    }
  }

  ::v-deep .el-button--mini {
    padding: 7px 10px;
  }

  ::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;
  }
</style>
<style lang="scss" scoped>
  ::v-deep .el-dialog__body {
    padding: 0 0 !important;
  }

  ::v-deep .buttonHover:hover {
    color: #3f9b6a !important;
    border-color: #c5e1d2 !important;
    background-color: #ecf5f0 !important;
    outline: none;
  }

  .el-dialog__header {
    padding: 0 0 !important;
  }
</style>
