|
@@ -5,8 +5,8 @@
|
|
|
<div class="w_1200">
|
|
|
<el-col :span="24" class="one">
|
|
|
<el-row :span="24" class="one_1">
|
|
|
- <el-col :span="20" class="title">{{ info.name || '暂无标题' }}</el-col>
|
|
|
- <el-col :span="4" class="file" @click="toCollection">
|
|
|
+ <el-col :span="23" class="title">{{ info.name || '暂无标题' }}</el-col>
|
|
|
+ <el-col :span="1" class="file" @click="toCollection">
|
|
|
<el-icon><Star /></el-icon>
|
|
|
收藏
|
|
|
</el-col>
|
|
@@ -71,6 +71,51 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="four_2">{{ info.brief || '暂无' }}</el-col>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24" class="four">
|
|
|
+ <el-col :span="24" class="four_1">
|
|
|
+ <p>相关推荐</p>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="four_3">
|
|
|
+ <a-list :loading="loading" :grid="{ gutter: 16, column: 4 }" :data-source="list">
|
|
|
+ <template #renderItem="{ item }">
|
|
|
+ <el-col :span="24" class="list">
|
|
|
+ <el-col :span="24" class="name textOver">
|
|
|
+ <el-tooltip effect="dark" :content="item.name" placement="top">
|
|
|
+ {{ item.name || '暂无名称' }}
|
|
|
+ </el-tooltip>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="two_1">
|
|
|
+ <span>技术领域:</span>{{ getDict(item.field || '暂无技术领域', 'field') }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="two_1">
|
|
|
+ <span>成果地区:</span>{{ getArea(item.area || '暂无成果地区') }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="two_1">
|
|
|
+ <span>单位:</span>{{ item.user || '暂无单位' }}
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="bottom">
|
|
|
+ <a-button size="small" type="primary" @click="toView(item)">
|
|
|
+ 查看详情
|
|
|
+ </a-button>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </template>
|
|
|
+ </a-list>
|
|
|
+ <el-col :span="24" class="page">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :page-sizes="[10, 20, 50, 100, 200]"
|
|
|
+ :total="total"
|
|
|
+ :page-size="limit"
|
|
|
+ v-model:current-page="currentPage"
|
|
|
+ @current-change="changePage"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
</div>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -84,8 +129,10 @@ import { get } from 'lodash-es'
|
|
|
const $checkRes = inject('$checkRes')
|
|
|
// 接口
|
|
|
import { DemandStore } from '@/store/api/platform/demand'
|
|
|
+import { AchievementStore } from '@/store/api/platform/achievement'
|
|
|
import { DictDataStore } from '@/store/api/system/dictData'
|
|
|
const store = DemandStore()
|
|
|
+const achievementStore = AchievementStore()
|
|
|
const dictDataStore = DictDataStore()
|
|
|
import { UserStore } from '@/store/user'
|
|
|
const userStore = UserStore()
|
|
@@ -102,11 +149,17 @@ const methodList = ref([])
|
|
|
const urgentList = ref([])
|
|
|
const fieldList = ref([])
|
|
|
const demandList = ref([])
|
|
|
+// 成果列表
|
|
|
+const list = ref([])
|
|
|
+let skip = 0
|
|
|
+let limit = inject('limit')
|
|
|
+const total = ref(0)
|
|
|
// 请求
|
|
|
onMounted(async () => {
|
|
|
loading.value = true
|
|
|
await searchOther()
|
|
|
await search()
|
|
|
+ await searchAchieve({ skip, limit })
|
|
|
loading.value = false
|
|
|
})
|
|
|
const search = async () => {
|
|
@@ -116,6 +169,19 @@ const search = async () => {
|
|
|
if (res.errcode == '0') info.value = res.data
|
|
|
}
|
|
|
}
|
|
|
+const searchAchieve = async (query = { skip: 0, limit }) => {
|
|
|
+ const info = {
|
|
|
+ skip: query.skip,
|
|
|
+ limit: query.limit,
|
|
|
+ is_use: '0',
|
|
|
+ status: '1'
|
|
|
+ }
|
|
|
+ const res = await achievementStore.query(info)
|
|
|
+ if (res.errcode == '0') {
|
|
|
+ list.value = res.data
|
|
|
+ total.value = res.total
|
|
|
+ }
|
|
|
+}
|
|
|
const searchOther = async () => {
|
|
|
let result
|
|
|
// 合作方式
|
|
@@ -157,6 +223,21 @@ const toDocking = () => {
|
|
|
const toCollection = () => {
|
|
|
console.log('收藏')
|
|
|
}
|
|
|
+// 查看
|
|
|
+const toView = (item) => {
|
|
|
+ router.push({ path: '/achievement/detail', query: { id: item.id || item._id } })
|
|
|
+}
|
|
|
+const currentPage = ref(1)
|
|
|
+// 分页
|
|
|
+const changePage = (page = currentPage.value) => {
|
|
|
+ searchAchieve({ skip: (page - 1) * limit, limit: limit })
|
|
|
+}
|
|
|
+const sizeChange = (limits) => {
|
|
|
+ console.log(limits)
|
|
|
+ limit = limits
|
|
|
+ currentPage.value = 1
|
|
|
+ searchAchieve({ skip: 0, limit: limit })
|
|
|
+}
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
|
.main {
|
|
@@ -180,7 +261,7 @@ const toCollection = () => {
|
|
|
.file {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- justify-content: end;
|
|
|
+ justify-content: space-between;
|
|
|
font-family: PingFangSC-Regular;
|
|
|
font-size: 14px;
|
|
|
color: #2374ff;
|
|
@@ -303,6 +384,62 @@ const toCollection = () => {
|
|
|
background: #2374ff;
|
|
|
}
|
|
|
}
|
|
|
+ .four_3 {
|
|
|
+ margin: 20px;
|
|
|
+
|
|
|
+ .list {
|
|
|
+ border: 1px solid #edeff2;
|
|
|
+ background: #fff;
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.03);
|
|
|
+ border-radius: 2px;
|
|
|
+ width: 280px;
|
|
|
+ height: 180px;
|
|
|
+ margin-bottom: 15px;
|
|
|
+ cursor: pointer;
|
|
|
+ transition: all 0.3s;
|
|
|
+ padding: 15px;
|
|
|
+ .name {
|
|
|
+ font-size: 16px;
|
|
|
+ color: #121834;
|
|
|
+ height: 16px;
|
|
|
+ line-height: 13px;
|
|
|
+ font-weight: 500;
|
|
|
+ margin: 10px 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ .name:hover {
|
|
|
+ color: #2374ff;
|
|
|
+ }
|
|
|
+
|
|
|
+ .two_1 {
|
|
|
+ font-size: 12px;
|
|
|
+ text-align: justify;
|
|
|
+ line-height: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ letter-spacing: 0;
|
|
|
+ color: #8f97a3;
|
|
|
+ margin-top: 15px;
|
|
|
+
|
|
|
+ span:last-child {
|
|
|
+ color: #525a68;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .bottom {
|
|
|
+ text-align: right;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .list:hover {
|
|
|
+ background: #f0f7ff;
|
|
|
+ box-shadow: 0 0 16px rgba(205, 205, 205, 0.6);
|
|
|
+ }
|
|
|
+
|
|
|
+ .page {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row-reverse;
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.pointer {
|
|
|
display: flex;
|