|
@@ -1,8 +1,17 @@
|
|
|
<script setup>
|
|
|
import shareBox from '@/components/shareBox/index.vue'
|
|
|
+import powerPerson from '@/components/subscribe-manager/powerPerson.vue'
|
|
|
import { contentModel } from '@jy/data-models'
|
|
|
-import { onMounted, ref } from 'vue'
|
|
|
+import { computed, getCurrentInstance, onMounted, ref } from 'vue'
|
|
|
import { useRoute } from 'vue-router/composables'
|
|
|
+import { useStore } from '@/store'
|
|
|
+import { useDistribute } from '@/views/article-content/composables/useDistribute'
|
|
|
+import { useShare } from '@/views/article-content/composables/useShare'
|
|
|
+
|
|
|
+const getters = useStore().getters
|
|
|
+const vt = computed(() => {
|
|
|
+ return useStore().getters['user/vt']
|
|
|
+})
|
|
|
|
|
|
const headerType = '业主委托项目'
|
|
|
|
|
@@ -17,21 +26,14 @@ const keepLabel = [
|
|
|
}
|
|
|
]
|
|
|
|
|
|
-// 打开弹框
|
|
|
-const useShareBox = ref(null)
|
|
|
+const params = useRoute().params
|
|
|
+const wxShareImgURL = '/biddetail/normal/qr/' + params.id
|
|
|
|
|
|
-onMounted(() => {
|
|
|
- const params = useRoute().params
|
|
|
- useShareBox.value.sendData({
|
|
|
- code: 1,
|
|
|
- stype: params.content,
|
|
|
- id: params.id,
|
|
|
- link: window.location.href
|
|
|
- })
|
|
|
-})
|
|
|
-function openShare() {
|
|
|
- useShareBox.value.showNewuserDialog = true
|
|
|
-}
|
|
|
+// 分享
|
|
|
+const { openShare, useShareRef } = useShare()
|
|
|
+// 分发
|
|
|
+const { doSubmitDistribute, openDistribute, usePowerRef } = useDistribute()
|
|
|
+// 监控
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -39,7 +41,9 @@ function openShare() {
|
|
|
<div class="before-type" v-if="contentModel.isSelfSite">
|
|
|
{{ headerType }}
|
|
|
</div>
|
|
|
- <h1 class="title">{{ contentModel.title }}</h1>
|
|
|
+ <h1 class="title">
|
|
|
+ {{ contentModel.title }}
|
|
|
+ </h1>
|
|
|
<div class="tags">
|
|
|
<a
|
|
|
:href="item.link"
|
|
@@ -51,19 +55,35 @@ function openShare() {
|
|
|
<div class="actions-info">
|
|
|
<div class="time-label">{{ contentModel.time }}</div>
|
|
|
<div class="actions">
|
|
|
+ <div class="action-item" @click="openDistribute">
|
|
|
+ <span class="iconfont icon-shoudongfenfa"></span>
|
|
|
+ <span class="text">分发</span>
|
|
|
+ </div>
|
|
|
<div class="action-item" @click="openShare">
|
|
|
<span class="iconfont icon-fenxiang"></span>
|
|
|
<span class="text">转给同事</span>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="action-item">
|
|
|
- <span class="iconfont icon-fenxiang"></span>
|
|
|
+ <el-popover
|
|
|
+ class="action-wx-popover"
|
|
|
+ placement="bottom"
|
|
|
+ title="微信扫一扫"
|
|
|
+ width="120"
|
|
|
+ :append-to-body="false"
|
|
|
+ trigger="hover"
|
|
|
+ >
|
|
|
+ <img :src="wxShareImgURL" alt="微信分享" />
|
|
|
+ <div class="action-item" slot="reference">
|
|
|
+ <span class="iconfont icon-weixin_line"></span>
|
|
|
+ <span class="text">微信分享</span>
|
|
|
+ </div>
|
|
|
+ </el-popover>
|
|
|
</div>
|
|
|
+
|
|
|
<div class="action-item">
|
|
|
<span class="iconfont icon-canbiao"></span>
|
|
|
</div>
|
|
|
- <div class="action-item">
|
|
|
- <span class="iconfont icon-weixin_line"></span>
|
|
|
- </div>
|
|
|
<div class="action-item">
|
|
|
<span class="iconfont icon-shoucang_weishoucang"></span>
|
|
|
<span class="iconfont icon-shoucang"></span>
|
|
@@ -83,7 +103,13 @@ function openShare() {
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 分享弹窗 -->
|
|
|
- <shareBox ref="useShareBox"></shareBox>
|
|
|
+ <shareBox ref="useShareRef"></shareBox>
|
|
|
+ <!-- 分发人员弹窗 -->
|
|
|
+ <powerPerson
|
|
|
+ ref="usePowerRef"
|
|
|
+ :vt="vt"
|
|
|
+ @manualDiatribution="doSubmitDistribute"
|
|
|
+ ></powerPerson>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -178,6 +204,32 @@ function openShare() {
|
|
|
margin-left: 2px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .action-wx-popover {
|
|
|
+ ::v-deep {
|
|
|
+ .el-popover {
|
|
|
+ width: 120px;
|
|
|
+ min-width: unset;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0;
|
|
|
+ padding-top: 12px;
|
|
|
+ }
|
|
|
+ .el-popover__title {
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 18px;
|
|
|
+ color: #1d1d1d;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ img {
|
|
|
+ min-width: 120px;
|
|
|
+ height: 120px;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.expands-info {
|