|
@@ -10,12 +10,16 @@ import moment from 'moment'
|
|
|
import { showToast,showDialog } from 'vant'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
import {useCachedViewsStore} from '@/store/modules/cachedViews'
|
|
|
+import {usePublicSettingStore} from '@/store/modules/publicSetting'
|
|
|
import {reportManageBtn} from '@/hooks/useAuthBtn'
|
|
|
const cachedViewsStore=useCachedViewsStore()
|
|
|
+const publicSettingStore = usePublicSettingStore()
|
|
|
|
|
|
const router=useRouter()
|
|
|
const route=useRoute()
|
|
|
|
|
|
+const isApprove = ref(false)
|
|
|
+
|
|
|
|
|
|
const {lastFocusPosition,initFroalaEditor,imgUploadFlag,frolaEditorContentChange}=useInitFroalaEditor()
|
|
|
let reportContentEditorIns=null//报告内容编辑器实例
|
|
@@ -98,6 +102,9 @@ async function getReportDetail(){
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+ //获取审批流
|
|
|
+ await publicSettingStore.getPublicSetting()
|
|
|
+ isApprove.value = ['1','3'].includes(publicSettingStore.publicSetting.ApprovalFlow)
|
|
|
}
|
|
|
|
|
|
|
|
@@ -276,6 +283,10 @@ async function handleReportOpt(type){
|
|
|
// // 显示发布提示弹窗,提示推送客群
|
|
|
// showPublishPop.value=true
|
|
|
// }
|
|
|
+ if(isApprove.value){
|
|
|
+ handleConfirmPublish(1)
|
|
|
+ return
|
|
|
+ }
|
|
|
// 没有客群了发布都有二次提示弹窗
|
|
|
showPublishPop.value=true
|
|
|
}
|
|
@@ -403,14 +414,22 @@ function onConfirmDSFBTime(time){
|
|
|
<img src="@/assets/imgs/report/icon_save2.png" alt="">
|
|
|
<span>保存</span>
|
|
|
</div>
|
|
|
- <div class="item" @click="handleReportOpt('dsfb')" v-permission="reportManageBtn.reportManage_publish">
|
|
|
- <img src="@/assets/imgs/report/icon_time.png" alt="">
|
|
|
- <span>定时发布</span>
|
|
|
- </div>
|
|
|
- <div class="item" @click="handleReportOpt('fb')" v-permission="reportManageBtn.reportManage_publish">
|
|
|
- <img src="@/assets/imgs/report/icon_publish3.png" alt="">
|
|
|
- <span>发布</span>
|
|
|
- </div>
|
|
|
+ <template v-if="!isApprove">
|
|
|
+ <div class="item" @click="handleReportOpt('dsfb')" v-permission="reportManageBtn.reportManage_publish">
|
|
|
+ <img src="@/assets/imgs/report/icon_time.png" alt="">
|
|
|
+ <span>定时发布</span>
|
|
|
+ </div>
|
|
|
+ <div class="item" @click="handleReportOpt('fb')" v-permission="reportManageBtn.reportManage_publish">
|
|
|
+ <img src="@/assets/imgs/report/icon_publish3.png" alt="">
|
|
|
+ <span>发布</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template v-if="isApprove">
|
|
|
+ <div class="item" @click="handleReportOpt('fb')" v-permission="reportManageBtn.reportManage_publish">
|
|
|
+ <img src="@/assets/imgs/report/icon_publish3.png" alt="">
|
|
|
+ <span>提交</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
<div class="right-btn" @click="showReportInsertPop=true">
|
|
|
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|