|
@@ -0,0 +1,285 @@
|
|
|
+<template>
|
|
|
+ <div id="index">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24" class="main animate__animated animate__backInRight" v-loading="loading">
|
|
|
+ <el-col :span="24" class="science">
|
|
|
+ <el-image class="image" :src="science" fit="fill" />
|
|
|
+ </el-col>
|
|
|
+ <div class="w_1200">
|
|
|
+ <el-col :span="24" class="one">
|
|
|
+ <el-col :span="24" class="one_1">
|
|
|
+ <el-col :span="12" class="left">汇聚科技创新的创新赛道</el-col>
|
|
|
+ <el-col :span="12" class="right">查看全部项目</el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="one_2">
|
|
|
+ <el-col :span="4" class="left">
|
|
|
+ <el-col
|
|
|
+ :span="24"
|
|
|
+ class="list"
|
|
|
+ v-for="(item, index) in typeList"
|
|
|
+ :key="index"
|
|
|
+ @onmouseover="mouseOver(item)"
|
|
|
+ >
|
|
|
+ <el-col :span="6" class="image">
|
|
|
+ <el-image class="image" :src="item.url" fit="fill" />
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="18" class="title">{{ item.title }}</el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="20" class="right">
|
|
|
+ <el-col
|
|
|
+ :span="7"
|
|
|
+ class="list"
|
|
|
+ v-for="(item, index) in list"
|
|
|
+ :key="index"
|
|
|
+ @click="toView(item)"
|
|
|
+ >
|
|
|
+ <el-col :span="24" class="name">{{ item.name || '暂无项目名称' }}</el-col>
|
|
|
+ <el-col :span="24" class="brief textOver">
|
|
|
+ 项目介绍:{{ item.brief || '暂无项目介绍' }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="info">
|
|
|
+ <div>技术成熟度:{{ getDict(item.maturity, 'maturity') }}</div>
|
|
|
+ <div>合作类型:{{ getDict(item.cooperate, 'cooperate') }}</div>
|
|
|
+ </el-col>
|
|
|
+ <span class="key">{{ getDict(item.type, 'type') }}</span>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="one">
|
|
|
+ <el-col :span="24" class="one_1">
|
|
|
+ <el-col :span="12" class="left">汇聚各种行业的专家通</el-col>
|
|
|
+ <el-col :span="12" class="right">查看更多专家</el-col>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="one_2"> </el-col>
|
|
|
+ </el-col>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+const $checkRes = inject('$checkRes')
|
|
|
+import { get } from 'lodash-es'
|
|
|
+// 接口
|
|
|
+import { DictDataStore } from '@/store/api/system/dictData'
|
|
|
+import { ProjectStore } from '@/store/api/platform/project'
|
|
|
+const store = ProjectStore()
|
|
|
+const dictDataStore = DictDataStore()
|
|
|
+// 路由
|
|
|
+const route = useRoute()
|
|
|
+// 图片引入
|
|
|
+import science from '@/assets/news.png'
|
|
|
+import science_1 from '@/assets/science_1.png'
|
|
|
+import science_2 from '@/assets/science_2.png'
|
|
|
+import science_3 from '@/assets/science_3.png'
|
|
|
+import science_4 from '@/assets/science_4.png'
|
|
|
+import science_5 from '@/assets/science_5.png'
|
|
|
+import science_6 from '@/assets/science_6.png'
|
|
|
+import science_7 from '@/assets/science_7.png'
|
|
|
+import science_8 from '@/assets/science_8.png'
|
|
|
+import science_9 from '@/assets/science_9.png'
|
|
|
+// 加载中
|
|
|
+const loading = ref(false)
|
|
|
+const typeList = ref([
|
|
|
+ { url: science_1, title: '生物技术', type: '0' },
|
|
|
+ { url: science_2, title: '信息技术', type: '1' },
|
|
|
+ { url: science_3, title: '新材料', type: '2' },
|
|
|
+ { url: science_4, title: '新能源', type: '3' },
|
|
|
+ { url: science_5, title: '智能制造', type: '4' },
|
|
|
+ { url: science_6, title: '光电芯片', type: '5' },
|
|
|
+ { url: science_7, title: '人工智能', type: '6' },
|
|
|
+ { url: science_8, title: '航空航天', type: '7' },
|
|
|
+ { url: science_9, title: '其他', type: '8' }
|
|
|
+])
|
|
|
+const list = ref([])
|
|
|
+const projectList = ref([])
|
|
|
+const maturityList = ref([])
|
|
|
+const industryList = ref([])
|
|
|
+// 请求
|
|
|
+onMounted(async () => {
|
|
|
+ loading.value = true
|
|
|
+ await searchOther()
|
|
|
+ await search()
|
|
|
+ loading.value = false
|
|
|
+})
|
|
|
+const searchOther = async () => {
|
|
|
+ let result
|
|
|
+ // 合作类型
|
|
|
+ result = await dictDataStore.query({ code: 'projectType', is_use: '0' })
|
|
|
+ if ($checkRes(result)) projectList.value = result.data
|
|
|
+ // 成熟度
|
|
|
+ result = await dictDataStore.query({ code: 'projectMaturity', is_use: '0' })
|
|
|
+ if ($checkRes(result)) maturityList.value = result.data
|
|
|
+ // 行业分类
|
|
|
+ result = await dictDataStore.query({ code: 'industry', is_use: '0' })
|
|
|
+ if ($checkRes(result)) industryList.value = result.data
|
|
|
+}
|
|
|
+const search = async (data) => {
|
|
|
+ const info = {
|
|
|
+ skip: 0,
|
|
|
+ limit: 9,
|
|
|
+ is_use: '0',
|
|
|
+ status: '1'
|
|
|
+ }
|
|
|
+ if (data?.type) info.type = data.type
|
|
|
+ const res = await store.query(info)
|
|
|
+ if (res.errcode == '0') list.value = res.data
|
|
|
+}
|
|
|
+// 字典数据转换
|
|
|
+const getDict = (data, model) => {
|
|
|
+ let res
|
|
|
+ if (model == 'cooperate') res = projectList.value.find((f) => f.value == data)
|
|
|
+ else if (model == 'maturity') res = maturityList.value.find((f) => f.value == data)
|
|
|
+ else if (model == 'type') res = industryList.value.find((f) => f.value == data)
|
|
|
+ return get(res, 'label')
|
|
|
+}
|
|
|
+// 查看详情
|
|
|
+const toView = (item) => {
|
|
|
+ console.log(item)
|
|
|
+}
|
|
|
+// 查询
|
|
|
+const mouseOver = (item) => {
|
|
|
+ console.log(item)
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style scoped lang="scss">
|
|
|
+.main {
|
|
|
+ .science {
|
|
|
+ .image {
|
|
|
+ width: 100%;
|
|
|
+ height: 250px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .one {
|
|
|
+ padding: 25px 0;
|
|
|
+ .one_1 {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+ .left {
|
|
|
+ font-size: 24px;
|
|
|
+ font-family:
|
|
|
+ PingFangSC-Semibold,
|
|
|
+ PingFang SC;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #111;
|
|
|
+ line-height: 33px;
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ text-align: right;
|
|
|
+ font-size: 14px;
|
|
|
+ font-family:
|
|
|
+ PingFangSC-Regular,
|
|
|
+ PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #2280ff;
|
|
|
+ line-height: 14px;
|
|
|
+ display: block;
|
|
|
+ margin-top: 13px;
|
|
|
+ margin-right: 34px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .one_2 {
|
|
|
+ display: flex;
|
|
|
+ .left {
|
|
|
+ padding: 10px;
|
|
|
+ .list {
|
|
|
+ display: flex;
|
|
|
+ padding: 15px;
|
|
|
+ border-radius: 8px;
|
|
|
+ .image {
|
|
|
+ text-align: center;
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ }
|
|
|
+ .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family:
|
|
|
+ PingFangSC-Regular,
|
|
|
+ PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #111;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list:hover {
|
|
|
+ border-radius: 8px;
|
|
|
+ background-color: #2280ff;
|
|
|
+ .title {
|
|
|
+ color: #ffffff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .right {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-around;
|
|
|
+ align-items: flex-start;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ .list {
|
|
|
+ padding: 20px;
|
|
|
+ border-radius: 10px;
|
|
|
+ margin: 0 0 10px 0;
|
|
|
+
|
|
|
+ .name {
|
|
|
+ font-size: 16px;
|
|
|
+ font-family:
|
|
|
+ PingFangSC-Medium,
|
|
|
+ PingFang SC;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #111;
|
|
|
+ line-height: 16px;
|
|
|
+ display: block;
|
|
|
+ width: 100%;
|
|
|
+ margin: 12px 0;
|
|
|
+ }
|
|
|
+ .brief {
|
|
|
+ font-size: 14px;
|
|
|
+ font-family:
|
|
|
+ PingFangSC-Regular,
|
|
|
+ PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #333;
|
|
|
+ line-height: 24px;
|
|
|
+ margin-bottom: 12px;
|
|
|
+ }
|
|
|
+ .info {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ font-size: 12px;
|
|
|
+ font-family:
|
|
|
+ PingFangSC-Regular,
|
|
|
+ PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #666;
|
|
|
+ line-height: 12px;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ }
|
|
|
+ .key {
|
|
|
+ font-size: 12px;
|
|
|
+ font-family:
|
|
|
+ PingFangSC-Regular,
|
|
|
+ PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #999990;
|
|
|
+ line-height: 20px;
|
|
|
+ height: 22px;
|
|
|
+ border-radius: 2px;
|
|
|
+ border: 1px solid #dbdbdb;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 6px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list:nth-child(1n) {
|
|
|
+ background: linear-gradient(180deg, #d5e5ff, #fff);
|
|
|
+ }
|
|
|
+ .list:nth-child(2n) {
|
|
|
+ background: linear-gradient(180deg, #cbeff8, #fff);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|