123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308 |
- <template>
- <div>
- <div class="autoBox box">
- <div class="crumbs">
- <el-breadcrumb separator="/">
- <el-breadcrumb-item :to="{ path: 'home' }"
- >{{ $t('common.Home') }}
- </el-breadcrumb-item>
- <el-breadcrumb-item :to="{ path: 'enterprise' }"
- >{{ $t('common.EnterpriseShow') }}
- </el-breadcrumb-item>
- <el-breadcrumb-item>{{ enterpriseDetails }}</el-breadcrumb-item>
- </el-breadcrumb>
- </div>
- <div
- style="
- width: 100%;
- height: 450px;
- position: relative;
- border-bottom: 1px solid #ccc;
- "
- >
- <div class="swipers">
- <div class="swiper-container gallery-top">
- <div class="swiper-wrapper">
- <div
- class="swiper-slide"
- v-for="(i, index) in img"
- v-if="img.length > 0"
- >
- <img
- :src="'api/file/pub/' + i"
- alt
- style="width: 100%; height: 100%"
- />
- </div>
- <div class="swiper-slide" v-if="img.length == 0">
- <img
- :src="'api/file/pub/' + '/def/def1.png'"
- alt
- style="width: 100%; height: 100%"
- />
- </div>
- </div>
- <div class="swiper-button-next swiper-button-white"></div>
- <div class="swiper-button-prev swiper-button-white"></div>
- </div>
- <div class="swiper-container gallery-thumbs">
- <div class="swiper-wrapper">
- <div
- class="swiper-slide"
- v-for="(i, index) in img"
- v-if="img.length > 0"
- >
- <img
- :src="'api/file/pub/' + i"
- alt
- style="width: 100%; height: 100%"
- />
- </div>
- <div class="swiper-slide" v-if="img.length == 0">
- <img
- :src="'api/file/pub/' + '/def/def1.png'"
- alt
- style="width: 100%; height: 100%"
- />
- </div>
- </div>
- </div>
- <div
- style="
- float: right;
- color: #666;
- font-size: 14px;
- margin-right: 20px;
- "
- >
- <!-- <span class="share cursor" :style="ifcommon?'color: #66b1ff;':''"-->
- <!-- style="margin-right: 20px;" @click="shareChange()">-->
- <!-- <i class="el-icon-star-off" :style="ifcommon?'color: #66b1ff;':''"> </i>-->
- <!-- {{ifcommon?$t('common.companyAttentioned'):$t('common.Focusonthecompany')}}-->
- <!-- </span>-->
- <!-- <span class="share cursor btn" :data-clipboard-text="url" @click="copy">
- <i class="el-icon-share"> </i>
- {{$t('common.ShareProject')}}
- </span> -->
- </div>
- </div>
- <div class="details">
- <div
- style="width: 100%; font-size: 16px"
- @click="toView('enterpriseDetails', item.label)"
- >
- <div>
- <span class="initData_label cursor">{{ initData.unitName }}</span>
- <span
- style="
- margin-left: 150px;
- padding: 10px;
- background: #ff0033;
- color: #fff;
- font-weight: 700;
- "
- v-if="initData.recommendFlag == 1"
- >{{ $t('common.RecommendedEnterprise') }}
- </span>
- </div>
- <div style="line-height: 40px">
- <div>
- <span>
- <i class="el-icon-location-outline"></i>
- {{
- $i18n.locale === 'zh'
- ? initData.unitCountry
- : initData.unitCountryDict.charAt(0).toUpperCase() +
- initData.unitCountryDict.slice(1)
- }}
- <span v-show="initData.unitRegion">-</span
- >{{ initData.unitRegion }}
- </span>
- </div>
- <!-- <div>-->
- <!-- <!– <span>-->
- <!-- <i class="fa fa-jpy" aria-hidden="true"></i>-->
- <!-- {{$t('common.RegisteredCapital')}}:{{initData.registerMoney}}-->
- <!-- </span> –>-->
- <!-- <i class="el-icon-time"></i>-->
- <!-- <span >-->
- <!-- {{$t('common.DateOfEstablishment')}}:{{formatDate(initData.setUpDate) }}-->
- <!-- </span>-->
- <!-- </div>-->
- </div>
- <div style="line-height: 40px">
- <span>
- <i class="fa fa-envelope-open-o" aria-hidden="true"></i>
- {{ $t('common.ProductInformation') }}
- <span style="color: #0099ff; padding: 0 3px"
- >(
- <a href="#unitScope">{{
- UnitTypeNumber[1] ? UnitTypeNumber[1] : '0'
- }}</a>
- )</span
- >
- {{ $t('common.CoreTechnology') }}
- <span style="color: #0099ff; padding: 0 3px"
- >(
- <a href="#information02">{{
- UnitTypeNumber[2] ? UnitTypeNumber[2] : '0'
- }}</a>
- )</span
- >
- {{ $t('common.ProjectPerformance') }}
- <span style="color: #0099ff; padding: 0 3px"
- >(
- <a href="#information03">{{
- UnitTypeNumber[3] ? UnitTypeNumber[3] : '0'
- }}</a>
- )</span
- >
- {{ $t('common.ScopeBusiness') }}
- <span style="color: #0099ff; padding: 0 3px"
- >(
- <a href="#information04">{{
- UnitTypeNumber[4] ? UnitTypeNumber[4] : '0'
- }}</a>
- )</span
- >
- </span>
- </div>
- <div
- style="
- -webkit-box-orient: vertical;
- position: relative;
- line-height: 1.4em;
- overflow: hidden;
- height: 7.1em;
- cursor: pointer;
- "
- class="plate"
- @click="dialogVisibleChange"
- >
- <span style="line-height: 30px">
- <i class="el-icon-tickets"></i>
- {{ $t('common.CompanyProfile') }}:
- <span v-html="initData.unitIntrodutionMin"></span>
- </span>
- </div>
- <div style="margin-top: 10px">
- <el-tag
- v-if="0 < initData.unitLabel.size"
- style="margin: 10px 10px 0 0"
- v-for="unitLabel in initData.unitLabel"
- >{{ unitLabel }}
- </el-tag>
- </div>
- <div
- style="
- float: right;
- color: #666;
- font-size: 14px;
- margin-right: 20px;
- "
- >
- <!-- <span class="share cursor" :style="ifcommon?'color: #66b1ff;':''"-->
- <!-- style="margin-right: 20px;" @click="shareChange()">-->
- <!-- <i class="el-icon-star-off" :style="ifcommon?'color: #66b1ff;':''"> </i>-->
- <!-- {{ifcommon?$t('common.companyAttentioned'):$t('common.Focusonthecompany')}}-->
- <!-- </span>-->
- <div>
- <!-- <el-button type="" style="margin-left: 10px;margin-top: 10px;height: 40px;width: 170px;" icon="el-icon-star-off" :style="ifcommon?'color: #66b1ff;':''" @click="shareChange()">-->
- <span
- class="share cursor"
- :style="ifcommon ? 'color: #66b1ff;' : ''"
- style="margin-right: 380px"
- @click="shareChange()"
- >
- <i
- class="el-icon-star-off"
- :style="ifcommon ? 'color: #66b1ff;' : ''"
- ></i>
- {{
- ifcommon
- ? $t('common.companyAttentioned')
- : $t('common.Focusonthecompany')
- }}
- </span>
- <!-- </el-button>-->
- </div>
- <!-- <span class="share cursor btn" :data-clipboard-text="url" @click="copy">
- <i class="el-icon-share"> </i>
- {{$t('common.ShareProject')}}
- </span> -->
- </div>
- </div>
- </div>
- </div>
- <!-- 企业介绍 -->
- <!-- <div style="width: 100%;border-bottom: 1px solid #ccc;" v-if="enterprise.label1.label">
- <div class="enterprise_style">
- <span class="enterprise_style_span">{{$t('common.EnterpriseIntroduction')}}</span>
- </div>
- <div
- style="margin-top: 15px;color: #2c3e50;margin:0 100px;"
- v-html="enterprise.label1.label"
- ></div>
- </div> -->
- <div
- style="width: 100%; height: 320px; border-bottom: 1px solid #ccc"
- id="unitScope"
- v-if="enterprise1.length > 0"
- >
- <!-- -->
- <div class="enterprise_style">
- <span class="enterprise_style_span">{{
- $t('common.ProductInformation')
- }}</span>
- </div>
- <div
- v-if="enterprise1.length > 6"
- style="
- float: right;
- transform: translateY(-7px);
- margin-right: 61px;
- font-size: 14px;
- color: #2c558a;
- "
- @click="
- toViewMore(
- 'EnterPriseMoreInformationList',
- initData.baseEntityId,
- '1'
- )
- "
- class="cursor"
- >
- {{ $t('common.ViewMore') }}
- </div>
- <div
- style="
- float: left;
- margin-top: 15px;
- margin-left: 100px;
- width: 400px;
- height: 230px;
- "
- >
- <img
- :src="'api/file/pub/' + enterprise.label2.src"
- alt
- style="width: 100%; height: 100%"
- v-if="enterprise.label2.src"
- />
- <img
- :src="'api/file/pub/' + '/def/def2.png'"
- alt
- style="width: 100%; height: 100%"
- v-if="!enterprise.label2.src"
- />
- </div>
- <div
- style="float: left; margin-top: 15px; margin-left: 20px; width: 620px"
- class="enterprise_style_product"
- >
- <tr
- v-for="(item, index) in enterprise1"
- v-if="index < 6"
- class="cursor"
- @click="
- toViewDetail(
- 'enterpriseInformationDetails',
- item.baseEntityId,
- 'common.ProductInformation'
- )
- "
- >
- <td
- style="
- float: left;
- width: 500px;
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- "
- >
- {{ item.title }}
- </td>
- <td style="float: right">{{ formatDate(item.createDate) }}</td>
- <td style="clear: both"></td>
- </tr>
- </div>
- </div>
- <div
- style="width: 100%; height: 320px; border-bottom: 1px solid #ccc"
- id="information03"
- v-if="enterprise3.length > 0"
- >
- <!-- -->
- <div class="enterprise_style">
- <span class="enterprise_style_span">{{
- $t('common.ProjectPerformance')
- }}</span>
- </div>
- <div
- v-if="enterprise3.length > 6"
- style="
- float: right;
- transform: translateY(-7px);
- margin-right: 61px;
- font-size: 14px;
- color: #2c558a;
- "
- @click="
- toViewMore(
- 'EnterPriseMoreInformationList',
- initData.baseEntityId,
- '3'
- )
- "
- class="cursor"
- >
- {{ $t('common.ViewMore') }}
- </div>
- <div
- style="
- float: left;
- margin-top: 15px;
- margin-left: 100px;
- width: 400px;
- height: 230px;
- "
- >
- <img
- :src="'api/file/pub/' + enterprise.label4.src"
- alt
- style="width: 100%; height: 100%"
- v-if="enterprise.label4.src"
- />
- <img
- :src="'api/file/pub/' + '/def/def4.png'"
- alt
- style="width: 100%; height: 100%"
- v-if="!enterprise.label4.src"
- />
- </div>
- <div
- style="float: left; margin-top: 15px; margin-left: 20px; width: 620px"
- class="enterprise_style_product"
- >
- <tr
- v-for="(item, index) in enterprise3"
- v-if="index < 5"
- class="cursor"
- @click="
- toViewDetail(
- 'enterpriseInformationDetails',
- item.baseEntityId,
- 'common.ProjectPerformance'
- )
- "
- >
- <td
- style="
- float: left;
- width: 500px;
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- "
- >
- {{ item.title }}
- </td>
- <td style="float: right">{{ formatDate(item.createDate) }}</td>
- <td style="clear: both"></td>
- </tr>
- </div>
- </div>
- <div
- style="width: 100%; height: 320px; border-bottom: 1px solid #ccc"
- id="information02"
- v-if="enterprise2.length > 0"
- >
- <div class="enterprise_style">
- <span class="enterprise_style_span">{{
- $t('common.CoreTechnology')
- }}</span>
- </div>
- <div
- v-if="enterprise2.length > 6"
- style="
- float: right;
- transform: translateY(-7px);
- margin-right: 61px;
- font-size: 14px;
- color: #2c558a;
- "
- @click="
- toViewMore(
- 'EnterPriseMoreInformationList',
- initData.baseEntityId,
- '2'
- )
- "
- class="cursor"
- >
- {{ $t('common.ViewMore') }}
- </div>
- <div
- style="
- float: left;
- margin-top: 15px;
- margin-left: 100px;
- width: 400px;
- height: 230px;
- "
- >
- <img
- :src="'api/file/pub/' + enterprise.label3.src"
- alt
- style="width: 100%; height: 100%"
- v-if="enterprise.label3.src"
- />
- <img
- :src="'api/file/pub/' + '/def/def3.png'"
- alt
- style="width: 100%; height: 100%"
- v-if="!enterprise.label3.src"
- />
- </div>
- <div
- style="float: left; margin-top: 15px; margin-left: 20px; width: 620px"
- class="enterprise_style_product"
- >
- <tr
- v-for="(item, index) in enterprise2"
- v-if="index < 6"
- class="cursor"
- @click="
- toViewDetail(
- 'enterpriseInformationDetails',
- item.baseEntityId,
- 'common.CoreTechnology'
- )
- "
- >
- <td
- style="
- float: left;
- width: 500px;
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- "
- >
- {{ item.title }}
- </td>
- <!-- <td style="float: right;margin-left: 10px;">{{item.updateDate}}</td> -->
- <td style="float: right">{{ formatDate(item.createDate) }}</td>
- <td style="clear: both"></td>
- </tr>
- </div>
- </div>
- <div
- style="width: 100%; height: 320px; border-bottom: 1px solid #ccc"
- id="information04"
- v-if="enterprise4.length > 0"
- >
- <!-- -->
- <div class="enterprise_style">
- <span class="enterprise_style_span">{{
- $t('common.ScopeBusiness')
- }}</span>
- </div>
- <div
- v-if="enterprise4.length > 6"
- style="
- float: right;
- transform: translateY(-7px);
- margin-right: 61px;
- font-size: 14px;
- color: #2c558a;
- "
- @click="
- toViewMore(
- 'EnterPriseMoreInformationList',
- initData.baseEntityId,
- '4'
- )
- "
- class="cursor"
- >
- {{ $t('common.ViewMore') }}
- </div>
- <div
- style="
- float: left;
- margin-top: 15px;
- margin-left: 100px;
- width: 400px;
- height: 230px;
- "
- >
- <img
- :src="'api/file/pub/' + enterprise.label5.src"
- alt
- style="width: 100%; height: 100%"
- v-if="enterprise.label5.src"
- />
- <img
- :src="'api/file/pub/' + '/def/def2.png'"
- alt
- style="width: 100%; height: 100%"
- v-if="!enterprise.label5.src"
- />
- </div>
- <div
- style="float: left; margin-top: 15px; margin-left: 20px; width: 620px"
- class="enterprise_style_product"
- >
- <tr
- v-for="(item, index) in enterprise4"
- v-if="index < 5"
- class="cursor"
- @click="
- toViewDetail(
- 'enterpriseInformationDetails',
- item.baseEntityId,
- 'common.ProjectPerformance'
- )
- "
- >
- <td
- style="
- float: left;
- width: 500px;
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- "
- >
- {{ item.title }}
- </td>
- <td style="float: right">{{ formatDate(item.createDate) }}</td>
- <td style="clear: both"></td>
- </tr>
- </div>
- </div>
- <!--<div style="width: 100%;height: 250px;display:none;">
- <div class="enterprise_style">
- <span class="enterprise_style_span">{{$t('common.RecommendedEnterprise')}}</span>
- </div>
- <div class="recommend">
- <ul>
- <li v-for="(item,index) in recommend" key="index">
- <img :src="'api/file/pub/' + item.photo" alt style="width: 100%;height: 115px;" />
- <div style="color: #bcbcbc;font-size: 14px;">{{item.num?item.num:0}}{{$t('common.Browse')}}</div>
- </li>
- </ul>
- </div>
- </div>-->
- </div>
- <!-- <el-dialog
- :title="$t('common.CompanyProfile')"
- :visible.sync="dialogVisible"
- width="60%">
- <span style="line-height: 29px;font-size: 18px;" v-html="initData.unitIntrodution"></span>
- </el-dialog> -->
- <FrameTemplate
- :dialogVisible="dialogVisible"
- width="60%"
- :title="$t('common.CompanyProfile')"
- @FrameBack="dialogVisible = false"
- >
- <span
- slot="center"
- style="line-height: 29px; font-size: 18px"
- v-html="initData.unitIntrodution"
- >
- </span>
- </FrameTemplate>
- <el-dialog
- :title="$i18n.locale == 'zh' ? '提示' : 'Reminder'"
- :visible.sync="toViewLogin"
- :width="$i18n.locale == 'zh' ? '500px' : '750px'"
- :height="$i18n.locale == 'zh' ? '300px' : '386px'"
- :before-close="toViewLoginChange"
- >
- <div style="width: 100%; height: 100%">
- <img
- src="@/assets/img/loginTips.png"
- alt=""
- style="width: 180px; height: 180px; margin-left: 20px"
- />
- <div
- style="float: right; margin-right: 20px"
- :style="
- $i18n.locale == 'zh'
- ? 'width: 49%;margin-top: 10px;'
- : 'width: 453px;margin-top: -25px;'
- "
- >
- <div
- style="
- font-size: 20px;
- font-weight: normal;
- color: #333333;
- font-family: HiraginoSansGB-W3, HiraginoSansGB;
- line-height: 40px;
- "
- >
- {{ $t('common.ReminderFirst') }}
- </div>
- <div
- style="
- font-size: 16px;
- font-family: HiraginoSansGB-W3, HiraginoSansGB;
- font-weight: normal;
- color: #666666;
- line-height: 30px;
- "
- >
- {{ $t('common.ReminderSecond') }}
- <span style="color: #0091ff; font-size: 18px">{{ num }}</span>
- {{ $t('common.ReminderThird') }}
- </div>
- <div
- style="
- font-size: 14px;
- font-family: HiraginoSansGB-W3, HiraginoSansGB;
- font-weight: normal;
- color: #666666;
- line-height: 30px;
- "
- >
- {{ $t('common.ReminderForth') }}
- </div>
- <div
- style="
- font-size: 14px;
- font-family: HiraginoSansGB-W3, HiraginoSansGB;
- height: 33px;
- line-height: 60px;
- font-weight: normal;
- color: #0091ff;
- "
- >
- <span
- style="margin-left: 40px"
- class="cursor"
- @click="toView('login')"
- >
- {{ $t('common.ReminderFifth') }}
- </span>
- <span
- style="margin-left: 10px"
- class="cursor"
- @click="toView('Register')"
- >
- {{ $t('common.ReminderSixth') }}
- </span>
- </div>
- </div>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import { Swiper, SwiperSlide, directive } from 'vue-awesome-swiper'
- // import 'swiper/dist/css/swiper.css'
- import 'vue-awesome-swiper/node_modules/swiper/dist/css/swiper.css'
- import Base from '@/views/base/Base'
- import {
- getBaseUnitViews,
- get,
- saveOrUpdate,
- del,
- cmsInformationViews,
- getUnit,
- gateGetUnitViewById,
- } from '@/api/baseUnitView'
- import moment from 'moment'
- import Clipboard from 'clipboard'
- import FrameTemplate from '@/components/FrameTemplate'
- import { formatDate } from '@/utils/formatUtils'
- import { saveFollowModelLanguage } from '@/api/operation/basePortalModelFollowInfo'
- import { getToken } from '@/utils/auth'
- import { getFollowModeNumlByModelIdAndUserId } from '@/api/operation/basePortalModelFollowInfo'
- import { addIntegral, addGrowth } from '@/utils/toCompleteTask'
- import { getUserPointPage } from '@/api/user'
- import _ from 'lodash'
- export default {
- name: 'EnterpriseDetails',
- extends: Base,
- components: { FrameTemplate },
- data() {
- return {
- num: 5,
- language: this.$i18n.locale.toUpperCase(),
- toViewLogin: false,
- timer: '',
- dialogVisible: false,
- enterpriseDetails: '',
- img: [],
- key: this.$route.query.key,
- page: {
- businessType: 'unitShow',
- businessId: '',
- // typeDict:1,
- },
- ifcommon: false,
- initData: {},
- enterprise: {
- label1: {
- label: '',
- src: '',
- },
- label2: {
- src: '',
- },
- label3: {
- src: '',
- },
- label4: {
- src: '',
- },
- label5: {
- src: '',
- },
- },
- recommend: [],
- enterprise1: [],
- enterprise2: [],
- enterprise3: [],
- enterprise4: [],
- UnitTypeNumber: {},
- user: {
- umsUser: {},
- },
- pointStatus: null,
- isToken: null,
- }
- },
- updated() {
- this.Swiper()
- },
- mounted() {
- this.initData1()
- this.page.businessId = this.key
- this.$store.commit('modify', 'enterpriseDetails')
- window.localStorage.setItem('router', 'enterpriseDetails')
- this.getData()
- console.log(this.$store.state.routerItem)
- // window.sessionStorage.setItem('routerItem', 'enterprise');
- },
- watch: {
- '$i18n.locale'() {
- this.getData()
- this.language = this.$i18n.locale.toUpperCase()
- },
- toViewLogin() {
- if (this.toViewLogin == true) {
- this.loginTipsChange()
- }
- },
- },
- methods: {
- initData1() {
- this.isToken = getToken()
- if (this.isToken) {
- getUserPointPage().then((res) => {
- this.pointStatus = res.data.umsUserPoints[0].pointStatus
- })
- }
- },
- // 未登录跳转
- loginTipsChange() {
- const that = this
- this.num = 5
- // clearInterval(timer_interval);
- this.timer = setInterval(function () {
- if (that.num > 0) {
- that.num--
- } else {
- if (that.toViewLogin == true) {
- clearInterval(that.timer)
- that.toView('login')
- } else {
- clearInterval(that.timer)
- }
- }
- }, 1000)
- },
- // 判断未登录跳转是否关闭
- toViewLoginChange(done) {
- this.toViewLogin = false
- this.num = 5
- clearInterval(this.timer)
- },
- dialogVisibleChange() {
- this.dialogVisible = true
- },
- Swiper() {
- var galleryThumbs = new Swiper('.gallery-thumbs', {
- spaceBetween: 10,
- slidesPerView: 4,
- freeMode: true,
- watchSlidesVisibility: true,
- watchSlidesProgress: true,
- autoplay: {
- //自动播放
- delay: 4000,
- disableOnInteraction: false, //用户操作后是否停止 默认停止(true)
- },
- })
- var galleryTop = new Swiper('.gallery-top', {
- spaceBetween: 10,
- navigation: {
- nextEl: '.swiper-button-next',
- prevEl: '.swiper-button-prev',
- },
- autoplay: {
- //自动播放
- delay: 4000,
- disableOnInteraction: false, //用户操作后是否停止 默认停止(true)
- },
- thumbs: {
- swiper: galleryThumbs,
- },
- })
- },
- getData() {
- const that = this
- gateGetUnitViewById(this.key, this.$i18n.locale.toUpperCase()).then(
- (res) => {
- that.initData = res.data.baseUnitView
- that.initData.unitIntrodutionMin = that.initData.unitIntrodution
- ? that.initData.unitIntrodution
- .replace(/<[^>]+>/g, '')
- .replace(/ /gi, '')
- : ''
- that.enterpriseDetails = that.initData.unitName
- that.initData.unitLabel = that.initData.unitLabel
- ? that.initData.unitLabel.split(',')
- : ''
- that.enterprise.label1.label = res.data.baseUnitView.unitIntrodution
- let user = window.localStorage.getItem('user')
- if (user) {
- var users = JSON.parse(user)
- var token = '' + getToken()
- var projectId = this.initData.baseEntityId
- let userId = users.userId
- getFollowModeNumlByModelIdAndUserId(
- projectId,
- 'enterprise',
- this.userId
- ).then((res) => {
- this.ifcommon = res.data
- console.log(
- res.data,
- '---------------------------------------------------------------------------'
- )
- })
- }
- }
- )
- // // 获取企业信息数量
- getUnit(this.key, this.$i18n.locale.toUpperCase()).then((res) => {
- this.UnitTypeNumber = res.data
- })
- // 获取企业详情信息
- this.getDataList(3)
- // 获取推荐企业
- // this.getRecommended();
- },
- getDataList(num) {
- // this.page.typeDict=num;
- this.img = []
- const that = this
- this.page.language = this.$i18n.locale.toUpperCase()
- cmsInformationViews(this.page).then((res) => {
- if (res.data[1]) {
- this.enterprise1 = res.data[1] || []
- let url = res.data[1].filter((item) => {
- return (
- item.pictureUrl !== undefined ||
- item.pictureUrl !== null ||
- item.pictureUrl !== ''
- )
- })
- if (url.length > 0) {
- that.enterprise.label2.src = url[0].pictureUrl
- } else {
- that.enterprise.label2.src = '/def/def2.png'
- }
- } else {
- this.enterprise1 = []
- that.$forceUpdate()
- }
- if (res.data[2]) {
- that.enterprise2 = res.data[2] || []
- let url = res.data[2].filter((item, index) => {
- return (
- item.pictureUrl !== undefined ||
- item.pictureUrl !== null ||
- item.pictureUrl !== ''
- )
- })
- if (url.length > 0) {
- that.enterprise.label3.src = url[0].pictureUrl
- } else {
- that.enterprise.label3.src = '/def/def3.png'
- }
- } else {
- that.enterprise2 = []
- that.$forceUpdate()
- // that.enterprise.label3.src="/def/def3.png";
- }
- if (res.data[3]) {
- that.enterprise3 = res.data[3] || []
- let url = res.data[3].filter((item, index) => {
- return (
- item.pictureUrl !== undefined ||
- item.pictureUrl !== null ||
- item.pictureUrl !== ''
- )
- })
- if (url.length > 0) {
- that.enterprise.label4.src = url[0].pictureUrl
- } else {
- that.enterprise.label4.src = '/def/def4.png'
- }
- } else {
- this.enterprise3 = []
- that.$forceUpdate()
- }
- if (res.data[4]) {
- that.enterprise4 = res.data[4] || []
- let url = res.data[4].filter((item, index) => {
- return (
- item.pictureUrl !== undefined ||
- item.pictureUrl !== null ||
- item.pictureUrl !== ''
- )
- })
- if (url.length > 0) {
- that.enterprise.label5.src = url[0].pictureUrl
- } else {
- that.enterprise.label5.src = '/def/def2.png'
- }
- } else {
- this.enterprise4 = []
- that.$forceUpdate()
- }
- that.img = []
- if (res.data[1]) {
- res.data[1].forEach((item, index) => {
- if (item) {
- if (item.pictureUrl) {
- that.img.push(item.pictureUrl)
- }
- }
- })
- }
- if (res.data[2]) {
- res.data[2].forEach((item, index) => {
- if (item) {
- if (item.pictureUrl) {
- that.img.push(item.pictureUrl)
- }
- }
- })
- }
- if (res.data[3]) {
- res.data[3].forEach((item, index) => {
- if (item) {
- if (item.pictureUrl) {
- that.img.push(item.pictureUrl)
- }
- }
- })
- }
- if (res.data[4]) {
- res.data[4].forEach((item, index) => {
- if (item) {
- if (item.pictureUrl) {
- that.img.push(item.pictureUrl)
- }
- }
- })
- }
- })
- this.getRecommended()
- },
- getRecommended() {
- this.page.recommendFlag = 'y'
- const that = this
- getBaseUnitViews(this.page).then((res) => {
- if (res.data.baseUnitViews) {
- that.recommend = res.data.baseUnitViews
- console.log(res.data.baseUnitViews, that.init)
- }
- this.loading = false
- })
- },
- getIconUrls(url) {
- return require('@/assets/img/realTimeInfo/' + url)
- },
- getIconUrl(url) {
- return 'http://localhost:8080' + 'api/file/pub/' + url
- },
- toView(router, json) {
- clearInterval(this.timer)
- this.$router.push({ name: router, params: { key: json } })
- },
- screenBack(data) {
- console.log(data, 'screenBackscreenBackscreenBackscreenBack')
- },
- toViewDetail(router, json, name) {
- this.$store.commit('modify', router)
- window.localStorage.setItem('router', router)
- const { href } = this.$router.resolve({
- name: router,
- query: {
- key: json,
- name: name,
- },
- })
- window.open(href, '_blank')
- },
- toViewMore(router, json, businessType) {
- this.$store.commit('modify', router)
- window.localStorage.setItem('router', router)
- const { href } = this.$router.resolve({
- name: 'EnterPriseMoreInformationList',
- query: {
- key: json,
- businessType: businessType,
- },
- })
- window.open(href, '_blank')
- },
- screen(i) {
- this.index = i
- },
- // 项目收藏改变
- // shareChange() {
- // if (this.ifcommon) {
- // this.saveFollowModelDo("unfollow");
- // } else {
- // this.saveFollowModelDo("follow");
- // }
- // },
- shareChange: _.throttle(function () {
- if (this.ifcommon) {
- this.saveFollowModelDo('unfollow')
- } else {
- this.saveFollowModelDo('follow')
- }
- }, 3000),
- saveFollowModelDo: function (followType) {
- let user = window.localStorage.getItem('user')
- let that = this
- if (!this.$Cookies.get('token')) {
- // this.$message.warning("请先登录");
- // this.$confirm('检测到您未登录,是否登录')
- // .then(_ => {
- // this.toView('login');
- // })
- // .catch(_ => {});
- this.toViewLogin = true
- } else {
- var users = JSON.parse(user)
- var token = '' + getToken()
- var projectId = this.initData.baseEntityId
- var userId = users.userId
- // 接口逻辑
- this.submitHandler((token) => {
- saveFollowModelLanguage(
- that.language,
- projectId,
- 'enterprise',
- userId,
- followType,
- token
- )
- .then((result) => {
- if (followType == 'unfollow') {
- if (this.$i18n.locale == 'zh') {
- this.$message({
- message: '取消关注成功',
- type: 'success',
- })
- } else {
- this.$message({
- message: 'Cancel the follow successfully',
- type: 'success',
- })
- }
- } else {
- if (
- this.user.umsUser.userUsertypeDict !== '2' &&
- this.pointStatus == 'y'
- ) {
- addIntegral('point_task_attention', '3')
- }
- if (this.$i18n.locale == 'zh') {
- this.$message({
- message: '关注成功',
- type: 'success',
- })
- } else {
- this.$message({
- message: 'Follow of success',
- type: 'success',
- })
- }
- }
- this.ifcommon = !this.ifcommon
- this.resetToken()
- })
- .catch((error) => {
- // 此处你的业务代码
- })
- })
- }
- },
- },
- }
- </script>
- <!-- Add "scoped" attribute to limit CSS to this component only -->
- <style scoped>
- .box {
- margin-top: 10px;
- background: #fff;
- /* height: 500px; */
- padding: 20px 0;
- }
- .crumbs {
- margin-left: 20px;
- }
- body {
- margin: 0;
- }
- .swipers {
- position: absolute;
- top: 30px;
- left: 100px;
- width: 460px;
- height: 390px;
- }
- .details {
- position: absolute;
- top: 30px;
- left: 600px;
- width: 490px;
- height: 390px;
- }
- .swiper-container {
- width: 100%;
- height: 300px;
- margin-left: auto;
- margin-right: auto;
- }
- .swiper-slide {
- background-size: cover;
- background-position: center;
- }
- .gallery-top {
- height: 80%;
- width: 100%;
- }
- .gallery-thumbs {
- height: 20%;
- box-sizing: border-box;
- padding: 10px 0;
- }
- .gallery-thumbs .swiper-slide {
- width: 25%;
- height: 100%;
- opacity: 0.4;
- }
- .gallery-thumbs .swiper-slide-thumb-active {
- opacity: 1;
- }
- .initData_label {
- color: #2c558a;
- font-weight: 700;
- font-size: 22px;
- line-height: 42px;
- }
- .enterprise_style {
- line-height: 50px;
- color: #6c819d;
- padding-left: 100px;
- font-size: 18px;
- font-weight: 700;
- margin-top: 5px;
- }
- .enterprise_style_span {
- display: inline-block;
- padding: 0 10px;
- text-align: center;
- height: 50px;
- border-bottom: 2px solid #6699ff;
- }
- .enterprise_style_product tr {
- line-height: 30px;
- width: 100%;
- display: inline-block;
- border-bottom: 1px dashed #ccc;
- font-size: 14px;
- color: #2c558a;
- margin-bottom: 5px;
- }
- .recommend {
- margin-top: 15px;
- margin-left: 100px;
- }
- .recommend li {
- display: inline-block;
- width: 170px;
- /* height: 130px; */
- text-align: center;
- margin-right: 15px;
- }
- .share:hover {
- color: #2c558a;
- }
- >>> .el-dialog__body {
- word-break: normal;
- padding: 0px 20px 10px;
- }
- </style>
|