<template>
  <div style="padding: 10px;background-color:#F2F3F5">
    <div class="zhuti">
      <div style="font-weight: bold;font-size: 14px">
        临铺方案审核
      </div>
      <div>
        <!-- 搜索 -->
        <div class="formSearch">
          <el-form :inline="true" :model="formSel">
            <el-select v-model="formSel.affiliation" placeholder="资源类型" size="mini"
              style="width: 120px;margin-right: 15px">
              <el-option label="1" value="1" />
            </el-select>
            <el-select v-model="formSel.createUser" placeholder="经营用途" size="mini"
              style="width: 120px;margin-right: 15px">
              <el-option label="2" value="2" />
            </el-select>
            <el-select v-model="formSel.createDate" placeholder="状态" size="mini"
              style="width: 120px;margin-right: 15px">
              <el-option label="3" value="3" />
            </el-select>
            <el-input v-model="formSel.contacts" placeholder="请输入关键词" size="mini" suffix-icon="el-icon-search"
              style="width: 220px;margin-right: 15px" />

            <el-form-item>
              <el-button plain @click="onSubmit" size="mini"
                style="background-color: #3F9B6A;color: #fff;border-color:#3F9B6A;">查询
              </el-button>
              <el-button plain @click="resetting" size="mini" style="color: #000;border-color:#d5d5d5;">重置
              </el-button>
            </el-form-item>
          </el-form>
        </div>

        <!-- 表格 -->
        <el-table
          :data="
            tableData.slice(
              (currentPage - 1) * pageSize,
              currentPage * pageSize
            )
          "
          :header-cell-style="{
            fontSize: '12px',
            backgroundColor: '#FAFAFA',
            color: '#000',
            fontWeight: 'normal',
          }"
          :border="true"
          style="width: 100%"
        >
          <el-table-column
            label="序号"
            width="auto"
            min-width="6%"
            align="center"
          >
          <template slot-scope="scope">
            {{scope.$index+1}}
          </template>
          </el-table-column>
          <el-table-column
            label="编号"
            prop="id"
            width="auto"
            min-width="12%"
          />
          <el-table-column
            label="所属区域"
            prop="belongingRegion"
            width="auto"
            min-width="12%"
          />
          <el-table-column
            label="临铺方案名称"
            prop="temporaryPavingPlanName"
            width="auto"
            min-width="12%"
          />
          <el-table-column
            label="商铺名称"
            prop="shopName"
            width="auto"
            min-width="12%"
            sortable
          />
          <el-table-column
            label="创建人"
            prop="founder"
            width="auto"
            min-width="12%"
            sortable
          />
          <el-table-column
            label="联系方式"
            prop="contactInformation"
            width="auto"
            min-width="12%"
            sortable
          />
          <el-table-column
            label="临铺数量"
            prop="temporaryShopsNumber"
            width="auto"
            min-width="12%"
            sortable
          />
          <el-table-column
            label="计划时间"
            prop="scheduledTime"
            width="auto"
            min-width="12%"
            sortable
          />
          <el-table-column
            prop="auditStatus"
            label="审核状态"
            width="auto"
            min-width="12%"
            sortable
          >
            <template slot-scope="scope">
              {{ scope.row.auditStatus == "0" ? "待审核" :scope.row.auditStatus == "1" ?'已通过' :'已驳回' }}
            </template>
          </el-table-column>
          <el-table-column
            label="提交时间"
            prop="submissionTime"
            width="auto"
            min-width="12%"
            sortable
          />

          <el-table-column label="操作" width="auto" min-width="17%">
            <template slot-scope="scope">
              <div class="tableBtn greens" @click="handleEditForm(scope.row)">
                详情
              </div>
            <div class="tableBtn greens" v-if="scope.row.auditStatus == '0'" @click="handleshenpi(scope.row)">审批</div>
              <div class="tableBtn greens" @click="delGuan(scope.row)">
                删除
              </div>
            </template>
          </el-table-column>
        </el-table>

        <!-- 详情框  :visible.sync="detbox" -->
        <el-dialog  :visible.sync="detbox"  custom-class='dialog_css' style="padding: 0;" width="85%" center
                  :close-on-click-modal="false" class="dialog_css_Xq" :show-close="false">
                  <div
                    style="background-color: #FAFAFA;border:1px solid #EAEAEA;height: 42px;width: 100%;margin-bottom: 20px;padding: 0 20px;line-height: 42px;font-weight: 600;">
                    详情
                  </div>
                  <div style="padding: 0 20px;">
                    <div style="display: flex;justify-content: space-between;font-size: 12px;margin-bottom: 20px;">
                      <el-tabs v-model="secondData.card" @tab-click="handleClick">
                          <el-tab-pane label="基本信息" name="first">
                            <div style="width:100%">
                              <el-row style="height: 38px;margin-bottom:15px;" v-if="secondData.reviewComments != ''">
                                <el-col :span="24">
                                  <el-form size="small" :inline="true" label-width="100px">
                                    <el-form-item prop="name" style="width:100%">
                                      <div slot="label"
                                        style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                        <span style="font-size: 12px;color: #000;">审批状态</span>
                                      </div>
                                      <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;"> {{ secondData.auditStatus == "1" ?'已通过' :'已驳回' }}</div>

                                    </el-form-item>
                                  </el-form>
                                </el-col>
                                </el-row>

      <el-row style="height: 38px;margin-bottom:15px;" v-if="secondData.reviewComments != ''">
        <el-col :span="24">
          <el-form size="small" :inline="true" label-width="100px">
            <el-form-item prop="name" style="width:100%">
              <div slot="label"
                style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                <span style="font-size: 12px;color: #000;">审批意见</span>
              </div>
              <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.reviewComments}}</div>

            </el-form-item>
          </el-form>
        </el-col>
        </el-row>
                              <el-row style="height: 38px;margin-bottom:15px;">
                                <el-col :span="24">
                                  <el-form size="small" :inline="true" label-width="100px">
                                    <el-form-item prop="name" style="width:100%">
                                      <div slot="label"
                                        style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                        <span style="font-size: 12px;color: #000;">商家编号</span>
                                      </div>
                                      <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                    </el-form-item>
                                  </el-form>
                                </el-col>
                                </el-row>

                                <el-row style="height: 38px;margin-bottom:15px;">
                                  <el-col :span="24">
                                    <el-form size="small" :inline="true" label-width="100px">
                                      <el-form-item prop="name" style="width:100%">
                                        <div slot="label"
                                          style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                          <span style="font-size: 12px;color: #000;">主办方</span>
                                        </div>
                                        <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                      </el-form-item>
                                    </el-form>
                                  </el-col>
                                  </el-row>

                                  <el-row style="height: 38px;margin-bottom:15px;">
                                    <el-col :span="24">
                                      <el-form size="small" :inline="true" label-width="100px">
                                        <el-form-item prop="name" style="width:100%">
                                          <div slot="label"
                                            style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                            <span style="font-size: 12px;color: #000;">联系方式</span>
                                          </div>
                                          <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                        </el-form-item>
                                      </el-form>
                                    </el-col>
                                    </el-row>
                              <el-row style="height: 38px;margin-bottom:15px;">
                                <el-col :span="24">
                                  <el-form size="small" :inline="true" label-width="100px">
                                    <el-form-item prop="name" style="width:100%">
                                      <div slot="label"
                                        style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                        <span style="font-size: 12px;color: #000;">计划招商时间</span>
                                      </div>
                                      <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.scheduledTime}}</div>

                                    </el-form-item>
                                  </el-form>
                                </el-col>
                                </el-row>
                              <el-row style="height: 38px;margin-bottom:15px;">
                                <el-col :span="24">
                                  <el-form size="small" :inline="true" label-width="100px">
                                    <el-form-item prop="name" style="width:100%">
                                      <div slot="label"
                                        style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                        <span style="font-size: 12px;color: #000;">活动场所</span>
                                      </div>
                                      <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.venue}}</div>

                                    </el-form-item>
                                  </el-form>
                                </el-col>
                                </el-row>
                                <el-row style="height: 38px;margin-bottom:15px;">
                                  <el-col :span="24">
                                    <el-form size="small" :inline="true" label-width="100px">
                                      <el-form-item prop="name" style="width:100%">
                                        <div slot="label"
                                          style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                          <span style="font-size: 12px;color: #000;">活动名称</span>
                                        </div>
                                        <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.activityName}}</div>

                                      </el-form-item>
                                    </el-form>
                                  </el-col>
                                  </el-row>
                              <el-row style="height: 38px;margin-bottom:15px;">
                                <el-col :span="24">
                                  <el-form size="small" :inline="true" label-width="100px">
                                    <el-form-item prop="name" style="width:100%">
                                      <div slot="label"
                                        style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                        <span style="font-size: 12px;color: #000;">活动内容</span>
                                      </div>
                                      <!-- {{secondData.activityContent}} -->
                                      <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;"></div>

                                    </el-form-item>
                                  </el-form>
                                </el-col>
                                </el-row>
                            </div>
                          </el-tab-pane>
                          <el-tab-pane label="经营策略" name="second">
                            <div style="width:100%">
                              <el-row style="margin-bottom:15px;">
                                <el-col :span="24">
                                  <el-form size="small" :inline="true" label-width="100px">
                                    <el-form-item prop="name" style="width:100%">
                                      <div slot="label"
                                        style="text-align:left;padding-left:10px;">
                                        <span style="font-size: 12px;color: #000;">铺位划分</span>
                                      </div>
                                      <div  style="font-size: 12px;">
                                        <el-table :data="linShop"
                                                    :header-cell-style="{fontSize: '12px', backgroundColor: '#FAFAFA',color:'#000',fontWeight: 'normal'}"
                                                    :border="true" style="width: 100%">
                                                    <el-table-column label="序号" width="auto" min-width="6%" prop="id" align="center">
                                                    </el-table-column>
                                                    <el-table-column label="铺位名称" prop="shopName" width="auto" min-width="12%">
                                                    </el-table-column>
                                                    <el-table-column label="位置信息" prop="positionInformation" width="auto" min-width="12%">

                                                    </el-table-column>
                                                    <el-table-column label="铺位面积" prop="shopArea" width="auto" min-width="12%">

                                                    </el-table-column>
                                                    <el-table-column label="用途" prop="useTo" width="auto" min-width="12%" >
                                                    </el-table-column>
                                                    <el-table-column label="租金" prop="rent" width="auto" min-width="12%" >
                                                    </el-table-column>
                                                    <el-table-column label="位置图片" prop="region" width="auto" min-width="12%" >
                                                      <template slot-scope="scope">
                                                         <img :src="scope.row.locationImage" style="width:50px;height:50px;"></img>
                                                        </template>
                                                    </el-table-column>
                                                    <el-table-column label="位置描述" prop="locationDescription" width="auto" min-width="12%" >
                                                    </el-table-column>

                                                  </el-table>
                                      </div>
                                    </el-form-item>
                                  </el-form>
                                </el-col>
                                </el-row>
                              <el-row style="height: 38px;margin-bottom:15px;">
                                <el-col :span="24">
                                  <el-form size="small" :inline="true" label-width="100px">
                                    <el-form-item prop="name" style="width:100%">
                                      <div slot="label"
                                        style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                        <span style="font-size: 12px;color: #000;">铺位管理策略</span>
                                      </div>
                                      <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                    </el-form-item>
                                  </el-form>
                                </el-col>
                                </el-row>
                                <el-row style="height: 38px;margin-bottom:15px;">
                                  <el-col :span="24">
                                    <el-form size="small" :inline="true" label-width="100px">
                                      <el-form-item prop="name" style="width:100%">
                                        <div slot="label"
                                          style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                          <span style="font-size: 12px;color: #000;">用水策略</span>
                                        </div>
                                        <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                      </el-form-item>
                                    </el-form>
                                  </el-col>
                                  </el-row>

                            </div>
                          </el-tab-pane>
                        </el-tabs>

                    </div>
<div
              style="
                margin-top: 50px;
                width: 99%;
                padding: 10px;
                display: flex;
                justify-content: flex-end;
              "
            >
              <el-button
                type="primary"
                style="
                  color: #000;
                  border-color: #d7d7d7;
                  background-color: #fff;
                  line-height: 0px;
                "
                @click="closeFn(1)"
                >取消</el-button
              >
            </div>
                    </div>
                </el-dialog>


          <el-dialog
            title="审核"
            :visible.sync="shenhe"
            width="80%"
            custom-class='shenhe_css'
            :close-on-click-modal="false"
            :close-on-press-escape="false"
             :show-close="false">
             <div style="padding: 20px;font-size:12px;">


            <div style="padding: 0 20px;">
                        <div style="display: flex;justify-content: space-between;font-size: 12px;margin-bottom: 20px;">
                          <el-tabs v-model="secondData.card" @tab-click="handleClick">
                              <el-tab-pane label="基本信息" name="first">
                                <div style="width:100%">
                                  <el-row style="height: 38px;margin-bottom:15px;">
                                    <el-col :span="24">
                                      <el-form size="small" :inline="true" label-width="100px">
                                        <el-form-item prop="name" style="width:100%">
                                          <div slot="label"
                                            style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                            <span style="font-size: 12px;color: #000;">商家编号</span>
                                          </div>
                                          <div style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                        </el-form-item>
                                      </el-form>
                                    </el-col>
                                    </el-row>

                                    <el-row style="height: 38px;margin-bottom:15px;">
                                      <el-col :span="24">
                                        <el-form size="small" :inline="true" label-width="100px">
                                          <el-form-item prop="name" style="width:100%">
                                            <div slot="label"
                                              style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                              <span style="font-size: 12px;color: #000;">主办方</span>
                                            </div>
                                            <div style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                          </el-form-item>
                                        </el-form>
                                      </el-col>
                                      </el-row>

                                      <el-row style="height: 38px;margin-bottom:15px;">
                                        <el-col :span="24">
                                          <el-form size="small" :inline="true" label-width="100px">
                                            <el-form-item prop="name" style="width:100%">
                                              <div slot="label"
                                                style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                                <span style="font-size: 12px;color: #000;">联系方式</span>
                                              </div>
                                              <div style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                            </el-form-item>
                                          </el-form>
                                        </el-col>
                                        </el-row>
                                  <el-row style="height: 38px;margin-bottom:15px;">
                                    <el-col :span="24">
                                      <el-form size="small" :inline="true" label-width="100px">
                                        <el-form-item prop="name" style="width:100%">
                                          <div slot="label"
                                            style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                            <span style="font-size: 12px;color: #000;">计划招商时间</span>
                                          </div>
                                          <div style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.scheduledTime}}</div>

                                        </el-form-item>
                                      </el-form>
                                    </el-col>
                                    </el-row>
                                  <el-row style="height: 38px;margin-bottom:15px;">
                                    <el-col :span="24">
                                      <el-form size="small" :inline="true" label-width="100px">
                                        <el-form-item prop="name" style="width:100%">
                                          <div slot="label"
                                            style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                            <span style="font-size: 12px;color: #000;">活动场所</span>
                                          </div>
                                          <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.venue}}</div>

                                        </el-form-item>
                                      </el-form>
                                    </el-col>
                                    </el-row>
                                    <el-row style="height: 38px;margin-bottom:15px;">
                                      <el-col :span="24">
                                        <el-form size="small" :inline="true" label-width="100px">
                                          <el-form-item prop="name" style="width:100%">
                                            <div slot="label"
                                              style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                              <span style="font-size: 12px;color: #000;">活动名称</span>
                                            </div>
                                            <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.activityName}}</div>

                                          </el-form-item>
                                        </el-form>
                                      </el-col>
                                      </el-row>
                                  <el-row style="height: 38px;margin-bottom:15px;">
                                    <el-col :span="24">
                                      <el-form size="small" :inline="true" label-width="100px">
                                        <el-form-item prop="name" style="width:100%">
                                          <div slot="label"
                                            style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                            <span style="font-size: 12px;color: #000;">活动内容</span>
                                          </div>
                                          <!-- {{secondData.region}} -->
                                          <div style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;"></div>

                                        </el-form-item>
                                      </el-form>
                                    </el-col>
                                    </el-row>
                                </div>
                              </el-tab-pane>
                              <el-tab-pane label="经营策略" name="second">
                                <div style="width:100%">
                                  <el-row style="margin-bottom:15px;">
                                    <el-col :span="24">
                                      <el-form size="small" :inline="true" label-width="100px">
                                        <el-form-item prop="name" style="width:100%">
                                          <div slot="label"
                                            style="text-align:left;padding-left:10px;">
                                            <span style="font-size: 12px;color: #000;">铺位划分</span>
                                          </div>
                                          <div  style="font-size: 12px;">
                                            <el-table :data="linShop"
                                                        :header-cell-style="{fontSize: '12px', backgroundColor: '#FAFAFA',color:'#000',fontWeight: 'normal'}"
                                                        :border="true" style="width: 100%">
                                                        <el-table-column label="序号" width="auto" min-width="6%" prop="id" align="center">
                                                        </el-table-column>
                                                        <el-table-column label="铺位名称" prop="shopName" width="auto" min-width="12%">
                                                        </el-table-column>
                                                        <el-table-column label="位置信息" prop="positionInformation" width="auto" min-width="12%">

                                                        </el-table-column>
                                                        <el-table-column label="铺位面积" prop="shopArea" width="auto" min-width="12%">

                                                        </el-table-column>
                                                        <el-table-column label="用途" prop="useTo" width="auto" min-width="12%" >
                                                        </el-table-column>
                                                        <el-table-column label="租金" prop="rent" width="auto" min-width="12%" >
                                                        </el-table-column>
                                                        <el-table-column label="位置图片" prop="region" width="auto" min-width="12%" >
                                                          <template slot-scope="scope">
                                                             <img :src="scope.row.locationImage" style="width:50px;height:50px;"></img>
                                                            </template>
                                                        </el-table-column>
                                                        <el-table-column label="位置描述" prop="locationDescription" width="auto" min-width="12%" >
                                                        </el-table-column>

                                                      </el-table>

                                          </div>
                                        </el-form-item>
                                      </el-form>
                                    </el-col>
                                    </el-row>
                                  <el-row style="height: 38px;margin-bottom:15px;">
                                    <el-col :span="24">
                                      <el-form size="small" :inline="true" label-width="100px">
                                        <el-form-item prop="name" style="width:100%">
                                          <div slot="label"
                                            style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                            <span style="font-size: 12px;color: #000;">铺位管理策略</span>
                                          </div>
                                          <div  style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>

                                        </el-form-item>
                                      </el-form>
                                    </el-col>
                                    </el-row>
                                    <el-row style="height: 38px;margin-bottom:15px;">
                                      <el-col :span="24">
                                        <el-form size="small" :inline="true" label-width="100px">
                                          <el-form-item prop="name" style="width:100%">
                                            <div slot="label"
                                              style="text-align:left;height: 38px;line-height: 38px;padding-left:10px;">
                                              <span style="font-size: 12px;color: #000;">用水策略</span>
                                            </div>
                                            <div style="height:38px;line-height: 38px;border: 1px solid #EBEEF5;padding:0 20px;font-size: 12px;">{{secondData.region}}</div>
                                          </el-form-item>
                                        </el-form>
                                      </el-col>
                                      </el-row>

                                </div>
                              </el-tab-pane>
                            </el-tabs>
                        </div>
                        </div>
                        <div>
                             <div style="display:flex;justify-content: space-between;margin-bottom: 15px;">
                               <span>请输入审核意见</span>
                                <div>
                                <el-radio v-model="shenheMsg.zt" label="1">驳回</el-radio>
                                 <el-radio v-model="shenheMsg.zt" label="2">通过</el-radio>
                                 </div>
                             </div>
                             <div>
                               <el-input
                                 type="textarea"
                                 :autosize="{ minRows: 2, maxRows: 8}"
                                 placeholder="请输入内容"
                                 v-model="shenheMsg.yijian">
                               </el-input>

                             </div>
                           </div>
                         </div>
                        <span slot="footer" class="dialog-footer">
                          <el-button type="primary"
                            style="color: #000;border-color:#D7D7D7;background-color: #fff;line-height: 0px;width: 70px;height: 30px;"
                            @click="closeFn(2)">取消</el-button>
                          <el-button  type="primary"  @click="msgeditS"
                            style="background-color: #3F9B6A;color: #fff;border-color:#3F9B6A;line-height: 0px;width: 70px;height: 30px;">确定</el-button>
                        </span>
          </el-dialog>

        <div class="fenye">
          <div style="line-height: 34px">显示第1到第10条记录</div>
          <el-pagination class="pagination" :hide-on-single-page="flag" background small :current-page="currentPage"
            :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" layout="total,sizes,prev, pager,next" :total="total "
            @size-change="handleSizeChange" @current-change="handleCurrentChange" />
        </div>
      </div>
    </div>

  </div>
</template>

<script>
  import * as echarts from 'echarts';
  import {
    GetAll,
    queryGetAll,
    msgadd,
    msgedit,
    close
  } from '../../../api/publish'
  import {
    GetAllLinAn,
    GetOnlinLinAn,
    AddLinAn,
    EditLinAn,
    delLinAn,
    addLin,
    selLin,
    editLin,
    delLin,
    selectList

  } from '../../../api/tspm';
  export default {
    name: 'publish',

    data() {
      return {
        detbox: false, //详情
        edit: true, //编辑
        shenhe: false, //审核
        formInline: {},
         linShop: [], // 临铺列表
        formSel: {
          affiliation: '',
          createUser: '',
          createDate: '',
          contacts: ''
        },
        secondData: {
          card:'first',//切换


        },
        shenheMsg:{

          yijian:'',
          zt:'1'
        },
        currentPage: 1,
        total: 100,
        flag: false,
        pageSize: 10,
        tableData: [],
        msgid:'',
        pageindex: {
          pageNumber: 1,
          pageSize: 10,
        },
        chart: null,
        chart1:null
      }
    },

    created() {
      this.getAll()


    },
    mounted() {


    },
    // beforeDestroy() {
    //   const editor = this.editor
    //   if (editor == null) return
    //   editor.destroy() // 组件销毁时，及时销毁编辑器
    // },
    methods: {
      onCreated(editor) {
        this.editor = Object.seal(editor) // 一定要用 Object.seal() ，否则会报错
      },
      //查询全数据
   async getAll() {
     const res = await GetAllLinAn(this.pageindex);
     this.tableData = res.data.content;
   },
      //删除
    async  closemsg(){
      const res=  await close({id:this.msgid})
        this.detbox = false
        this.getAll()
      },
     async handleDelete(val){
        const res =  await close({id:val.id})
          this.getAll()
      },
      bianjilist(item){
        this.detbox = true
        this.secondData.region = item.region
        this.secondData.resourceNumber = item.resourceNumber
        if(this.edit){
          this.edit = false
        }
      },
      //审批
     async handleshenpi(item){
        this.shenhe = true
        this.secondData = item
        this.secondData.card =  'first'
        this.msgid = item.id
        const res =  await selLin({temporaryPavingId:item.id})
          this.linShop = res.data
      },
      //审批确定
     async msgeditS(){
        if(this.shenheMsg.zt == '1'){
                await EditLinAn({auditStatus:'2',reviewComments:this.shenheMsg.yijian,id:this.msgid})
                this.shenhe = false
                this.getAll()
        }else{
 await EditLinAn({auditStatus:'1',reviewComments:this.shenheMsg.yijian,id:this.msgid})
 this.shenhe = false
 this.getAll()
        }
      },
      //查询
      async onSubmit() {


      },

      //详情点击
     async handleEditForm(item) {
        this.detbox = true
        this.secondData = item
        this.secondData.card =  'first'
        this.msgid = item.id
   const res =  await selLin({temporaryPavingId:item.id})
     this.linShop =res.data
      },

      handleCurrentChange(val) {
        this.currentPage = val
      },
      handleSizeChange(val) {
        this.pageSize = val
      },
      //取消
      closeFn(val) {
        if(val == 1){
          this.detbox = false
          this.shenhe = false
           this.edit = true
        }else{
         this.detbox = false
         this.shenhe = false
        }
      },
      handleClick() {

      },
      //上传

      handlePreview(file) {
        console.log(file);
      },
      handleRemove(file, fileList) {
        console.log(file, fileList);
      },
      //重置按钮
      resetting() {
        this.formSel = {
            affiliation: '',
            createUser: '',
            createDate: '',
            contacts: ''
          },
          this.getAll()

      }
    }
  }
</script>
<style src="@wangeditor/editor/dist/css/style.css"></style>
<style scoped>
  /deep/ .first-column-bg {
    background-color: #f4f4f5 !important;
  }

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

  }

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

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

  .formSearch {
    margin: 30px 0;
    display: flex;
    width: 100%;
    height: 30px;
    font-size: 12px;
    flex-direction: column
  }

  .greens {
    color: #89C1A3;
  }

  /deep/ .el-table__row {
    font-size: 12px;
  }

  .fenye {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
    position: relative;
  }

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


  :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/ .el-form--label-top .el-form-item__label {
    padding: 0;
  }

  .demo-input-suffix {
    display: flex;
    margin-right: 20px;
  }

  .pagination {
    text-align: right;
    line-height: 20px;
  }

  /deep/ .el-pagination__total {
    margin-top: 4px;
  }

  /deep/ .btn-prev {
    position: absolute;
    top: 4px;
    right: 69px;
  }

  /deep/ .el-pager {
    position: absolute;
    top: 4px;
    right: 40px;
  }

  /deep/ .btn-next {
    position: absolute;
    top: 4px;
    right: 10px;
  }

  .dialog_css {
    padding: 0px;
  }
.dialog_xin{
  padding: 0px;
}
  /deep/.el-dialog__body {
    padding: 0px;
  }

  /deep/ .el-dialog__header {
    background-color: #fff;
    padding: 0
  }

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

  .el-row {


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

  /deep/ .avatar-uploader .el-upload {
    border: 1px dashed #d9d9d9;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
  }

  .avatar-uploader .el-upload:hover {
    border-color: #409EFF;
  }

  .avatar-uploader-icon {
    font-size: 28px;
    color: #8c939d;
    width: 108px;
    height: 108px;
    line-height: 108px;
    /*text-align: center;*/
  }

  .avatar {
    width: 108px;
    height: 108px;
    display: block;
  }

  ::v-deep .el-tabs__item.is-active {
    color: #3F9B6A;
    opacity: 1;
  }

  /deep/ .el-tabs__nav-wrap::after {
    background-color: #fff;
  }

  ::v-deep .el-tabs__item:hover {
    color: #3F9B6A;
    cursor: pointer;
    opacity: 1;
  }

  /deep/ .el-tabs__active-bar {
    background-color: #389865;
  }

  /deep/ .el-table_2_column_13 {
    font-weight: 100;
  }

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

  ::v-deep .el-form-item__label {
    font-weight: normal;
    font-size: 12px;
  }

  /* ::v-deep .el-steps .el-step__head.is-wait {
  background-color: red; /* 修改为你想要的颜色 */

  /* 修改未进行步骤的描述文字颜色 */
  ::v-deep .el-steps .el-step__description.is-wait {
    color: #999;
    /* 修改为你想要的颜色 */
  }

  /* 修改未进行步骤的图标颜色 */
  ::v-deep .el-steps .el-step__icon.is-text.is-wait {
    color: #999;
    /* 修改为你想要的颜色 */
  }

  /* 修改未进行步骤的边框色 */
  ::v-deep .el-steps .el-step__line.is-wait {
    border-color: #eee;
    /* 修改为你想要的颜色 */
  }

  ::v-deep .el-steps .is-process .el-step__line {
    background-color: #3F9B6A;
    /* 修改线的颜色 */
  }

  ::v-deep .el-steps .is-process .el-step__title {
    color: #fe7b6a;
    /* 修改进行中步骤的标题颜色 */
  }

  ::v-deep .el-steps .is-process .el-step__icon {
    color: #fff;
    /* 修改进行中步骤的图标颜色 */
    background: #3F9B6A;
    /* 修改进行中步骤图标的边框颜色 */
    border: 0px;
  }

  ::v-deep .el-step__icon-inner {
    line-height: 0
  }

  /* 线条长度 */
  ::v-deep .el-step.is-vertical .el-step__line {
    top: 30px;
    height: 60px;
  }

  ::v-deep .btn .el-button:focus,
  .el-button:hover {
    border: 1px solid #3F9B6A;
  }

  ::v-deep .moren {
  .el-input__inner {
    margin-top: 5px;
    padding: 0 20px;
  }
  }
  ::v-deep .dialog_css_Xq{
    .el-form-item__content {
     width:80%
    }
  }
/deep/ .el-radio-group{
   margin-top:11px;
}
  /deep/ .el-radio__input.is-checked .el-radio__inner{
    border-color:#3F9B6A;
    background:#3F9B6A;
  }
  ::v-deep .el-col {
    padding: 0 !important;
  }

  ::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;
      }
    }
  }
 ::v-deep .shenhe_css{
   .el-form-item__content {
    width:80%
   }
 .el-dialog__header {
    border-bottom:1px solid rgb(234, 234, 234);
    padding: 10px 15px;
  }
  .el-dialog__title {
    font-size: 16px !important;
    font-weight: 600;
    color: #000;

  }
}
.radio-right-side{
   width: 100%;
    display: flex;
    justify-content: space-between;
}
/deep/ .radio-right-side .el-radio__label {
  display: flex;
  align-items: center;
}

/deep/ .radio-right-side .el-radio__inner {
  order: 1;
}

/deep/ .radio-right-side .el-radio__input {
  display: flex;
  order: 2;
}
/deep/ .radio-right-side{
   &:hover {
   color:#000;

    }
    }
  ::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;
      }
    }
  }
::v-deep .setup{
  .el-steps{
    justify-content: center;
  }
}
::v-deep .el-step__head.is-finish{
  color:#C0C4CC;
  border-color:#C0C4CC;
}
::v-deep .el-step__title.is-finish{
  color:#C0C4CC;
}
::v-deep .el-step__title.is-process{
  color:#C0C4CC;
}
::v-deep .el-tabs{
  width:100%;
}

</style>
