|
@@ -4,14 +4,24 @@
|
|
|
class="content-project-timeline"
|
|
|
v-if="stepList.length"
|
|
|
>
|
|
|
- <div class="action-right-container" slot="header-actions">
|
|
|
- <DownProjectReport
|
|
|
- class="action-item"
|
|
|
- v-if="hasProject"
|
|
|
- :id="content.id"
|
|
|
- :name="projectName"
|
|
|
- :beforeLeavePage="beforeLeavePage"
|
|
|
- />
|
|
|
+ <div class="flex items-center justify-between action-right-container">
|
|
|
+ <div class="flex items-center">
|
|
|
+ <DownProjectReport
|
|
|
+ class="action-item"
|
|
|
+ v-if="hasProject"
|
|
|
+ :id="content.id"
|
|
|
+ :name="projectName"
|
|
|
+ :beforeLeavePage="beforeLeavePage"
|
|
|
+ />
|
|
|
+ <div
|
|
|
+ v-if="showProjectButton"
|
|
|
+ class="flex items-center action-item"
|
|
|
+ @click="onProjectReport"
|
|
|
+ >
|
|
|
+ <i class="iconfont icon-xiazaixiangmubaogao font-size-20px"></i>
|
|
|
+ <span class="action-text">项目分析报告</span>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<span class="action-item clickable follow-project">
|
|
|
<QuickMonitor
|
|
|
:beforeLeavePage="beforeLeavePage"
|
|
@@ -26,7 +36,7 @@
|
|
|
<div class="bg-white">
|
|
|
<h5 class="project-title">{{ projectName }}</h5>
|
|
|
<ProjectTimeline :stepList="stepList2" @itemClick="itemClick" />
|
|
|
- <div style="height: 8px;background-color: brown;" v-if="false"></div>
|
|
|
+ <div style="height: 8px; background-color: brown" v-if="false"></div>
|
|
|
<TimeLine :stepList="stepList" @itemClick="itemClick" v-if="false">
|
|
|
<template v-slot:step-footer="{ step }">
|
|
|
<span v-if="step.bidAmountFormatted">
|
|
@@ -90,7 +100,8 @@ export default {
|
|
|
...mapState({
|
|
|
content: (state) => state.article.mainModel.content,
|
|
|
expandModel: (state) => state.article.expandModel,
|
|
|
- otherModel: (state) => state.article.otherModel
|
|
|
+ otherModel: (state) => state.article.otherModel,
|
|
|
+ reportBtn: (state) => state.article.reportBtn
|
|
|
}),
|
|
|
...mapGetters('user', ['isNewBusiness']),
|
|
|
projectName() {
|
|
@@ -130,6 +141,9 @@ export default {
|
|
|
bidAmountFormatted: p.bidAmount ? formatMoney(p.bidAmount) : ''
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ showProjectButton() {
|
|
|
+ return this.reportBtn?.project_report_button
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -159,6 +173,30 @@ export default {
|
|
|
if (!id) return
|
|
|
if (item.isActive) return
|
|
|
this.__toArticlePage(id)
|
|
|
+ },
|
|
|
+ onProjectReport() {
|
|
|
+ const { project_report_id } = this.reportBtn
|
|
|
+ // 判断是否购买过,已购买跳转报告页,未购买跳转购买页
|
|
|
+ if (project_report_id) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/report/analysis/detail',
|
|
|
+ query: {
|
|
|
+ id: project_report_id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ // 项目分析报告 name: 项目名称(下单页展示用),buyer:采购单位名称(下单接口参数用)
|
|
|
+ const buyers = this.content?._summary.buyers || []
|
|
|
+ const buyerName = buyers[0]?.name
|
|
|
+ this.$router.push({
|
|
|
+ path: '/order/create/analysis-report/project',
|
|
|
+ query: {
|
|
|
+ name: this.content?.projectName,
|
|
|
+ id: this.content?.id,
|
|
|
+ buyer: buyerName
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -174,8 +212,8 @@ export default {
|
|
|
}
|
|
|
|
|
|
.action-right-container {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
+ padding: 8px 16px 8px 0;
|
|
|
+ background: #fff;
|
|
|
}
|
|
|
.action-item {
|
|
|
margin-left: 16px;
|
|
@@ -186,4 +224,7 @@ export default {
|
|
|
margin-left: 4px;
|
|
|
}
|
|
|
}
|
|
|
+::v-deep .content-module-header {
|
|
|
+ border-bottom: 0;
|
|
|
+}
|
|
|
</style>
|