index.vue 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092
  1. <template>
  2. <div id="index">
  3. <el-row>
  4. <el-col :span="24" class="main animate__animated animate__backInRight">
  5. <div class="w_1200" v-loading="loadingOne">
  6. <el-col :span="24" class="one" v-loading="loadingTwo">
  7. <el-col :span="24" class="one_1">
  8. <el-col :span="12" class="left">汇聚各种行业政策法规</el-col>
  9. <el-col :span="12" class="right" @click="selectMenu('news')">查看更多新闻</el-col>
  10. </el-col>
  11. <el-col :span="24" class="one_5">
  12. <el-col :span="3" class="left">
  13. <el-image class="image" :src="news" fit="fill" />
  14. </el-col>
  15. <el-col :span="21" class="right">
  16. <el-col
  17. :span="12"
  18. class="list"
  19. v-for="(item, index) in newsList"
  20. :key="index"
  21. @click="toView(item, '3')"
  22. >
  23. <el-col :span="4" class="left">
  24. <div class="year" v-if="item.time">{{ moment(item.time).format('YYYY') }}</div>
  25. <div class="date" v-if="item.time">{{ moment(item.time).format('MM-DD') }}</div>
  26. </el-col>
  27. <el-col :span="20" class="right">
  28. <el-col :span="24" class="name textOver">
  29. <el-tooltip effect="dark" :content="item.title" placement="top">
  30. {{ item.title || '暂无标题' }}
  31. </el-tooltip>
  32. </el-col>
  33. <el-col :span="24" class="content">
  34. <div v-html="removeHtmlStyle(item.content)"></div>
  35. </el-col>
  36. </el-col>
  37. </el-col>
  38. </el-col>
  39. </el-col>
  40. </el-col>
  41. <el-col :span="24" class="one" v-loading="loadingThr">
  42. <el-col :span="24" class="one_1">
  43. <el-col :span="12" class="left">汇聚科技创新的创新赛道</el-col>
  44. <el-col :span="12" class="right" @click="selectMenu('project')">查看全部项目</el-col>
  45. </el-col>
  46. <el-col :span="24" class="one_2">
  47. <el-col :span="4" class="left">
  48. <el-col
  49. :span="24"
  50. class="list"
  51. v-for="(item, index) in typeList"
  52. :key="index"
  53. @mouseover="mouseOver(item)"
  54. :class="[active == item.type ? 'active' : '']"
  55. >
  56. <el-col :span="6" class="image">
  57. <el-image
  58. v-show="active == item.type"
  59. class="image"
  60. :src="item.icon"
  61. fit="fill"
  62. />
  63. <el-image
  64. v-show="active != item.type"
  65. class="image"
  66. :src="item.url"
  67. fit="fill"
  68. />
  69. </el-col>
  70. <el-col :span="18" class="title textOver">{{ item.title }}</el-col>
  71. </el-col>
  72. </el-col>
  73. <el-col :span="20" class="right">
  74. <el-col
  75. :span="7"
  76. class="list"
  77. v-for="(item, index) in list"
  78. :key="index"
  79. @click="toView(item, '0')"
  80. >
  81. <el-col :span="24" class="name textOver">{{
  82. item.name || '暂无项目名称'
  83. }}</el-col>
  84. <el-col :span="24" class="brief textMore">
  85. 项目介绍:{{ item.brief || '暂无项目介绍' }}
  86. </el-col>
  87. <el-col :span="24" class="info">
  88. <div>技术成熟度:{{ getDict(item.maturity, 'maturity') }}</div>
  89. <div>合作类型:{{ getDict(item.cooperate, 'cooperate') }}</div>
  90. </el-col>
  91. <span class="key">{{ getDict(item.type, 'type') }}</span>
  92. </el-col>
  93. </el-col>
  94. </el-col>
  95. </el-col>
  96. <el-col :span="24" class="one" v-loading="loadingFour">
  97. <el-col :span="24" class="one_1">
  98. <el-col :span="12" class="left">汇聚各种行业的专家</el-col>
  99. <el-col :span="12" class="right" @click="selectMenu('expert')">查看更多专家</el-col>
  100. </el-col>
  101. <el-col :span="24" class="one_3">
  102. <el-col :span="24" class="table_1">
  103. <el-col :span="2" class="title">姓名</el-col>
  104. <el-col :span="3" class="title">所在地</el-col>
  105. <el-col :span="3" class="title">学历/职称</el-col>
  106. <el-col :span="3" class="title">技术领域</el-col>
  107. <el-col :span="3" class="title">工作单位</el-col>
  108. <el-col :span="6" class="title">研究方向</el-col>
  109. <el-col :span="4" class="title">操作</el-col>
  110. </el-col>
  111. <el-col :span="24" class="table_2">
  112. <vue3-seamless-scroll
  113. :list="exportList"
  114. :hover="true"
  115. :step="0.5"
  116. :wheel="true"
  117. :isWatch="true"
  118. >
  119. <el-col
  120. :span="24"
  121. class="list"
  122. v-for="(item, index) in exportList"
  123. :key="index"
  124. @click="toView(item, '1')"
  125. >
  126. <el-col :span="2" class="content textOver">
  127. <el-tooltip effect="dark" :content="item.name" placement="top">
  128. {{ item.name || '暂无名称' }}
  129. </el-tooltip>
  130. </el-col>
  131. <el-col :span="3" class="content textOver">
  132. {{ getArea(item.area) || '暂无地区' }}
  133. </el-col>
  134. <el-col :span="3" class="content textOver">
  135. {{ getDict(item.education, 'education') || '暂无学历/职称' }}
  136. </el-col>
  137. <el-col :span="3" class="content textOver">
  138. {{ getDict(item.field, 'field') || '暂无技术领域' }}
  139. </el-col>
  140. <el-col :span="3" class="content textOver">
  141. {{ item.work || '暂无工作单位' }}
  142. </el-col>
  143. <el-col :span="6" class="content textOver">
  144. {{ item.direction || '暂无研究方向' }}
  145. </el-col>
  146. <el-col :span="4" class="content textOver">
  147. <el-button @click.stop="toChat(item)" type="primary"> 联络专家 </el-button>
  148. </el-col>
  149. </el-col>
  150. </vue3-seamless-scroll>
  151. </el-col>
  152. </el-col>
  153. </el-col>
  154. <el-col :span="24" class="one" v-loading="loadingFive">
  155. <el-col :span="24" class="one_1">
  156. <el-col :span="12" class="left">汇聚各类优质的企业</el-col>
  157. <el-col :span="12" class="right" @click="selectMenu('company')">查看更多企业</el-col>
  158. </el-col>
  159. <el-col :span="24" class="one_4">
  160. <el-col
  161. :span="24"
  162. class="list"
  163. v-for="(item, index) in companyList"
  164. :key="index"
  165. @click="toView(item, '2')"
  166. >
  167. <el-col :span="4" class="left">
  168. <el-image class="image" :src="getUrl(item.logo)" fit="fill" />
  169. </el-col>
  170. <el-col :span="20" class="right">
  171. <el-col :span="24" class="right_1">
  172. <el-tooltip effect="dark" :content="item.name" placement="top">
  173. <span class="name">{{ item.name || '暂无名称' }}</span>
  174. </el-tooltip>
  175. <el-tag :type="[item.companyStatus == '0' ? 'success' : 'info']">{{
  176. getDict(item.companyStatus, 'status')
  177. }}</el-tag>
  178. </el-col>
  179. <el-col :span="24" class="right_2">
  180. <el-tag type="primary">{{ getDict(item.pattern, 'pattern') }}</el-tag>
  181. <el-tag type="primary">{{ getDict(item.scale, 'scale') }}</el-tag>
  182. </el-col>
  183. <el-col :span="24" class="right_3">
  184. <el-col :span="6" class="info">
  185. 法定代表人:<span>{{ item.representative || '暂无' }}</span>
  186. </el-col>
  187. <el-col :span="6" class="info">
  188. 成立日期: {{ moment(item.create_time).format('YYYY-MM-DD') }}
  189. </el-col>
  190. <el-col :span="8" class="info">
  191. 统一社会信用代码:{{ item.code || '暂无' }}
  192. </el-col>
  193. </el-col>
  194. <el-col :span="24" class="right_3">
  195. <el-col :span="6" class="info">电话:{{ item.phone || '暂无' }}</el-col>
  196. <el-col :span="8" class="info">邮箱:{{ item.email || '暂无' }}</el-col>
  197. </el-col>
  198. <el-col :span="24" class="right_3"> 地址:{{ item.address || '暂无' }} </el-col>
  199. </el-col>
  200. </el-col>
  201. </el-col>
  202. </el-col>
  203. <el-col :span="24" class="one" v-loading="loadingSix">
  204. <el-col :span="24" class="one_1">
  205. <el-col :span="12" class="left">汇聚各类优质的成果</el-col>
  206. <el-col :span="12" class="right" @click="selectMenu('achievement')"
  207. >查看更多成果</el-col
  208. >
  209. </el-col>
  210. <el-col :span="24" class="one_6">
  211. <el-col :span="10" class="left">
  212. <vue3-seamless-scroll
  213. :list="achievementList"
  214. :hover="true"
  215. :step="0.5"
  216. :wheel="true"
  217. :isWatch="true"
  218. >
  219. <el-col
  220. :span="24"
  221. class="list"
  222. v-for="(item, index) in achievementList"
  223. :key="index"
  224. @click="toView(item, '4')"
  225. >
  226. <el-col :span="1">
  227. <div class="i"></div>
  228. </el-col>
  229. <el-col :span="16" class="content textOver">
  230. <el-tooltip effect="dark" :content="item.name" placement="top">
  231. {{ item.name || '暂无名称' }}
  232. </el-tooltip>
  233. </el-col>
  234. <el-col :span="7" class="other textOver">
  235. {{ getDict(item.field || '暂无技术领域', 'field') }}
  236. </el-col>
  237. </el-col>
  238. </vue3-seamless-scroll>
  239. </el-col>
  240. <el-col :span="14" class="right">
  241. <el-col :span="24" class="right_1">
  242. <BuildTwoTone /> <span>热门技术领域</span>
  243. </el-col>
  244. <div class="right_2">
  245. <div
  246. class="list"
  247. v-for="(item, index) in fieldList"
  248. :key="index"
  249. @click="toAchive(item)"
  250. >
  251. <RocketTwoTone />
  252. <span class="textOver">{{ item.label }}</span>
  253. </div>
  254. </div>
  255. </el-col>
  256. </el-col>
  257. </el-col>
  258. </div>
  259. </el-col>
  260. </el-row>
  261. </div>
  262. </template>
  263. <script setup>
  264. import moment from 'moment'
  265. const $checkRes = inject('$checkRes')
  266. import { get } from 'lodash-es'
  267. const selectMenu = inject('selectMenu')
  268. import { SearchOutlined, RocketTwoTone, BuildTwoTone } from '@ant-design/icons-vue'
  269. // 接口
  270. import { DictDataStore } from '@/store/api/system/dictData'
  271. import { ProjectStore } from '@/store/api/platform/project'
  272. import { AchievementStore } from '@/store/api/platform/achievement'
  273. import { ExpertStore } from '@/store/api/user/expert'
  274. import { NewsStore } from '@/store/api/platform/news'
  275. import { CompanyStore } from '@/store/api/user/company'
  276. const companyStore = CompanyStore()
  277. const newsStore = NewsStore()
  278. const store = ProjectStore()
  279. const dictDataStore = DictDataStore()
  280. const achievementStore = AchievementStore()
  281. const expertStore = ExpertStore()
  282. // 路由
  283. const router = useRouter()
  284. // 图片引入
  285. import science from '/images/home.jpg'
  286. import science_1 from '/images/science_1.png'
  287. import science_2 from '/images/science_2.png'
  288. import science_3 from '/images/science_3.png'
  289. import science_4 from '/images/science_4.png'
  290. import science_5 from '/images/science_5.png'
  291. import science_6 from '/images/science_6.png'
  292. import science_7 from '/images/science_7.png'
  293. import science_8 from '/images/science_8.png'
  294. import science_9 from '/images/science_9.png'
  295. import science1 from '/images/science1.png'
  296. import science2 from '/images/science2.png'
  297. import science3 from '/images/science3.png'
  298. import science4 from '/images/science4.png'
  299. import science5 from '/images/science5.png'
  300. import science6 from '/images/science6.png'
  301. import science7 from '/images/science7.png'
  302. import science8 from '/images/science8.png'
  303. import science9 from '/images/science9.png'
  304. import news from '/images/news.jpg'
  305. // 加载中
  306. const loadingOne = ref(false)
  307. const loadingTwo = ref(false)
  308. const loadingThr = ref(false)
  309. const loadingFour = ref(false)
  310. const loadingFive = ref(false)
  311. const loadingSix = ref(false)
  312. // 搜索
  313. const searchValue = ref('')
  314. const active = ref('0')
  315. const typeList = ref([
  316. { url: science_1, icon: science1, title: '生物技术', type: '0' },
  317. { url: science_2, icon: science2, title: '信息技术', type: '1' },
  318. { url: science_3, icon: science3, title: '新材料', type: '2' },
  319. { url: science_4, icon: science4, title: '新能源', type: '3' },
  320. { url: science_5, icon: science5, title: '智能制造', type: '4' },
  321. { url: science_6, icon: science6, title: '光电芯片', type: '5' },
  322. { url: science_7, icon: science7, title: '人工智能', type: '6' },
  323. { url: science_8, icon: science8, title: '航空航天', type: '7' },
  324. { url: science_9, icon: science9, title: '其他', type: '8' }
  325. ])
  326. const list = ref([])
  327. // 字典表
  328. const projectList = ref([])
  329. const maturityList = ref([])
  330. const industryList = ref([])
  331. const statusList = ref([])
  332. const fieldList = ref([])
  333. const patternList = ref([])
  334. const scaleList = ref([])
  335. const educationList = ref([])
  336. // 成果
  337. const achievementList = ref([])
  338. // 专家
  339. const exportList = ref([])
  340. // 企业
  341. const companyList = ref([])
  342. // 新闻
  343. const newsList = ref([])
  344. // 项目
  345. const list0 = ref([])
  346. const list1 = ref([])
  347. const list2 = ref([])
  348. const list3 = ref([])
  349. const list4 = ref([])
  350. const list5 = ref([])
  351. const list6 = ref([])
  352. const list7 = ref([])
  353. const list8 = ref([])
  354. // 请求
  355. onMounted(async () => {
  356. loadingOne.value = true
  357. await searchOther()
  358. loadingOne.value = false
  359. loadingTwo.value = true
  360. await searchNews()
  361. loadingTwo.value = false
  362. loadingThr.value = true
  363. await search(active.value)
  364. loadingThr.value = false
  365. loadingFour.value = true
  366. await searchExport()
  367. loadingFour.value = false
  368. loadingFive.value = true
  369. await searchCompany()
  370. loadingFive.value = false
  371. loadingSix.value = true
  372. await searchAchieve()
  373. loadingSix.value = false
  374. })
  375. const searchOther = async () => {
  376. let result
  377. // 学历
  378. result = await dictDataStore.query({ code: 'education', is_use: '0' })
  379. if ($checkRes(result)) educationList.value = result.data
  380. // 合作类型
  381. result = await dictDataStore.query({ code: 'projectType', is_use: '0' })
  382. if ($checkRes(result)) projectList.value = result.data
  383. // 成熟度
  384. result = await dictDataStore.query({ code: 'projectMaturity', is_use: '0' })
  385. if ($checkRes(result)) maturityList.value = result.data
  386. // 行业分类
  387. result = await dictDataStore.query({ code: 'industry', is_use: '0' })
  388. if ($checkRes(result)) industryList.value = result.data
  389. // 企业状态
  390. result = await dictDataStore.query({ code: 'companyStatus', is_use: '0' })
  391. if ($checkRes(result)) statusList.value = result.data
  392. // 企业类型
  393. result = await dictDataStore.query({ code: 'companyType', is_use: '0' })
  394. if ($checkRes(result)) patternList.value = result.data
  395. // 企业规模
  396. result = await dictDataStore.query({ code: 'companyScale', is_use: '0' })
  397. if ($checkRes(result)) scaleList.value = result.data
  398. // 技术领域
  399. result = await dictDataStore.query({ code: 'field', is_use: '0' })
  400. if ($checkRes(result)) fieldList.value = result.data
  401. }
  402. const search = async (active) => {
  403. if (active == '0') {
  404. if (list0.value.length > 0) list.value = list0.value
  405. else {
  406. const info = {
  407. skip: 0,
  408. limit: 9,
  409. is_use: '0',
  410. status: '1'
  411. }
  412. if (active) info.type = active
  413. const res = await store.query(info)
  414. if (res.errcode == '0') {
  415. list.value = res.data
  416. list0.value = res.data
  417. }
  418. }
  419. }
  420. if (active == '1') {
  421. if (list1.value.length > 0) list.value = list1.value
  422. else {
  423. const info = {
  424. skip: 0,
  425. limit: 9,
  426. is_use: '0',
  427. status: '1'
  428. }
  429. if (active) info.type = active
  430. const res = await store.query(info)
  431. if (res.errcode == '0') {
  432. list.value = res.data
  433. list1.value = res.data
  434. }
  435. }
  436. }
  437. if (active == '2') {
  438. if (list2.value.length > 0) list.value = list2.value
  439. else {
  440. const info = {
  441. skip: 0,
  442. limit: 9,
  443. is_use: '0',
  444. status: '1'
  445. }
  446. if (active) info.type = active
  447. const res = await store.query(info)
  448. if (res.errcode == '0') {
  449. list.value = res.data
  450. list2.value = res.data
  451. }
  452. }
  453. }
  454. if (active == '3') {
  455. if (list3.value.length > 0) list.value = list3.value
  456. else {
  457. const info = {
  458. skip: 0,
  459. limit: 9,
  460. is_use: '0',
  461. status: '1'
  462. }
  463. if (active) info.type = active
  464. const res = await store.query(info)
  465. if (res.errcode == '0') {
  466. list.value = res.data
  467. list3.value = res.data
  468. }
  469. }
  470. }
  471. if (active == '4') {
  472. if (list4.value.length > 0) list.value = list4.value
  473. else {
  474. const info = {
  475. skip: 0,
  476. limit: 9,
  477. is_use: '0',
  478. status: '1'
  479. }
  480. if (active) info.type = active
  481. const res = await store.query(info)
  482. if (res.errcode == '0') {
  483. list.value = res.data
  484. list4.value = res.data
  485. }
  486. }
  487. }
  488. if (active == '5') {
  489. if (list5.value.length > 0) list.value = list5.value
  490. else {
  491. const info = {
  492. skip: 0,
  493. limit: 9,
  494. is_use: '0',
  495. status: '1'
  496. }
  497. if (active) info.type = active
  498. const res = await store.query(info)
  499. if (res.errcode == '0') {
  500. list.value = res.data
  501. list5.value = res.data
  502. }
  503. }
  504. }
  505. if (active == '6') {
  506. if (list6.value.length > 0) list.value = list6.value
  507. else {
  508. const info = {
  509. skip: 0,
  510. limit: 9,
  511. is_use: '0',
  512. status: '1'
  513. }
  514. if (active) info.type = active
  515. const res = await store.query(info)
  516. if (res.errcode == '0') {
  517. list.value = res.data
  518. list6.value = res.data
  519. }
  520. }
  521. }
  522. if (active == '7') {
  523. if (list7.value.length > 0) list.value = list7.value
  524. else {
  525. const info = {
  526. skip: 0,
  527. limit: 9,
  528. is_use: '0',
  529. status: '1'
  530. }
  531. if (active) info.type = active
  532. const res = await store.query(info)
  533. if (res.errcode == '0') {
  534. list.value = res.data
  535. list7.value = res.data
  536. }
  537. }
  538. }
  539. if (active == '8') {
  540. if (list0.value.length > 0) list.value = list8.value
  541. else {
  542. const info = {
  543. skip: 0,
  544. limit: 9,
  545. is_use: '0',
  546. status: '1'
  547. }
  548. if (active) info.type = active
  549. const res = await store.query(info)
  550. if (res.errcode == '0') {
  551. list.value = res.data
  552. list8.value = res.data
  553. }
  554. }
  555. }
  556. }
  557. const searchNews = async () => {
  558. const info = {
  559. skip: 0,
  560. limit: 6,
  561. is_use: '0',
  562. status: '1'
  563. }
  564. const res = await newsStore.query(info)
  565. if (res.errcode == '0') newsList.value = res.data
  566. }
  567. const searchExport = async () => {
  568. const info = {
  569. skip: 0,
  570. limit: 10,
  571. is_show: '0',
  572. status: '1'
  573. }
  574. const res = await expertStore.query(info)
  575. if (res.errcode == '0') exportList.value = res.data
  576. }
  577. const searchCompany = async () => {
  578. const info = {
  579. skip: 0,
  580. limit: 10,
  581. is_show: '0',
  582. status: '1'
  583. }
  584. const res = await companyStore.query(info)
  585. if (res.errcode == '0') companyList.value = res.data
  586. }
  587. const searchAchieve = async () => {
  588. const info = {
  589. skip: 0,
  590. limit: 10,
  591. is_use: '0',
  592. status: '1'
  593. }
  594. const res = await achievementStore.list(info)
  595. if (res.errcode == '0') achievementList.value = res.data
  596. }
  597. // 字典数据转换
  598. const getDict = (data, model) => {
  599. let res
  600. if (model == 'cooperate') res = projectList.value.find((f) => f.value == data)
  601. else if (model == 'education') res = educationList.value.find((f) => f.value == data)
  602. else if (model == 'maturity') res = maturityList.value.find((f) => f.value == data)
  603. else if (model == 'type') res = industryList.value.find((f) => f.value == data)
  604. else if (model == 'status') res = statusList.value.find((f) => f.value == data)
  605. else if (model == 'field') res = fieldList.value.find((f) => f.value == data)
  606. else if (model == 'pattern') res = patternList.value.find((f) => f.value == data)
  607. else if (model == 'scale') res = scaleList.value.find((f) => f.value == data)
  608. return get(res, 'label')
  609. }
  610. const getUrl = (item) => {
  611. if (item) return `${import.meta.env.VITE_APP_HOST}${item[0].uri}`
  612. }
  613. // 地区显示
  614. const getArea = (data) => {
  615. if (data) return data.join(',')
  616. else return '暂无地区'
  617. }
  618. // 查看详情
  619. const toView = (item, type) => {
  620. if (type == '0') router.push({ path: '/project/detail', query: { id: item.id || item._id } })
  621. else if (type == '1') router.push({ path: '/expert/detail', query: { id: item.id || item._id } })
  622. else if (type == '2') router.push({ path: '/company/detail', query: { id: item.id || item._id } })
  623. else if (type == '3') router.push({ path: '/news/detail', query: { id: item.id || item._id } })
  624. else if (type == '4')
  625. router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })
  626. }
  627. // 类型
  628. const mouseOver = async (item) => {
  629. active.value = item.type
  630. await search(item.type)
  631. }
  632. // 联络专家
  633. const toChat = (item) => {
  634. router.push({ path: '/chat', query: { id: item.user } })
  635. }
  636. // 查看成果
  637. const toAchive = (item) => {
  638. router.push({ path: '/achievement', query: { type: item.value } })
  639. }
  640. const removeHtmlStyle = (html) => {
  641. let relStyle = /style\s*?=\s*?([‘"])[\s\S]*?\1/g //去除样式
  642. let relTag = /<.+?>/g //去除标签
  643. let relClass = /class\s*?=\s*?([‘"])[\s\S]*?\1/g // 清除类名
  644. let newHtml = ''
  645. if (html) {
  646. newHtml = html.replace(relStyle, '')
  647. newHtml = newHtml.replace(relTag, '')
  648. newHtml = newHtml.replace(relClass, '')
  649. }
  650. return newHtml
  651. }
  652. // 搜索
  653. const onSearch = (data) => {
  654. const query = { type: 'search' }
  655. if (data) query.searchValue = data
  656. router.push({ path: '/search', query })
  657. }
  658. </script>
  659. <style scoped lang="scss">
  660. .main {
  661. .home {
  662. position: relative;
  663. .image {
  664. width: 100%;
  665. height: 200px;
  666. }
  667. .input {
  668. width: 800px;
  669. position: absolute;
  670. left: 30%;
  671. bottom: 40%;
  672. :deep(.ant-input-affix-wrapper) {
  673. background-color: transparent;
  674. border: 3px solid #fff !important;
  675. }
  676. :deep(.ant-input) {
  677. height: 45px;
  678. line-height: 45px;
  679. font-family: PingFangSC-Regular;
  680. font-size: $global-font-size-18;
  681. padding-right: 24px;
  682. color: #fff;
  683. border: none !important;
  684. outline: none !important;
  685. box-shadow: 0 0 0 0 !important;
  686. text-shadow: 0 0 0 0 !important;
  687. background-color: transparent !important;
  688. &::placeholder {
  689. color: #ffffff !important;
  690. }
  691. }
  692. }
  693. }
  694. .one {
  695. padding: 25px 0;
  696. .one_1 {
  697. display: flex;
  698. justify-content: space-between;
  699. margin: 0 0 10px 0;
  700. .left {
  701. font-size: $global-font-size-26;
  702. font-family:
  703. PingFangSC-Semibold,
  704. PingFang SC;
  705. font-weight: 600;
  706. color: #111;
  707. line-height: 33px;
  708. }
  709. .right {
  710. text-align: right;
  711. font-size: $global-font-size-18;
  712. font-family:
  713. PingFangSC-Regular,
  714. PingFang SC;
  715. font-weight: 400;
  716. color: #2280ff;
  717. line-height: $global-font-size-16;
  718. display: block;
  719. margin-top: 13px;
  720. margin-right: 34px;
  721. }
  722. .right:hover {
  723. cursor: pointer;
  724. }
  725. }
  726. .one_2 {
  727. display: flex;
  728. .left {
  729. padding: 10px;
  730. .list {
  731. display: flex;
  732. padding: 15px;
  733. border-radius: 8px;
  734. .image {
  735. text-align: center;
  736. width: 20px;
  737. height: 20px;
  738. }
  739. .title {
  740. font-size: $global-font-size-18;
  741. font-family:
  742. PingFangSC-Regular,
  743. PingFang SC;
  744. font-weight: 400;
  745. color: #111;
  746. line-height: $global-font-size-24;
  747. }
  748. }
  749. .list:hover {
  750. border-radius: 8px;
  751. background-color: #2280ff;
  752. cursor: pointer;
  753. .title {
  754. color: #ffffff;
  755. }
  756. }
  757. .active {
  758. border-radius: 8px;
  759. background-color: #2280ff;
  760. .title {
  761. color: #ffffff;
  762. }
  763. }
  764. }
  765. .right {
  766. display: flex;
  767. justify-content: space-around;
  768. align-items: flex-start;
  769. flex-wrap: wrap;
  770. .list {
  771. padding: 20px;
  772. border-radius: 10px;
  773. margin: 0 0 10px 0;
  774. .name {
  775. display: flex;
  776. align-items: center;
  777. font-size: $global-font-size-18;
  778. font-family:
  779. PingFangSC-Medium,
  780. PingFang SC;
  781. font-weight: 500;
  782. color: #111;
  783. line-height: $global-font-size-18;
  784. display: block;
  785. margin: 5px 0 12px 0;
  786. }
  787. .name:hover {
  788. color: #2374ff;
  789. cursor: pointer;
  790. }
  791. .brief {
  792. font-size: $global-font-size-18;
  793. font-family:
  794. PingFangSC-Regular,
  795. PingFang SC;
  796. font-weight: 400;
  797. color: #333;
  798. line-height: 24px;
  799. margin-bottom: 12px;
  800. cursor: pointer;
  801. }
  802. .info {
  803. display: flex;
  804. justify-content: space-between;
  805. font-size: $global-font-size-12;
  806. font-family:
  807. PingFangSC-Regular,
  808. PingFang SC;
  809. font-weight: 400;
  810. color: #666;
  811. line-height: $global-font-size-12;
  812. margin-bottom: 15px;
  813. cursor: pointer;
  814. }
  815. .key {
  816. font-size: $global-font-size-14;
  817. font-family:
  818. PingFangSC-Regular,
  819. PingFang SC;
  820. font-weight: 400;
  821. color: #999990;
  822. line-height: $global-font-size-14;
  823. height: 22px;
  824. border-radius: 2px;
  825. border: 1px solid #dbdbdb;
  826. box-sizing: border-box;
  827. padding: 0 6px;
  828. cursor: pointer;
  829. }
  830. }
  831. .list:nth-child(1n) {
  832. background: linear-gradient(180deg, #d5e5ff, #fff);
  833. }
  834. .list:nth-child(2n) {
  835. background: linear-gradient(180deg, #cbeff8, #fff);
  836. }
  837. }
  838. }
  839. .one_3 {
  840. margin: 10px;
  841. .table_1 {
  842. display: flex;
  843. justify-content: center;
  844. height: 50px;
  845. background-image: linear-gradient(90deg, #2171f6 0, #619bf5 100%);
  846. line-height: 50px;
  847. color: #ffffff;
  848. font-size: $global-font-size-18;
  849. .title {
  850. text-align: center;
  851. }
  852. .title:hover {
  853. cursor: pointer;
  854. }
  855. }
  856. .table_2 {
  857. max-height: 400px;
  858. overflow: hidden;
  859. .list {
  860. display: flex;
  861. justify-content: center;
  862. height: 50px;
  863. line-height: 50px;
  864. font-size: $global-font-size-18;
  865. color: #666;
  866. background: #fff;
  867. .content {
  868. text-align: center;
  869. padding: 0 10px;
  870. }
  871. .content:hover {
  872. color: #2374ff;
  873. }
  874. }
  875. .list:nth-child(2n) {
  876. background: #f4f4f4;
  877. }
  878. }
  879. }
  880. .one_4 {
  881. .list {
  882. display: flex;
  883. margin: 5px 0 0 0;
  884. padding: 5px;
  885. border-radius: 8px;
  886. border: 1px solid #f4f4f4;
  887. .left {
  888. text-align: center;
  889. .image {
  890. width: 150px;
  891. height: 150px;
  892. border-radius: 10px;
  893. }
  894. }
  895. .right {
  896. padding: 5px;
  897. .right_1 {
  898. display: flex;
  899. align-content: center;
  900. .name {
  901. margin: 0 10px 0 0;
  902. word-break: break-all;
  903. font-size: $global-font-size-20;
  904. font-family:
  905. PingFangSC-Regular,
  906. PingFang SC;
  907. font-weight: 500;
  908. line-height: 24px;
  909. overflow: hidden;
  910. text-overflow: ellipsis;
  911. display: -webkit-box;
  912. -webkit-line-clamp: 2;
  913. -webkit-box-orient: vertical;
  914. }
  915. }
  916. .right_2 {
  917. grid-gap: 0.5rem;
  918. gap: 0.5rem;
  919. display: flex;
  920. margin: 10px 0;
  921. }
  922. .right_3 {
  923. display: flex;
  924. margin: 10px 0;
  925. font-size: $global-font-size-18;
  926. font-family:
  927. PingFangSC-Regular,
  928. PingFang SC;
  929. color: #666;
  930. .info {
  931. span {
  932. color: #2171f6;
  933. }
  934. }
  935. }
  936. }
  937. }
  938. .list:hover {
  939. box-shadow:
  940. 0 4px 5px -3px rgba(0, 0, 0, 0.06),
  941. 0 4px 12px 4px rgba(0, 0, 0, 0.06);
  942. }
  943. }
  944. .one_5 {
  945. display: flex;
  946. .left {
  947. .image {
  948. width: 150px;
  949. height: 320px;
  950. }
  951. }
  952. .right {
  953. display: flex;
  954. justify-content: space-between;
  955. flex-wrap: wrap;
  956. .list {
  957. display: flex;
  958. justify-content: space-between;
  959. align-items: center;
  960. padding: 20px;
  961. transition: all 0.3s;
  962. .left {
  963. font-family: PingFangSC-Regular;
  964. font-size: $global-font-size-14;
  965. color: #2374ff;
  966. line-height: $global-font-size-14;
  967. .year {
  968. margin-bottom: 2px;
  969. }
  970. .date {
  971. font-size: $global-font-size-24;
  972. line-height: $global-font-size-24;
  973. margin-bottom: 10px;
  974. }
  975. }
  976. .right {
  977. .name {
  978. font-family: PingFangSC-Medium;
  979. font-size: $global-font-size-18;
  980. color: #121834;
  981. line-height: $global-font-size-18;
  982. font-weight: 700;
  983. margin-bottom: 8px;
  984. }
  985. .content {
  986. font-size: $global-font-size-14;
  987. color: #525a68;
  988. line-height: 19px;
  989. font-weight: 400;
  990. display: -webkit-box;
  991. -webkit-line-clamp: 2;
  992. -webkit-box-orient: vertical;
  993. overflow: hidden;
  994. text-overflow: ellipsis;
  995. margin-top: 8px;
  996. }
  997. }
  998. }
  999. .list:hover {
  1000. background: #f0f7ff;
  1001. box-shadow: 0 0 16px rgba(205, 205, 205, 0.6);
  1002. cursor: pointer;
  1003. }
  1004. }
  1005. }
  1006. .one_6 {
  1007. display: flex;
  1008. padding: 20px 22px;
  1009. background-color: #fbfcfd;
  1010. .left {
  1011. max-height: 300px;
  1012. overflow: hidden;
  1013. .list {
  1014. display: flex;
  1015. align-items: center;
  1016. height: 34px;
  1017. font-size: $global-font-size-18;
  1018. .i {
  1019. display: inline-block;
  1020. vertical-align: middle;
  1021. margin-right: 10px;
  1022. width: 6px;
  1023. height: 6px;
  1024. background-color: #8ab7f1;
  1025. border-radius: 50%;
  1026. }
  1027. .other {
  1028. color: #145ca4;
  1029. text-align: center;
  1030. }
  1031. }
  1032. }
  1033. .right {
  1034. font-size: $global-font-size-18;
  1035. .right_1 {
  1036. padding: 10px 30px;
  1037. span {
  1038. margin: 0 5px 0 0;
  1039. }
  1040. }
  1041. .right_2 {
  1042. display: flex;
  1043. justify-content: center;
  1044. flex-wrap: wrap;
  1045. margin: 10px 0 0 0;
  1046. .list {
  1047. display: flex;
  1048. align-items: center;
  1049. margin: 0 0 10px 10px;
  1050. padding-left: 15px;
  1051. width: 200px;
  1052. height: 50px;
  1053. line-height: 53px;
  1054. background-color: #eaeff7;
  1055. span {
  1056. margin: 0 5px 0 0;
  1057. }
  1058. }
  1059. .list:hover {
  1060. cursor: pointer;
  1061. color: #2e70f1;
  1062. box-shadow: 0 0 10px 0 rgba(0, 69, 183, 0.3);
  1063. }
  1064. }
  1065. }
  1066. }
  1067. }
  1068. }
  1069. </style>