|
@@ -2,11 +2,17 @@
|
|
|
import { showToast,showDialog } from 'vant';
|
|
|
import apiReport from '@/api/report'
|
|
|
import {useCachedViewsStore} from '@/store/modules/cachedViews'
|
|
|
+import {usePublicSettingStore} from '@/store/modules/publicSetting'
|
|
|
const cachedViewsStore=useCachedViewsStore()
|
|
|
+const publicSettingStore = usePublicSettingStore()
|
|
|
|
|
|
const props=defineProps({
|
|
|
reportData:{
|
|
|
default:''
|
|
|
+ },
|
|
|
+ waterMarkStr:{
|
|
|
+ type:String,
|
|
|
+ default:'',
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -20,29 +26,23 @@ function handleConfirmPublish(type){
|
|
|
ReportIds:props.reportData.Id.toString(),
|
|
|
ReportUrl:generatePdfLinks(props.reportData.ReportCode)
|
|
|
}).then(res=>{
|
|
|
- if(res.Ret==200){
|
|
|
- cachedViewsStore.removeCaches('ReportList')
|
|
|
- if(type===2){
|
|
|
- handleReportMessageSend(true)
|
|
|
+ if(res.Ret!=200) return;
|
|
|
+ cachedViewsStore.removeCaches('ReportList')
|
|
|
+ if(type===2){
|
|
|
+ handleReportMessageSend(true)
|
|
|
+ }else{
|
|
|
+ if(res.Data){
|
|
|
+ showDialog({ title: '发布提示', message: res.Data }).then(()=>{})
|
|
|
}else{
|
|
|
- if(res.Data){
|
|
|
- showDialog({
|
|
|
- title: '发布提示',
|
|
|
- message: res.Data,
|
|
|
- }).then(()=>{
|
|
|
-
|
|
|
- })
|
|
|
- }else{
|
|
|
- showToast('发布成功')
|
|
|
- }
|
|
|
- emits('close','refresh')
|
|
|
+ showToast('发布成功')
|
|
|
}
|
|
|
+ emits('close','refresh')
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
|
|
|
function generatePdfLinks(Code){
|
|
|
- return `${publicSettingStore.publicSetting.ReportViewUrl}/reportshare_pdf?code=${Code}&flag=${waterMarkStr.value}`
|
|
|
+ return `${publicSettingStore.publicSetting.ReportViewUrl}/reportshare_pdf?code=${Code}&flag=${props.waterMarkStr}`
|
|
|
}
|
|
|
|
|
|
// 推送消息
|
|
@@ -69,7 +69,7 @@ function handleReportMessageSend(publish){
|
|
|
<div class="btns">
|
|
|
<div :class="['btn blue',reportData.MsgIsSend===1?'disabled':'']" @click="handleConfirmPublish(2)">发布&推送</div>
|
|
|
<div class="btn" @click="handleConfirmPublish(1)">仅发布</div>
|
|
|
- <div class="btn" @click="emits('close')">取消</div>
|
|
|
+ <div class="btn" @click="emits('close')" style="margin-bottom: 0;">取消</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -78,17 +78,22 @@ function handleReportMessageSend(publish){
|
|
|
.publish-report-pop-box{
|
|
|
padding: 48px;
|
|
|
.title{
|
|
|
- font-size: 36px;
|
|
|
+ font-size: 32px;
|
|
|
text-align: center;
|
|
|
+ font-weight: 600;
|
|
|
margin-bottom: 32px;
|
|
|
}
|
|
|
.tips{
|
|
|
color: $font-grey;
|
|
|
margin-bottom: 48px;
|
|
|
+ font-size: 32px;
|
|
|
+ line-height: 48px;
|
|
|
}
|
|
|
.btns{
|
|
|
.btn{
|
|
|
- line-height: 96px;
|
|
|
+ display: block;
|
|
|
+ padding: 24px 0;
|
|
|
+ line-height: 48px;
|
|
|
border-radius: 12px;
|
|
|
text-align: center;
|
|
|
font-size: 32px;
|
|
@@ -111,17 +116,20 @@ function handleReportMessageSend(publish){
|
|
|
.publish-report-pop-box{
|
|
|
padding: 24px;
|
|
|
.title{
|
|
|
- font-size: 18px;
|
|
|
+ font-size: 22px;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
.tips{
|
|
|
margin-bottom: 24px;
|
|
|
+ font-size: 22px;
|
|
|
+ line-height: 48px;
|
|
|
}
|
|
|
.btns{
|
|
|
.btn{
|
|
|
- line-height: 48px;
|
|
|
+ padding: 12px 0;
|
|
|
border-radius: 12px;
|
|
|
- font-size: 16px;
|
|
|
+ line-height: 48px;
|
|
|
+ font-size: 20px;
|
|
|
margin-bottom: 12px;
|
|
|
}
|
|
|
}
|