|
@@ -89,8 +89,7 @@ const { bgColor,headImgStyle,endImgStyle,layoutBaseInfo } = toRefs(smartState)
|
|
|
|
|
|
|
|
|
const showImgPop = ref(false)
|
|
|
-const linkUrl = (waterMarkStr) =>{
|
|
|
- console.log(publicSettingStore)
|
|
|
+const handleCopyLink = (type) =>{
|
|
|
let str=''
|
|
|
let url=''
|
|
|
const baseUrl= publicSettingStore.publicSetting.ReportViewUrl;
|
|
@@ -99,7 +98,7 @@ const linkUrl = (waterMarkStr) =>{
|
|
|
// let waterMarkStr= '';
|
|
|
|
|
|
str= reportInfo.value.ReportLayout===1
|
|
|
- ? `${baseUrl}/reportshare_crm_report?code=${reportInfo.value.ReportCode}&flag=${waterMarkStr}& ${reportInfo.value.Title}`
|
|
|
+ ? `${baseUrl}/reportshare_crm_report?code=${reportInfo.value.ReportCode}&flag=${waterMarkStr.value}& ${reportInfo.value.Title}`
|
|
|
: `${baseUrl}/reportshare_smart_report?code=${reportInfo.value.ReportCode}& ${reportInfo.value.Title}`
|
|
|
|
|
|
const params={
|
|
@@ -115,21 +114,28 @@ const linkUrl = (waterMarkStr) =>{
|
|
|
url=location.origin
|
|
|
}
|
|
|
shareUrls.value=url+'/v1/share/'+res.Data.UrlToken
|
|
|
+
|
|
|
+ if(type==='urcode') {
|
|
|
+ showImgPop.value=true
|
|
|
+ }else {
|
|
|
+ copyText(shareUrls.value,undefined,(error,event)=>{
|
|
|
+ if(error){
|
|
|
+ showToast('复制链接失败')
|
|
|
+
|
|
|
+ throw new Error('复制数据失败'+JSON.stringify(error))
|
|
|
+ }else{
|
|
|
+ showToast('复制链接成功')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
-function handleCopyLink() {
|
|
|
- copyText(shareUrls.value,undefined,(error,event)=>{
|
|
|
- if(error){
|
|
|
- showToast('复制链接成功')
|
|
|
-
|
|
|
- throw new Error('复制数据失败'+JSON.stringify(error))
|
|
|
- }else{
|
|
|
- showToast('复制链接成功')
|
|
|
- }
|
|
|
- })
|
|
|
-}
|
|
|
+const shareCodeUrls = computed(() => {
|
|
|
+ let index = shareUrls.value.indexOf(' ');
|
|
|
+ return shareUrls.value.substring(0,index)
|
|
|
+})
|
|
|
|
|
|
const waterMarkStr=ref('')
|
|
|
const getSystemInfoFun=()=>{
|
|
@@ -142,7 +148,6 @@ const getSystemInfoFun=()=>{
|
|
|
waterMarkString=`${systemUserInfo.RealName}${systemUserInfo.Mobile?systemUserInfo.Mobile:systemUserInfo.Email}`
|
|
|
waterMarkString=encodeURIComponent(waterMarkString)
|
|
|
waterMarkStr.value=Base64.encode(waterMarkString)
|
|
|
- linkUrl(waterMarkStr.value)
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -216,7 +221,7 @@ const getSystemInfoFun=()=>{
|
|
|
<img class="icon" src="@/assets/imgs/report/icon_copy.png" alt="">
|
|
|
<div>复制链接</div>
|
|
|
</div>
|
|
|
- <div class="item" @click="showImgPop=true" v-permission="reportManageBtn.reportManage_reportView_wechartShare">
|
|
|
+ <div class="item" @click="handleCopyLink('urcode')" v-permission="reportManageBtn.reportManage_reportView_wechartShare">
|
|
|
<img class="icon" src="@/assets/imgs/report/icon_wx_black.png" alt="">
|
|
|
<div>微信分享</div>
|
|
|
</div>
|
|
@@ -228,7 +233,7 @@ const getSystemInfoFun=()=>{
|
|
|
v-model:show="showImgPop"
|
|
|
round
|
|
|
>
|
|
|
- <vue-qr :text="shareUrls" colorDark="#333" colorLight="#fff" :dotScale="1"></vue-qr>
|
|
|
+ <vue-qr :text="shareCodeUrls" colorDark="#333" colorLight="#fff" :dotScale="1"></vue-qr>
|
|
|
</van-popup>
|
|
|
</template>
|
|
|
|