index.vue 31 KB

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