Эх сурвалжийг харах

报告发布增加二次提示、定时发布回显

jwyu 1 жил өмнө
parent
commit
c290058c97

+ 14 - 12
src/views/report/EditReport.vue

@@ -264,17 +264,19 @@ async function handleReportOpt(type){
     }
     if(type==='fb'){
         // 发布
-        const hasTel=reportBaseInfoData.classifyName[1].HasTeleconference
-        //有电话会的不提示推送客群
-        if(hasTel==1){
-            const res=await apiReport.reportEdit(params)
-            if(res.Ret===200){
-                reportPublish(res.Data.ReportId)
-            }
-        }else{
-            // 显示发布提示弹窗,提示推送客群
-            showPublishPop.value=true
-        }
+        // const hasTel=reportBaseInfoData.classifyName[1].HasTeleconference
+        // //有电话会的不提示推送客群
+        // if(hasTel==1){
+        //     const res=await apiReport.reportEdit(params)
+        //     if(res.Ret===200){
+        //         reportPublish(res.Data.ReportId)
+        //     }
+        // }else{
+        //     // 显示发布提示弹窗,提示推送客群
+        //     showPublishPop.value=true
+        // }
+        // 没有客群了发布都有二次提示弹窗
+        showPublishPop.value=true
     }
     if(type==='dsfb'){
         showDSFBTime.value=true
@@ -451,7 +453,7 @@ function onConfirmDSFBTime(time){
     </van-popup>
 
     <!-- 定时发布选择时间 -->
-    <ReportPublishTimeSet v-model="showDSFBTime" @confirm="onConfirmDSFBTime" />
+    <ReportPublishTimeSet v-model="showDSFBTime" :prePublishTime="reportData?.PrePublishTime" @confirm="onConfirmDSFBTime" />
 </template>
 <style lang="scss" scoped>
 .publish-report-pop-box{

+ 1 - 1
src/views/report/List.vue

@@ -391,7 +391,7 @@ async function handleReportEdit(e){
                     style="flex:1"
                     shape="round" 
                     readonly 
-                    placeholder="请输入报告标题或作者"
+                    placeholder="请输入报告标题或创建人"
                     @click-input="goSearch"
                 />
                 <div :class="['menu-icon',showClassify||listState.ClassifyNameSecond?'active':'']" @click="showClassify=true">

+ 11 - 0
src/views/report/components/ReportPublishTimeSet.vue

@@ -7,6 +7,7 @@ const props=defineProps({
         type:Boolean,
         default:false
     },
+    prePublishTime:''
 })
 const emits=defineEmits(['update:modelValue','confirm'])
 
@@ -14,6 +15,16 @@ const minDSFBDate=new Date()
 const minDSFBTime=ref(moment().add(2,'m').format('HH:mm:ss'))
 const dsfbDate=ref([])//定时发布选中的日期
 const dsfbTime=ref([])//定时发布选中的时间
+watch(
+    ()=>props.modelValue,
+    (n)=>{
+        if(n&&props.prePublishTime){
+            dsfbDate.value=props.prePublishTime.split(' ')[0].split('-')
+            dsfbTime.value=props.prePublishTime.split(' ')[1].split(':').slice(0,2)
+        }
+    }
+)
+
 watch(
     ()=>dsfbDate.value,
     ()=>{

+ 10 - 3
src/views/reportEn/AddReport.vue

@@ -6,7 +6,7 @@ import ReportPublishTimeSet from '@/views/report/components/ReportPublishTimeSet
 import apiReportEn from '@/api/reportEn'
 import apiChart from '@/api/chart'
 import moment from 'moment'
-import { showToast } from 'vant'
+import { showToast,showDialog } from 'vant'
 import { useRoute, useRouter } from 'vue-router'
 import {useInitFroalaEditor} from '@/hooks/useFroalaEditor'
 import {useCachedViewsStore} from '@/store/modules/cachedViews'
@@ -288,7 +288,14 @@ async function handleReportOpt(e){
         }, 1000);
     }
     if(e==='fb'){
-        reportPublish(res.Data.ReportId)
+        showDialog({
+            title: '提示',
+            message: `是否确定立即发布报告?`,
+            showCancelButton:true
+        }).then(()=>{
+            reportPublish(res.Data.ReportId)
+        })
+        
     }
     if(e==='dsfb'){
         showDSFBTime.value=true
@@ -400,7 +407,7 @@ function onConfirmDSFBTime(time){
     </van-popup>
 
     <!-- 定时发布选择时间 -->
-    <ReportPublishTimeSet v-model="showDSFBTime" @confirm="onConfirmDSFBTime" />
+    <ReportPublishTimeSet v-model="showDSFBTime" :prePublishTime="reportData?.PrePublishTime" @confirm="onConfirmDSFBTime" />
 
 </template>
 

+ 1 - 1
src/views/reportEn/List.vue

@@ -400,7 +400,7 @@ function handleGoEmailLog(e){
                     style="flex:1"
                     shape="round" 
                     readonly 
-                    placeholder="请输入报告标题或作者"
+                    placeholder="请输入报告标题或创建人"
                     @click="goSearch"
                 />
                 <div :class="['menu-icon',showClassify||listState.ClassifyNameSecond?'active':'']" @click="showClassify=true">