<template>
  <div id="category">
    <!--头部-->
    <!--      <navbar title="企业详情"></navbar>-->
    <div class="header-title">
      <span class="header-title-return" @click="returnClick"><van-icon name="arrow-left" /></span>
      <div class="header-title-name">企业详情</div>
    </div>

    <div class="manage-body-head">
      <div style="height: 6.5rem">
        <div class="ft-left wt-15-per hg-100-per">
          <div v-if="businessInfo.colorNum == 1" class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-2372eb">
            <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')"
              size="1.5rem" />
          </div>
          <div v-else-if="businessInfo.colorNum == 2" class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-ee8c15">
            <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')"
              size="1.5rem" />
          </div>
          <div v-else-if="businessInfo.colorNum == 3" class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-11c95f">
            <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')"
              size="1.5rem" />
          </div>
          <div v-else-if="businessInfo.colorNum == 4" class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-e21183">
            <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')"
              size="1.5rem" />
          </div>
          <div v-else-if="businessInfo.colorNum == 5" class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-fde809">
            <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')"
              size="1.5rem" />
          </div>
          <div v-else-if="businessInfo.colorNum == 6" class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-17b9d7">
            <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')"
              size="1.5rem" />
          </div>
          <div v-else-if="businessInfo.colorNum == 7" class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-db2c2c">
            <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')"
              size="1.5rem" />
          </div>
          <div v-else-if="businessInfo.colorNum == 8" class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-9232db">
            <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')"
              size="1.5rem" />
          </div>
          <!--              <div class="mg-lt-5 hg-25-rem wt-2-rem firm-icon-body bg-2372eb">-->
          <!--                <van-icon style="top: 7px" class="firm-icon" :name="require('@/images/part_one/icon_company.png')" size="1.5rem" />-->
          <!--              </div>-->
        </div>
        <div class="ft-right wt-84-per"><span class="ft-left fs-16 fw-bold" style="width: 85%">{{ businessInfo.companyName
        }}</span><van-tag class="ft-right fs-13" color="#E7F9EF" text-color="#11C95F">{{ businessInfo.status
}}</van-tag></div>
        <div class="ft-right wt-84-per hg-13-rem cl-gray"><span class="ft-left fs-13">{{ businessInfo.creditCode
        }}</span><span class="ft-right fs-13" @click="update()">{{ businessInfo.updatedDate }}</span></div>
        <div class="ft-right wt-84-per hg-13-rem"><van-tag color="#E9F1FD" text-color="#2372EB">{{ businessInfo.industry
        }}</van-tag></div>
      </div>
      <div class="firm-info">
        <van-grid :column-num="3" :border="false">
          <van-grid-item style="flex-basis: 30% !important" class="border-right-operName">
            <div class="van-item-style">法定代表人</div>
            <div class="fs-14 fw-bold">{{ businessInfo.operName }}</div>
          </van-grid-item>
          <van-grid-item style="flex-basis: 40% !important" class="border-right">
<!--                <div class="van-item-style" :style="businessInfo.registCapi.length > 14?'padding-top: 1.1rem':''">注册资本</div>-->
            <div class="van-item-style">注册资本</div>
            <div class="fs-14 fw-bold" style="text-align: center">{{ businessInfo.registCapiValue !==
              null ? `${businessInfo.registCapiValue}${businessInfo.registCapiUnit}` : '未披露' }}</div>
          </van-grid-item>
          <van-grid-item style="flex-basis: 30% !important">
            <div class="van-item-style">成立时间</div>
            <div class="fs-14 fw-bold">{{ businessInfo.startDate }}</div>
          </van-grid-item>
        </van-grid>
      </div>
      <div class="pd-10">
        <span class="fs-14 cl-gray">地址：</span>
        <span class="fs-14">{{ businessInfo.address }}</span>
        <span v-if="businessInfo.address !== ''"><van-tag class="mg-lt-5" color="#E9F1FD" @click="copyOk(businessInfo.address)" text-color="#2372EB">复制</van-tag></span>
      </div>
      <div class="pd-10">
        <span class="fs-15" style="color: #595959"><van-icon name="phone-o" class="mg-rt-5" />{{ businessInfo.phoneNumber
        }}</span>
        <span class="fs-15 ft-right">
          <van-tag color="#E9F1FD" text-color="#2372EB" @click="toastOn('net')"><van-icon name="tv-o"
              class="mg-rt-5" />官网</van-tag>
          <van-tag class="mg-lt-5" color="#E9F1FD" @click="toastOn('email')" text-color="#2372EB"><van-icon
              name="envelop-o" class="mg-rt-5" />邮箱</van-tag>
<!--          <van-tag class="mg-lt-5" color="#E9F1FD" @click="toastOn('address')" text-color="#2372EB"><van-icon-->
<!--              name="location-o" class="mg-rt-5" />复制</van-tag>-->
        </span>
      </div>
    </div>
    <div class="manage-body">
      <div class="fs-15 fw-bold mg-tp-10 pd-10">
        基本信息
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item v-for="(item, index) in jiben.slice(0, 4)" :key="index" icon="" text=""
            @click="gridType(item.name, item.num)" :class="[index != 3 ? 'border-right' : '']">
            <img :src="item.num !== 0 || item.num == -1?item.icon:item.icon_grey" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ item.name }}</div>
            <span v-if="item.num !== 0 && item.num !== -1" class="fs-14 badge">{{ item.num }}</span>
          </van-grid-item>
        </van-grid>
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item icon="" text="" @click="gridType(jiben[4].name, jiben[4].num)" class="border-right">
            <img :src="jiben[4].num !== 0?jiben[4].icon:jiben[4].icon_grey" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ jiben[4].name }}</div>
            <span v-if="jiben[4].num !== 0" class="fs-14 badge">{{ jiben[4].num }}</span>
          </van-grid-item>
        </van-grid>
      </div>

    </div>
    <div class="manage-body">
      <div class="fs-15 fw-bold mg-tp-10 pd-10">
        司法涉诉
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item v-for="(item, index) in sifa.slice(0, 4)" :key="index" icon="" text=""
            @click="gridType(item.name, item.num)" :class="[index != 3 ? 'border-right' : '']">
            <van-icon :name="item.num !== 0?item.icon:item.icon_grey" size="28px" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ item.name }}</div>
            <span v-if="item.num !== 0" class="fs-14 badge">{{ item.num }}</span>
          </van-grid-item>
        </van-grid>
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item v-for="(item, index) in sifa.slice(4, sifa.length)" :key="index" icon="" text=""
            @click="gridType(item.name, item.num)" class="border-right">
            <van-icon :name="item.num !== 0?item.icon:item.icon_grey" size="28px" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ item.name }}</div>
            <span v-if="item.num !== 0" class="fs-14 badge">{{ item.num }}</span>
          </van-grid-item>
        </van-grid>
      </div>
    </div>
    <div class="manage-body">
      <div class="fs-15 fw-bold mg-tp-10 pd-10">
        经营风险
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item v-for="(item, index) in fengxian.slice(0, 4)" :key="index" icon="" text="" @click="gridType(item.name, item.num)"
            :class="[index != 3 ? 'border-right' : '']">
            <van-icon :name="item.num !== 0?item.icon:item.icon_grey" size="28px" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ item.name }}</div>
            <span v-if="item.num !== 0" class="fs-14 badge">{{ item.num }}</span>
          </van-grid-item>
        </van-grid>
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item v-for="(item, index) in fengxian.slice(4, fengxian.length)" :key="index" icon="" text="" @click="gridType(item.name, item.num)"
            class="border-right">
            <van-icon :name="item.num !== 0?item.icon:item.icon_grey" size="28px" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ item.name }}</div>
            <span v-if="item.num !== 0" class="fs-14 badge">{{ item.num }}</span>
          </van-grid-item>
        </van-grid>
      </div>
    </div>
    <div class="manage-body">
      <div class="fs-15 fw-bold mg-tp-10 pd-10">
        经营动态
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item v-for="(item, index) in dongtai.slice(0, 4)" :key="index" icon="" text="" @click="gridType(item.name, item.num)"
          :class="[index != 3 ? 'border-right' : '']">
            <van-icon :name="item.num !== 0 || item.num == -1?item.icon:item.icon_grey" size="28px" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ item.name }}</div>
            <span v-if="item.num !== 0 && item.num !== -1" class="fs-14 badge">{{ item.num }}</span>
          </van-grid-item>
        </van-grid>
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item v-for="(item, index) in dongtai.slice(4, dongtai.length)" :key="index" icon="" text="" @click="gridType(item.name, item.num)"
          class="border-right">
            <van-icon :name="item.num !== 0?item.icon:item.icon_grey" size="28px" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ item.name }}</div>
            <span v-if="item.num !== 0" class="fs-14 badge">{{ item.num }}</span>
          </van-grid-item>
        </van-grid>
      </div>
    </div>
    <div class="manage-body" style="padding-bottom: 50px;">
      <div class="fs-15 fw-bold mg-tp-10 pd-10">
        知识产权
      </div>
      <div class="border-top">
        <van-grid class="cl-blue" :column-num="4" :border="false">
          <van-grid-item v-for="(item, index) in chanquan" :key="index" icon="" text="" @click="gridType(item.name, item.num)"
            :class="[index != 3 ? 'border-right' : '']">
            <van-icon :name="item.num !== 0?item.icon:item.icon_grey" size="28px" />
            <div class="fw-bold cl-gray fs-12 mg-tp-8">{{ item.name }}</div>
            <span v-if="item.num !== 0" class="fs-14 badge">{{ item.num }}</span>
          </van-grid-item>
        </van-grid>
      </div>
    </div>

    <div class="fs-15 fw-bold cl-blue concern" @click="concern()">
      <van-icon class="mg-rt-5" :name="concernStatus == true ? 'star' : 'star-o'" />{{ concernStatus == true ? '已关注' :
        '关注' }}
    </div>
    <van-action-sheet v-model="sheetShow" title="选择分组">
      <van-radio-group v-model="updateResult">
        <van-cell-group style="padding-bottom: 10px">
          <van-cell clickable style="padding-bottom: 20px" @click="addGroup">
            <template #title>
              <div style="margin-top: 15px;font-size: 15px;color:#2372EB">+ 新建分组</div>
            </template>
          </van-cell>
          <van-cell v-for="(item, index) in groupList" clickable :key="index" style="padding-bottom: 20px">
            <template #title>
              <div style="margin-top: 15px;font-size: 15px;font-weight: bold;">{{ item.groupName }}</div>
            </template>
            <template #right-icon>
              <van-radio :name="index" />
            </template>
          </van-cell>
        </van-cell-group>
        <van-button plain color="#2372eb" @click="updateSure"
          style="width: 90%;border-radius: 5px;margin-left: 5%;">确定</van-button>
      </van-radio-group>
    </van-action-sheet>
    <van-dialog v-model="show" title="新建分组" show-cancel-button @confirm="addGroupOk()">
      <van-field
        style="height: 30px;width: 80%;height: 30px;margin-top: 20px;margin-bottom: 20px;margin-left: 10%;background-color: #F7F8FA;"
        v-model="groupName" label="" placeholder="请输入分组名称" maxlength="12" />
    </van-dialog>
  </div>
</template>

<script>
// 2. 引入滚动组件
import BScroll from 'better-scroll'
import { Button, Col, Row, Icon, Field, Tag, Image, Toast, ActionSheet, RadioGroup, Radio } from 'vant';
import { postBaseInfo } from "@/service/api/customerDashboard";
import {
  postBatchDelateAttention,
  postQueryByName,
  postAddAttentionCompany,
  postCancelGuanzhu,
  postUpdateAttentionCompany, postAddGroupInfo
} from "@/service/api/category";
import navbar from '../../components/navbar/navbar.vue';



export default {
  name: "CustomerDashboard",
  data() {
    return {
      // 是否显示正在加载
      showLoading: true,
      jiben: [
        {
          icon: require('@/images/part_two/icon_business.png'),
          icon_grey: require('@/images/part_two/icon_business_grey.png'),
          name: '工商信息',
          num: -1
        },
        {
          icon: require('@/images/part_two/icon_executive.png'),
          icon_grey: require('@/images/part_two/icon_executive_grey.png'),
          name: '高管信息',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_shareholder.png'),
          icon_grey: require('@/images/part_two/icon_shareholder_grey.png'),
          name: '股东信息',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_history.png'),
          icon_grey: require('@/images/part_two/icon_history_grey.png'),
          name: '历史变更',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_annual_report.png'),
          icon_grey: require('@/images/part_two/icon_annual_report_grey.png'),
          name: '年报信息',
          num: 0
        }
      ],
      sifa: [
        {
          icon: require('@/images/part_two/icon_administrative_license.png'),
          icon_grey: require('@/images/part_two/icon_administrative_license_grey.png'),
          name: '全部涉诉',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_credit.png'),
          icon_grey: require('@/images/part_two/icon_credit_grey.png'),
          name: '失信信息',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_debtor.png'),
          icon_grey: require('@/images/part_two/icon_justice_grey.png'),
          name: '被执行人信息',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_justice.png'),
          icon_grey: require('@/images/part_two/icon_justice_grey.png'),
          name: '裁判文书',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_court-announcement.png'),
          icon_grey: require('@/images/part_two/icon_court-announcement_grey.png'),
          name: '法院公告',
          num: 0
        },
        // {
        //     icon: require('@/images/part_two/icon_court_session.png'),
        //     name: '开庭公告',
        //     num: 0
        // },
        {
          icon: require('@/images/part_two/icon_limitation.png'),
          icon_grey: require('@/images/part_two/icon_limitation_grey.png'),
          name: '限制高消费',
          num: 0
        }
      ],
      fengxian: [
        {
          icon: require('@/images/part_two/icon_abnormal_business.png'),
          icon_grey: require('@/images/part_two/icon_abnormal_business_grey.png'),
          name: '经营异常',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_administrative_penalty.png'),
          icon_grey: require('@/images/part_two/icon_administrative_penalty_grey.png'),
          name: '行政处罚',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_offence.png'),
          icon_grey: require('@/images/part_two/icon_offence_grey.png'),
          name: '违法行为',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_tax_violations.png'),
          icon_grey: require('@/images/part_two/icon_tax_violations_grey.png'),
          name: '税收违法',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_tax_arrears.png'),
          icon_grey: require('@/images/part_two/icon_tax_arrears_grey.png'),
          name: '欠税公告',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_judicial_auction.png'),
          icon_grey: require('@/images/part_two/icon_judicial_auction_grey.png'),
          name: '司法拍卖',
          num: 0
        }
      ],
      dongtai: [
        {
          icon: require('@/images/part_two/icon_administrative_license.png'),
          icon_grey: require('@/images/part_two/icon_administrative_license_grey.png'),
          name: '行政许可',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_bidding.png'),
          icon_grey: require('@/images/part_two/icon_bidding_grey.png'),
          name: '招投标信息',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_export_and_import.png'),
          icon_grey: require('@/images/part_two/icon_export_and_import_grey.png'),
          name: '进出口情况',
          num: -1
        },
        {
          icon: require('@/images/part_two/icon_news.png'),
          icon_grey: require('@/images/part_two/icon_news_grey.png'),
          name: '舆情信息',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_financing.png'),
          icon_grey: require('@/images/part_two/icon_financing_grey.png'),
          name: '融资信息',
          num: 0
        }
      ],
      chanquan: [
        {
          icon: require('@/images/part_two/icon_trademark.png'),
          icon_grey: require('@/images/part_two/icon_trademark_grey.png'),
          name: '商标',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_patent.png'),
          icon_grey: require('@/images/part_two/icon_patent_grey.png'),
          name: '专利',
          num: 0
        },
        {
          icon: require('@/images/part_two/icon_copyright.png'),
          icon_grey: require('@/images/part_two/icon_copyright_grey.png'),
          name: '著作权',
          num: 0
        }
      ],
      concernStatus: false,
      businessInfo: {},
      sheetShow: false,
      updateResult: '',
      groupList: [],
      groupName: '',
      show: false,
      userId: '',
      userCode: '',
    }
  },
  components: {
    navbar: navbar,
    VanButton: Button,
    VanRow: Row,
    VanCol: Col,
    VanIcon: Icon,
    VanField: Field,
    VanTag: Tag,
    VanImage: Image,
    VanToast: Toast,
    VanActionSheet: ActionSheet,
    VanRadioGroup: RadioGroup,
    VanRadio: Radio,
  },
  created() {
    this.userId = localStorage.getItem('userId')
    this.userCode = sessionStorage.getItem('code')
    this.postBusinessInfo();
    this.postGroupList();
  },
  methods: {
    // 获取工商信息
    async postBusinessInfo() {
      let result = await postBaseInfo({ companyId: sessionStorage.getItem('companyId') });
      this.businessInfo = result;
      sessionStorage.setItem('companyName', this.businessInfo.companyName);
      // this.businessInfo.startDate = /\d{4}\/\d{1,2}\/\d{1,2}/g.exec(this.businessInfo.startDate);
      this.businessInfo.startDate = this.businessInfo.startDate?this.businessInfo.startDate.substr(0, 10):'';
      this.jiben[1].num = this.businessInfo.employeeCount;
      this.jiben[2].num = this.businessInfo.partnerCount;
      this.jiben[3].num = this.businessInfo.changeCount;
      this.jiben[4].num = this.businessInfo.annualCount;
      this.sifa[0].num = this.businessInfo.litigCount;
      this.sifa[1].num = this.businessInfo.shixinCount;
      this.sifa[2].num = this.businessInfo.zhixingCount;
      this.sifa[3].num = this.businessInfo.judgementCount;
      this.sifa[4].num = this.businessInfo.courtCount;
      this.sifa[5].num = this.businessInfo.limithightCount;
      this.fengxian[0].num = this.businessInfo.operateexceptionCount;
      this.fengxian[1].num = this.businessInfo.penaltyCount;
      this.fengxian[2].num = this.businessInfo.seriousviolationCount;
      this.fengxian[3].num = this.businessInfo.taxillegalCount;
      this.fengxian[4].num = this.businessInfo.taxoweCount;
      this.fengxian[5].num = this.businessInfo.auctionCount;
      this.dongtai[0].num = this.businessInfo.licenseCount;
      this.dongtai[1].num = this.businessInfo.tenderCount;
      this.dongtai[3].num = this.businessInfo.newsinfoCount;
      this.dongtai[4].num = this.businessInfo.financingCount;
      this.chanquan[0].num = this.businessInfo.tmCount;
      this.chanquan[1].num = this.businessInfo.patentCount;
      this.chanquan[2].num = this.businessInfo.copyrightsCount;
      if (this.businessInfo.flag == true) {
        this.concernStatus = true;
      } else {
        this.concernStatus = false;
      }
    },
    toastOn(type) {
      if (type === 'net') {
        if (this.businessInfo.website) {
          Toast(this.businessInfo.website);
        } else {
          Toast('无');
        }
        // Toast(localStorage.getItem('userId'))
      } else if (type === 'email') {
        if (this.businessInfo.email) {
          Toast(this.businessInfo.email);
        } else {
          Toast('无');
        }
      } else if (type === 'address') {
        if (this.businessInfo.address) {
          Toast(this.businessInfo.address);
        } else {
          Toast('无');
        }
      }
    },
    update() {
      this.postBusinessInfo();
    },
    returnClick() {
      //if (sessionStorage.getItem('dashboardType') == 'search') {
       // sessionStorage.setItem('getResult', 'true');
       // this.$router.push({ path: '/searchEnterprise' });
       //} else if (sessionStorage.getItem('dashboardType') == 'result') {
      //  this.$router.push({ path: '/search' });
      //} else {
      //  this.$router.push({ path: 'Category' });
      //}
      this.$router.go(-1)
    },
    async concern() {
      // 点击取关
      if (this.concernStatus == true) {
        let params = { companyId: sessionStorage.getItem('companyId')};
        let result = await postCancelGuanzhu(params);
        Toast.success('取关成功');
        this.concernStatus = false
        this.postBusinessInfo();
      } else {
        this.sheetShow = true;
      }
    },
    // 点击关注
    async updateSure() {
      let result = await postAddAttentionCompany(
        { groupName: this.groupList[this.updateResult].groupName, 
          groupId: this.groupList[this.updateResult].groupId, 
          companyId: sessionStorage.getItem('companyId'), 
          companyName:  sessionStorage.getItem('companyName'), 
        }
        );
      console.log(result)
      if (result) {
        this.sheetShow = false;
        Toast.success('关注成功');
        this.concernStatus = true;
        this.postBusinessInfo();
      }
    },
    // 分组信息查询
    async postGroupList() {
      let result = await postQueryByName({ pageSize: 99, pageNum: 1 });
      if (result) {
        this.groupList = result.records;
      }
    },
    // 点击新建分组
    addGroup() {
      this.groupName = '';
      this.show = true;
    },
    async addGroupOk() {
      if (this.groupName == '') {
        Toast.fail('请输入分组名称')
      } else {
        let result = await postAddGroupInfo({ groupName: this.groupName });
        if (result) {
          Toast.success('新建成功')
          this.postGroupList();
        }
      }
    },

    copyOk(address) {
      let orderNumber = address;
      let newInput = document.createElement("input");
      newInput.value = orderNumber;
      document.body.appendChild(newInput);
      newInput.select();
      document.execCommand("copy");
      newInput.remove();
      Toast('复制成功');
    },
    gridType(type, num) {
      if (type === '工商信息' && num !== 0) {
        this.$router.push({ path: 'BusinessInfo', query: { name: type } })
      } else if (type === '高管信息' && num !== 0) {
        this.$router.push({ path: 'ExecutiveInfo', query: { name: type } })
      } else if (type === '股东信息' && num !== 0) {
        this.$router.push({ path: 'ShareholderInfo', query: { name: type } })
      } else if (type === '历史变更' && num !== 0) {
        this.$router.push({ path: 'HistoryChange', query: { name: type } })
      } else if (type === '年报信息' && num !== 0) {
        this.$router.push({ path: 'AnnualReportInfo', query: { name: type } })
      } else if (type === '商标' && num !== 0) {
        this.$router.push({ path: 'TradeMark', query: { name: type } })
      } else if (type === '专利' && num !== 0) {
        this.$router.push({ path: 'Patent', query: { name: type } })
      } else if (type === '著作权' && num !== 0) {
        this.$router.push({ path: 'Copyright', query: { name: type } })
      } else if (type === '行政许可' && num !== 0) {
        this.$router.push({ path: 'Administrative', query: { name: type } })
      } else if (type === '招投标信息' && num !== 0) {
        this.$router.push({ path: 'BiddingInfo', query: { name: type } })
      } else if (type === '融资信息' && num !== 0) {
        this.$router.push({ path: 'FinancingInfo', query: { name: type } })
      } else if (type === '舆情信息' && num !== 0) {
        this.$router.push({ path: 'PublicOpinionInfo', query: { name: type } })
      } else if (type === '进出口情况' && num !== 0) {
        this.$router.push({ path: 'EximInfo', query: { name: type } })
      } else if (type === '经营异常' && num !== 0) {
        this.$router.push({ path: 'AbnormalOperation', query: { name: type } })
      } else if (type === '失信信息' && num !== 0) {
        this.$router.push({ path: 'PromiseInfo', query: { name: type } })
      } else if (type === '被执行人信息' && num !== 0) {
        this.$router.push({ path: 'JudgmentDebtorInfo', query: { name: type } })
      } else if (type === '裁判文书' && num !== 0) {
        this.$router.push({ path: 'Judgments', query: { name: type } })
      } else if (type === '法院公告' && num !== 0) {
        this.$router.push({ path: 'CourtAnnouncements', query: { name: type } })
      } else if (type === '开庭公告' && num !== 0) {
        this.$router.push({ path: 'HearingNotice', query: { name: type } })
      } else if (type === '限制高消费' && num !== 0) {
        this.$router.push({ path: 'LimitSpending', query: { name: type } })
      } else if (type === '全部涉诉' && num !== 0) {
        this.$router.push({ path: 'AllInvolved', query: { name: type } })
      } else if (type === '行政处罚' && num !== 0) {
        this.$router.push({ path: 'ExecutivePunish', query: { name: type } })
      } else if (type === '违法行为' && num !== 0) {
        this.$router.push({ path: 'Offence', query: { name: type } })
      } else if (type === '税收违法' && num !== 0) {
        this.$router.push({ path: 'TaxViolations', query: { name: type } })
      } else if (type === '欠税公告' && num !== 0) {
        this.$router.push({ path: 'TaxArrearsNotice', query: { name: type } })
      } else if (type === '司法拍卖' && num !== 0) {
        this.$router.push({ path: 'JudicialAuctions', query: { name: type } })
      }

    },

  },
}
</script>

<style lang="less" scoped>
.header-title {
  height: 46px;
  width: 100%;
  background-color: #fff;
  text-align: center;
}

.header-title-name {
  font-weight: bold;
  line-height: 46px;
  align-items: center;
  justify-content: center;
  //display: inline-flex;
  font-size: 15px;
}

.header-title-return {
  position: absolute;
  top: 13px;
  left: 20px;
  font-size: 15px;
}

.manage-body-head {
  background-color: #fff;
  margin-top: 10px;
  padding: 20px 10px 0px 10px;
}

.manage-body {
  background-color: #fff;
  margin-top: 10px;
  padding: 0px 10px 0px 10px;
}

.van-item-style {
  font-size: 14px;
  font-weight: bold;
  color: #96989e;
  margin-bottom: 5px;
}

.firm-info /deep/ .van-grid-item__content--center {
  background-color: #F9F9FA;
}
.firm-info /deep/ .van-grid-item__content {
  padding: 10px 8px;
}

/deep/ .van-grid-item__text {
  font-weight: bold;
}

.firm-info {
  width: 92%;
  margin-left: 4%;
}

.firm-icon-body {
  //background-color: #2372EB;
  border-radius: 5px;
}

.firm-icon {
  line-height: 2.5rem;
  margin-left: 0.5rem;
}

.fs-12 {
  font-size: 12px;
}

.fs-14 {
  font-size: 14px;
}

.fs-15 {
  font-size: 15px;
}

.fs-13 {
  font-size: 13px;
}

.fs-16 {
  font-size: 16px;
}

.fw-bold {
  font-weight: bold;
}

.cl-gray {
  color: #646566;
}

.cl-blue {
  color: #2372EB;
}

.ft-left {
  float: left;
}

.ft-right {
  float: right;
}

.wt-15-per {
  width: 15%;
}

.wt-84-per {
  width: 84%;
}

.wt-2-rem {
  width: 2.5rem;
}

.hg-13-rem {
  height: 1.3rem;
}

.hg-14-rem {
  height: 1.4rem;
}

.hg-25-rem {
  height: 2.5rem;
}

.hg-45-rem {
  height: 4.5rem;
}

.hg-100-per {
  height: 100%;
}

.mg-rt-5 {
  margin-right: 5px;
}

.mg-lt-5 {
  margin-left: 5px;
}

.mg-tp-8 {
  margin-top: 8px;
}

.mg-tp-10 {
  margin-top: 10px;
}

.pd-10 {
  padding: 10px;
}

.badge {
  position: absolute;
  top: 5px;
  right: 5px;
}

.concern {
  width: 100%;
  height: 50px;
  position: fixed;
  bottom: 0;
  z-index: 1001;
  margin: 0 auto;
  text-align: center;
  background-color: #fff;
  line-height: 50px;
}

.bg-2372eb {
  background: #2372EB;
}

.bg-ee8c15 {
  background: #ee8c15;
}

.bg-11c95f {
  background: #11c95f;
}

.bg-e21183 {
  background: #e21183;
}

.bg-fde809 {
  background: #fde809;
}

.bg-17b9d7 {
  background: #17b9d7;
}

.bg-db2c2c {
  background: #db2c2c;
}

.bg-9232db {
  background: #9232db;
}

.bg-8c8c8c {
  background: #8c8c8c;
}

.border-right::after {
  position: absolute;
  box-sizing: border-box;
  content: ' ';
  pointer-events: none;
  top: -20%;
  right: -50%;
  bottom: -20%;
  left: -50%;
  border-right: 1px solid #aaa;
  transform: scale(0.5);
  z-index: 1000;
}

.border-top {
  position: relative;
}

.cl-blue::after {
  position: absolute;
  box-sizing: border-box;
  content: ' ';
  pointer-events: none;
  top: -50%;
  right: -50%;
  bottom: -50%;
  left: -50%;
  border-top: 1px solid #aaa;
  transform: scale(0.5);
}
.border-right-operName::after {
  position: absolute;
  box-sizing: border-box;
  content: ' ';
  pointer-events: none;
  top: -10%;
  right: -50%;
  bottom: -10%;
  left: -50%;
  border-right: 1px solid #aaa;
  transform: scale(0.5);
  z-index: 1000;
}

</style>