|
@@ -44,6 +44,7 @@ import ContentHeaderSkeleton from '@/views/article-content/components/ContentHea
|
|
import PoverTimeLine from '@/components/time-line/PoverTimeLine.vue'
|
|
import PoverTimeLine from '@/components/time-line/PoverTimeLine.vue'
|
|
import { useHoverHighlightTextPopover } from '@/views/article-content/composables/useHoverElementClientRect'
|
|
import { useHoverHighlightTextPopover } from '@/views/article-content/composables/useHoverElementClientRect'
|
|
import attachmentDownload from '@/composables/attachment-download/component/AttachmentDownload.vue'
|
|
import attachmentDownload from '@/composables/attachment-download/component/AttachmentDownload.vue'
|
|
|
|
+import { dateFromNow } from '@jy/util'
|
|
|
|
|
|
useContentStore()
|
|
useContentStore()
|
|
// 判断在哪个容器
|
|
// 判断在哪个容器
|
|
@@ -250,14 +251,42 @@ const canShowMask = computed(() => {
|
|
const popoverElement = ref(null)
|
|
const popoverElement = ref(null)
|
|
const popoverTriggerElement = ref(null)
|
|
const popoverTriggerElement = ref(null)
|
|
|
|
|
|
-// 项目名称悬浮窗口
|
|
|
|
-const projectTimeLine = computed(() => {
|
|
|
|
- return timeLineList.value
|
|
|
|
|
|
+// 招标、采购进度
|
|
|
|
+const winnerTimeLineList = computed(() => {
|
|
|
|
+ return ContentExpandsModel.value.recommendWinners.list.map((v) => {
|
|
|
|
+ const tag = v._o.subtype || v._o.toptype || ''
|
|
|
|
+ return {
|
|
|
|
+ content: replaceKeyword(
|
|
|
|
+ v.title,
|
|
|
|
+ ContentExpandsModel.value.recommendWinners.name,
|
|
|
|
+ ['<span class="highlight-text">', '</span>']
|
|
|
|
+ ),
|
|
|
|
+ s_id: v.id,
|
|
|
|
+ tags: tag ? [tag] : [],
|
|
|
|
+ time: v?.time ? dateFromNow(v?.time) : '',
|
|
|
|
+ isActive: v.isActive
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+// 项目名称、企业名称悬浮窗口
|
|
|
|
+const popoverTimeLine = computed(() => {
|
|
|
|
+ if (elementState.value.className.indexOf('project-name') !== -1) {
|
|
|
|
+ return timeLineList.value
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ elementState.value.text ===
|
|
|
|
+ ContentExpandsModel.value.recommendWinners.name &&
|
|
|
|
+ elementState.value.className.indexOf('winner-name') !== -1
|
|
|
|
+ ) {
|
|
|
|
+ return winnerTimeLineList.value
|
|
|
|
+ }
|
|
|
|
+ return []
|
|
})
|
|
})
|
|
|
|
|
|
const { elementState } = useHoverHighlightTextPopover({
|
|
const { elementState } = useHoverHighlightTextPopover({
|
|
parentSelector: '.article-page-container',
|
|
parentSelector: '.article-page-container',
|
|
- hasClass: 'project-name',
|
|
|
|
|
|
+ hasClass: 'keyword-underline',
|
|
onChangeHover: debounce((isHover) => {
|
|
onChangeHover: debounce((isHover) => {
|
|
popoverElement.value.doChangePopover(isHover)
|
|
popoverElement.value.doChangePopover(isHover)
|
|
}, 150)
|
|
}, 150)
|
|
@@ -457,7 +486,7 @@ const { elementState } = useHoverHighlightTextPopover({
|
|
|
|
|
|
<pover-time-line
|
|
<pover-time-line
|
|
trigger="manual"
|
|
trigger="manual"
|
|
- :stepList="projectTimeLine"
|
|
|
|
|
|
+ :stepList="popoverTimeLine"
|
|
ref="popoverElement"
|
|
ref="popoverElement"
|
|
>
|
|
>
|
|
<div slot="content" :style="elementState.style"></div>
|
|
<div slot="content" :style="elementState.style"></div>
|
|
@@ -504,6 +533,17 @@ const { elementState } = useHoverHighlightTextPopover({
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
+.article-page-container {
|
|
|
|
+ ::v-deep {
|
|
|
|
+ .step-items:hover .item-label {
|
|
|
|
+ text-decoration: underline;
|
|
|
|
+ color: #fe7379;
|
|
|
|
+ .highlight-text {
|
|
|
|
+ color: inherit;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
.article-content-footer-container {
|
|
.article-content-footer-container {
|
|
::v-deep {
|
|
::v-deep {
|
|
.adsense {
|
|
.adsense {
|