|
@@ -48,6 +48,12 @@
|
|
|
@click.native="clickreportadd('cg')"
|
|
|
>存草稿</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="medium"
|
|
|
+ @click.native="clickreportadd('dsfb')"
|
|
|
+ >定时发布</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
size="medium"
|
|
@@ -293,8 +299,38 @@
|
|
|
<div v-if="tabsactive == 'MyETA批量插入'">
|
|
|
<importMyChart @handleImportMyChart="handleImportMyChart"/>
|
|
|
</div>
|
|
|
+ <div v-if="tabsactive == '语义分析插入'">
|
|
|
+ <importSemantics @handleImportSemantic="(item)=>insertHtml(item,'image')"/>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 定时发布弹窗 -->
|
|
|
+ <el-dialog
|
|
|
+ v-dialogDrag
|
|
|
+ :append-to-body="true"
|
|
|
+ :visible.sync="showDSFB"
|
|
|
+ width="500px"
|
|
|
+ title="定时发布"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
+ <span>发送时间</span>
|
|
|
+ <el-date-picker
|
|
|
+ v-model="taskTime"
|
|
|
+ type="datetime"
|
|
|
+ placeholder="选择日期时间"
|
|
|
+ value-format="yyyy-MM-dd HH:mm:ss"
|
|
|
+ :picker-options="timePickerOpt"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <p style="margin:15px 0">设置成功之后,研报将定时进行发送。</p>
|
|
|
+ <div style="text-align:right;margin:20px 0">
|
|
|
+ <el-button type="primary" plain @click="showDSFB=false">取消</el-button>
|
|
|
+ <el-button type="primary" @click="handleSetReportPrepublish">确定</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -309,7 +345,8 @@ import {
|
|
|
reportauthor,
|
|
|
getDraft,
|
|
|
dataBaseInterface,
|
|
|
- sandInterface
|
|
|
+ sandInterface,
|
|
|
+ reportSetPrepublish
|
|
|
} from '@/api/api.js';
|
|
|
import http from '@/api/http.js';
|
|
|
import VueFroala from 'vue-froala-wysiwyg';
|
|
@@ -317,6 +354,7 @@ import urlSlug from 'url-slug';
|
|
|
import mixinMsg from './mixins/messagePush'
|
|
|
import reportMixin from './mixins/reportMixin';
|
|
|
import importMyChart from './components/importMyChart.vue'
|
|
|
+import importSemantics from './components/importSemantics.vue';
|
|
|
export default {
|
|
|
mixins:[mixinMsg,reportMixin],
|
|
|
data() {
|
|
@@ -595,7 +633,7 @@ export default {
|
|
|
this.isMessagePost = false;
|
|
|
this.reporteditMsg(params2,tp)
|
|
|
}else{
|
|
|
- this.$confirm('发布后,是否推送模板消息和客户群?', '发布提示', {
|
|
|
+ this.$confirm('发布后,是否推送模板消息?', '发布提示', {
|
|
|
confirmButtonText: '推送',
|
|
|
cancelButtonText: '不推送',
|
|
|
type: 'warning',
|
|
@@ -629,7 +667,7 @@ export default {
|
|
|
this.isMessagePost = false;
|
|
|
this.reportaddMsg(params,tp)
|
|
|
}else{
|
|
|
- this.$confirm('发布后,是否推送模板消息和客户群?', '发布提示', {
|
|
|
+ this.$confirm('发布后,是否推送模板消息?', '发布提示', {
|
|
|
confirmButtonText: '推送',
|
|
|
cancelButtonText: '不推送',
|
|
|
type: 'warning',
|
|
@@ -667,6 +705,57 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 定时发布报告
|
|
|
+ handleSetReportPrepublish(){
|
|
|
+ if(!this.taskTime){
|
|
|
+ this.$message.warning('请选择定时发布的时间')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ const now=this.$moment().format('YYYY-MM-DD HH:mm:ss')
|
|
|
+ console.log(now);
|
|
|
+ console.log(this.taskTime);
|
|
|
+ if(this.$moment(this.taskTime).isBefore(now,'second')){
|
|
|
+ this.$message.warning('定时发布不得早于当前时间')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log('定时去发布了');
|
|
|
+ this.$confirm('是否发布定时报告,并推送模板消息?', '发布提示', {
|
|
|
+ confirmButtonText: '推送',
|
|
|
+ cancelButtonText: '不推送',
|
|
|
+ type: 'warning',
|
|
|
+ distinguishCancelAndClose:true,
|
|
|
+ beforeClose:(action, instance,done)=>{
|
|
|
+ console.log(action, instance);
|
|
|
+ if(action==='close'||action==='cancel') {
|
|
|
+ //右上角或者不推送
|
|
|
+ reportSetPrepublish({
|
|
|
+ ReportId:Number(this.report_draft_id),
|
|
|
+ PrePublishTime:this.taskTime,
|
|
|
+ PreMsgSend:0,
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.$message.success('定时发布成功!')
|
|
|
+ this.$router.push({ path: '/reportlist' });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ //confirmButton
|
|
|
+ reportSetPrepublish({
|
|
|
+ ReportId:Number(this.report_draft_id),
|
|
|
+ PrePublishTime:this.taskTime,
|
|
|
+ PreMsgSend:1,
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.$message.success('定时发布成功!')
|
|
|
+ this.$router.push({ path: '/reportlist' });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ done()
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
//批量插入我的图表
|
|
|
handleImportMyChart(data){
|
|
|
//设置编辑器获取焦点
|
|
@@ -784,7 +873,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
},
|
|
|
- components: {importMyChart},
|
|
|
+ components: {importMyChart,importSemantics},
|
|
|
watch: {
|
|
|
'aeForm.add_type'(to, from) {
|
|
|
if (from == 2 && to == 1) {
|