<template>
  <div class="reform-bg">
    <div class="reform-warp">
      <div class="reform-content">
        <el-form ref="dataForm" :rules="rules" :model="dataForm" label-width="200px">
          <div class="level-title">
            <h1>1、相关方单位基础信息</h1>
          </div>
          <el-row :gutter="24">
            <el-col :gutter="12">
              <el-form-item label="相关方单位名称" prop="RELEVANT_UNIT_NAME">
                <el-input v-model="dataForm.RELEVANT_UNIT_NAME" disabled/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="24">
            <el-col :span="12">
              <el-form-item label="股份监管部门" prop="MANAGER_DEPARTMENT_NAME">
                <el-input v-model="dataForm.MANAGER_DEPARTMENT_NAME" disabled/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="基层单位监管部门" prop="COMPETENT_DEPT_NAME">
                <el-input v-model="dataForm.COMPETENT_DEPT_NAME" disabled/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="股份主管部门" prop="MAIN_DEPARTMENT">
                <Treeselect
                  :options="treeData"
                  :disabled="true"
                  :normalizer="normalizer"
                  v-model="dataForm.MAIN_DEPARTMENT"
                  placeholder="请选择部门"
                  no-options-text="暂无数据"
                  no-children-text="暂无数据"
                  style="width: 100%;"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="基层单位主管部门" prop="SUPERVISE_CORPINFO_DEPT_NAME">
                <el-input v-model="dataForm.SUPERVISE_CORPINFO_DEPT_NAME" disabled maxlength="255" title="单位名称"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="集团单位" prop="corpTypeName">
                <el-input id="corpTypeName" ref="corpTypeName" v-model="dataForm.corpTypeName" disabled maxlength="255" placeholder="这里输入开户人..." title="开户人"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="开户人" prop="CREATOR">
                <el-input id="CREATOR" ref="CREATOR" v-model="dataForm.USER_NAME" disabled maxlength="255" placeholder="这里输入开户人..." title="开户人"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="统一社会信用代码" prop="SOCIAL_CODE">
                <el-input id="SOCIAL_CODE" ref="SOCIAL_CODE" v-model="dataForm.SOCIAL_CODE" maxlength="255" disabled placeholder="这里输入统一社会信用代码..." title="统一社会信用代码"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="属地" prop="POSSESSION">
                <el-input v-model="COMPANY_AREA" disabled placeholder="属地"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="所属行业" disabled prop="INDUSTRY">
                <el-select v-model="dataForm.INDUSTRY" disabled style="width: 100%">
                  <el-option v-for="item in industryList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA"/>
                </el-select>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="经济类型" prop="ECONOMIC_TYPE">
                <el-select v-model="dataForm.ECONOMIC_TYPE" placeholder="请选择" style="width: 100%;" disabled>
                  <el-option v-for="item in ecnomicTypeList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="经度" prop="LONGITUDE">
                <el-input v-model="dataForm.LONGITUDE" disabled placeholder="请输入内容" @focus="handleMap" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="纬度" prop="LATITUDE">
                <div style="display: flex">
                  <el-input v-model="dataForm.LATITUDE" disabled placeholder="请输入内容" style="width: 100%" @focus="handleMap"/>
                  <el-button style="margin-left:10px" @click="handleMap">
                    <span class="svg-container">
                      <svg-icon icon-class="international" />
                    </span>
                  </el-button>
                </div>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="单位经营地址" prop="BUSINESS_ADDRESS">
                <el-input id="BUSINESS_ADDRESS" ref="BUSINESS_ADDRESS" v-model="dataForm.BUSINESS_ADDRESS" maxlength="255" disabled placeholder="这里输入单位经营地址..." title="单位经营地址"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="企业规模" prop="CORP_SIZE">
                <el-select v-model="dataForm.CORP_SIZE" style="width: 100%;" disabled>
                  <el-option v-for="item in enterpriseSizeList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="法人姓名" prop="LEGAL_PERSON">
                <el-input id="LEGAL_PERSON" ref="LEGAL_PERSON" v-model="dataForm.LEGAL_PERSON" maxlength="20" disabled placeholder="这里输入法人姓名..." title="法人姓名"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="联系电话" prop="LEGAL_PERSON_TEL">
                <el-input id="LEGAL_PERSON_TEL" ref="LEGAL_PERSON_TEL" v-model="dataForm.LEGAL_PERSON_TEL" maxlength="11" disabled placeholder="这里输入联系电话..." title="联系电话"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="主要负责人" prop="CONTACT_PERSON">
                <el-input id="CONTACT_PERSON" ref="CONTACT_PERSON" v-model="dataForm.CONTACT_PERSON" maxlength="20" disabled placeholder="这里输入主要负责人..." title="主要负责人"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="主要负责人联系电话" prop="CONTACT_TEL">
                <el-input id="CONTACT_TEL" ref="CONTACT_TEL" v-model="dataForm.CONTACT_TEL" maxlength="11" disabled placeholder="这里输入主要负责人联系电话..." title="主要负责人联系电话"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="成立日期" prop="ESTABLISHMENT_DATE">
                <el-date-picker v-model="dataForm.ESTABLISHMENT_DATE" type="date" value-format="yyyy-MM-dd" format="yyyy-MM-dd" disabled placeholder="选择日期" style="width: 100%"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="职工人数（人）" prop="EMPLOY_NUM">
                <el-input id="EMPLOY_NUM" ref="EMPLOY_NUM" v-model="dataForm.EMPLOY_NUM" type="number" maxlength="11" disabled placeholder="这里输入职工人数..." title="职工人数"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="资产总额（万元）" prop="TOTAL_ASSETS">
                <el-input id="TOTAL_ASSETS" ref="TOTAL_ASSETS" v-model="dataForm.TOTAL_ASSETS" type="number" maxlength="11" disabled placeholder="这里输入资产总额（万元）..." title="资产总额（万元）"/>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="注册资金" prop="REGISTERED_CAPITAL">
                <el-input id="REGISTERED_CAPITAL" ref="REGISTERED_CAPITAL" v-model="dataForm.REGISTERED_CAPITAL" type="number" maxlength="11" disabled placeholder="这里输入注册资金..." title="注册资金"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row :gutter="20">
            <el-col :span="12">
              <el-form-item label="用工形式" prop="EMPLOYMENT_FORM">
                <Treeselect
                  :options="employmentTypeList"
                  :normalizer="normalizer"
                  v-model="dataForm.EMPLOYMENT_FORM"
                  placeholder="请选择用工形式"
                  no-options-text="暂无数据"
                  no-children-text="暂无数据"
                  disabled
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="选取形式" disabled prop="SELECT_FORM">
                <el-select v-model="dataForm.SELECT_FORM" style="width: 100%;" disabled multiple>
                  <el-option v-for="item in selectFormList" :key="item.BIANMA" :label="item.NAME" :value="item.BIANMA" />
                </el-select>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="营业执照" class="is-required">
                <el-carousel v-if="businessLicenseImgs.length > 0" :interval="4000" type="card" height="200px" style="margin-top: 10px" >
                  <el-carousel-item v-for="item in businessLicenseImgs" :key="item">
                    <img v-viewer :src="item" style="max-width: 100%;">
                  </el-carousel-item>
                </el-carousel>
                <span v-else>暂无信息</span>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="24">
              <el-form-item label="营业执照有效期" prop="businessLicenseDate">
                <el-date-picker
                  v-model="dataForm.businessLicenseDate"
                  disabled
                  type="daterange"
                  clearable
                  format="yyyy-MM-dd"
                  value-format="yyyy-MM-dd"
                  range-separator="至"
                  start-placeholder="开始日期"
                  end-placeholder="结束日期"/>
              </el-form-item>
            </el-col>
          </el-row>
          <el-form-item :span="12" label="流动人员比例(%)" disabled prop="FLOATING_PERCENT">
            <el-input id="FLOATING_PERCENT" ref="FLOATING_PERCENT" v-model="dataForm.FLOATING_PERCENT" maxlength="255" placeholder="这里输入流动人员比例..." disabled title="流动人员比例"/>
          </el-form-item>
          <div class="level-title">
            <h1>2、单位资质信息</h1>
            <!-- <el-button type="primary" icon="el-icon-plus" @click="handleQualificationAdd">添加资质</el-button>-->
          </div>
          <el-table
            v-loading="listLoading"
            :data="qualificationList"
            :header-cell-style="{
              'font-weight': 'bold',
              'color': '#000'
            }"
            tooltip-effect="dark"
            border
            fit
            highlight-current-row
          >
            <el-table-column type="index" label="序号" width="50" align="center" />
            <el-table-column prop="QUALIFICATION_NAME" label="资质正式名称" />
            <el-table-column prop="" label="证书有限期">
              <template slot-scope="{row}">
                {{ row.START_DATE }} 至 {{ row.END_DATE }}
              </template>
            </el-table-column>
            <el-table-column prop="CERTIFICATE_NO" label="证书编号" />
            <el-table-column label="操作" align="center" width="200">
              <template slot-scope="{row}">
                <el-button type="primary" icon="el-icon-view" size="mini" @click="handlePictureCardView(row)">预览</el-button>
                <!-- <el-button type="primary" icon="el-icon-edit" size="mini" @click="handleQualificationEdit(row.CORPQUALIFICATIONINFO_ID)">编辑</el-button>
                <el-button type="danger" icon="el-icon-delete" size="mini" @click="delQualification(row.CORPQUALIFICATIONINFO_ID)">删除</el-button>-->
              </template>
            </el-table-column>
          </el-table>
        </el-form>
      </div>
      <div class="ui-height" />
      <div class="ui-foot" style="z-index: 9999">
        <!--        <el-button :loading="buttonloading" type="warning" icon="el-icon-document" @click="confirm('1')">保存并提交审核</el-button>-->
        <!--        <el-button :loading="buttonloading" type="primary" icon="el-icon-check" @click="confirm('0')">保存草稿</el-button>-->
        <!-- <el-button type="primary" @click="handleSh">通过</el-button>
        <el-button type="danger" @click="handleBtg">不通过</el-button>-->
        <el-button plain type="info" @click="back">返 回</el-button>
      </div>
      <!-- 上级企业 -->
      <el-dialog :visible.sync="dialogParentCorp" title="上级企业" width="1000px">
        <CorpSelect v-if="dialogParentCorp" ref="corpSelect" :corpid="CORPINFO_ID" @assignCorpParent="assignCorpParent" />
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogParentCorp = false">取 消</el-button>
          <el-button type="primary" @click="defineCorp">确 定</el-button>
        </div>
      </el-dialog>

      <!-- 坐标选择 -->
      <el-dialog :visible.sync="dialogFormMap" title="编辑坐标" width="800px" class="dy-dialog">
        <baidu-map
          v-loading="loadingMap"
          :zoom="zoom"
          :scroll-wheel-zoom="true"
          :style="{height: clientHeight+'px'}"
          @click="getClickInfo"
          @ready="handler">
          <bm-view style="width: 100%; height:100%; flex: 1" />
          <bm-control ref="control" :offset="{width: 10, height: 10}" anchor="BMAP_ANCHOR_TOP_LEFT">
            <div class="map-flex">

              <div class="map-lable">关键词：</div>
              <div style="flex:1;">
                <el-autocomplete v-model="addressKeyword" :fetch-suggestions="querySearch" :trigger-on-focus="false" placeholder="请输入详细地址" style="width:100%" @select="handleSelect" />
              </div>
              <!--            <el-input v-model="addressKeyword" style="width: 200px" placeholder="请输入内容" />-->
              <!--            <el-button slot="append" icon="el-icon-search" @click="mapNameChange"/>-->
            </div>
          </bm-control>
          <!--        <bm-local-search :keyword="addressKeyword" :auto-viewport="true"/>-->
        </baidu-map>
        <div slot="footer" class="dialog-footer">
          <span>经度：</span>
          <el-input v-model="LONGITUDE" style="width: 200px" placeholder="请输入内容" disabled />
          <span>纬度：</span>
          <el-input v-model="LATITUDE" style="width: 200px" placeholder="请输入内容" disabled />
          <el-button @click="dialogFormMap = false">关 闭</el-button>
          <!-- <el-button type="primary" @click="setPosition">确 定</el-button>-->
        </div>
      </el-dialog>

      <!-- 图片上传预览 -->
      <el-dialog :visible.sync="dialogVisible">
        <img :src="dialogImageUrl" width="100%" alt="">
      </el-dialog>
      <!-- 单位资质信息 编辑 -->
      <el-dialog :visible.sync="dialogQualificationEdit" :title="dialogQualificationType==='edit'?'修改单位资质信息':'新增单位资质信息'" width="600px">
        <el-form ref="formQualification" :rules="rulesQualification" :model="formQualification" label-width="140px" style="width: 500px;">
          <el-form-item label="资质正式名称" prop="QUALIFICATION_NAME">
            <el-input id="QUALIFICATION_NAME" ref="QUALIFICATION_NAME" v-model="formQualification.QUALIFICATION_NAME" maxlength="255" placeholder="这里输入资质正式名称..." title="资质正式名称"/>
          </el-form-item>
          <el-form-item label="证书有限期" prop="date">
            <el-date-picker
              v-model="formQualification.date"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              format="yyyy-MM-dd"
              value-format="yyyy-MM-dd"
              @change="handlePeriodChange"/>
          </el-form-item>
          <el-form-item label="证书编号" prop="CERTIFICATE_NO">
            <el-input id="CERTIFICATE_NO" ref="CERTIFICATE_NO" v-model="formQualification.CERTIFICATE_NO" maxlength="255" placeholder="这里输入证书编号..." title="证书编号"/>
          </el-form-item>
          <el-form-item label="照片" prop="QUALIFICATION_PIC">
            <el-upload ref="qualificationPicFileRef" :file-list="formQualification.QUALIFICATION_PIC" :multiple="false" :limit="1" :auto-upload="false" :on-change="qualificationPicFileChange" :on-remove="qualificationPicFileRemove" action="#" accept=".jpg,.jpeg,.png" list-type="picture-card">
              <el-button size="small" type="primary">点击上传</el-button>
            </el-upload>
          </el-form-item>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button @click="dialogQualificationEdit = false">取 消</el-button>
          <el-button type="primary" @click="confirmQualification">确 定</el-button>
        </div>
      </el-dialog>
    </div>
  </div>
</template>

<script>
import { requestFN } from '@/utils/request'
import SelectTree from '@/components/SelectTree'
import Treeselect from '@riophae/vue-treeselect'
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
import { upload } from '@/utils/upload'
export default {
  components: { SelectTree, Treeselect },
  data() {
    return {
      COMPANY_AREA: '',
      dataForm: {
        MAIN_DEPARTMENT: '',
        businessLicenseDate: [],
        SUPERVISE_CORPINFO_DEPT_NAME: '',
        COMPETENT_DEPT_NAME: '',
        MANAGER_DEPARTMENT_NAME: '',
        RELEVANT_UNIT_NAME: '',
        SOCIAL_CODE: '',
        POSSESSION: '',
        INDUSTRY: '',
        ECONOMIC_TYPE: '',
        LONGITUDE: '',
        LATITUDE: '',
        BUSINESS_ADDRESS: '',
        CORP_SIZE: '',
        LEGAL_PERSON: '',
        LEGAL_PERSON_TEL: '',
        CONTACT_PERSON: '',
        CONTACT_TEL: '',
        ESTABLISHMENT_DATE: '',
        EMPLOY_NUM: '',
        TOTAL_ASSETS: '',
        REGISTERED_CAPITAL: '',
        EMPLOYMENT_FORM: '',
        SELECT_FORM: ''
      },
      employmentTypeList: [], // 用工形式数据
      selectFormList: [], // 选取形式数据
      ecnomicTypeList: [], // 经济类型数据
      enterpriseSizeList: [], // 企业规模数据
      industryList: [], // 行业类型数据
      treeData: [], // 主管部门
      config: config,
      corpStateList: [], // 企业经营状态
      hylxList: [], // 国民经济行业分类 (GB-T4754-2017)
      /** 安全生产管理制度 Begin */
      dialogQualificationEdit: false,
      dialogQualificationType: 'add',
      qualificationList: [],
      formQualification: {
        date: [],
        FILE_NAME: '',
        CORPQUALIFICATIONINFO_ID: '',
        CERTIFICATE_PERIOD: '',
        QUALIFICATION_PIC: [],
        CORPINFO_ID: this.$parent.CORPINFO_ID,
        QUALIFICATION_NAME: '',
        START_DATE: '',
        END_DATE: '',
        CERTIFICATE_NO: '',
        IMG_URL: ''
      },
      rulesQualification: {
        QUALIFICATION_NAME: [{ required: true, message: '资质正式名称不能为空', trigger: 'blur' }],
        date: [
          {
            type: 'array',
            required: true,
            message: '请选择日期区间',
            fields: {
              // tpye类型试情况而定,所以如果返回的是date就改成date,如果返回的是string就改成string
              0: { type: 'string', trigger: 'change', required: true, message: '请选择开始日期' },
              1: { type: 'string', trigger: 'change', required: true, message: '请选择结束日期' }
            },
            trigger: 'blur'
          }
        ],
        CERTIFICATE_NO: [{ required: true, message: '证书编号不能为空', trigger: 'blur' }],
        QUALIFICATION_PIC: [
          {
            type: 'array',
            required: true,
            message: '请上传照片',
            trigger: 'blur'
          }
        ]
      },
      /** 安全生产管理制度 End */
      // 地图相关
      // clientHeight: document.documentElement.clientHeight - 250,
      CORPINFO_ID: this.$parent.CORPINFO_ID,
      clientHeight: 600,
      loadingMap: true,
      listLoading: false,
      buttonloading: false,
      BMap: '',
      map: '',
      showMap: false,
      addressKeyword: '',
      pointLngLat: '',
      zoom: 10,
      dialogFormMap: false,
      LATITUDE: '',
      LONGITUDE: '',
      dialogImageUrl: '',
      dialogVisible: false,
      provinceList: [],
      cityList: [],
      countyList: [],
      scaleList: [],
      areaList: [], // 属地
      jjlxList: [],
      corpFoTypeList: [],
      trainDicList: [],
      OLDFOURTYPE: '',
      normalizer(node) {
        return {
          id: node.id,
          label: node.name,
          children: node.nodes
        }
      },
      defaultProps: {
        children: 'nodes',
        label: 'name',
        value: 'id'
      },
      // 上级企业选择
      dialogParentCorp: false,
      ECO_TYPE: '',
      ecoArr: [],
      ecoNameArr: [],
      businessLicenseImgs: [],
      INDUSTRY: '',
      // imgUrl: require('@/assets/images/map.png'),
      rules: {
        MAIN_DEPARTMENT: [{ required: true, message: '主管部门不能为空', trigger: 'blur' }],
        /* RELEVANT_UNIT_NAME: [
          { required: true, message: '单位名字不能为空', trigger: 'blur' },
          { validator: hasName, trigger: 'blur' }
        ], */
        /* SOCIAL_CODE: [
          { required: true, message: '统一社会信用代码不能为空', trigger: 'blur' },
          { validator: hasSocialCode, trigger: 'blur' },
          {
            pattern: /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/,
            message: '请输入正确的统一社会信用代码'
          }
        ], */
        // POSSESSION: [{ required: true, message: '属地不能为空', trigger: 'blur' }],
        // INDUSTRY: [{ required: true, message: '国民经济行业分类 (GB-T4754-2017)不能为空', trigger: 'blur' }],
        ECONOMIC_TYPE: [{ required: true, message: '请选择经济类型', trigger: 'blur' }],
        LONGITUDE: [{ required: true, message: '请选择经度', trigger: 'blur' }],
        LATITUDE: [{ required: true, message: '请选择纬度', trigger: 'blur' }],
        BUSINESS_ADDRESS: [{ required: true, message: '单位经营地址不能为空', trigger: 'blur' }],
        CORP_SIZE: [{ required: true, message: '企业规模不能为空', trigger: 'blur' }],
        LEGAL_PERSON: [{ required: true, message: '法人姓名不能为空', trigger: 'blur' }],
        LEGAL_PERSON_TEL: [
          { required: true, message: '法人电话不能为空', trigger: 'blur' },
          { min: 11, max: 11, message: '请输入11位手机号码', trigger: 'blur' },
          {
            pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
            message: '请输入正确的手机号码'
          }
        ],
        CONTACT_PERSON: [{ required: true, message: '主要负责人不能为空', trigger: 'blur' }],
        CONTACT_TEL: [
          { required: true, message: '主要负责人电话不能为空', trigger: 'blur' },
          { min: 11, max: 11, message: '请输入11位手机号码', trigger: 'blur' },
          {
            pattern: /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/,
            message: '请输入正确的手机号码'
          }
        ],
        ESTABLISHMENT_DATE: [{ required: true, message: '请选择成立日期', trigger: 'blur' }],
        EMPLOY_NUM: [
          { required: true, message: '职工人数不能为空', trigger: 'blur' },
          { min: 1, max: 5, message: '请正确的职工人数', trigger: 'blur' }
        ],
        TOTAL_ASSETS: [
          { required: true, message: '资产总额不能为空', trigger: 'blur' },
          { min: 1, max: 5, message: '请正确的资产总额', trigger: 'blur' }
        ],
        REGISTERED_CAPITAL: [
          { required: true, message: '注册资金不能为空', trigger: 'blur' },
          { min: 1, max: 5, message: '请正确的注册资金', trigger: 'blur' }
        ],
        EMPLOYMENT_FORM: [{ required: true, message: '请选择用工形式', trigger: 'blur' }],
        SELECT_FORM: [{ required: true, message: '请选择选取形式', trigger: 'blur' }]
      },
      propsCorpFoType: { value: 'id', id: 'id', label: 'label', children: 'children' },

      ecoProps: {
        lazy: true,
        lazyLoad: this.lazyLoad,
        value: 'id',
        id: 'id',
        label: 'label',
        children: 'children'
      },
      industryProps: {
        lazy: true,
        lazyLoad: this.lazyLoad,
        value: 'id',
        id: 'id',
        label: 'label',
        children: 'children',
        checkStrictly: false
      },
      areaProps: {
        lazy: true,
        lazyLoad: async(node, resolve) => {
          const resData = await this.getAreaDict(
            (node.data && node.data.DICTIONARIES_ID) || 'e725d2a91b8248f4b8f49889038df7de'
          )
          const { level } = node
          resolve(
            resData.map((item) => {
              return {
                DICTIONARIES_ID: item.DICTIONARIES_ID,
                BIANMA: item.BIANMA,
                NAME: item.NAME,
                leaf: level >= 3
              }
            })
          )
        },
        value: 'BIANMA',
        id: 'DICTIONARIES_ID',
        label: 'NAME',
        children: 'children',
        checkStrictly: true
      },
      // 主管部门
      mainDepartment: '',
      // 监管部门
      regulatoryDepartment: ''
    }
  },
  watch: {},
  async created() {
    const loading = this.$loading({
      lock: true,
      text: '读取中...',
      spinner: 'el-icon-loading',
      background: 'rgba(0, 0, 0, 0.7)'
    })
    await this.getTreeList()
    await this.getData()
    this.getDict()
    loading.close()
  },
  mounted() {
    // this.getNextTickData()
  },
  methods: {
    async getAreaDict(DICTIONARIES_ID) {
      const { list } = await requestFN(
        '/xgf/dictionaries/getAreaLevels',
        {
          DICTIONARIES_ID
        }
      )
      return list
    },
    cascaderChange(e) {
      // console.log('e', e)
      const newVal = e[e.length - 1]
      // console.log('选中', newVal[newVal.length - 1])
      if (newVal === '1' || newVal === '2' || newVal === '3' || newVal === '4') {
        this.$message({
          message: '请选择正确的属地...',
          type: 'error'
        })
        this.form.POSSESSION.pop()
        // console.log('移除', this.corpStateForm.REGULATORY_DEPARTMENT_ARR)
      }
    },
    getTreeList() {
      return new Promise((resolve, reject) => {
        requestFN(
          '/app/regulatory/user/departListTree',
          {}
        ).then((data) => {
          this.treeData = JSON.parse(data.zTreeNodes)
          resolve()
        }).catch((e) => {
          reject()
        })
      })
    },
    getData() {
      return new Promise((resolve) => {
        requestFN(
          '/xgf/corp/getCorpInfoDetail',
          {
            CORPINFO_ID: this.$parent.CORPINFO_ID,
            tm: new Date().getTime()
          }
        ).then((data) => {
          this.businessLicenseImgs = []
          if (data.licenseImgs) {
            data.licenseImgs.forEach(item => {
              this.businessLicenseImgs.push(this.config.fileUrl + item.FILEPATH)
            })
          }
          data.pd.SELECT_FORM = data.pd.SELECT_FORM.split(',')

          this.businessLicenseImgs = []
          if (data.licenseImgs) {
            data.licenseImgs.forEach(item => {
              this.businessLicenseImgs.push(this.config.fileUrl + item.FILEPATH)
            })
          }

          this.dataForm = Object.assign(this.dataForm, data.pd)
          this.dataForm.POSSESSION = []

          this.dataForm.businessLicenseDate = []
          this.dataForm.businessLicenseDate.push(this.dataForm.LICENSE_START)
          this.dataForm.businessLicenseDate.push(this.dataForm.LICENSE_END)
          if (data.pd.PROVINCE != '') this.dataForm.POSSESSION.push(data.pd.PROVINCE)
          if (data.pd.CITY != '') this.dataForm.POSSESSION.push(data.pd.CITY)
          if (data.pd.COUNTY != '') this.dataForm.POSSESSION.push(data.pd.COUNTY)
          if (data.pd.VILLAGE != '') this.dataForm.POSSESSION.push(data.pd.VILLAGE)
          this.qualificationList = data.qualification
          if (this.dataForm.COMPANY_AREA) {
            this.COMPANY_AREA = this.dataForm.COMPANY_AREA.replaceAll(',', ' / ')
          }

          this.dataForm.businessLicenseDate = []
          this.dataForm.businessLicenseDate.push(this.dataForm.LICENSE_START)
          this.dataForm.businessLicenseDate.push(this.dataForm.LICENSE_END)

          resolve()
        }).catch((e) => {
          this.$message({
            message: '操作失败',
            type: 'error'
          })
        })
      }).catch((e) => {
        this.listLoading = false
      })
    },
    getNextTickData() {
      // this.$nextTick(() => {
      //   this.$refs.ecoCascader.presentText = this.censusRegisterPlaceName
      // })
      if (this.form.CORP_OF_TYPE2 && this.form.CORP_OF_TYPE2 != '') {
        const node = {}
        node.id = this.form.CORP_OF_TYPE2
        this.$nextTick(() => {
          this.$refs.corpOfTypeRef.handleNodeClick(node)
        })
      } else if (this.form.CORP_OF_TYPE && this.form.CORP_OF_TYPE != '') {
        const node = {}
        node.id = this.form.CORP_OF_TYPE
        this.$nextTick(() => {
          this.$refs.corpOfTypeRef.handleNodeClick(node)
        })
      }
      // const nodea = {}
      // nodea.id = this.form.TRAINTYPE
      // this.$nextTick(() => { // 此处使用这个可以等节点渲染后再获取节点
      //   this.$refs.keyHyRef.handleNodeClick(nodea)
      // })
      this.$forceUpdate()
    },
    /** 上级企业选择 Begin */
    handleSelectParentCorp() {
      this.dialogParentCorp = true
    },
    defineCorp() {
      this.$refs.corpSelect.defineCorp()
    },
    assignCorpParent(corp) {
      this.form.CORP_PARENT = corp.CORPINFO_ID
      this.form.CORP_PARENT_NAME = corp.CORP_NAME
      this.form.CORP_GROUP = this.validStr(corp.CORP_GROUP) ? corp.CORP_GROUP : corp.CORPINFO_ID
      this.form.CORP_GROUP_NAME = this.validStr(corp.CORP_GROUP_NAME) ? corp.CORP_GROUP_NAME : corp.CORP_NAME
      this.form.CORP_PARENTS = (this.validStr(corp.CORP_PARENTS) ? corp.CORP_PARENTS : ',') + corp.CORPINFO_ID + ','
      // console.log('this.form.CORP_PARENT', this.form.CORP_PARENT)
      // console.log('this.form.CORP_PARENT_NAME', this.form.CORP_PARENT_NAME)
      // console.log('this.form.CORP_GROUP', this.form.CORP_GROUP)
      // console.log('this.form.CORP_GROUP_NAME', this.form.CORP_GROUP_NAME)
      // console.log('this.form.CORP_PARENTS', this.form.CORP_PARENTS)
      this.dialogParentCorp = false
    },
    /** 上级企业选择 End */
    // 加载级联的方法
    lazyLoad(nodeValue, resolve) {
      if (nodeValue.data && (!nodeValue.children || nodeValue.children.length == 0)) {
        this.getDictByDicId(nodeValue.data.id).then(data => {
          resolve(data)
        })
      } else {
        resolve(null)
      }
    },
    handleMap() {
      this.dialogFormMap = true
      this.LATITUDE = this.dataForm.LATITUDE
      this.LONGITUDE = this.dataForm.LONGITUDE
    },
    getClickInfo(e) {
      this.LONGITUDE = e.point.lng
      this.LATITUDE = e.point.lat
    },
    setPosition() {
      this.dialogFormMap = false
      this.dataForm.LATITUDE = this.LATITUDE
      this.dataForm.LONGITUDE = this.LONGITUDE
    },
    // 提交表单
    confirm(type) {
      // const _this = this
      this.$refs.dataForm.validate(valid => {
        if (valid) {
          const loading = this.$loading({
            lock: true,
            text: '提交中...',
            spinner: 'el-icon-loading',
            background: 'rgba(0, 0, 0, 0.7)'
          })
          /* if (this.dataForm.POSSESSION && this.dataForm.POSSESSION.length > 0) {
            this.dataForm.PROVINCE = this.dataForm.POSSESSION[0] || ''
            this.dataForm.CITY = this.dataForm.POSSESSION[1] || ''
            this.dataForm.COUNTY = this.dataForm.POSSESSION[2] || ''
            this.dataForm.VILLAGE = this.dataForm.POSSESSION[3] || ''
            this.dataForm.STREET = this.dataForm.POSSESSION[4] || ''
            this.dataForm.COMPANY_AREA = this.$refs.POSSESSION.getCheckedNodes()[0].pathLabels ? this.$refs.POSSESSION.getCheckedNodes()[0].pathLabels.join(',') : ''
          }
          if (_this.dataForm.INDUSTRYALL && _this.dataForm.INDUSTRYALL.length > 0) {
            _this.dataForm.CORP_TYPE = _this.dataForm.INDUSTRYALL[0] || ''
            _this.dataForm.CORP_TYPE2 = _this.dataForm.INDUSTRYALL[1] || ''
            _this.dataForm.CORP_TYPE3 = _this.dataForm.INDUSTRYALL[2] || ''
            _this.dataForm.CORP_TYPE4 = _this.dataForm.INDUSTRYALL[3] || ''
            _this.dataForm.CORP_TYPE_NAME = _this.$refs.industryCascader.getCheckedNodes()[0].pathLabels ? _this.$refs.industryCascader.getCheckedNodes()[0].pathLabels.join('/') : ''
          } */

          const formData = new FormData()
          Object.keys(this.dataForm).map(key => {
            formData.append(key, this.dataForm[key])
          })
          formData.append('saveType', type)
          this.buttonloading = true
          upload(
            '/corpinfo/saveEdit',
            formData
          ).then((data) => {
            loading.close()
            this.$message({
              message: '操作成功',
              type: 'success'
            })
            this.buttonloading = false
            // this.$parent.activeName = 'CorpView'
          }).catch((e) => {
            loading.close()
            this.buttonloading = false
            this.$message({
              message: '操作失败',
              type: 'error'
            })
          })
        }
      })
    },
    // back() {
    //   this.$parent.activeName = 'CorpView'
    // },

    getTrainDicList() {
      return new Promise(resolve => {
        requestFN(
          '/dictionaries/listAllDictToParId',
          {
            parentId: '052369aa22d242118236cde52d0c67ea'
          }
        ).then((data) => {
          resolve()
          this.trainDicList = JSON.parse(data.zTreeNodes)
        }).catch((e) => {
          this.listLoading = false
        })
      })
    },
    getProvinceList() {
      requestFN(
        '/dictionaries/getLevels',
        {
          DICTIONARIES_ID: 'e725d2a91b8248f4b8f49889038df7de'
        }
      ).then((data) => {
        this.provinceList = data.list
        // this.provinceList = [{ DICTIONARIES_ID: 'acd05c42faf346db9a0d067402b97c10', BIANMA: '130000', NAME: '河北省' }]
      }).catch((e) => {
      })
    },
    async getCityList() {
      var dictID = await this.getDictID(this.form.PROVINCE)
      requestFN(
        '/dictionaries/getLevels',
        {
          DICTIONARIES_ID: dictID
        }
      ).then((data) => {
        this.cityList = data.list
      }).catch((e) => {
      })
    },
    async getCountyList() {
      var dictID = await this.getDictID(this.form.CITY)
      requestFN(
        '/dictionaries/getLevels',
        {
          DICTIONARIES_ID: dictID
        }
      ).then((data) => {
        this.countyList = data.list
      }).catch((e) => {
      })
    },
    getDictID(BIANMA) {
      return new Promise((resolve) => {
        requestFN(
          '/dictionaries/findByBianma',
          {
            BIANMA: BIANMA
          }
        ).then((data) => {
          resolve(data.DICTIONARIES_ID)
        }).catch((e) => {
        })
      })
    },
    getDict() {
      requestFN(
        '/xgf/dictionaries/getLevels',
        {
          DICTIONARIES_ID: '720992d898bf4fd7b44bf0ba1f1bbb88'
        }
      ).then((data) => {
        this.employmentTypeList = data.list
      })
      requestFN(
        '/xgf/dictionaries/getLevels',
        {
          DICTIONARIES_ID: '9ce2e9a4636b4d41b460ce16c346d497'
        }
      ).then((data) => {
        this.selectFormList = data.list
      })
      requestFN(
        '/xgf/dictionaries/getLevels',
        {
          DICTIONARIES_ID: '688d2cf1c6cd4dab999a0106e09aec83'
        }
      ).then((data) => {
        this.ecnomicTypeList = data.list
      })
      requestFN(
        '/xgf/dictionaries/getLevels',
        {
          DICTIONARIES_ID: '37b045e160c04ddba851073b4e510cc9'
        }
      ).then((data) => {
        this.enterpriseSizeList = data.list
      })
      requestFN(
        '/dictionaries/getLevels',
        {
          DICTIONARIES_ID: 'f2598ba72e864eadabf0ca4b664d26b9'
        }
      ).then((data) => {
        this.industryList = data.list
      })
    },

    // 获取数据字典数据
    getDictByDicId(dicId) {
      /* var dicListVal = []
      return new Promise((resolve) => {
        let id = ''
        if (!dicId) {
          id = '0'
        } else {
          id = dicId
        }
        requestFN(
          '/dictionaries/getLevelsAndSCount',
          {
            DICTIONARIES_ID: id
          }
        ).then((data) => {
          if (data.list.length > 0) {
            dicListVal = data.list.map((e) => {
              if (e.zcount == '0') {
                return { value: e.DICTIONARIES_ID.toString(), numValue: e.BIANMA.toString(), label: e.NAME, id: e.DICTIONARIES_ID, leaf: true }
              } else {
                return { value: e.DICTIONARIES_ID.toString(), numValue: e.BIANMA.toString(), label: e.NAME, id: e.DICTIONARIES_ID, children: [], leaf: false }
              }
            })
          } else {
            dicListVal = undefined
          }
          return resolve(dicListVal)
        }).catch((e) => {
        })
      }) */
    },
    // 地图相关
    mapOpen() {
      this.top = this.getScrollTop()
      if (this.top) {
        this.setScrollTop(0)
      }
    },
    // 关闭地图后调用
    mapClose() {
      this.setScrollTop(this.top)
      this.top = 0
      this.showMap = false
    },
    getScrollTop() {
      let scrollTop = 0
      if (document.documentElement && document.documentElement.scrollTop) {
        scrollTop = document.documentElement.scrollTop
      } else if (document.body) {
        scrollTop = document.body.scrollTop
      }
      return scrollTop
    },
    setScrollTop(top) {
      if (!isNaN(top)) {
        if (document.documentElement && document.documentElement.scrollTop !== undefined) {
          document.documentElement.scrollTop = top
        } else if (document.body) {
          document.body.scrollTop = top
        }
      }
    },
    // 地图初始化
    handler({ BMap, map }) {
      this.mapOpen()
      this.BMap = BMap
      this.map = map
      this.loadingMap = true
      var geolocation = new BMap.Geolocation()
      const myGeo = new BMap.Geocoder()
      var $this = this
      // 调用百度地图api 中的获取当前位置接口
      geolocation.getCurrentPosition(function(r) {
        myGeo.getLocation(new BMap.Point(r.point.lng, r.point.lat), function(result) {
          if (result) {
            $this.loadingMap = false
            $this.$set($this, 'pointLngLat', { lng: result.point.lng, lat: result.point.lat })
            map.enableScrollWheelZoom(true) // 开启鼠标滚轮缩放,默认关闭
            $this.setCenter({ BMap, map })
          }
        })
      })
    },
    // 搜索地图
    querySearch(queryString, cb) {
      var options = {
        onSearchComplete: function(results) {
          if (local.getStatus() === 0) {
            // 判断状态是否正确
            var s = []
            for (var i = 0; i < results.getCurrentNumPois(); i++) {
              var x = results.getPoi(i)
              var item = { value: x.address + x.title, point: x.point }
              s.push(item)
              cb(s)
            }
          } else {
            cb()
          }
        }
      }
      var local = new this.BMap.LocalSearch(this.map, options)
      local.search(queryString)
    },
    handleSelect(item) {
      var { point } = item
      this.map.clearOverlays() // 清除地图上所有覆盖物
      this.map.centerAndZoom(point, this.zoom)
      const marker = new this.BMap.Marker(point) // 创建标注
      this.map.addOverlay(marker) // 将标注添加到地图中
      marker.enableDragging() // 可拖拽
      this.LONGITUDE = point.lng
      this.LATITUDE = point.lat
    },
    // 设置打开中心位置
    setCenter({ BMap, map }) {
      var lng = ''
      var lat = ''
      if (this.dataForm.LONGITUDE == '' || this.dataForm.LATITUDE == '') {
        lng = '119.525971'
        lat = '39.894727'
      } else {
        lng = this.dataForm.LONGITUDE
        lat = this.dataForm.LATITUDE
      }
      var point = new BMap.Point(lng, lat)
      // var point = new BMap.Point(this.form.LONGITUDE, this.form.LATITUDE)
      const zoom = map.getZoom()
      setTimeout(() => {
        map.centerAndZoom(point, zoom)
      }, 0)
      // var marker = new BMap.Marker(point) // 创建标注
      // map.addOverlay(marker) // 将标注添加到地图中
    },
    handleSh() {
      this.$confirm('确定要通过吗?', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        const formData = new FormData()
        formData.append('MAIN_DEPARTMENT', this.dataForm.MAIN_DEPARTMENT)
        formData.append('POSSESSION', this.dataForm.POSSESSION)
        formData.append('RELEVANT_UNIT_NAME', this.dataForm.RELEVANT_UNIT_NAME)
        formData.append('EMPLOYMENT_FORM', this.dataForm.EMPLOYMENT_FORM)
        formData.append('SELECT_FORM', this.dataForm.SELECT_FORM)
        formData.append('SOCIAL_CODE', this.dataForm.SOCIAL_CODE)
        formData.append('COMPANY_AREA', this.dataForm.COMPANY_AREA)

        formData.append('CORPINFO_ID', this.$parent.CORPINFO_ID)
        formData.append('STATE', '2')
        formData.append('ROLE_ID', '1')
        upload(
          '/relevantunits/examine',
          formData
        ).then((data) => {
          this.$message.success('通过成功')
          this.$parent.activeName = 'List'
          this.back()
        })
      })
    },
    handleBtg() {
      this.$confirm('确定要不通过吗?', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        const formData = new FormData()
        formData.append('MAIN_DEPARTMENT', this.dataForm.MAIN_DEPARTMENT)
        formData.append('POSSESSION', this.dataForm.POSSESSION)
        formData.append('RELEVANT_UNIT_NAME', this.dataForm.RELEVANT_UNIT_NAME)
        formData.append('EMPLOYMENT_FORM', this.dataForm.EMPLOYMENT_FORM)
        formData.append('SELECT_FORM', this.dataForm.SELECT_FORM)
        formData.append('SOCIAL_CODE', this.dataForm.SOCIAL_CODE)
        formData.append('COMPANY_AREA', this.dataForm.COMPANY_AREA)

        formData.append('CORPINFO_ID', this.$parent.CORPINFO_ID)
        formData.append('STATE', '3')
        formData.append('ROLE_ID', 'bc85a526809f43c29c670c057bf25165')

        upload(
          '/relevantunits/examine',
          formData
        ).then((data) => {
          this.$message.success('审核成功')
          this.$parent.activeName = 'List'
          this.back()
        })
      })
    },
    back() {
      this.$parent.activeName = 'List'
    },
    // 添加资质信息dialog
    handleQualificationAdd() {
      this.dialogQualificationType = 'add'
      this.resetQualificationForm()
      this.dialogQualificationEdit = true
    },
    // 修改资质信息
    handleQualificationEdit(ID) {
      this.dialogQualificationType = 'edit'
      this.formQualification = {
        date: [],
        FILE_NAME: '',
        CORPQUALIFICATIONINFO_ID: '',
        CERTIFICATE_PERIOD: '',
        QUALIFICATION_PIC: [],
        CORPINFO_ID: this.$parent.CORPINFO_ID,
        QUALIFICATION_NAME: '',
        START_DATE: '',
        END_DATE: '',
        CERTIFICATE_NO: '',
        IMG_URL: ''
      }
      requestFN(
        '/corpqualificationinfo/goEdit',
        {
          CORPQUALIFICATIONINFO_ID: ID
        }
      ).then((data) => {
        this.formQualification = Object.assign(this.formQualification, data.pd) // copy obj
        this.$set(this.formQualification, 'date', [data.pd.START_DATE, data.pd.END_DATE])
        var url = config.fileUrl + data.pd.IMG_URL
        this.formQualification.QUALIFICATION_PIC.push({
          'url': url
        })
      }).catch((e) => {
        this.listLoading = false
      })
      this.dialogQualificationEdit = true
    },
    // 保存资质信息
    confirmQualification() {
      this.$refs.formQualification.validate(valid => {
        if (valid) {
          this.listLoading = true
          const formData = new FormData()
          Object.keys(this.formQualification).map(key => {
            formData.append(key, this.formQualification[key])
          })
          // qualificationPicFileRef
          if (this.$refs['qualificationPicFileRef'].uploadFiles.length > 0) {
            for (let i = 0; i < this.$refs['qualificationPicFileRef'].uploadFiles.length; i++) {
              if (this.$refs['qualificationPicFileRef'].uploadFiles[i]) {
                formData.append('qualificationPic', this.$refs['qualificationPicFileRef'].uploadFiles[i].raw)
              }
            }
          }
          upload(
            '/corpqualificationinfo/' + this.dialogQualificationType,
            formData
          ).then((data) => {
            this.$message({
              message: '保存成功',
              type: 'success'
            })
            this.listLoading = false
            this.dialogQualificationEdit = false
            this.formQualification = {
              date: [],
              FILE_NAME: '',
              CORPQUALIFICATIONINFO_ID: '',
              CERTIFICATE_PERIOD: '',
              QUALIFICATION_PIC: [],
              CORPINFO_ID: this.$parent.CORPINFO_ID,
              QUALIFICATION_NAME: '',
              START_DATE: '',
              END_DATE: '',
              CERTIFICATE_NO: '',
              IMG_URL: ''
            }
          }).catch((e) => {
            this.listLoading = false
          })
        } else {
          return false
        }
      })
    },
    // 删除资质信息
    delQualification(id) {
      this.$confirm('确定要删除吗?', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.listLoading = true
        requestFN(
          '/corpqualificationinfo/delete',
          {
            CORPQUALIFICATIONINFO_ID: id
          }
        ).then(() => {
          this.$message({
            message: '删除成功',
            type: 'success'
          })
          this.listLoading = false
          this.qualificationList = []
        }).catch((e) => {
          this.listLoading = false
        })
      }).catch(() => {
      })
    },
    // 清空数据
    resetQualificationForm() {
      this.formQualification = {
        date: [],
        FILE_NAME: '',
        CORPQUALIFICATIONINFO_ID: '',
        CERTIFICATE_PERIOD: '',
        QUALIFICATION_PIC: [],
        CORPINFO_ID: this.$parent.CORPINFO_ID,
        QUALIFICATION_NAME: '',
        START_DATE: '',
        END_DATE: '',
        CERTIFICATE_NO: '',
        IMG_URL: ''
      }
    },
    // 资质证书照片change
    qualificationPicFileChange(file) {
      this.formQualification.FILE_NAME = file.name
      this.formQualification.QUALIFICATION_PIC.push(file)
    },
    // 资质图片移除
    qualificationPicFileRemove(file, fileList) {
      this.formQualification.FILE_NAME = ''
      this.formQualification.QUALIFICATION_PIC = fileList
    },
    // 资质图片预览
    handlePictureCardView(row) {
      this.dialogImageUrl = config.fileUrl + row.IMG_URL
      this.dialogVisible = true
    },
    // 资质有效期change事件
    handlePeriodChange(data) {
      this.formQualification.START_DATE = data[0]
      this.formQualification.END_DATE = data[1]
      this.formQualification.CERTIFICATE_PERIOD = data[0] + '-' + data[1]
    }
    /** 资质信息 End */
  } // methods 结束
}
</script>

<style lang="sass" scoped>
.avatar-uploader
  ul
    margin: 0
    li
      padding: 0
.el-dialog__body
  padding: 0
.map-flex
  display: flex
  width: 500px
  align-items: center

.ud-flex
  display: flex
.form-group
  display: flex
  align-items: center
  .form-label
    padding: 0px 15px
    font-size: 14px
    width: 240px
    font-weight: 400
    text-align: right
    margin-bottom: 18px
    .star
      color: red
      padding-right: 4px
  .input-block
    display: flex

.disContent
  display: flex
  align-items: center
  flex-wrap: wrap
  .img-div
    position: relative
    margin: 0 10px 0px 0
    width: 108px
    height: 108px
    border-radius: 4px
    overflow: hidden
    &>img
      width: 100%
      height: 100%

.disContent-hide
  position: absolute
  width: 100%
  height: 100%
  border-radius: 4px
  background-color: rgba(48, 48, 48, 0.59)
  display: none
  top: 0
  left: 0
  line-height: 32px

  .Delete
    position: absolute
    bottom: 14px
    right: 10px
    font-size: 16px
    color: white
    cursor: pointer
  .yuLan
    position: absolute
    bottom: 23px
    right: 50px
    font-size: 16px
    color: white
    cursor: pointer
    .yuLanImg
      position: absolute
      bottom: 0
      right: 0
      width: 100%
      height: 100%
      opacity: 0

.img-div:hover .disContent-hide
  display: block

  .pitchCss
    border: 1px solid #202e78
    transition: all linear 0.1s
    width: 116px
    height: 116px

</style>

<style lang="scss" scoped>
.uo-flex {
  display: flex;
}
</style>

