|
@@ -494,6 +494,7 @@ export default {
|
|
|
this.$message.success(this.$t('MsgPrompt.publish_msg'))
|
|
|
|
|
|
setTimeout(() => {
|
|
|
+ this.timer && clearInterval(this.timer);
|
|
|
this.$router.go(-1);
|
|
|
}, 1000);
|
|
|
}
|
|
@@ -612,9 +613,14 @@ export default {
|
|
|
|
|
|
// 跳转预览
|
|
|
handlePreviewReport(){
|
|
|
- const htmlStr=document.getElementById('report-html-content').outerHTML.replace(/contenteditable="true"/g,'contenteditable="false"');
|
|
|
- sessionStorage.setItem('smartReportContent', htmlStr);
|
|
|
- sessionStorage.setItem('smartReportContentBg', this.bgColor);
|
|
|
+ sessionStorage.removeItem('smartReportContent');
|
|
|
+ sessionStorage.removeItem('smartReportContentBg');
|
|
|
+
|
|
|
+ if(document.getElementById('report-html-content')) {
|
|
|
+ const htmlStr=document.getElementById('report-html-content').outerHTML.replace(/contenteditable="true"/g,'contenteditable="false"');
|
|
|
+ sessionStorage.setItem('smartReportContent', htmlStr);
|
|
|
+ sessionStorage.setItem('smartReportContentBg', this.bgColor);
|
|
|
+ }
|
|
|
let { href } = this.$router.resolve({
|
|
|
path: '/smartReportDetail',
|
|
|
query:{
|
|
@@ -1013,15 +1019,18 @@ export default {
|
|
|
|
|
|
if(this.$route.query.id&&code_arr.length) {
|
|
|
let res = await dataBaseInterface.getReportrefreshStatus({
|
|
|
- Source: 'smart_report',
|
|
|
- ReportId: Number(this.$route.query.id),
|
|
|
- ReportChapterId: Number(this.reportInfo.ReportChapterId)
|
|
|
+ Source: 'report',
|
|
|
+ PrimaryId: Number(this.$route.query.id),
|
|
|
+ SubId: this.reportInfo.ReportChapterId
|
|
|
});
|
|
|
|
|
|
if(!res.Data.RefreshResult) return this.$message.warning(this.$t('ReportManage.ReportList.chart_refreshed_msg'))
|
|
|
|
|
|
const { Ret,Msg } = await dataBaseInterface.reportRefresh({
|
|
|
- ChartInfoCode: code_arr
|
|
|
+ ChartInfoCode: code_arr,
|
|
|
+ Source: 'report',
|
|
|
+ PrimaryId: Number(this.$route.query.id),
|
|
|
+ SubId: this.reportInfo.ReportChapterId
|
|
|
})
|
|
|
|
|
|
if(Ret === 200) {
|
|
@@ -1037,13 +1046,16 @@ export default {
|
|
|
if(this.$route.query.id&&sheet_code_arr.length){
|
|
|
//获取刷新结果
|
|
|
let res = await sheetInterface.getRefreshResult({
|
|
|
- Source: 'smart_report',
|
|
|
- ReportId: Number(this.$route.query.id),
|
|
|
- ReportChapterId: 0
|
|
|
+ Source: 'report',
|
|
|
+ PrimaryId: Number(this.$route.query.id),
|
|
|
+ SubId: this.reportInfo.ReportChapterId
|
|
|
});
|
|
|
- if(!res.Data.RefreshResult) return this.$message.warning('表格正在刷新中,请勿重复操作')
|
|
|
+ if(!res.Data.RefreshResult) return this.$message.warning(/* '表格正在刷新中,请勿重复操作' */this.$t('ReportManage.ReportList.chart_refreshed_msg'))
|
|
|
const { Ret,Msg } = await sheetInterface.refreshSheet({
|
|
|
- ExcelCodes: sheet_code_arr
|
|
|
+ ExcelCodes: sheet_code_arr,
|
|
|
+ Source: fromPage,
|
|
|
+ PrimaryId: Number(this.$route.query.id),
|
|
|
+ SubId: this.reportInfo.ReportChapterId
|
|
|
})
|
|
|
|
|
|
if(Ret === 200) {
|
|
@@ -1104,7 +1116,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
//截止至ETA1.3.8 智能研报无推送模板消息,所有的reportInfo.MsgIsSend都为1
|
|
|
- let sendMsg = this.$route.query.reportCoopType===2 ? this.$refs.chapterContRef.reportBase.MsgIsSend : this.reportInfo.MsgIsSend;
|
|
|
+ let sendMsg = this.reportCoopType===2 ? this.$refs.chapterContRef.reportBase.MsgIsSend : this.reportInfo.MsgIsSend;
|
|
|
if(sendMsg===1){//该报告已经推送过模板消息
|
|
|
this.reportPublish({sendMsg:false})
|
|
|
}else{
|
|
@@ -1169,7 +1181,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
// 如果该报告已经推送过模板消息
|
|
|
- let sendMsg = this.$route.query.reportCoopType===2 ? this.$refs.chapterContRef.reportBase.MsgIsSend : this.reportInfo.MsgIsSend;
|
|
|
+ let sendMsg = this.reportCoopType===2 ? this.$refs.chapterContRef.reportBase.MsgIsSend : this.reportInfo.MsgIsSend;
|
|
|
if(sendMsg===1){
|
|
|
reportSetPrepublish({
|
|
|
ReportId:Number(this.$route.query.id),
|
|
@@ -1238,7 +1250,11 @@ export default {
|
|
|
if(sendMsg){
|
|
|
this.reportSendMsg()
|
|
|
}
|
|
|
- this.$router.replace({ path: '/reportNew' });
|
|
|
+ this.$message.success(this.$t('MsgPrompt.publish_msg'))
|
|
|
+
|
|
|
+ setTimeout(() => {
|
|
|
+ this.$router.replace({ path: '/reportNew' });
|
|
|
+ },1000)
|
|
|
}
|
|
|
})
|
|
|
},
|