|
@@ -63,6 +63,12 @@
|
|
@click.native="clickreportadd('cg')"
|
|
@click.native="clickreportadd('cg')"
|
|
>存草稿</el-button
|
|
>存草稿</el-button
|
|
>
|
|
>
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="medium"
|
|
|
|
+ @click.native="clickreportadd('dsfb')"
|
|
|
|
+ >定时发布</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
size="medium"
|
|
size="medium"
|
|
@@ -299,6 +305,9 @@
|
|
<div v-if="tabsactive == 'MyETA批量插入'">
|
|
<div v-if="tabsactive == 'MyETA批量插入'">
|
|
<importMyChart @handleImportMyChart="handleImportMyChart" :showEnMark="true" />
|
|
<importMyChart @handleImportMyChart="handleImportMyChart" :showEnMark="true" />
|
|
</div>
|
|
</div>
|
|
|
|
+ <div v-if="tabsactive == '语义分析插入'">
|
|
|
|
+ <importSemantics @handleImportSemantic="(item)=>insertHtml(item,'image')"/>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -313,6 +322,33 @@
|
|
:edblist="enChartInfo.ChartType===10?enEdblist:[]"
|
|
:edblist="enChartInfo.ChartType===10?enEdblist:[]"
|
|
/>
|
|
/>
|
|
|
|
|
|
|
|
+ <!-- 定时发布弹窗 -->
|
|
|
|
+ <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="handleConfirmDSFB">确定</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -329,6 +365,7 @@ import mixinMsg from '../mixins/messagePush'
|
|
import reportMixin from '../mixins/reportMixin';
|
|
import reportMixin from '../mixins/reportMixin';
|
|
import importMyChart from '../components/importMyChart.vue'
|
|
import importMyChart from '../components/importMyChart.vue'
|
|
import setEnNameDia from '@/views/dataEntry_manage/components/setEnNameDia.vue'
|
|
import setEnNameDia from '@/views/dataEntry_manage/components/setEnNameDia.vue'
|
|
|
|
+import importSemantics from '../components/importSemantics.vue';
|
|
export default {
|
|
export default {
|
|
mixins:[mixinMsg,reportMixin],
|
|
mixins:[mixinMsg,reportMixin],
|
|
data() {
|
|
data() {
|
|
@@ -438,9 +475,26 @@ export default {
|
|
language: "zh_cn",
|
|
language: "zh_cn",
|
|
//允许粘贴的样式
|
|
//允许粘贴的样式
|
|
pasteAllowedStyleProps: ['font-family', 'font-size', 'color']
|
|
pasteAllowedStyleProps: ['font-family', 'font-size', 'color']
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ showDSFB:false,//显示定时发布弹窗
|
|
|
|
+ taskTime:'',//定时发布的时间
|
|
|
|
+ timePickerOpt:{
|
|
|
|
+ disabledDate(e){
|
|
|
|
+ return e.getTime()< new Date().getTime()-24 * 60 * 60 * 1000
|
|
|
|
+ },
|
|
|
|
+ selectableRange:'00:00:00 - 23:59:59'
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ beforeRouteEnter(to, from, next) {
|
|
|
|
+ if(to.query.id){
|
|
|
|
+ to.matched[1].name=`编辑英文研报`
|
|
|
|
+ }else{
|
|
|
|
+ to.matched[1].name=`添加英文研报`
|
|
|
|
+ }
|
|
|
|
+ next()
|
|
|
|
+ },
|
|
mounted() {
|
|
mounted() {
|
|
this.$route.query.id && this.getreportdetail();
|
|
this.$route.query.id && this.getreportdetail();
|
|
this.getclassifylist();
|
|
this.getclassifylist();
|
|
@@ -472,6 +526,20 @@ export default {
|
|
this.$refs.sandTable.scrollTop=0
|
|
this.$refs.sandTable.scrollTop=0
|
|
this.sandTabelQuery.CurrentIndex = 1
|
|
this.sandTabelQuery.CurrentIndex = 1
|
|
this.getSandTable()
|
|
this.getSandTable()
|
|
|
|
+ },
|
|
|
|
+ 'taskTime'(){
|
|
|
|
+ const date = this.$moment(this.taskTime).startOf('day').format('x');
|
|
|
|
+ const nowDate = this.$moment().startOf('day').format('x');
|
|
|
|
+ // 如果选择的是今天 则需要禁用已经过去的时间节点
|
|
|
|
+ if (date <= nowDate) {
|
|
|
|
+ // 默认选择的最新时间 是当前时间的两分钟后 (留出2分钟的富裕时间)
|
|
|
|
+ this.timePickerOpt.selectableRange = (
|
|
|
|
+ `${this.$moment().add(2,'m').format('HH:mm:ss')} - 23:59:59`
|
|
|
|
+ );
|
|
|
|
+ }else {
|
|
|
|
+ // 如果是以后的日期,则不需要禁用时间节点
|
|
|
|
+ this.timePickerOpt.selectableRange = '00:00:00 - 23:59:59';
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -673,7 +741,12 @@ export default {
|
|
});
|
|
});
|
|
window.open(href, "_blank");
|
|
window.open(href, "_blank");
|
|
} else if (tp === "fb") {
|
|
} else if (tp === "fb") {
|
|
|
|
+ this.$confirm('是否确定立即发布报告?','提示',{type: 'warning'}).then(()=>{
|
|
this.publishreport(this.report_id);
|
|
this.publishreport(this.report_id);
|
|
|
|
+ })
|
|
|
|
+ }else if(tp==='dsfb'){
|
|
|
|
+ //定时发布
|
|
|
|
+ this.showDSFB=true
|
|
}
|
|
}
|
|
// if (tp == 'yl') { //预览
|
|
// if (tp == 'yl') { //预览
|
|
// sessionStorage.setItem('reportdtl', JSON.stringify(params));
|
|
// sessionStorage.setItem('reportdtl', JSON.stringify(params));
|
|
@@ -697,6 +770,30 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ //定时发布报告
|
|
|
|
+ handleConfirmDSFB(){
|
|
|
|
+ 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
|
|
|
|
+ }
|
|
|
|
+ reportEnInterface.enReportPrepblish({
|
|
|
|
+ ReportId:this.report_id,
|
|
|
|
+ PrePublishTime:this.taskTime
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ if(res.Ret===200){
|
|
|
|
+ this.$message.success('定时发布成功!')
|
|
|
|
+ this.$router.push({ path: '/reportEnList' });
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
//批量插入我的图表
|
|
//批量插入我的图表
|
|
handleImportMyChart(data){
|
|
handleImportMyChart(data){
|
|
//设置编辑器获取焦点
|
|
//设置编辑器获取焦点
|
|
@@ -816,7 +913,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- components: {importMyChart,setEnNameDia},
|
|
|
|
|
|
+ components: {importMyChart,setEnNameDia,importSemantics},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|