|
@@ -44,7 +44,11 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="content">
|
|
|
<a-timeline>
|
|
|
- <a-timeline-item v-for="(item, index) in achievementList" :key="index">
|
|
|
+ <a-timeline-item
|
|
|
+ v-for="(item, index) in achievementList"
|
|
|
+ :key="index"
|
|
|
+ @click="toCommon(item, '/achievement/detail')"
|
|
|
+ >
|
|
|
<div class="name">{{ item.name }}</div>
|
|
|
<div class="time">{{ item.time }}</div>
|
|
|
</a-timeline-item>
|
|
@@ -56,7 +60,11 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="content">
|
|
|
<a-timeline>
|
|
|
- <a-timeline-item v-for="(item, index) in projectList" :key="index">
|
|
|
+ <a-timeline-item
|
|
|
+ v-for="(item, index) in projectList"
|
|
|
+ :key="index"
|
|
|
+ @click="toCommon(item, '/project/detail')"
|
|
|
+ >
|
|
|
<div class="name">{{ item.name }}</div>
|
|
|
<div class="time">{{ item.time }}</div>
|
|
|
</a-timeline-item>
|
|
@@ -143,8 +151,13 @@ const toView = (item) => {
|
|
|
router.push({ path: `/news/detail`, query: { id: item.id || item._id } })
|
|
|
}
|
|
|
// 查看更多
|
|
|
-const toMore = () => {
|
|
|
- router.push({ path: `/achievement` })
|
|
|
+const toMore = (type) => {
|
|
|
+ if (type == '0') router.push({ path: `/achievement` })
|
|
|
+ else router.push({ path: `/project` })
|
|
|
+}
|
|
|
+// 详情
|
|
|
+const toCommon = (item, route) => {
|
|
|
+ router.push({ path: route, query: { id: item._id || item.id } })
|
|
|
}
|
|
|
const removeHtmlStyle = (html) => {
|
|
|
let relStyle = /style\s*?=\s*?([‘"])[\s\S]*?\1/g //去除样式
|