<template>
  <div class="main">
    <el-drawer
      title="筛选"
      :visible.sync="showDrawer"
      :size="1080"
      :with-header="false"
      direction="rtl"
      :append-to-body="true"
      :wrapper-closable="false"
    >
      <div id="search-content" class="search-content">
        <div class="collapse" @click="showDrawer = false">
          <span>收起>></span>
        </div>
        <div class="my-title">筛选</div>
        <div v-if="templateList.length > 0" class="myTemplate">
          <div class="header">
            <p class="title_t">我的模板</p>
            <p class="more" @click="onShowAllTemplate">
              全部模板 <i class="el-icon-arrow-right" />
            </p>
          </div>
          <div class="list">
            <div
              v-for="(item, index) in templateList"
              :key="index"
              class="list-item"
              @click="onUseTemplate(item)"
            >
              {{ item.templateName }}
            </div>
          </div>
        </div>
        <el-form
          id="pushform"
          ref="pushform"
          :model="pushform"
          label-width="100px"
        >
          <!-- 基础筛选 -->
          <div class="base-box">
            <div class="base-header">
              <span class="base-title">基础筛选</span>
              <span class="arrow" @click="showBase = !showBase">
                {{ showBase ? "收起" : "展开" }}
                <i v-if="showBase" class="el-icon-arrow-up" />
                <i v-else class="el-icon-arrow-down" />
              </span>
            </div>
            <div v-if="showBase" class="common-content">
              <!-- 常用筛选 -->
              <div class="box">
                <span class="left">常用筛选</span>
                <div>
                  <span class="mycascader-box shengfen-box">
                    <el-checkbox
                      v-model="checkForm.check_origon"
                      @change="handleCheckOrigon"
                    />
                    <span class="span-label">
                      省份地区<i class="el-icon-arrow-down special" />
                    </span>
                    <el-cascader
                      ref="mycascader_origon"
                      v-model="pushform.origon"
                      style="width: 140px"
                      placeholder=""
                      :options="origonArr"
                      class="mycascader"
                      :props="{ checkStrictly: true }"
                      size="mini"
                      @change="origonChange"
                    />
                  </span>
                  <span class="mycascader-box hangye-box">
                    <el-checkbox
                      v-model="checkForm.check_industry"
                      @change="handleCheckIndustry"
                    />
                    <span class="span-label">
                      所在行业<i class="el-icon-arrow-down special" />
                    </span>
                    <el-cascader
                      ref="mycascader_industry"
                      v-model="pushform.belongBusinessList"
                      style="width: 100px"
                      placeholder=""
                      :options="industryArr"
                      class="mycascader"
                      :props="{ multiple: true, checkStrictly: true }"
                      size="mini"
                      @change="industryChange"
                    />
                  </span>
                </div>
              </div>
              <!-- 成立年限 -->
              <div class="box yearbox">
                <span class="left">成立年限</span>
                <div>
                  <span class="mycascader-box">
                    <span class="check-total">
                      <el-checkbox
                        v-model="checkForm.checkAll_year"
                        :indeterminate="checkForm.isIndeterminateYear"
                        class="checkall"
                        @change="handleCheckAllYear"
                      >全选</el-checkbox>
                    </span>
                    <span style="position: relative">
                      <el-checkbox-group
                        v-model="pushform.startDateIntervalList"
                        @change="handleCheckedChangeYear"
                      >
                        <el-checkbox
                          v-for="item in groupYearArr"
                          :key="item.value"
                          :label="item.value"
                          class="el-checkbox"
                        >{{ item.label }}</el-checkbox>
                      </el-checkbox-group>
                      <span class="custom-year-box">
                        <el-checkbox
                          v-model="checkForm.check_customYear"
                          @change="handleCheckCustomYear"
                        />
                        <span id="yearPickerBox" class="el-icon-year">
                          <el-popover placement="bottom" trigger="click">
                            <span class="yearPicker">
                              <el-date-picker
                                v-model="pushform.startYear"
                                type="year"
                                value-format="yyyy"
                                placeholder="开始年份"
                                style="width: 120px"
                                :picker-options="pickStartDateOption"
                                @change="toggleStartYear"
                              />
                              <i>-</i>
                              <el-date-picker
                                v-model="pushform.endYear"
                                type="year"
                                value-format="yyyy"
                                placeholder="结束年份"
                                style="width: 120px"
                                :picker-options="pickEndDateOption"
                                @change="toggleEndYear"
                              />
                            </span>
                            <span
                              slot="reference"
                            >自定义<i
                              class="el-icon-arrow-down special"
                            /></span>
                          </el-popover>
                        </span>
                      </span>
                    </span>
                  </span>
                </div>
              </div>
              <!-- 经营状态 -->
              <div class="box JYStatus">
                <span class="left">经营状态</span>
                <span class="JYStatus-box">
                  <span class="relation JY-relation">
                    <el-dropdown @command="toggleJYRelate">
                      <span>
                        <span
                          class="unit"
                        >条件关系: {{ checkForm.jyRelationNm }}
                          <i
                            class="el-icon-arrow-down"
                          /></span>
                        <el-dropdown-menu slot="dropdown">
                          <el-dropdown-item :command="1">包含</el-dropdown-item>
                          <el-dropdown-item
                            :command="0"
                          >不包含</el-dropdown-item>
                        </el-dropdown-menu>
                      </span>
                    </el-dropdown>
                  </span>
                  <el-checkbox-group
                    v-model="pushform.statusList"
                    @change="handleCheckedChangeJYStatus"
                  >
                    <el-checkbox
                      v-for="item in groupJYStatusArr"
                      :key="item.value"
                      :label="item.value"
                      class="el-checkbox"
                    >
                      {{ item.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                  <span class="custom-select-box">
                    <el-checkbox
                      v-model="checkForm.check_customStatus"
                      :indeterminate="checkForm.isIndeterminateJYStatus"
                      @change="handleCheckCustomStatus"
                    />
                    <el-select
                      v-model="pushform.otherJYStatus"
                      :multiple="true"
                      style="width: 100px"
                      placeholder=""
                      @change="changeOthStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >其他状态 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option
                        v-for="item in groupJYStatusArrOth"
                        :key="item.key"
                        :label="item.value"
                        :value="item.key"
                      />
                    </el-select>
                  </span>
                </span>
              </div>
              <div class="special-money-box">
                <!-- 注册资本 -->
                <div class="box registerMoney">
                  <span class="left">注册资本</span>
                  <span class="register-box">
                    <span class="custom-select-box">
                      <el-select
                        v-model="pushform.registerAll"
                        :multiple="true"
                        style="width: 80px"
                        placeholder=""
                        @change="changeRegisterAll"
                      >
                        <template slot="prefix">
                          <span
                            class="prefix-text"
                          >全部 <i
                            class="el-icon-arrow-down register-arrow"
                          /></span>
                        </template>
                        <el-option
                          v-for="item in registerMoneyArr"
                          :key="item.key"
                          :label="item.value"
                          :value="item.key"
                        />
                      </el-select>
                    </span>
                    <span>
                      <el-input-number
                        v-model="pushform.minRegiterMoney"
                        size="mini"
                        style="width: 100px"
                        placeholder="最低金额"
                        :controls="false"
                        :min="0"
                        @blur="handleRegisterBlur"
                      />
                    </span>
                    <span style="color: #ddd">-</span>
                    <span>
                      <el-input-number
                        v-model="pushform.maxRegiterMoney"
                        size="mini"
                        style="width: 100px"
                        placeholder="最高金额"
                        :controls="false"
                        :min="0"
                        @blur="handleRegisterBlur"
                      />
                    </span>
                    <span class="register-unit">
                      <span
                        :class="
                          pushform.registerUnit == '1' ? 'activeUnit' : ''
                        "
                        @click="toggleRegisterUnit('1')"
                      >万</span>
                      <span
                        :class="
                          pushform.registerUnit == '2' ? 'activeUnit' : ''
                        "
                        @click="toggleRegisterUnit('2')"
                      >亿</span>
                    </span>
                    <span>
                      <el-select
                        v-model="pushform.registCapiCur"
                        style="width: 100px"
                        placeholder=""
                        size="mini"
                        @change="changeMoneyType1"
                      >
                        <el-option
                          v-for="item in moneyTypeArr"
                          :key="item.key"
                          :label="item.value"
                          :value="item.key"
                        />
                      </el-select>
                    </span>
                  </span>
                </div>
                <!-- 实缴资本 -->
                <div class="box registerMoney">
                  <span class="left giveMoney-title">实缴资本</span>
                  <span class="register-box">
                    <span class="custom-select-box">
                      <el-select
                        v-model="pushform.giveAll"
                        :multiple="true"
                        style="width: 80px"
                        placeholder=""
                        @change="changeGiveAll"
                      >
                        <template slot="prefix">
                          <span
                            class="prefix-text"
                          >全部 <i
                            class="el-icon-arrow-down register-arrow"
                          /></span>
                        </template>
                        <el-option
                          v-for="item in registerMoneyArr"
                          :key="item.key"
                          :label="item.value"
                          :value="item.key"
                        />
                      </el-select>
                    </span>
                    <span>
                      <el-input-number
                        v-model="pushform.minGiveMoney"
                        size="mini"
                        style="width: 100px"
                        placeholder="最低金额"
                        :controls="false"
                        :min="0"
                        @blur="handleGiveBlur"
                      />
                    </span>
                    <span style="color: #ddd">-</span>
                    <span>
                      <el-input-number
                        v-model="pushform.maxGiveMoney"
                        size="mini"
                        style="width: 100px"
                        placeholder="最高金额"
                        :controls="false"
                        :min="0"
                        @blur="handleGiveBlur"
                      />
                    </span>
                    <span class="register-unit">
                      <span
                        :class="pushform.giveUnit == '1' ? 'activeUnit' : ''"
                        @click="toggleGiveUnit('1')"
                      >万</span>
                      <span
                        :class="pushform.giveUnit == '2' ? 'activeUnit' : ''"
                        @click="toggleGiveUnit('2')"
                      >亿</span>
                    </span>
                    <span>
                      <el-select
                        v-model="pushform.recCapCur"
                        style="width: 100px"
                        placeholder=""
                        size="mini"
                        @change="changeMoneyType2"
                      >
                        <el-option
                          v-for="item in moneyTypeArr"
                          :key="item.key"
                          :label="item.value"
                          :value="item.key"
                        />
                      </el-select>
                    </span>
                  </span>
                </div>
              </div>
              <!-- 联系方式 -->
              <div class="box contactType">
                <span class="left">联系方式</span>
                <span class="contact-box">
                  <span class="custom-select-box">
                    <el-checkbox
                      v-model="checkForm.check_phone"
                      @change="handleCheckPhone"
                    />
                    <el-select
                      v-model="pushform.isPhoneNumber"
                      style="width: 100px"
                      placeholder=""
                      @change="changePhone"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >联系电话 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option
                        v-for="item in phoneArr"
                        :key="item.key"
                        :label="item.value"
                        :value="item.key"
                      />
                    </el-select>
                  </span>
                  <span class="custom-select-box">
                    <el-checkbox
                      v-model="checkForm.check_email"
                      @change="handleCheckEmail"
                    />
                    <el-select
                      v-model="pushform.isEmail"
                      style="width: 100px"
                      placeholder=""
                      @change="changeEmail"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >邮箱地址 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option
                        v-for="item in emailArr"
                        :key="item.key"
                        :label="item.value"
                        :value="item.key"
                      />
                    </el-select>
                  </span>
                </span>
              </div>
            </div>
          </div>
          <!-- 组织机构 -->
          <div class="base-box">
            <div class="base-header">
              <span class="base-title">组织机构</span>
              <span class="arrow" @click="showZZ = !showZZ">
                {{ showZZ ? "收起" : "展开" }}
                <i v-if="showZZ" class="el-icon-arrow-up" />
                <i v-else class="el-icon-arrow-down" />
              </span>
            </div>
            <div v-if="showZZ" class="common-content">
              <!-- 机构类型 -->
              <div class="box JYStatus JGtype">
                <span class="left">机构类型</span>
                <span class="JYStatus-box special-JYStatus-box">
                  <span class="relation">
                    <el-dropdown @command="toggleJGRelate">
                      <span>
                        <span
                          class="unit"
                        >条件关系: {{ checkForm.jgRelationNm }}
                          <i
                            class="el-icon-arrow-down"
                          /></span>
                        <el-dropdown-menu slot="dropdown">
                          <el-dropdown-item :command="1">包含</el-dropdown-item>
                          <el-dropdown-item
                            :command="0"
                          >不包含</el-dropdown-item>
                        </el-dropdown-menu>
                      </span>
                    </el-dropdown>
                  </span>
                  <el-checkbox
                    v-model="checkForm.checkAll_JG"
                    :indeterminate="checkForm.isIndeterminateJGStatus"
                    class="checkall"
                    @change="handleCheckAllJG"
                  >全选</el-checkbox>
                  <span class="mycascader-box qiye-mycascader-box">
                    <el-checkbox
                      v-model="checkForm.check_QY"
                      @change="handleCheckQY"
                    />
                    <span class="span-label">
                      企业<i class="el-icon-arrow-down" />
                    </span>
                    <el-cascader
                      ref="mycascader_qy"
                      v-model="pushform.companyType"
                      style="width: 100px"
                      placeholder=""
                      :options="qiyeArr"
                      class="mycascader"
                      :props="{ multiple: true }"
                      size="mini"
                      @change="qiyeChange"
                    />
                  </span>
                  <el-checkbox-group
                    v-model="pushform.companyTypeList"
                    @change="handleCheckedChangeJGStatus"
                  >
                    <el-checkbox
                      key="1"
                      label="102"
                      class="el-checkbox"
                    >个体工商户
                    </el-checkbox>
                    <el-checkbox
                      key="2"
                      label="103"
                      class="el-checkbox"
                    >机关单位
                    </el-checkbox>
                  </el-checkbox-group>
                  <span class="mycascader-box qiye-mycascader-box">
                    <el-checkbox
                      v-model="checkForm.check_shiyeComp"
                      :indeterminate="checkForm.isIndeterminateSYStatus"
                      @change="handleCheckSYStatus"
                    />
                    <span class="span-label">
                      事业单位<i class="el-icon-arrow-down" />
                    </span>
                    <el-cascader
                      ref="mycascader_qy"
                      v-model="pushform.SYStatus"
                      style="width: 100px"
                      placeholder=""
                      :options="shiyeArr"
                      class="mycascader"
                      :props="{ multiple: true, checkStrictly: true }"
                      size="mini"
                      @change="changeSYStatus"
                    />
                  </span>
                </span>
              </div>
              <!-- 分支机构 -->
              <div class="box JYStatus JGtype FZJG">
                <span class="left">分支机构</span>
                <span class="JYStatus-box FZJGStatus-box">
                  <span class="custom-select-box">
                    <el-checkbox
                      v-model="checkForm.check_hasFZJG"
                      @change="handleCheckFZJGStatus"
                    />
                    <el-select
                      v-model="pushform.isHasBranchFlag"
                      style="width: 120px"
                      placeholder=""
                      @change="changeFZJGStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >是否有分支机构 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">是</el-option>
                      <el-option key="0" :value="0">否</el-option>
                    </el-select>
                  </span>
                  <span class="custom-select-box">
                    <el-checkbox
                      v-model="checkForm.check_ISFZJG"
                      @change="handleCheckISFZJGStatus"
                    />
                    <el-select
                      v-model="pushform.isBranchFlag"
                      style="width: 120px"
                      placeholder=""
                      @change="changeISFZJGStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >是否为分支机构 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">是</el-option>
                      <el-option key="0" :value="0">否</el-option>
                    </el-select>
                  </span>
                </span>
              </div>
            </div>
          </div>
          <!-- 经营信息 -->
          <div class="base-box">
            <div class="base-header">
              <span class="base-title">经营信息</span>
              <span class="arrow" @click="showJY = !showJY">
                {{ showJY ? "收起" : "展开" }}
                <i v-if="showJY" class="el-icon-arrow-up" />
                <i v-else class="el-icon-arrow-down" />
              </span>
            </div>
            <div v-if="showJY" class="common-content">
              <!-- 经营信息 -->
              <div class="box JYXX">
                <span class="left">经营信息</span>
                <div style="margin-top: 8px">
                  <div style="margin-bottom: 8px">
                    <span class="custom-select-box jy-info-box">
                      <el-checkbox
                        v-model="checkForm.check_yanglao"
                        @change="handleCheckYLStatus"
                      />
                      <el-select
                        v-model="pushform.businessInfoPenInsurIntervalList"
                        :multiple="true"
                        style="width: 136px"
                        placeholder=""
                        @change="handChangeYL"
                      >
                        <template slot="prefix">
                          <span
                            class="prefix-text"
                          >养老保险参保人数 <i
                            class="el-icon-arrow-down"
                          /></span>
                        </template>
                        <span class="custom-input-num">
                          <i style="visibility: hidden">-</i>
                          <el-input-number
                            v-model="pushform.minYL"
                            style="width: 80px"
                            placeholder="最小值"
                            :controls="false"
                            :min="0"
                            :precision="0"
                            @blur="customYL"
                          />
                          <span style="color: #ddd">-</span>
                          <el-input-number
                            v-model="pushform.maxYL"
                            style="width: 80px"
                            placeholder="最大值"
                            :controls="false"
                            :min="0"
                            :precision="0"
                            @blur="customYL"
                          />
                          <i style="visibility: hidden">-</i>
                        </span>
                        <el-option
                          v-for="item in baoxianOptions"
                          :key="item.key"
                          :label="item.value"
                          :value="item.key"
                        />
                      </el-select>
                    </span>
                    <span class="custom-select-box">
                      <el-checkbox
                        v-model="checkForm.check_yiniao"
                        @change="handleCheckYNStatus"
                      />
                      <el-select
                        v-model="pushform.businessInfoMediInsurIntervalList"
                        :multiple="true"
                        style="width: 136px"
                        placeholder=""
                        @change="handChangeYN"
                      >
                        <template slot="prefix">
                          <span
                            class="prefix-text"
                          >医疗保险参保人数 <i
                            class="el-icon-arrow-down"
                          /></span>
                        </template>
                        <span class="custom-input-num">
                          <i style="visibility: hidden">-</i>
                          <el-input-number
                            v-model="pushform.minYN"
                            style="width: 80px"
                            placeholder="最小值"
                            :controls="false"
                            :min="0"
                            :precision="0"
                            @blur="customYN"
                          />
                          <span style="color: #ddd">-</span>
                          <el-input-number
                            v-model="pushform.maxYN"
                            style="width: 80px"
                            placeholder="最大值"
                            :controls="false"
                            :min="0"
                            :precision="0"
                            @blur="customYN"
                          />
                          <i style="visibility: hidden">-</i>
                        </span>
                        <el-option
                          v-for="item in baoxianOptions"
                          :key="item.key"
                          :label="item.value"
                          :value="item.key"
                        />
                      </el-select>
                    </span>
                    <span class="custom-select-box">
                      <el-checkbox
                        v-model="checkForm.check_ns"
                        @change="handleCheckNxLevel"
                      />
                      <el-select
                        v-model="pushform.nsxydjList"
                        style="width: 120px"
                        placeholder=""
                        multiple
                        @change="changeNsxydj"
                      >
                        <template slot="prefix">
                          <span
                            class="prefix-text"
                          >纳税信用等级 <i
                            class="el-icon-arrow-down"
                          /></span>
                        </template>
                        <el-option
                          key="0"
                          value="一般纳税人"
                        >一般纳税人</el-option>
                        <el-option key="1" value="信用A级">信用A级</el-option>
                        <el-option
                          key="2"
                          value="小规模纳税人"
                        >小规模纳税人</el-option>
                      </el-select>
                    </span>
                    <span class="custom-select-box">
                      <el-checkbox
                        v-model="checkForm.check_JCK"
                        @change="handleCheckbusinessInfoImExportFlag"
                      />
                      <el-select
                        v-model="pushform.businessInfoImExportFlag"
                        style="width: 120px"
                        placeholder=""
                        @change="changebusinessInfoImExportFlag"
                      >
                        <template slot="prefix">
                          <span
                            class="prefix-text"
                          >进出口信息 <i
                            class="el-icon-arrow-down"
                          /></span>
                        </template>
                        <el-option key="0" :value="1">有进出口信息</el-option>
                        <el-option key="1" :value="0">无进出口信息</el-option>
                        <!-- <el-option key="2" value="2">海关高等认证</el-option>
                        <el-option key="3" value="3">海关一般认证</el-option> -->
                      </el-select>
                    </span>
                    <span class="custom-select-box">
                      <el-checkbox
                        v-model="checkForm.check_hgrz"
                        @change="handleCheckbusinessInfoImExportCreditGradeList"
                      />
                      <el-select
                        v-model="pushform.businessInfoImExportCreditGradeList"
                        style="width: 120px"
                        placeholder=""
                        :multiple="true"
                        @change="changebusinessInfoImExportCreditGradeList"
                      >
                        <template slot="prefix">
                          <span
                            class="prefix-text"
                          >海关认证 <i
                            class="el-icon-arrow-down"
                          /></span>
                        </template>
                        <el-option
                          key="0"
                          value="海关一般认证"
                        >海关一般认证</el-option>
                        <el-option
                          key="1"
                          value="海关高等认证"
                        >海关高等认证</el-option>
                      </el-select>
                    </span>
                  </div>
                  <span class="custom-select-box jy-info-box">
                    <el-checkbox
                      v-model="checkForm.check_FCJL"
                      @change="handleCheckFCJLStatus"
                    />
                    <el-select
                      v-model="pushform.businessInfoGovSupportFlag"
                      style="width: 120px"
                      placeholder=""
                      @change="changeFCJLStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >政府扶持和奖励 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有政府扶持和奖励</el-option>
                      <el-option key="0" :value="0">无政府扶持和奖励</el-option>
                    </el-select>
                  </span>
                  <span class="custom-select-box rzlc">
                    <el-checkbox
                      v-model="checkForm.check_RZXX"
                      @change="handleCheckRZXXStatus"
                    />
                    <el-select
                      v-model="pushform.businessInfoFinaInfoFlag"
                      style="width: 120px"
                      placeholder=""
                      @change="changeRZXXStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >融资信息 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有融资信息</el-option>
                      <el-option key="0" :value="0">无融资信息</el-option>
                    </el-select>
                  </span>
                  <span class="custom-select-box rzlc">
                    <el-checkbox
                      v-model="checkForm.check_RZLC"
                      @change="handleCheckRZLCStatus"
                    />
                    <el-select
                      v-model="pushform.businessInfoFinaRoundList"
                      style="width: 120px"
                      placeholder=""
                      :multiple="true"
                      @change="changeRZLCStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >融资轮次 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option
                        v-for="item in rzNmArr"
                        :key="item.key"
                        :value="item.key"
                      >{{ item.value }}</el-option>
                    </el-select>
                  </span>
                </div>
              </div>
              <!-- 知识产权 -->
              <div class="box JYXX">
                <span class="left">知识产权</span>
                <div style="margin-top: 8px">
                  <span class="custom-select-box jy-info-box">
                    <el-checkbox
                      v-model="checkForm.check_SBXX"
                      @change="handleCheckSBXXStatus"
                    />
                    <el-select
                      v-model="pushform.intelPropRightTrademarkInfoFlag"
                      style="width: 120px"
                      placeholder=""
                      @change="changeSBXXStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >商标信息 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有商标信息</el-option>
                      <el-option key="0" :value="0">无商标信息</el-option>
                    </el-select>
                  </span>
                  <span class="custom-select-box special-zuanli">
                    <el-checkbox
                      v-model="checkForm.check_ZLXX"
                      @change="handleCheckZLXXStatus"
                    />
                    <el-select
                      v-model="pushform.intelPropRightPatentInfoFlag"
                      style="width: 120px"
                      placeholder=""
                      @change="changeZLXXStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >专利信息 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有专利信息</el-option>
                      <el-option key="0" :value="0">无专利信息</el-option>
                    </el-select>
                  </span>
                  <span class="custom-select-box ruanzhuzuozhe">
                    <el-checkbox
                      v-model="checkForm.check_RZZZ"
                      @change="handleCheckRZZZStatus"
                    />
                    <el-select
                      v-model="pushform.intelPropRightSoftCopyrightFlag"
                      style="width: 120px"
                      placeholder=""
                      @change="changeRZZZStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >软著&作者 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有软著&作著</el-option>
                      <el-option key="0" :value="0">无软著&作著</el-option>
                    </el-select>
                  </span>
                </div>
              </div>
              <!-- 资质证书 -->
              <div class="box JYXX">
                <span class="left" style="flex-shrink: 0">资质证书</span>
                <div
                  style="
                    margin-top: 8px;
                    display: flex;
                    align-items: self-start;
                    flex-wrap: wrap;
                  "
                >
                  <el-checkbox
                    v-model="checkForm.checkAll_zzzs"
                    :indeterminate="checkForm.isIndeterminateZzzs"
                    style="width: 150px"
                    @change="handleCheckAllZzzs"
                  >全选</el-checkbox>
                  <el-checkbox-group
                    v-model="pushform.zzzsCodeList"
                    style="display: flex; flex-wrap: wrap; flex: 1"
                    @change="handleCheckedChangeZzzs"
                  >
                    <el-checkbox
                      v-for="(item, index) in groupZZZSArr"
                      :key="index"
                      :label="item.value"
                      style="
                        width: 150px;
                        margin-left: 30px;
                        margin-right: 0;
                        margin-bottom: 8px;
                      "
                    >
                      {{ item.label }}
                    </el-checkbox>
                  </el-checkbox-group>
                </div>
              </div>
            </div>
          </div>
          <!-- 科创认定 -->
          <div class="base-box">
            <div class="base-header">
              <span class="base-title">科创认定</span>
              <span class="arrow" @click="showKCRD = !showKCRD">
                {{ showKCRD ? "收起" : "展开" }}
                <i v-if="showKCRD" class="el-icon-arrow-up" />
                <i v-else class="el-icon-arrow-down" />
              </span>
            </div>
            <!-- 科技等级 -->
            <div v-if="showKCRD" class="box JYXX common-content">
              <span class="left">科技等级</span>
              <div style="margin-top: 8px">
                <span class="custom-select-box jy-info-box">
                  <el-checkbox
                    v-model="checkForm.check_KJLX"
                    @change="handleCheckKJLXStatus"
                  />
                  <el-select
                    v-model="pushform.technologyLvlTypeList"
                    :multiple="true"
                    style="width: 165px"
                    placeholder=""
                    @change="handChangeKJLX"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >类型 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option
                      v-for="item in kjlxOptions"
                      :key="item.key"
                      :label="item.value"
                      :value="item.key"
                    />
                  </el-select>
                </span>
                <span class="custom-select-box jy-info-box">
                  <el-checkbox
                    v-model="checkForm.check_KJZT"
                    @change="handleCheckKJZTStatus"
                  />
                  <el-select
                    v-model="pushform.technologyLvlStateList"
                    :multiple="true"
                    style="width: 165px"
                    placeholder=""
                    @change="handChangeKJZT"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >状态 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option
                      v-for="item in kjztOptions"
                      :key="item.key"
                      :label="item.value"
                      :value="item.key"
                    />
                  </el-select>
                </span>
                <span class="custom-select-box jy-info-box">
                  <el-checkbox
                    v-model="checkForm.check_KJJB"
                    @change="handleCheckKJJBStatus"
                  />
                  <el-select
                    v-model="pushform.technologyLvlLevelList"
                    :multiple="true"
                    style="width: 136px"
                    placeholder=""
                    @change="handChangeKJJB"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >级别 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option
                      v-for="item in kjjbOptions"
                      :key="item.key"
                      :label="item.value"
                      :value="item.key"
                    />
                  </el-select>
                </span>
              </div>
            </div>
          </div>
          <!-- 资本市场 -->
          <div class="base-box">
            <div class="base-header">
              <span class="base-title">资本市场</span>
              <span class="arrow" @click="showZBSC = !showZBSC">
                {{ showZBSC ? "收起" : "展开" }}
                <i v-if="showZBSC" class="el-icon-arrow-up" />
                <i v-else class="el-icon-arrow-down" />
              </span>
            </div>
            <!-- 上市信息 -->
            <div v-if="showZBSC" class="box JYXX">
              <span class="left ssxx">上市信息</span>
              <div style="margin-top: 8px">
                <span class="custom-select-box jy-info-box">
                  <el-checkbox
                    v-model="checkForm.check_SSXX"
                    @change="handleCheckSSXXStatus"
                  />
                  <el-select
                    v-model="pushform.capMarketListInfoFlag"
                    style="width: 136px"
                    placeholder=""
                    @change="handChangeSSXX"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >上市信息 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有上过市</el-option>
                    <el-option key="0" :value="0">无上市</el-option>
                  </el-select>
                </span>
              </div>
            </div>
          </div>
          <!-- 风险信息 -->
          <div class="base-box">
            <div class="base-header">
              <span class="base-title">风险信息</span>
              <span class="arrow" @click="showFXXX = !showFXXX">
                {{ showFXXX ? "收起" : "展开" }}
                <i v-if="showFXXX" class="el-icon-arrow-up" />
                <i v-else class="el-icon-arrow-down" />
              </span>
            </div>
            <!-- 风险特征 -->
            <div v-if="showFXXX" class="box JYXX common-content">
              <span class="left">风险特征</span>
              <div style="margin-top: 8px">
                <span class="custom-select-box jy-info-box">
                  <el-checkbox
                    v-model="checkForm.check_SXXX"
                    @change="handleCheckSXXXStatus"
                  />
                  <el-select
                    v-model="pushform.riskCharDisInfoFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeSXXXStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >失信信息 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有失信信息</el-option>
                    <el-option key="0" :value="0">无失信信息</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_PCQS"
                    @change="handleCheckPCQSStatus"
                  />
                  <el-select
                    v-model="pushform.riskCharBankruptcyLiquiFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changePCQSStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >破产清算 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有破产清算</el-option>
                    <el-option key="0" :value="0">无破产清算</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_BGJL"
                    @change="handleCheckBGJLStatus"
                  />
                  <el-select
                    v-model="pushform.riskCharChangeRecordFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeBGJLStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >变更记录 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有变更记录</el-option>
                    <el-option key="0" :value="0">无变更记录</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_SXBZXR"
                    @change="handleCheckSXBZXRStatus"
                  />
                  <el-select
                    v-model="pushform.riskCharDisPersonFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeSXBZXRStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >失信被执行人 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有失信被执行人</el-option>
                    <el-option key="0" :value="0">无失信被执行人</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_SXWF"
                    @change="handleCheckSXWFStatus"
                  />
                  <el-select
                    v-model="pushform.riskCharSncFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeSXWFStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >严重失信违法 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有严重失信违法</el-option>
                    <el-option key="0" :value="0">无严重失信违法</el-option>
                  </el-select>
                </span>
                <div style="margin-top: 8px">
                  <span class="custom-select-box jy-info-box">
                    <el-checkbox
                      v-model="checkForm.check_SSWF"
                      @change="handleCheckSSWFStatus"
                    />
                    <el-select
                      v-model="pushform.isSswf"
                      style="width: 120px"
                      placeholder=""
                      @change="changeSSWFStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >税收违法 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有税收违法</el-option>
                      <el-option key="0" :value="0">无税收违法</el-option>
                    </el-select>
                  </span>
                  <span class="custom-select-box">
                    <el-checkbox
                      v-model="checkForm.check_XZXF"
                      @change="handleCheckXZXFStatus"
                    />
                    <el-select
                      v-model="pushform.riskCharRhcFlag"
                      style="width: 120px"
                      placeholder=""
                      @change="changeXZXFStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >限制高消费 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有限制高消费</el-option>
                      <el-option key="0" :value="0">无限制高消费</el-option>
                    </el-select>
                  </span>
                </div>
              </div>
            </div>
            <!-- 经营风险 -->
            <div v-if="showFXXX" class="box JYXX common-content">
              <span class="left">经营风险</span>
              <div style="margin-top: 8px">
                <span class="custom-select-box jy-info-box">
                  <el-checkbox
                    v-model="checkForm.check_JYYC"
                    @change="handleCheckJYYCStatus"
                  />
                  <el-select
                    v-model="pushform.isJyyc"
                    style="width: 120px"
                    placeholder=""
                    @change="changeJYYCStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >经营异常 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有经营异常</el-option>
                    <el-option key="0" :value="0">无经营异常</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_XZCF"
                    @change="handleCheckXZCFStatus"
                  />
                  <el-select
                    v-model="pushform.operatRiskAdminPenaltyFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeXZCFStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >行政处罚 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有行政处罚</el-option>
                    <el-option key="0" :value="0">无行政处罚</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_HBCF"
                    @change="handleCheckXZCFStatus"
                  />
                  <el-select
                    v-model="pushform.operatRiskEnvirPenaltyFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeHBCFStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >环保处罚 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有环保处罚</el-option>
                    <el-option key="0" :value="0">无环保处罚</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_QSXX"
                    @change="handleCheckQSXXStatus"
                  />
                  <el-select
                    v-model="pushform.operatRiskOweTaxInfoFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeQSXXStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >欠税信息 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有欠税信息</el-option>
                    <el-option key="0" :value="0">无欠税信息</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_ZBAJ"
                    @change="handleCheckZBAJStatus"
                  />
                  <el-select
                    v-model="pushform.operatRiskFinalCaseFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeZBAJStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >终本案件 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有终本案件</el-option>
                    <el-option key="0" :value="0">无终本案件</el-option>
                  </el-select>
                </span>
                <span class="custom-select-box">
                  <el-checkbox
                    v-model="checkForm.check_WJAJ"
                    @change="handleCheckWJAJStatus"
                  />
                  <el-select
                    v-model="pushform.operatRiskUnfinishCaseFlag"
                    style="width: 120px"
                    placeholder=""
                    @change="changeWJAJStatus"
                  >
                    <template slot="prefix">
                      <span
                        class="prefix-text"
                      >未结案件 <i
                        class="el-icon-arrow-down"
                      /></span>
                    </template>
                    <el-option key="1" :value="1">有未结案件</el-option>
                    <el-option key="0" :value="0">无未结案件</el-option>
                  </el-select>
                </span>

                <div style="margin-top: 8px">
                  <span class="custom-select-box jy-info-box">
                    <el-checkbox
                      v-model="checkForm.check_FRBG"
                      @change="handleCheckFRBGtatus"
                    />
                    <el-select
                      v-model="pushform.isFrbg"
                      style="width: 120px"
                      placeholder=""
                      @change="changeFRBGStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >法人变更 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有法人变更</el-option>
                      <el-option key="0" :value="0">无法人变更</el-option>
                    </el-select>
                  </span>
                  <span class="custom-select-box">
                    <el-checkbox
                      v-model="checkForm.check_GQDJ"
                      @change="handleCheckGQDJtatus"
                    />
                    <el-select
                      v-model="pushform.isGqdj"
                      style="width: 120px"
                      placeholder=""
                      @change="changeGQDJStatus"
                    >
                      <template slot="prefix">
                        <span
                          class="prefix-text"
                        >股权冻结 <i
                          class="el-icon-arrow-down"
                        /></span>
                      </template>
                      <el-option key="1" :value="1">有股权冻结</el-option>
                      <el-option key="0" :value="0">无股权冻结</el-option>
                    </el-select>
                  </span>
                </div>
              </div>
            </div>
          </div>
        </el-form>
        <div class="footer">
          <div class="choose-list">
            <p>已选</p>
            <div class="tag-list">
              <el-tooltip
                v-for="(item, index) in searchListResult"
                :key="index"
                :content="item.text"
                placement="bottom"
              >
                <el-tag closable @close="handleCloseTag(item)">
                  {{ item.label }}：{{ item.text }}
                </el-tag>
              </el-tooltip>
            </div>
          </div>
          <div class="button">
            <el-button type="primary" @click="submitForm">确定</el-button>
            <el-button type="primary" @click="saveTemplate">存为模板</el-button>
            <el-button
              type="primary"
              icon="el-icon-delete"
              @click="resetForm"
            >清空</el-button>
          </div>
        </div>
      </div>

      <el-dialog
        title="保存筛选条件"
        :visible.sync="showSaveDialog"
        width="500px"
        :modal="false"
      >
        <el-form>
          <div>
            <el-radio
              v-model="saveRadio"
              label="add"
              :disabled="templateList.length >= 5"
            >
              <el-form-item label="新建模板">
                <el-input
                  v-model="templateName"
                  maxlength="20"
                  show-word-limit
                  :disabled="saveRadio === '' || saveRadio === 'update'"
                  placeholder="请输入模板名称"
                />
              </el-form-item>
            </el-radio>
          </div>
          <div>
            <el-radio v-model="saveRadio" label="update">
              <el-form-item label="替换当前">
                <el-select
                  v-model="templateId"
                  :disabled="saveRadio === '' || saveRadio === 'add'"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="(item, index) in templateList"
                    :key="index"
                    :value="item.templateId"
                    :label="item.templateName"
                  />
                </el-select>
              </el-form-item>
            </el-radio>
          </div>
        </el-form>

        <div slot="footer">
          <el-button @click="handleCancelSaveTemplate">取消</el-button>
          <el-button
            type="primary"
            @click="handleConfirmSaveTemplate"
          >保存</el-button>
        </div>
      </el-dialog>

      <el-dialog
        title="我的模板"
        :visible.sync="showAllDialog"
        width="50%"
        :modal="false"
      >
        <el-tabs tab-position="left" type="boder-card" class="myTemplate">
          <el-tab-pane
            v-for="(item, index) in templateList"
            :key="index"
            :label="item.templateName"
          >
            <div class="template">
              <p class="title">模板名称</p>
              <p class="content">{{ item.templateName }}</p>
              <p class="title">模板创建人</p>
              <p class="content">
                创建人：{{ item.nickName }}&nbsp;&nbsp;&nbsp;创建时间：{{
                  item.createTime
                }}
              </p>
              <p class="title">保存条件</p>
              <el-table
                :data="item.searchListResult"
                max-height="500px"
                style="width: 100%"
              >
                <el-table-column type="index" width="50" />
                <el-table-column prop="label" label="筛选项" />
                <el-table-column prop="text" label="预设条件" />
              </el-table>

              <div style="float: right; margin-top: 12px">
                <el-button
                  type="primary"
                  @click="onUseTemplate(item)"
                >直接使用</el-button>
                <el-button
                  slot="reference"
                  type="danger"
                  @click="onDeleteTemplate(item)"
                >
                  删除
                </el-button>
              </div>
            </div>
          </el-tab-pane>
        </el-tabs>
      </el-dialog>

      <el-dialog
        title="提示"
        :visible.sync="showConfirmDialog"
        width="300px"
        :modal="false"
      >
        <span>是否确认删除该模板？</span>
        <span slot="footer">
          <el-button @click="showConfirmDialog = false">取消</el-button>
          <el-button
            type="primary"
            :loading="buttonLoading"
            @click="handleConfirmDeleteTemplate"
          >确认</el-button>
        </span>
      </el-dialog>
    </el-drawer>
  </div>
</template>
<script>
import { Message, Loading } from 'element-ui'
import GroupCheck from './group-check.vue'
import {
  getZzzsDict,
  getTemplateList,
  saveTemplate,
  deleteTemplate
} from '@/api/customRadar/customRadar.js'
import { getSearchList, if_show_dict } from './searchList.js'
export default {
  components: { GroupCheck },
  props: {
    deptOptions: {
      type: Array,
      default: []
    },
    industryOptions: {
      type: Array,
      default: []
    },
    moneyTypeList: {
      type: Array,
      default: []
    },
    qiyeTypeList: {
      type: Array,
      default: []
    }
  },
  data() {
    return {
      showAllDialog: false,
      showSaveDialog: false,
      showConfirmDialog: false,
      buttonLoading: false,
      deleteInfo: {},
      saveRadio: '',
      templateName: '',
      templateId: '',
      templateOptions: [],
      showDrawer: false,
      showBase: true,
      showZZ: true,
      showJY: true,
      showKCRD: true,
      showZBSC: true,
      showFXXX: true,
      pushformOrigin: {
        origon: [],
        belongBusinessList: [],
        startDateIntervalList: [],
        startYear: undefined,
        endYear: undefined,
        cusStartDateInterval: [],
        statusInclude: true,
        statusList: [],
        otherJYStatus: [],
        registerAll: [],
        giveAll: [],
        minRegiterMoney: undefined,
        maxRegiterMoney: undefined,
        registerUnit: 1,
        giveUnit: 1,
        minGiveMoney: undefined,
        maxGiveMoney: undefined,
        registCapiCur: '',
        recCapCur: '',
        isPhoneNumber: '',
        isEmail: '',
        companyTypeInclude: 1,
        companyTypeList: [],
        companyType: [],
        SYStatus: [],
        isHasBranchFlag: undefined,
        minYL: undefined,
        maxYL: undefined,
        businessInfoPenInsurIntervalList: [],
        minYN: undefined,
        maxYN: undefined,
        businessInfoMediInsurIntervalList: [],
        businessInfoImExportFlag: '',
        businessInfoGovSupportFlag: '',
        businessInfoFinaInfoFlag: '',
        businessInfoFinaRoundList: [],
        intelPropRightTrademarkInfoFlag: '',
        intelPropRightPatentInfoFlag: '',
        intelPropRightSoftCopyrightFlag: '',
        technologyLvlTypeList: [],
        technologyLvlStateList: [],
        technologyLvlLevelList: [],
        capMarketListInfoFlag: '',
        riskCharDisInfoFlag: '',
        riskCharBankruptcyLiquiFlag: '',
        riskCharChangeRecordFlag: '',
        riskCharDisPersonFlag: '',
        riskCharSncFlag: '',
        riskCharRhcFlag: '',
        operatRiskAdminPenaltyFlag: '',
        operatRiskEnvirPenaltyFlag: '',
        operatRiskOweTaxInfoFlag: '',
        operatRiskFinalCaseFlag: '',
        operatRiskUnfinishCaseFlag: '',
        businessInfoImExportCreditGradeList: [],
        origonNm: [],
        isBranchFlag: undefined,
        nsxydjList: [],
        isSswf: '',
        zzzsCodeList: []
      },
      pushform: {
        origon: [],
        belongBusinessList: [],
        startDateIntervalList: [],
        startYear: undefined,
        endYear: undefined,
        cusStartDateInterval: [],
        statusInclude: true,
        statusList: [],
        otherJYStatus: [],
        registerAll: [],
        giveAll: [],
        minRegiterMoney: undefined,
        maxRegiterMoney: undefined,
        registerUnit: 1,
        giveUnit: 1,
        minGiveMoney: undefined,
        maxGiveMoney: undefined,
        registCapiCur: '',
        recCapCur: '',
        isPhoneNumber: '',
        isEmail: '',
        companyTypeInclude: 1,
        companyTypeList: [],
        companyType: [],
        SYStatus: [],
        isHasBranchFlag: undefined,
        minYL: undefined,
        maxYL: undefined,
        businessInfoPenInsurIntervalList: [],
        minYN: undefined,
        maxYN: undefined,
        businessInfoMediInsurIntervalList: [],
        businessInfoImExportFlag: '',
        businessInfoGovSupportFlag: '',
        businessInfoFinaInfoFlag: '',
        businessInfoFinaRoundList: [],
        intelPropRightTrademarkInfoFlag: '',
        intelPropRightPatentInfoFlag: '',
        intelPropRightSoftCopyrightFlag: '',
        technologyLvlTypeList: [],
        technologyLvlStateList: [],
        technologyLvlLevelList: [],
        capMarketListInfoFlag: '',
        riskCharDisInfoFlag: '',
        riskCharBankruptcyLiquiFlag: '',
        riskCharChangeRecordFlag: '',
        riskCharDisPersonFlag: '',
        riskCharSncFlag: '',
        riskCharRhcFlag: '',
        operatRiskAdminPenaltyFlag: '',
        operatRiskEnvirPenaltyFlag: '',
        operatRiskOweTaxInfoFlag: '',
        operatRiskFinalCaseFlag: '',
        operatRiskUnfinishCaseFlag: '',
        businessInfoImExportCreditGradeList: [],
        origonNm: [],
        isBranchFlag: undefined,
        nsxydjList: [],
        isSswf: '',
        zzzsCodeList: []
      },
      boolOrigin: {
        check_origon: false,
        check_industry: false,
        checkAll_year: false,
        checkAll_zzzs: false,
        isIndeterminateYear: false,
        isIndeterminateZzzs: false,
        check_customYear: false,
        jyRelationNm: '包含',
        check_customStatus: false,
        isIndeterminateJYStatus: false,
        check_phone: false,
        check_email: false,
        jgRelationNm: '包含',
        checkAll_JG: false,
        isIndeterminateJGStatus: false,
        check_QY: false,
        check_shiyeComp: false,
        isIndeterminateSYStatus: false,
        check_hasFZJG: false,
        check_ISFZJG: false,
        check_yanglao: false,
        check_yiniao: false,
        check_ns: false,
        check_JCK: false,
        check_FCJL: false,
        check_RZXX: false,
        check_RZLC: false,
        check_SBXX: false,
        check_ZLXX: false,
        check_RZZZ: false,
        check_KJLX: false,
        check_KJZT: false,
        check_KJJB: false,
        check_SSXX: false,
        check_SXXX: false,
        check_PCQS: false,
        check_BGJL: false,
        check_SXBZXR: false,
        check_SXWF: false,
        check_XZXF: false,
        check_SSWF: false,
        check_XZCF: false,
        check_JYYC: false,
        check_HBCF: false,
        check_QSXX: false,
        check_ZBAJ: false,
        check_WJAJ: false,
        check_FRBG: false,
        check_GQDJ: false,
        check_hgrz: false
      },
      checkForm: {
        check_origon: false,
        check_industry: false,
        checkAll_year: false,
        checkAll_zzzs: false,
        isIndeterminateYear: false,
        isIndeterminateZzzs: false,
        check_customYear: false,
        jyRelationNm: '包含',
        check_customStatus: false,
        isIndeterminateJYStatus: false,
        check_phone: false,
        check_email: false,
        jgRelationNm: '包含',
        checkAll_JG: false,
        isIndeterminateJGStatus: false,
        check_QY: false,
        check_shiyeComp: false,
        isIndeterminateSYStatus: false,
        check_hasFZJG: false,
        check_ISFZJG: false,
        check_yanglao: false,
        check_yiniao: false,
        check_ns: false,
        check_JCK: false,
        check_FCJL: false,
        check_RZXX: false,
        check_RZLC: false,
        check_SBXX: false,
        check_ZLXX: false,
        check_RZZZ: false,
        check_KJLX: false,
        check_KJZT: false,
        check_KJJB: false,
        check_SSXX: false,
        check_SXXX: false,
        check_PCQS: false,
        check_BGJL: false,
        check_SXBZXR: false,
        check_SXWF: false,
        check_XZXF: false,
        check_SSWF: false,
        check_XZCF: false,
        check_JYYC: false,
        check_HBCF: false,
        check_QSXX: false,
        check_ZBAJ: false,
        check_WJAJ: false,
        check_FRBG: false,
        check_GQDJ: false,
        check_hgrz: false
      },
      origonArr: [],
      industryArr: [],
      groupZZZSArr: [],
      groupYearArr: [
        {
          label: '3个月以内',
          value: '0-3'
        },
        {
          label: '半年以内',
          value: '0-6'
        },
        {
          label: '1年以内',
          value: '0-12'
        },
        {
          label: '1年以上',
          value: '12-'
        },
        {
          label: '1-5年',
          value: '12-60'
        },
        {
          label: '5-10年',
          value: '60-120'
        },
        {
          label: '10年以上',
          value: '120-'
        }
      ],
      groupJYStatusArr: [
        {
          label: '存续',
          value: '存续'
        },
        {
          label: '迁出',
          value: '迁出'
        },
        {
          label: '注销',
          value: '注销'
        },
        {
          label: '吊销',
          value: '吊销'
        }
      ],
      groupJYStatusArrOth: [
        {
          key: '歇业',
          value: '歇业'
        },
        {
          key: '撤销',
          value: '撤销'
        }
      ],
      registerMoneyArr: [
        {
          key: '0-100',
          value: '100万以内'
        },
        {
          key: '100-200',
          value: '100万-200万'
        },
        {
          key: '200-500',
          value: '200万-500万'
        },
        {
          key: '500-1000',
          value: '500万-1000万'
        },
        {
          key: '1000-5000',
          value: '1000万-5000万'
        },
        {
          key: '5000-',
          value: '5000万以上'
        }
      ],
      moneyTypeArr: [],
      phoneArr: [
        {
          key: 1,
          value: '有联系电话'
        },
        {
          key: 0,
          value: '无联系电话'
        }
      ],
      emailArr: [
        {
          key: 1,
          value: '有邮箱地址'
        },
        {
          key: 0,
          value: '无邮箱地址'
        }
      ],
      qiyeArr: [],
      qiyeLeafAll: [],
      shiyeArr: [
        {
          label: '集体事业单位营业',
          value: '1041'
        },
        {
          label: '事业单位营业',
          value: '1042'
        },
        {
          label: '国有事业单位营业',
          value: '1043'
        }
      ],
      baoxianOptions: [
        {
          key: '1-50',
          value: '1-50人'
        },
        {
          key: '50-99',
          value: '50-99人'
        },
        {
          key: '100-499',
          value: '100-499人'
        },
        {
          key: '500-999',
          value: '500-999人'
        },
        {
          key: '1000-4999',
          value: '1000-4999人'
        },
        {
          key: '5000-9999',
          value: '5000-9999人'
        },
        {
          key: '10000-',
          value: '10000人以上'
        }
      ],
      rzNmArr: [
        {
          key: 'A',
          value: 'A'
        },
        {
          key: 'A+',
          value: 'A+'
        },
        {
          key: 'B',
          value: 'B'
        },
        {
          key: 'B+',
          value: 'B+'
        },
        {
          key: 'C',
          value: 'C+'
        },
        {
          key: 'D',
          value: 'D+'
        },
        {
          key: 'E',
          value: 'E'
        },
        {
          key: 'F',
          value: 'F'
        },
        {
          key: 'G',
          value: 'G'
        },
        {
          key: 'Pre-A',
          value: 'Pre-A'
        },
        {
          key: 'Pre-B',
          value: 'Pre-B'
        },
        {
          key: 'Pre-IPO',
          value: 'Pre-IPO'
        },
        {
          key: '上市定增',
          value: '上市定增'
        },
        {
          key: '其他',
          value: '其他'
        },
        {
          key: '基石投资',
          value: '基石投资'
        },
        {
          key: '天使轮',
          value: '天使轮'
        },
        {
          key: '战略投资',
          value: '战略投资'
        },
        {
          key: '新三板定增',
          value: '新三板定增'
        },
        {
          key: '种子轮',
          value: '种子轮'
        },
        {
          key: '老股权转让',
          value: '老股权转让'
        }
      ],
      kjlxOptions: [
        { key: '"专精特新"中小企业', value: '"专精特新"中小企业' },
        { key: '专精特新"小巨人"企业', value: '专精特新"小巨人"企业' },
        { key: '企业技术中心', value: '企业技术中心' },
        { key: '众创空间', value: '众创空间' },
        { key: '创新型中小企业', value: '创新型中小企业' },
        { key: '制造业单项冠军产品企业', value: '制造业单项冠军产品企业' },
        { key: '制造业单项冠军培育企业', value: '制造业单项冠军培育企业' },
        { key: '制造业单项冠军示范企业', value: '制造业单项冠军示范企业' },
        { key: '技术先进性企业', value: '技术先进性企业' },
        { key: '技术创新示范企业', value: '技术创新示范企业' },
        { key: '民营科技企业', value: '民营科技企业' },
        { key: '独角兽企业', value: '独角兽企业' },
        { key: '瞪羚企业', value: '瞪羚企业' },
        { key: '科技企业孵化器', value: '科技企业孵化器' },
        { key: '科技创新', value: '科技创新' },
        { key: '科技小巨人', value: '科技小巨人' },
        { key: '科技部科技型中小企业', value: '科技部科技型中小企业' },
        { key: '隐形冠军', value: '隐形冠军' },
        { key: '雏鹰企业', value: '雏鹰企业' },
        { key: '高新技术企业', value: '高新技术企业' }
      ],
      kjztOptions: [
        { key: '取消', value: '取消' },
        { key: '已过期', value: '已过期' },
        { key: '撤销', value: '撤销' },
        { key: '有效', value: '有效' }
      ],
      kjjbOptions: [
        { key: '全国', value: '全国' },
        { key: '全球', value: '全球' },
        { key: '区县级', value: '区县级' },
        { key: '市级', value: '市级' },
        { key: '省级', value: '省级' }
      ],
      allIndustry: [],
      pickStartDateOption: {
        disabledDate(time) {
          return new Date(time).getFullYear() < 1900
        }
      },
      pickEndDateOption: {
        disabledDate(time) {
          return new Date(time).getFullYear() > new Date().getFullYear()
        }
      },
      loadingForm: false,
      templateList: []
    }
  },
  computed: {
    searchListResult() {
      const dict = {
        companyTypeList: [
          ...this.qiyeTypeList,
          ...this.shiyeArr,
          { label: '个体工商户', value: '102' },
          { label: '机关单位', value: '103' }
        ],
        groupYearArr: [...this.groupYearArr],
        registerMoneyArr: [
          ...this.registerMoneyArr.map((item) => {
            return { label: item.value, value: item.key }
          })
        ],
        baoxianOptions: [
          ...this.baoxianOptions.map((item) => {
            return { label: item.value, value: item.key }
          })
        ]
      }
      return getSearchList(this.pushform, dict)
    }
  },
  watch: {
    deptOptions: {
      handler: function(arr) {
        this.origonArr = arr
      },
      immediate: true
    },
    industryOptions: {
      handler: function(arr) {
        this.industryArr = arr
        this.allIndustry = arr.map((item) => [item.label])
      },
      immediate: true
    },
    moneyTypeList: {
      handler: function(arr) {
        this.moneyTypeArr = arr
      },
      immediate: true
    },
    qiyeTypeList: {
      handler: function(arr) {
        this.qiyeArr = arr
        this.qiyeLeafAll = this.getAllLeaf(arr).map((item) => {
          if (item.length == 4) {
            return [item]
          } else if (item.length == 5) {
            return [item.slice(0, 4), item]
          } else if (item.length == 6) {
            return [item.slice(0, 4), item.slice(0, 5), item]
          } else if (item.length == 7) {
            return [item.slice(0, 4), item.slice(0, 5), item]
          }
        })
        // console.log(this.qiyeLeafAll)
      },
      immediate: true
    }
  },
  mounted() {
    console.log(22222)
    // this.origonArr = this.deptOptions;
    // this.industryArr = this.industryOptions;
    // console.log(this.industryOptions);
  },
  created() {},
  methods: {
    handleCancelSaveTemplate() {
      this.showSaveDialog = false
      this.saveRadio = ''
      this.templateName = ''
      this.templateId = ''
    },
    handleConfirmSaveTemplate() {
      if (this.saveRadio === '') {
        return this.$message.error('请选择保存方式')
      }
      if (this.saveRadio === 'add' && this.templateName.trim() === '') {
        return this.$message.error('请输入模板名称')
      }
      if (this.saveRadio === 'update' && this.templateId === '') {
        return this.$message.error('请选择替换模板')
      }
      const params =
        this.saveRadio === 'update'
          ? {
            templateId: this.templateId,
            searchTemplate: JSON.stringify(this.pushform),
            templateName: this.templateList.filter(
              (item) => item.templateId === this.templateId
            )[0].templateName
          }
          : {
            templateName: this.templateName,
            searchTemplate: JSON.stringify(this.pushform)
          }

      saveTemplate(params).then((res) => {
        if (res.code === 200) {
          this.showSaveDialog = false
          this.getTemplate()
          this.$message.success('操作成功')
        }
      })
    },
    getAllLeaf(arr) {
      let roots = []
      arr.forEach((item) => {
        if (!item?.children?.length) {
          roots.push(item.value)
        } else {
          roots = roots.concat(this.getAllLeaf(item.children))
        }
      })
      return roots
    },
    handleCheckOrigon() {
      if (!this.checkForm.check_origon) {
        this.pushform.origon = []
        this.pushform.origonNm = []
      } else {
        this.pushform.origon = ['33']
        this.pushform.origonNm = ['浙江省']
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckIndustry() {
      if (!this.checkForm.check_industry) {
        this.pushform.belongBusinessList = []
      } else {
        this.pushform.belongBusinessList = this.allIndustry
      }
      this.$emit('clearIndustryList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    origonChange() {
      console.log(this.pushform)
      console.log(this.origonNm)
      if (this.pushform.origon.length) {
        this.pushform.origonNm =
          this.$refs.mycascader_origon.getCheckedNodes()[0].pathLabels
        this.checkForm.check_origon = true
      } else {
        this.pushform.origonNm = []
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    industryChange() {
      console.log(this.pushform)
      if (this.pushform.belongBusinessList.length) {
        this.checkForm.check_industry = true
      }
      this.$emit('clearIndustryList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    // toggleYearShow() {
    //   this.showYearPicker = !this.showYearPicker;
    //   const that = this;
    //   if (this.showYearPicker) {
    //     setTimeout(() => {
    //       const span = document.getElementById("yearPickerBox");
    //       span.addEventListener("click", function (e) {
    //         e.stopPropagation();
    //       });
    //     }, 300);
    //   }
    // },
    getZZZSOptions() {
      getZzzsDict().then((res) => {
        if (res.code === 200) {
          this.groupZZZSArr = res.data?.map((item) => {
            return {
              label: item.dictLabel,
              value: item.dictLabel
            }
          })
        }
      })
    },
    getTemplate() {
      getTemplateList().then((res) => {
        if (res.code === 200) {
          const dict = {
            companyTypeList: [
              ...this.qiyeTypeList,
              ...this.shiyeArr,
              { label: '个体工商户', value: '102' },
              { label: '机关单位', value: '103' }
            ],
            groupYearArr: [...this.groupYearArr],
            registerMoneyArr: [
              ...this.registerMoneyArr.map((item) => {
                return { label: item.value, value: item.key }
              })
            ],
            baoxianOptions: [
              ...this.baoxianOptions.map((item) => {
                return { label: item.value, value: item.key }
              })
            ]
          }
          this.templateList =
            res.data?.map((item) => {
              return {
                ...item,
                searchTemplate: JSON.parse(item.searchTemplate),
                searchListResult: getSearchList(
                  JSON.parse(item.searchTemplate),
                  dict
                )
              }
            }) || []
        }
      })
    },
    handleCheckAllZzzs(val) {
      this.pushform.zzzsCodeList = val
        ? this.groupZZZSArr?.map((item) => item.label)
        : []
      this.checkForm.isIndeterminateZzzs = false
    },
    handleCheckedChangeZzzs(value) {
      const checkedCount = value.length
      this.checkForm.checkAll_zzzs = checkedCount === this.groupZZZSArr?.length
      this.checkForm.isIndeterminateZzzs =
        checkedCount > 0 && checkedCount < this.groupZZZSArr?.length
    },
    handleCheckAllYear(val) {
      this.pushform.startDateIntervalList = val
        ? this.groupYearArr?.map((ot) => ot.value)
        : []
      this.checkForm.check_customYear = !!val
      if (!val) {
        this.pushform.startYear = ''
        this.pushform.endYear = ''
        this.pushform.cusStartDateInterval = []
        this.checkForm.check_customYear = false
      }
      this.checkForm.isIndeterminateYear = false
      this.$emit('clearYearList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckedChangeYear(value) {
      console.log(value)
      const newArr = value.filter((item) => item != undefined)
      console.log(newArr)
      const checkedCount = newArr.length
      this.checkForm.checkAll_year =
        checkedCount === this.groupYearArr.length &&
        this.checkForm.check_customYear == true
      this.checkForm.isIndeterminateYear =
        (checkedCount > 0 || this.checkForm.check_customYear == true) &&
        (checkedCount < this.groupYearArr.length ||
          this.checkForm.check_customYear == false)
      console.log(this.pushform)
      this.$emit('clearYearList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckCustomYear(v) {
      if (!v) {
        this.pushform.startYear = ''
        this.pushform.endYear = ''
        this.pushform.cusStartDateInterval = []
        this.checkForm.checkAll_year = false
        this.checkForm.isIndeterminateYear =
          this.pushform.startDateIntervalList.length > 0
      }
      this.$emit('clearYearList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    toggleStartYear(v) {
      //   if (v) {
      this.checkForm.check_customYear = true
      //   this.pushform.cusStartDateInterval[0] = v;
      //   }
      if (this.pushform.startDateIntervalList.length == 7) {
        this.checkForm.checkAll_year = true
        this.checkForm.isIndeterminateYear = false
      }
      console.log(this.pushform)
      this.$emit('clearYearList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    toggleEndYear(v) {
      this.checkForm.check_customYear = true
      //   this.pushform.cusStartDateInterval[1] = v;
      this.$emit('clearYearList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    openModal() {
      this.getZZZSOptions()
      this.getTemplate()
      this.showDrawer = true
    },
    handleselectedSizeOptions(value) {
      console.log(value)
    },
    toggleJYRelate(v) {
      this.pushform.statusInclude = v
      this.checkForm.jyRelationNm = v == 0 ? '不包含' : '包含'
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckedChangeJYStatus() {
      //  this.pushform.statusList = val
      // ? this.groupJYStatusArr?.map((ot) => ot.key)
      // : [];
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeOthStatus(arr) {
      console.log(arr)
      const checkedCount = arr.length
      //   this.check_customStatus =
      //     checkedCount === this.groupJYStatusArrOth.length;
      if (checkedCount) {
        this.checkForm.check_customStatus = true
      }
      //   this.isIndeterminateJYStatus =
      //     checkedCount > 0 && checkedCount < this.groupJYStatusArrOth.length;
      //   console.log(this.check_customStatus, this.isIndeterminateJYStatus);
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckCustomStatus(v) {
      this.pushform.otherJYStatus = v
        ? this.groupJYStatusArrOth?.map((ot) => ot.key)
        : []
      //   this.isIndeterminateJYStatus = false;
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeRegisterAll() {
      this.$emit('clearRegisterMoneyList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleRegisterBlur() {
      console.log('blur')
      this.$emit('clearRegisterMoneyList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    toggleRegisterUnit(type) {
      this.pushform.registerUnit = type
      this.$emit('clearRegisterMoneyList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeMoneyType1() {
      this.$emit('clearRegisterMoneyList')
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeGiveAll() {
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleGiveBlur() {
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    toggleGiveUnit(type) {
      this.pushform.giveUnit = type
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeMoneyType2() {
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckPhone(v) {
      if (!v) {
        this.pushform.isPhoneNumber = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changePhone() {
      this.checkForm.check_phone = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckEmail(v) {
      if (!v) {
        this.pushform.isEmail = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeEmail() {
      this.checkForm.check_email = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    toggleJGRelate(v) {
      this.pushform.companyTypeInclude = v
      this.checkForm.jgRelationNm = v == '0' ? '不包含' : '包含'
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckAllJG(val) {
      this.pushform.companyTypeList = val ? ['102', '103'] : []
      this.checkForm.checkAll_JG = !!val
      this.checkForm.check_QY = !!val
      this.checkForm.check_shiyeComp = !!val
      this.pushform.SYStatus = val ? [['1041'], ['1042'], ['1043']] : []
      if (val) {
        this.pushform.companyType = this.qiyeLeafAll
      } else {
        this.pushform.companyType = []
      }
      this.checkForm.isIndeterminateJGStatus = false
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    qiyeChange() {
      console.log(this.pushform)
      if (this.pushform.companyType.length) {
        this.checkForm.check_QY = true
        if (
          this.pushform.companyTypeList.length == 2
          // && this.check_shiyeComp == true
        ) {
          this.checkForm.checkAll_JG = true
          this.checkForm.isIndeterminateJGStatus = false
        } else {
          this.checkForm.checkAll_JG = false
          this.checkForm.isIndeterminateJGStatus = true
        }
      } else {
        this.checkForm.check_QY = false
        this.checkForm.checkAll_JG = false
        if (
          this.pushform.companyTypeList.length
          // || this.check_shiyeComp
        ) {
          this.checkForm.isIndeterminateJGStatus = true
        } else {
          this.checkForm.isIndeterminateJGStatus = false
        }
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckQY() {
      console.log(this.qiyeLeafAll, 22222)
      if (!this.checkForm.check_QY) {
        this.pushform.companyType = []
        this.checkForm.checkAll_JG = false
        if (
          this.pushform.companyTypeList.length
          // || this.check_shiyeComp
        ) {
          this.checkForm.isIndeterminateJGStatus = true
        } else {
          this.checkForm.isIndeterminateJGStatus = false
        }
      } else {
        this.pushform.companyType = this.qiyeLeafAll // 全选的值
        if (
          this.pushform.companyTypeList.length == 2
          // && this.check_shiyeComp
        ) {
          this.checkForm.checkAll_JG = true
          this.checkForm.isIndeterminateJGStatus = false
        } else {
          this.checkForm.checkAll_JG = false
          this.checkForm.isIndeterminateJGStatus = true
        }
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckedChangeJGStatus(arr) {
      const checkedCount = arr.length
      this.checkForm.checkAll_JG =
        checkedCount === 2 &&
        this.checkForm.check_QY &&
        this.checkForm.check_shiyeComp
      this.checkForm.isIndeterminateJGStatus =
        !this.checkForm.checkAll_JG &&
        (checkedCount > 0 ||
          this.checkForm.check_QY ||
          this.checkForm.check_shiyeComp)
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeSYStatus(arr) {
      console.log(arr)
      const checkedCount = arr.length
      if (checkedCount) {
        this.checkForm.check_shiyeComp = true
        if (
          this.pushform.companyTypeList.length == 2 &&
          this.checkForm.check_QY == true
        ) {
          this.checkForm.checkAll_JG = true
          this.checkForm.isIndeterminateJGStatus = false
        } else {
          this.checkForm.checkAll_JG = false
          this.checkForm.isIndeterminateJGStatus = true
        }
      } else {
        this.checkForm.check_shiyeComp = false
        this.checkForm.checkAll_JG = false
        if (this.pushform.companyTypeList.length || this.checkForm.check_QY) {
          this.checkForm.isIndeterminateJGStatus = true
        } else {
          this.checkForm.isIndeterminateJGStatus = false
        }
      }
      //   this.check_customStatus =
      //     checkedCount === this.groupJYStatusArrOth.length;
      //   this.isIndeterminateJYStatus =
      //     checkedCount > 0 && checkedCount < this.groupJYStatusArrOth.length;
      //   console.log(this.check_customStatus, this.isIndeterminateJYStatus);
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckSYStatus(v) {
      if (!v) {
        this.pushform.SYStatus = []
        this.checkForm.checkAll_JG = false
        if (this.pushform.companyTypeList.length || this.checkForm.check_QY) {
          this.checkForm.isIndeterminateJGStatus = true
        } else {
          this.checkForm.isIndeterminateJGStatus = false
        }
      } else {
        this.pushform.SYStatus = this.shiyeArr?.map((ot) => [ot.value])
        if (
          this.pushform.companyTypeList.length == 2 &&
          this.checkForm.check_QY
        ) {
          this.checkForm.checkAll_JG = true
          this.checkForm.isIndeterminateJGStatus = false
        } else {
          this.checkForm.checkAll_JG = false
          this.checkForm.isIndeterminateJGStatus = true
        }
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckAllFZJG(v) {
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckFZJGStatus(v) {
      if (!v) {
        this.pushform.isHasBranchFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckISFZJGStatus(v) {
      if (!v) {
        this.pushform.isBranchFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeFZJGStatus() {
      this.checkForm.check_hasFZJG = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeISFZJGStatus() {
      this.checkForm.check_ISFZJG = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckYLStatus(v) {
      if (!v) {
        this.pushform.businessInfoPenInsurIntervalList = []
        this.pushform.minYL = undefined
        this.pushform.maxYL = undefined
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    customYL() {
      if (
        this.pushform.businessInfoPenInsurIntervalList.length ||
        this.pushform.minYL ||
        this.pushform.maxYL
      ) {
        this.checkForm.check_yanglao = true
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handChangeYL(arr) {
      if (
        this.pushform.businessInfoPenInsurIntervalList.length ||
        this.pushform.minYL ||
        this.pushform.maxYL
      ) {
        this.checkForm.check_yanglao = true
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckYNStatus(v) {
      if (!v) {
        this.pushform.businessInfoMediInsurIntervalList = []
        this.pushform.minYN = undefined
        this.pushform.maxYN = undefined
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    customYN() {
      if (
        this.pushform.businessInfoMediInsurIntervalList.length ||
        this.pushform.minYN ||
        this.pushform.maxYN
      ) {
        this.checkForm.check_yiniao = true
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handChangeYN(arr) {
      if (
        this.pushform.businessInfoMediInsurIntervalList.length ||
        this.pushform.minYN ||
        this.pushform.maxYN
      ) {
        this.checkForm.check_yiniao = true
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckNxLevel(v) {
      if (!v) {
        this.pushform.nsxydjList = []
      }
    },
    changeNsxydj() {
      this.checkForm.check_ns = true
    },
    handleCheckbusinessInfoImExportFlag(v) {
      if (!v) {
        this.pushform.businessInfoImExportFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckbusinessInfoImExportCreditGradeList(v) {
      if (!v) {
        this.pushform.businessInfoImExportCreditGradeList = []
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changebusinessInfoImExportFlag() {
      this.checkForm.check_JCK = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changebusinessInfoImExportCreditGradeList() {
      if (this.pushform.businessInfoImExportCreditGradeList.length) {
        this.checkForm.check_hgrz = true
      } else {
        this.checkForm.check_hgrz = false
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckFCJLStatus(v) {
      if (!v) {
        this.pushform.businessInfoGovSupportFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeFCJLStatus(v) {
      console.log(v)
      this.checkForm.check_FCJL = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckRZXXStatus(v) {
      if (!v) {
        this.pushform.businessInfoFinaInfoFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeRZXXStatus() {
      this.checkForm.check_RZXX = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckRZLCStatus(v) {
      if (!v) {
        this.pushform.businessInfoFinaRoundList = []
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeRZLCStatus() {
      this.checkForm.check_RZLC = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckSBXXStatus(v) {
      if (!v) {
        this.pushform.intelPropRightTrademarkInfoFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeSBXXStatus() {
      this.checkForm.check_SBXX = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckZLXXStatus(v) {
      if (!v) {
        this.pushform.intelPropRightPatentInfoFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeZLXXStatus() {
      this.checkForm.check_ZLXX = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckRZZZStatus(v) {
      if (!v) {
        this.pushform.intelPropRightSoftCopyrightFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeRZZZStatus() {
      this.checkForm.check_RZZZ = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckKJLXStatus(v) {
      this.pushform.technologyLvlTypeList = v
        ? this.kjlxOptions.map((item) => item.key)
        : []
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handChangeKJLX(arr) {
      this.checkForm.check_KJLX = !!arr.length
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckKJZTStatus(v) {
      this.pushform.technologyLvlStateList = v
        ? this.kjztOptions.map((item) => item.key)
        : []
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handChangeKJZT(arr) {
      this.checkForm.check_KJZT = !!arr.length
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckKJJBStatus(v) {
      this.pushform.technologyLvlLevelList = v
        ? this.kjjbOptions.map((item) => item.key)
        : []
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handChangeKJJB(arr) {
      this.checkForm.check_KJJB = !!arr.length
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckSSXXStatus(v) {
      if (!v) {
        this.pushform.capMarketListInfoFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handChangeSSXX() {
      this.checkForm.check_SSXX = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },

    handleCheckSXXXStatus(v) {
      if (!v) {
        this.pushform.riskCharDisInfoFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeSXXXStatus() {
      this.checkForm.check_SXXX = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckPCQSStatus(v) {
      if (!v) {
        this.pushform.riskCharBankruptcyLiquiFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changePCQSStatus() {
      this.checkForm.check_PCQS = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckBGJLStatus(v) {
      if (!v) {
        this.pushform.riskCharChangeRecordFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeBGJLStatus() {
      this.checkForm.check_BGJL = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckSXBZXRStatus(v) {
      if (!v) {
        this.pushform.riskCharDisPersonFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeSXBZXRStatus() {
      this.checkForm.check_SXBZXR = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckSXWFStatus(v) {
      if (!v) {
        this.pushform.riskCharSncFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeSXWFStatus() {
      this.checkForm.check_SXWF = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckXZXFStatus(v) {
      if (!v) {
        this.pushform.riskCharRhcFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeXZXFStatus() {
      this.checkForm.check_XZXF = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeSSWFStatus() {
      this.checkForm.check_SSWF = true
    },
    handleCheckSSWFStatus(v) {
      if (!v) {
        this.pushform.isSswf = ''
      }
    },
    handleCheckXZCFStatus(v) {
      if (!v) {
        this.pushform.operatRiskAdminPenaltyFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeXZCFStatus() {
      this.checkForm.check_XZCF = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckJYYCStatus(v) {
      if (!v) {
        this.pushform.isJyyc = ''
      }
    },
    changeJYYCStatus() {
      this.checkForm.check_JYYC = true
    },
    handleCheckHBCFStatus(v) {
      if (!v) {
        this.pushform.operatRiskEnvirPenaltyFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeHBCFStatus() {
      this.checkForm.check_HBCF = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckQSXXStatus(v) {
      if (!v) {
        this.pushform.operatRiskOweTaxInfoFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeQSXXStatus() {
      this.checkForm.check_QSXX = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckZBAJStatus(v) {
      if (!v) {
        this.pushform.operatRiskFinalCaseFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeZBAJStatus() {
      this.checkForm.check_ZBAJ = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckWJAJStatus(v) {
      if (!v) {
        this.pushform.operatRiskUnfinishCaseFlag = ''
      }
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    changeWJAJStatus() {
      this.checkForm.check_WJAJ = true
      // this.$emit("getCurrentMoreSearch", this.pushform);
    },
    handleCheckFRBGtatus(v) {
      if (!v) {
        this.pushform.isFrbg = ''
      }
    },
    changeFRBGStatus() {
      this.checkForm.check_FRBG = true
    },
    handleCheckGQDJtatus(v) {
      if (!v) {
        this.pushform.isGqdj = ''
      }
    },
    changeGQDJStatus() {
      this.checkForm.check_GQDJ = true
    },
    resetForm() {
      for (const key in this.boolOrigin) {
        this['checkForm'][key] = this.boolOrigin[key]
      }
      this.pushform = { ...this.pushformOrigin }
      this.$emit('getCurrentMoreSearch', this.pushform)
    },
    handleCloseTag(val) {
      if (val.key === 'origonNm') {
        this.checkForm.check_origon = false
        this.$set(this.pushform, 'origon', [])
        this.$set(this.pushform, 'origonNm', [])
      } else if (
        [
          'belongBusinessList',
          'nsxydjList',
          'businessInfoImExportCreditGradeList',
          'businessInfoFinaRoundList',
          'zzzsCodeList',
          'technologyLvlTypeList',
          'technologyLvlStateList',
          'technologyLvlLevelList'
        ].includes(val.key)
      ) {
        const check_value = {
          belongBusinessList: 'check_industry',
          nsxydjList: 'check_ns',
          businessInfoImExportCreditGradeList: 'check_hgrz',
          businessInfoFinaRoundList: 'check_RZLC',
          zzzsCodeList: 'checkAll_zzzs',
          technologyLvlTypeList: 'check_KJLX',
          technologyLvlStateList: 'check_KJZT',
          technologyLvlLevelList: 'check_KJJB'
        }
        this.$set(this.pushform, val.key, [])
        this['checkForm'][check_value[val.key]] = false
      } else if (val.key === 'startDateIntervalList') {
        this.$set(this.pushform, val.key, [])
        this.$set(this.pushform, 'startYear', '')
        this.$set(this.pushform, 'endYear', '')
        this.checkForm.check_customYear = false
        this.checkForm.checkAll_year = false
        this.checkForm.isIndeterminateYear = false
      } else if (val.key === 'statusList') {
        this.checkForm.check_customStatus = false
        this.$set(this.pushform, 'statusList', [])
        this.$set(this.pushform, 'otherJYStatus', [])
      } else if (val.key === 'registerAll') {
        this.$set(this.pushform, 'registerAll', [])
        this.$set(this.pushform, 'minRegiterMoney', '')
        this.$set(this.pushform, 'maxRegiterMoney', '')
      } else if (val.key === 'giveAll') {
        this.$set(this.pushform, 'giveAll', [])
        this.$set(this.pushform, 'minGiveMoney', '')
        this.$set(this.pushform, 'maxGiveMoney', '')
      } else if (if_show_dict.includes(val.key)) {
        const check_value = {
          isPhoneNumber: 'check_phone',
          isEmail: 'check_email',
          isHasBranchFlag: 'check_hasFZJG',
          isBranchFlag: 'check_ISFZJG',
          businessInfoImExportFlag: 'check_JCK',
          businessInfoGovSupportFlag: 'check_FCJL',
          businessInfoFinaInfoFlag: 'check_RZXX',
          intelPropRightTrademarkInfoFlag: 'check_SBXX',
          intelPropRightPatentInfoFlag: 'check_ZLXX',
          intelPropRightSoftCopyrightFlag: 'check_RZZZ',
          capMarketListInfoFlag: 'check_SSXX',
          riskCharDisInfoFlag: 'check_SXXX',
          riskCharBankruptcyLiquiFlag: 'check_PCQS',
          riskCharChangeRecordFlag: 'check_BGJL',
          riskCharDisPersonFlag: 'check_SXBZXR',
          riskCharSncFlag: 'check_SXWF',
          isSswf: 'check_SSWF',
          riskCharRhcFlag: 'check_XZXF',
          isJyyc: 'check_JYYC',
          operatRiskAdminPenaltyFlag: 'check_XZCF',
          operatRiskEnvirPenaltyFlag: 'check_HBCF',
          operatRiskOweTaxInfoFlag: 'check_QSXX',
          operatRiskFinalCaseFlag: 'check_ZBAJ',
          operatRiskUnfinishCaseFlag: 'check_WJAJ',
          isFrbg: 'check_FRBG',
          isGqdj: 'check_GQDJ'
        }
        this.$set(this.pushform, val.key, '')
        this['checkForm'][check_value[val.key]] = false
      } else if (val.key === 'companyTypeList') {
        this.$set(this.pushform, val.key, [])
        this.checkForm.checkAll_JG = false
        this.checkForm.check_QY = false
        this.checkForm.check_shiyeComp = false
        this.$set(this.pushform, 'SYStatus', [])
        this.$set(this.pushform, 'companyType', [])
      } else if (val.key === 'businessInfoPenInsurIntervalList') {
        this.checkForm.check_yanglao = false
        this.$set(this.pushform, 'businessInfoPenInsurIntervalList', [])
        this.$set(this.pushform, 'minYL', undefined)
        this.$set(this.pushform, 'maxYL', undefined)
      } else if (val.key === 'businessInfoMediInsurIntervalList') {
        this.checkForm.check_yiniao = false
        this.$set(this.pushform, 'businessInfoMediInsurIntervalList', [])
        this.$set(this.pushform, 'minYN', undefined)
        this.$set(this.pushform, 'maxYN', undefined)
      }
    },
    saveTemplate() {
      this.showSaveDialog = true
    },
    onShowAllTemplate() {
      this.showAllDialog = true
    },
    onUseTemplate(val) {
      const check_value_bool = {
        isPhoneNumber: 'check_phone',
        isEmail: 'check_email',
        isHasBranchFlag: 'check_hasFZJG',
        isBranchFlag: 'check_ISFZJG',
        businessInfoImExportFlag: 'check_JCK',
        businessInfoGovSupportFlag: 'check_FCJL',
        businessInfoFinaInfoFlag: 'check_RZXX',
        intelPropRightTrademarkInfoFlag: 'check_SBXX',
        intelPropRightPatentInfoFlag: 'check_ZLXX',
        intelPropRightSoftCopyrightFlag: 'check_RZZZ',
        capMarketListInfoFlag: 'check_SSXX',
        riskCharDisInfoFlag: 'check_SXXX',
        riskCharBankruptcyLiquiFlag: 'check_PCQS',
        riskCharChangeRecordFlag: 'check_BGJL',
        riskCharDisPersonFlag: 'check_SXBZXR',
        riskCharSncFlag: 'check_SXWF',
        isSswf: 'check_SSWF',
        riskCharRhcFlag: 'check_XZXF',
        isJyyc: 'check_JYYC',
        operatRiskAdminPenaltyFlag: 'check_XZCF',
        operatRiskEnvirPenaltyFlag: 'check_HBCF',
        operatRiskOweTaxInfoFlag: 'check_QSXX',
        operatRiskFinalCaseFlag: 'check_ZBAJ',
        operatRiskUnfinishCaseFlag: 'check_WJAJ',
        isFrbg: 'check_FRBG',
        isGqdj: 'check_GQDJ'
      }
      for (const key in check_value_bool) {
        if (
          val.searchTemplate[key] !== undefined &&
          val.searchTemplate[key] !== '' &&
          val.searchTemplate[key] !== null
        ) {
          this['checkForm'][check_value_bool[key]] = true
        }
      }
      const check_value_list = {
        belongBusinessList: 'check_industry',
        nsxydjList: 'check_ns',
        businessInfoImExportCreditGradeList: 'check_hgrz',
        businessInfoFinaRoundList: 'check_RZLC',
        technologyLvlTypeList: 'check_KJLX',
        technologyLvlStateList: 'check_KJZT',
        technologyLvlLevelList: 'check_KJJB',
        origon: 'check_origon',
        businessInfoPenInsurIntervalList: 'check_yanglao',
        businessInfoMediInsurIntervalList: 'check_yiniao'
      }
      for (const key in check_value_list) {
        if (
          Array.isArray(val.searchTemplate[key]) &&
          val.searchTemplate[key].length > 0
        ) {
          this['checkForm'][check_value_list[key]] = true
        }
      }

      if (val.searchTemplate.startYear || val.searchTemplate.endYear) {
        this.checkForm.check_customYear = true
        this.isIndeterminateYear = true
      }

      if (val.searchTemplate.startDateIntervalList.length > 0) {
        if (
          val.searchTemplate.startDateIntervalList.length === 7 &&
          this.checkForm.check_customYear
        ) {
          this.checkForm.checkAll_year = true
          this.checkForm.isIndeterminateYear = false
        } else {
          this.checkForm.isIndeterminateYear = true
        }
      }

      this.checkForm.jyRelationNm = val.searchTemplate.statusInclude
        ? '包含'
        : '不包含'

      this.checkForm.check_customStatus = !!(
        Array.isArray(val.searchTemplate.otherJYStatus) &&
        val.searchTemplate.otherJYStatus.length > 0
      )

      this.checkForm.jgRelationNm = val.searchTemplate.companyTypeInclude
        ? '包含'
        : '不包含'

      if (
        Array.isArray(val.searchTemplate.companyType) &&
        val.searchTemplate.companyType.length > 0
      ) {
        this.checkForm.isIndeterminateJGStatus = true
        this.checkForm.check_QY = true
      }
      if (
        Array.isArray(val.searchTemplate.SYStatus) &&
        val.searchTemplate.SYStatus.length > 0
      ) {
        this.checkForm.isIndeterminateJGStatus = true
        this.checkForm.check_shiyeComp = true
      }

      if (
        Array.isArray(val.searchTemplate.zzzsCodeList) &&
        val.searchTemplate.zzzsCodeList.length > 0
      ) {
        this.checkForm.isIndeterminateZzzs = true
        if (
          val.searchTemplate.zzzsCodeList.length === this.groupZZZSArr.length
        ) {
          this.checkForm.isIndeterminateZzzs = false
          this.checkForm.checkAll_zzzs = true
        }
      }

      if (
        Array.isArray(val.searchTemplate.companyTypeList) &&
        val.searchTemplate.companyTypeList.length > 0
      ) {
        this.checkForm.isIndeterminateJGStatus = true

        if (
          val.searchTemplate.companyTypeList.length === 2 &&
          this.checkForm.check_QY &&
          this.checkForm.check_shiyeComp
        ) {
          this.checkForm.isIndeterminateJGStatus = false
          this.checkForm.checkAll_JG = true
        }
      }

      this.pushform = { ...this.pushform, ...val.searchTemplate }
      this.showAllDialog = false
      // this.showDrawer = false
      this.$emit('getCurrentMoreSearch', val.searchTemplate)
    },
    onDeleteTemplate(val) {
      this.deleteInfo = val
      this.showConfirmDialog = true
    },
    handleConfirmDeleteTemplate() {
      this.buttonLoading = true
      deleteTemplate({ templateId: this.deleteInfo.templateId })
        .then((res) => {
          if (res.code === 200) {
            this.$message.success('删除成功')
            this.showConfirmDialog = false
            this.showAllDialog = false
            this.getTemplate()
          }
        })
        .finally(() => {
          this.buttonLoading = false
        })
    },
    submitForm() {
      this.$emit('getCurrentMoreSearch', this.pushform)
    }
  }
}
</script>
<style lang="scss" scoped>
.main {
}
.search-content {
  position: relative;
  .collapse {
    position: fixed;
    right: 1080px;
    background: #fff;
    height: 100px;
    font-size: 14px;
    color: #4886f8;
    margin-left: 2px;
    display: flex;
    align-items: center;
    top: 38%;
    cursor: pointer;
    padding-left: 5px;
    border-radius: 10px 0 0 10px;
  }
  padding: 10px;
  .my-title {
    color: #00000a;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 22px;
    border-bottom: 1px solid #e6ebf5;
  }

  .myTemplate {
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      height: 55px;
      border-bottom: 1px solid #e6ebf5;
      padding: 0 8px;

      .title_t {
        color: #00000a;
        font-size: 16px;
        font-style: normal;
        font-weight: 600;
      }

      .more {
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;

        i {
          margin-left: 8px;
        }
      }
    }

    .list {
      display: flex;
      align-items: center;
      margin-top: 8px;

      &-item {
        flex: 0 0 calc(20% - 8px);
        margin: 0 4px;
        background-color: rgba(22, 132, 252, 0.1);
        height: 38px;
        line-height: 38px;
        font-size: 14px;
        color: rgba(0, 0, 0, 0.85);
        padding-left: 8px;
        border-radius: 8px;
        text-align: center;
        cursor: pointer;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }
  .base-box {
    margin-top: 10px;
    .base-header {
      color: #00000a;
      height: 32px;
      padding-right: 12px;
      background: rgba(245, 247, 250, 1);
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 14px;
    }
    .base-title {
      font-weight: 600;
      position: relative;
      padding-left: 8px;
      &::before {
        position: absolute;
        top: 50%;
        transform: translatey(-50%);
        left: 0;
        content: "";
        width: 3px;
        background-color: #4886f8;
        height: 16px;
        border-radius: 2px;
      }
    }
    .arrow {
      cursor: pointer;
      font-size: 14px;
      color: rgba(0, 0, 0, 0.85);
    }
    .box {
      display: flex;
      .left {
        margin-right: 5px;
        line-height: 36px;
        width: 80px;
      }
      .custom-select-box {
        ::v-deep .el-select .el-input__inner {
          border: none !important;
          height: 20px !important;
        }
        ::v-deep .el-input-number.is-without-controls .el-input__inner {
          border: none !important;
        }
        ::v-deep .el-select .el-select__tags {
          display: none !important;
        }
        ::v-deep .el-select .el-input .el-input__suffix {
          // right: 15px;
          display: none;
        }
        .prefix-text {
          color: #393a51;
          line-height: 20px;
          cursor: pointer;
          margin-top: -10px;
        }
        .activeClass {
          color: #1a53ff !important;
        }
        margin-left: 30px;
        width: 150px;
        ::v-deep .el-checkbox {
          width: 14px !important;
        }
      }
    }
    .yearbox {
      .mycascader-box {
        display: flex;
        // margin-left: 12px;
        .checkall {
          margin-right: 5px;
        }
        ::v-deep .el-checkbox {
          width: 150px !important;
          margin-bottom: 5px;
        }
        .custom-year-box {
          position: absolute;
          //   margin-left: 30px;
          right: 192px;
          bottom: 0px;
          ::v-deep .el-checkbox {
            width: 30px !important;
          }
          .yearPicker {
            position: absolute;
            z-index: 1000;
            background: #fff;
            width: 250px;
            left: 21px;
            top: 10px;
          }
          .el-icon-year {
            display: inline-block;
            // padding-left: 10px;
            line-height: 19px;
            font-size: 14px;
            color: #606266;
            font-weight: 500;
            cursor: pointer;
            margin-left: -5px;
          }
        }
      }
      .left {
        line-height: 20px;
        width: 100px;
        margin-right: 8px;
      }
      .check-total {
        margin-right: 41px;
        width: 113px;
        margin-left: 7px;
      }
    }
    .JYStatus {
      .JYStatus-box {
        display: flex;
        align-items: center;
        ::v-deep .el-checkbox {
          width: 80px;
        }
      }
      .special-JYStatus-box {
        .checkall {
          margin-left: 31px;
        }
      }
      .FZJGStatus-box {
        .checkall {
          margin-right: 40px;
        }
        .custom-select-box {
          margin-left: 0 !important;
        }
      }
      .relation {
        display: inline-block;
        line-height: 36px;
        cursor: pointer;
        margin-right: 5px;
        .unit {
          margin-right: 5px;
        }
      }
      .JY-relation {
        margin-right: 39px;
      }
    }
    .JGtype {
      .mycascader-box {
        margin-left: 29px !important;
      }
      .span-label {
        line-height: 30px !important;
        .el-icon-arrow-down {
          margin-left: 10px;
        }
      }
    }
    .FZJG,
    .JYXX {
      .custom-select-box {
        // .prefix-text{
        ::v-deep .el-input .el-input__inner {
          visibility: hidden !important;
        }
        // }
      }
      .rzlc {
        margin-left: 46px;
      }
      .ssxx {
        margin-right: 9px;
      }
    }
    .jy-info-box {
      // ::v-deep .el-select-dropdown  .el-select-dropdown__list{
      //     padding: 0 5px !important;
      // }
      .custom-input-num {
        ::v-deep .el-input-number {
          // margin: 0 5px;
          margin-bottom: 5px !important;
        }
      }
      margin-left: 0 !important;
    }
  }
  .mycascader-box {
    position: relative;
    .span-label {
      //   position: absolute;
      z-index: 500;
      top: 2px;
      left: 19px;
      background: #fff;
      cursor: pointer;
      font-size: 14px;
      color: #606266;
      font-weight: 500;
    }
    .mycascader {
      position: absolute;
      left: 0;
    }
    ::v-deep .el-cascader .el-input .el-input__inner {
      border: none !important;
      visibility: hidden;
      background: transparent;
    }
    ::v-deep .el-cascader .el-input .el-input__suffix {
      display: none;
    }
    ::v-deep .el-cascader .el-cascader__tags {
      display: none !important;
    }
    .special {
      margin-left: 5px;
    }
  }
  .registerMoney {
    .custom-select-box {
      margin-left: -5px !important;
      .register-arrow {
        margin-left: 14px;
      }
    }
    .register-box {
      margin-top: 5px;
      .register-unit {
        cursor: pointer;
        color: #ccc;
        margin-left: 5px;
        margin-right: 5px;
        .activeUnit {
          color: #000;
        }
        span:nth-child(1) {
          margin-right: 5px;
        }
        font-size: 14px;
      }
      ::v-deep .el-input-number .el-input__inner {
        border: none !important;
      }
      ::v-deep .el-select .el-input__inner {
        border: none !important;
      }
    }
    .giveMoney-title {
      margin-left: 10px;
    }
  }
  .contact-box {
    display: flex;
    align-items: center;
    ::v-deep .el-input .el-input__inner {
      visibility: hidden !important;
    }
    .custom-select-box {
      margin-left: 0 !important;
    }
  }
}
.common-content {
  padding-left: 5px;
}
.special-money-box {
  display: flex;
}
.special-zuanli {
  margin-left: 46px !important;
}
.ruanzhuzuozhe {
  margin-left: 46px !important;
}
.search-content .base-box .JGtype .qiye-mycascader-box {
  ::v-deep .el-checkbox {
    width: 20px;
  }
  .mycascader {
    margin-left: 0px;
  }
  .span-label {
    margin-right: 30px;
  }
  // margin-left: 100px !important;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  border-top: 1px solid #e6ebf5;
  padding: 8px;
  margin-top: 16px;

  .choose-list {
    display: flex;
    align-items: center;
    margin-right: 24px;

    p {
      margin-right: 16px;
      flex-shrink: 0;
    }
    .tag-list {
      .el-tag {
        margin-right: 24px;
        margin-bottom: 6px;
        max-width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
        position: relative;
        padding-right: 20px;

        ::v-deep .el-icon-close {
          position: absolute !important;
          right: 2px;
          top: 4px;
        }
      }
    }
  }

  .button {
    flex-shrink: 0;
  }
}
.shengfen-box {
  margin-right: 62px;
  top: 6px;
}
.hangye-box {
  top: 6px;
}
::v-deep .el-popper {
  margin-top: 0px !important;
}

::v-deep .el-radio {
  display: flex;
  align-items: center;
  margin-bottom: 12px;

  .el-input {
    width: 300px;
  }
  .el-form-item {
    margin-bottom: 0;
  }
}

::v-deep .template {
  margin-left: 8px;
  .title {
    line-height: 20px;
    font-size: 14px;
    color: rgba(0, 0, 0, 1);
    font-weight: bold;
    position: relative;
    padding-left: 8px;
    margin-bottom: 6px;

    &::before {
      content: "";
      width: 3px;
      height: 20px;
      border-radius: 2px;
      background-color: rgba(22, 132, 252, 1);
      position: absolute;
      left: 0;
    }
  }

  .content {
    line-height: 20px;
    color: rgba(0, 0, 0, 0.7);
    font-size: 14px;
    padding-left: 12px;
    margin-bottom: 10px;
  }
}

::v-deep .myTemplate {
  .el-tabs__item {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
</style>
