|
@@ -1,10 +1,11 @@
|
|
|
<template>
|
|
|
<div id="editreport">
|
|
|
|
|
|
- <!-- 章节编辑区 -->
|
|
|
- <div class="left-wrap">
|
|
|
+ <!-- 章节报告 章节编辑区 -->
|
|
|
+ <div class="left-wrap" v-if="reportCoopType===2">
|
|
|
<chapterWrapper
|
|
|
v-show="isLeftWrapShow"
|
|
|
+ @change="handleChapterInfo"
|
|
|
/>
|
|
|
|
|
|
<span
|
|
@@ -17,53 +18,76 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="editor-wrapper">
|
|
|
- <!-- 顶部操作栏 -->
|
|
|
- <editHeader
|
|
|
- :reportInfo="{Title: aeForm.title}"
|
|
|
- @handleClearContent="handleClearContent"
|
|
|
- @openBaseInfo="showReportBaseInfo=true"
|
|
|
- @handleRefreshAllChart="refreshReport"
|
|
|
- @handlePreviewReport="clickreportadd('yl')"
|
|
|
- @handleSaveContent="clickreportadd('cg')"
|
|
|
- @handlePublishOpt="clickreportadd"
|
|
|
- />
|
|
|
|
|
|
- <div class="editor-main">
|
|
|
- <div
|
|
|
- id="leftfroala"
|
|
|
- v-loading="importChartNum>0"
|
|
|
- :element-loading-text="$t('ReportManage.ReportList.chart_insertion_progress')"
|
|
|
- element-loading-spinner="el-icon-loading"
|
|
|
- element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
- >
|
|
|
- <froala
|
|
|
- ref="froalaEditor"
|
|
|
- :tag="'textarea'"
|
|
|
- :config="CNEditorConfig"
|
|
|
- v-model="aeForm.content"
|
|
|
- ></froala>
|
|
|
+ <!-- 章节报告默认 -->
|
|
|
+ <template v-if="reportCoopType===2">
|
|
|
+ <div>
|
|
|
+
|
|
|
</div>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 可插入内容 -->
|
|
|
- <insertContent
|
|
|
- v-show="activeTab"
|
|
|
- :actTab="activeTab"
|
|
|
- @slide="activeTab=''"
|
|
|
- @insertHtml="insertHtml"
|
|
|
- @handleImportMyChart="handleImportMyChart"
|
|
|
- />
|
|
|
-
|
|
|
- </div>
|
|
|
+ <!-- 非章节报告或章节报告编辑 -->
|
|
|
+ <template v-else>
|
|
|
+ <!-- 顶部操作栏 -->
|
|
|
+ <editHeader
|
|
|
+ :isApprove="isApprove"
|
|
|
+ :hasApproveFlow="hasApproveFlow"
|
|
|
+ :reportInfo="{Title: reportInfo.Title}"
|
|
|
+ @handleClearContent="handleClearContent"
|
|
|
+ @openBaseInfo="showReportBaseInfo=true"
|
|
|
+ @handleRefreshAllChart="refreshReport"
|
|
|
+ @handlePreviewReport="handlePreviewReport"
|
|
|
+ @handleSaveContent="handleSaveContent"
|
|
|
+ @handlePublishOpt="clickreportadd"
|
|
|
+ />
|
|
|
+
|
|
|
+ <div class="editor-main">
|
|
|
+ <div
|
|
|
+ id="leftfroala"
|
|
|
+ v-loading="importChartNum>0"
|
|
|
+ :element-loading-text="$t('ReportManage.ReportList.chart_insertion_progress')"
|
|
|
+ element-loading-spinner="el-icon-loading"
|
|
|
+ element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
+ >
|
|
|
+ <froala
|
|
|
+ ref="froalaEditor"
|
|
|
+ :tag="'textarea'"
|
|
|
+ :config="CNEditorConfig"
|
|
|
+ v-model="reportInfo.Content"
|
|
|
+ ></froala>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 可插入内容 -->
|
|
|
+ <insertContent
|
|
|
+ v-show="activeTab"
|
|
|
+ :actTab="activeTab"
|
|
|
+ @slide="activeTab=''"
|
|
|
+ @insertHtml="insertHtml"
|
|
|
+ @handleImportMyChart="handleImportMyChart"
|
|
|
+ />
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 可插入模块 -->
|
|
|
+ <ul class="fixed-insert-wrapper">
|
|
|
+ <li v-for="item in insertTabs" :key="item.type" @click="activeTab=item.type">
|
|
|
+ <img class="icon" :src="item.icon" alt="">
|
|
|
+ <span>{{item.name}}</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </template>
|
|
|
|
|
|
- <!-- 可插入模块 -->
|
|
|
- <ul class="fixed-insert-wrapper">
|
|
|
- <li v-for="item in insertTabs" :key="item.type" @click="activeTab=item.type">
|
|
|
- <img class="icon" :src="item.icon" alt="">
|
|
|
- <span>{{item.name}}</span>
|
|
|
- </li>
|
|
|
- </ul>
|
|
|
</div>
|
|
|
|
|
|
+
|
|
|
+ <!-- 报告基础信息 -->
|
|
|
+ <reportBaseInfo
|
|
|
+ v-model="showReportBaseInfo"
|
|
|
+ :reportInfo="reportInfo"
|
|
|
+ :id="$route.query.id"
|
|
|
+ @save="handleReportEdit"
|
|
|
+ />
|
|
|
+
|
|
|
<!-- 定时发布弹窗 -->
|
|
|
<el-dialog
|
|
|
v-dialogDrag
|
|
@@ -96,14 +120,12 @@
|
|
|
<script>
|
|
|
import {
|
|
|
autosave,
|
|
|
- reportdetail,
|
|
|
reportedit,
|
|
|
+ reportdetail,
|
|
|
classifylist,
|
|
|
reportpublish,
|
|
|
- classifyIdDetail,
|
|
|
- reportSetPrepublish,
|
|
|
- departInterence
|
|
|
-} from 'api/api.js';
|
|
|
+ reportSetPrepublish
|
|
|
+} from '@/api/modules/reportV2';
|
|
|
import http from '@/api/http.js';
|
|
|
import mixinMsg from './mixins/messagePush'
|
|
|
import reportMixin from './mixins/reportMixin';
|
|
@@ -111,27 +133,21 @@ import reportApproveConfig from "@/mixins/reportApproveConfig.js"
|
|
|
import editHeader from '../components/reportEditHeader.vue';
|
|
|
import insertContent from './components/insertContent.vue';
|
|
|
import chapterWrapper from '../components/chapterEditWrapper.vue'
|
|
|
+import reportBaseInfo from '../components/reportBaseInfoDia.vue';
|
|
|
export default {
|
|
|
- mixins:[mixinMsg,reportMixin,reportApproveConfig],
|
|
|
- components: {editHeader,insertContent,chapterWrapper},
|
|
|
+ mixins:[ mixinMsg,reportMixin,reportApproveConfig ],
|
|
|
+ components: { editHeader,insertContent,chapterWrapper,reportBaseInfo },
|
|
|
data() {
|
|
|
var that = this;
|
|
|
return {
|
|
|
//批量导入图表
|
|
|
importChartNum:0,//批量导入图表的数量 如果大于0则说明在加载
|
|
|
report_id: this.$route.query.id,
|
|
|
+ reportCoopType: 0,//协作类型 1单人 2章节报告
|
|
|
+ selectChapterId: 0, //选中章节Id
|
|
|
+ editChapterId: 0,//编辑章节Id
|
|
|
|
|
|
- aeForm: {
|
|
|
- add_type: 1,
|
|
|
- classify_name: 1,
|
|
|
- classifynameArr: [],
|
|
|
- title: '',
|
|
|
- abstract: '',
|
|
|
- author: ['投研团队'],
|
|
|
- frequency: '日度',
|
|
|
- create_time: http.dateFormatter(new Date(), false),
|
|
|
- content: '',
|
|
|
- },
|
|
|
+ reportInfo: {},
|
|
|
|
|
|
optionsArr: [],
|
|
|
|
|
@@ -144,13 +160,18 @@ export default {
|
|
|
isLeftWrapShow: true,//展开章节区
|
|
|
};
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.reportCoopType = Number(this.$route.query.coopType)
|
|
|
+ },
|
|
|
mounted() {
|
|
|
- this.getreportdetail();
|
|
|
-
|
|
|
- this.getSystemUserInfo()
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.autoSave();
|
|
|
- }, 6000);
|
|
|
+ //章节报告默认不获取详情
|
|
|
+ if(this.reportCoopType===1) {
|
|
|
+ this.getreportdetail();
|
|
|
+
|
|
|
+ this.timer = setInterval(() => {
|
|
|
+ this.handleAutoSave();
|
|
|
+ }, 6000);
|
|
|
+ }
|
|
|
|
|
|
window.addEventListener('message',this.reInitIframe)
|
|
|
},
|
|
@@ -165,145 +186,143 @@ export default {
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- // 每十秒自动保存
|
|
|
- autoSave() {
|
|
|
- console.log(this.ischange);
|
|
|
- // if (this.ischange) {
|
|
|
- if(!this.autoSaveFlag) return
|
|
|
- //如果富文本中有未上传完成的图片,去除这个dom
|
|
|
- $('.fr-element').find('img.fr-uploading').length&&$('.fr-element').find('img.fr-uploading').remove()
|
|
|
- autosave({
|
|
|
- ReportId: Number(this.$route.query.id),
|
|
|
- Content: $('.fr-element').html(),
|
|
|
- NoChange:this.ischange?0:1
|
|
|
- }).then((res) => {
|
|
|
- if (res.Ret === 200) {
|
|
|
- this.report_id = res.Data.ReportId;
|
|
|
- this.lastsavetime = http.dateFormatter(new Date(), true);
|
|
|
- }
|
|
|
- });
|
|
|
- this.ischange = false;
|
|
|
- // }
|
|
|
+ /* 当前章节信息 */
|
|
|
+ handleChapterInfo({ selectChapterId,editChapterId }) {
|
|
|
+ this.selectChapterId = selectChapterId;
|
|
|
+ this.editChapterId = editChapterId;
|
|
|
+
|
|
|
+ this.getChapterDetail()
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 获取章节报告详情 */
|
|
|
+ getChapterDetail() {
|
|
|
+ if(!this.editChapterId) return
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 保存章节内容 存草稿 */
|
|
|
+ handleSaveChapterContent() {
|
|
|
+
|
|
|
},
|
|
|
- userclassidreportdetail() {
|
|
|
- //检查classifynameArr是否有审批流
|
|
|
- let classify = this.aeForm.classifynameArr.map(i=>{
|
|
|
- return JSON.parse(i).v||0
|
|
|
- })
|
|
|
- this.checkClassifyNameArr(1,classify)
|
|
|
|
|
|
- if (this.aeForm.add_type == 1) {
|
|
|
- if (this.aeForm.classifynameArr.length == 2) {
|
|
|
- this.aeForm.title = JSON.parse(this.aeForm.classifynameArr[1]).l;
|
|
|
+ /* 单章节发布 */
|
|
|
+ handlePublishChapter() {
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ // 编辑基础信息
|
|
|
+ handleReportEdit(e){
|
|
|
+
|
|
|
+ const params={
|
|
|
+ ...e,
|
|
|
+ ReportId: parseInt(this.report_id),
|
|
|
+ Content: $('.fr-element').html(),
|
|
|
}
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (this.aeForm.classifynameArr.length == 0) {
|
|
|
- return false;
|
|
|
- }
|
|
|
- console.log(this.aeForm.classifynameArr);
|
|
|
- let params = {
|
|
|
- ClassifyIdFirst: JSON.parse(this.aeForm.classifynameArr[0]).v,
|
|
|
- };
|
|
|
- if (this.aeForm.classifynameArr.length == 2) {
|
|
|
- params.ClassifyIdSecond = JSON.parse(
|
|
|
- this.aeForm.classifynameArr[1]
|
|
|
- ).v;
|
|
|
- } else {
|
|
|
- params.ClassifyIdSecond = 0;
|
|
|
- }
|
|
|
- classifyIdDetail(params).then((res) => {
|
|
|
- if (res.Ret == 200) {
|
|
|
- if (res.Data == null) {
|
|
|
- this.$message.error(this.$t('ReportManage.ReportList.no_reports_msg'));
|
|
|
- return false;
|
|
|
- }
|
|
|
- this.aeForm = {
|
|
|
- add_type: 2,
|
|
|
- classify_name: 1,
|
|
|
- classifynameArr:
|
|
|
- res.Data.ClassifyIdSecond && res.Data.ClassifyNameSecond
|
|
|
- ? [
|
|
|
- JSON.stringify({
|
|
|
- l: res.Data.ClassifyNameFirst,
|
|
|
- v: res.Data.ClassifyIdFirst,
|
|
|
- }),
|
|
|
- JSON.stringify({
|
|
|
- l: res.Data.ClassifyNameSecond,
|
|
|
- v: res.Data.ClassifyIdSecond,
|
|
|
- }),
|
|
|
- ]
|
|
|
- : [
|
|
|
- JSON.stringify({
|
|
|
- l: res.Data.ClassifyNameFirst,
|
|
|
- v: res.Data.ClassifyIdFirst,
|
|
|
- }),
|
|
|
- ],
|
|
|
- title: res.Data.Title,
|
|
|
- abstract: res.Data.Abstract,
|
|
|
- author: res.Data.Author ? res.Data.Author.split(',') : '',
|
|
|
- frequency: res.Data.Frequency,
|
|
|
- create_time: res.Data.CreateTime,
|
|
|
- content: res.Data.Content,
|
|
|
- };
|
|
|
+
|
|
|
+ console.log(params);
|
|
|
+ //检查classifynameArr是否有审批流
|
|
|
+ let classify = [e.ClassifyIdFirst,e.ClassifyIdSecond,e.ClassifyIdThird]
|
|
|
+ this.checkClassifyNameArr(1,classify)
|
|
|
+
|
|
|
+ reportedit(params).then(res=>{
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.$message.success(this.$t('MsgPrompt.saved_msg'))
|
|
|
+
|
|
|
+ this.reportInfo.Title=params.Title;
|
|
|
+ this.reportInfo.ClassifyIdFirst=params.ClassifyIdFirst;
|
|
|
+ this.reportInfo.ClassifyIdSecond=params.ClassifyIdSecond;
|
|
|
+ this.reportInfo.ClassifyIdThird=params.ClassifyIdThird;
|
|
|
+ this.reportInfo.ClassifyNameFirst=params.ClassifyNameFirst;
|
|
|
+ this.reportInfo.ClassifyNameSecond=params.ClassifyNameSecond;
|
|
|
+ this.reportInfo.ClassifyNameThird=params.ClassifyNameThird;
|
|
|
+ this.reportInfo.Abstract=params.Abstract;
|
|
|
+ this.reportInfo.Author=params.Author;
|
|
|
+ this.reportInfo.CreateTime=params.CreateTime;
|
|
|
+ this.reportInfo.IsPublicPublish=params.IsPublicPublish;
|
|
|
+
|
|
|
+ this.showReportBaseInfo=false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 预览 */
|
|
|
+ handlePreviewReport() {
|
|
|
+ //如果富文本中有未上传完成的图片,去除这个dom
|
|
|
+ $('.fr-element').find('img.fr-uploading').length&&$('.fr-element').find('img.fr-uploading').remove()
|
|
|
+
|
|
|
+ let { href } = this.$router.resolve({
|
|
|
+ path: '/reportdtl',
|
|
|
+ query:{
|
|
|
+ id:this.$route.query.id
|
|
|
}
|
|
|
});
|
|
|
+ window.open(href, '_blank');
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
+ /* 保存 存草稿*/
|
|
|
+ handleSaveContent() {
|
|
|
+ //如果富文本中有未上传完成的图片,去除这个dom
|
|
|
+ $('.fr-element').find('img.fr-uploading').length&&$('.fr-element').find('img.fr-uploading').remove()
|
|
|
+
|
|
|
+ //章节报告
|
|
|
+ if(this.reportCoopType===2) return this.handleSaveChapterContent()
|
|
|
+
|
|
|
+ autosave({
|
|
|
+ ReportId: Number(this.$route.query.id),
|
|
|
+ Content: $('.fr-element').html(),
|
|
|
+ NoChange:this.ischange?0:1
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.$message.success(res.Msg);
|
|
|
+
|
|
|
+ this.report_id = res.Data.ReportId;
|
|
|
+ this.lastsavetime = http.dateFormatter(new Date(), true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ // 每十秒自动保存
|
|
|
+ handleAutoSave() {
|
|
|
+
|
|
|
+ if(!this.autoSaveFlag) return
|
|
|
+ //如果富文本中有未上传完成的图片,去除这个dom
|
|
|
+ $('.fr-element').find('img.fr-uploading').length&&$('.fr-element').find('img.fr-uploading').remove()
|
|
|
+ autosave({
|
|
|
+ ReportId: Number(this.$route.query.id),
|
|
|
+ Content: $('.fr-element').html(),
|
|
|
+ NoChange:this.ischange?0:1
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.report_id = res.Data.ReportId;
|
|
|
+ this.lastsavetime = http.dateFormatter(new Date(), true);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.ischange = false;
|
|
|
+ },
|
|
|
+
|
|
|
+ /* 报告详情 */
|
|
|
getreportdetail() {
|
|
|
- reportdetail({ ReportId: parseInt(this.report_id) }).then((res) => {
|
|
|
- if (res.Ret == 200) {
|
|
|
- let data = res.Data;
|
|
|
- this.aeForm = {
|
|
|
- add_type: parseInt(data.AddType),
|
|
|
- classify_name: 1,
|
|
|
- classifynameArr:
|
|
|
- data.ClassifyIdSecond && data.ClassifyNameSecond
|
|
|
- ? [
|
|
|
- JSON.stringify({
|
|
|
- l: data.ClassifyNameFirst,
|
|
|
- v: parseInt(data.ClassifyIdFirst),
|
|
|
- }),
|
|
|
- JSON.stringify({
|
|
|
- l: data.ClassifyNameSecond,
|
|
|
- v: parseInt(data.ClassifyIdSecond),
|
|
|
- }),
|
|
|
- ]
|
|
|
- : [
|
|
|
- JSON.stringify({
|
|
|
- l: data.ClassifyNameFirst,
|
|
|
- v: parseInt(data.ClassifyIdFirst),
|
|
|
- }),
|
|
|
- ],
|
|
|
- title: data.Title,
|
|
|
- abstract: data.Abstract,
|
|
|
- author: data.Author ? data.Author.split(',') : '',
|
|
|
- frequency: data.Frequency,
|
|
|
- create_time: data.CreateTime,
|
|
|
- content: data.Content,
|
|
|
- };
|
|
|
- this.ThsMsgIsSend=data.ThsMsgIsSend
|
|
|
- // 回显定时发布时间
|
|
|
- if(data.PrePublishTime){
|
|
|
- this.taskTime=data.PrePublishTime
|
|
|
- }
|
|
|
- let classify = [data.ClassifyIdFirst,data.ClassifyIdSecond]
|
|
|
- this.checkClassifyNameArr(1,classify)
|
|
|
+ reportdetail({ ReportId: parseInt(this.report_id) }).then(res=> {
|
|
|
+ if (res.Ret !== 200) return
|
|
|
+
|
|
|
+ this.reportInfo = res.Data;
|
|
|
+ let data = res.Data;
|
|
|
+
|
|
|
+ this.ThsMsgIsSend=data.ThsMsgIsSend
|
|
|
+ // 回显定时发布时间
|
|
|
+ if(data.PrePublishTime){
|
|
|
+ this.taskTime=data.PrePublishTime
|
|
|
}
|
|
|
+ let classify = [data.ClassifyIdFirst,data.ClassifyIdSecond,data.ClassifyIdThird]
|
|
|
+ this.checkClassifyNameArr(1,classify)
|
|
|
+
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
clickreportadd(tp) {
|
|
|
- if (
|
|
|
- !this.aeForm.classifynameArr ||
|
|
|
- this.aeForm.classifynameArr.length == 0
|
|
|
- ) {
|
|
|
- this.$message.error(this.$t('ReportManage.ReportList.please_select_category'));
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (!this.aeForm.title) {
|
|
|
- this.$message.error(this.$t('ReportManage.ReportList.input_title_please'));
|
|
|
- return false;
|
|
|
- }
|
|
|
+
|
|
|
if(!this.autoSaveFlag){
|
|
|
this.$message.error(this.$t('ReportManage.smart_msg.img_wait'))
|
|
|
return false
|
|
@@ -312,57 +331,31 @@ export default {
|
|
|
$('.fr-element').find('img.fr-uploading').length&&$('.fr-element').find('img.fr-uploading').remove()
|
|
|
let params = {
|
|
|
ReportId: parseInt(this.report_id),
|
|
|
- AddType: this.aeForm.add_type,
|
|
|
- ClassifyIdFirst: JSON.parse(this.aeForm.classifynameArr[0]).v,
|
|
|
- ClassifyNameFirst: JSON.parse(this.aeForm.classifynameArr[0]).l,
|
|
|
- Title: this.aeForm.title,
|
|
|
- Abstract: this.aeForm.abstract,
|
|
|
- Author:
|
|
|
- this.aeForm.author.length > 0
|
|
|
- ? this.aeForm.author.join(',')
|
|
|
- : '',
|
|
|
- Frequency: this.aeForm.frequency,
|
|
|
- // content:this.aeForm.content,create_time:this.aeForm.create_time
|
|
|
+ AddType: this.reportInfo.AddType,
|
|
|
+ ClassifyIdFirst: this.reportInfo.ClassifyIdFirst,
|
|
|
+ ClassifyNameFirst: this.reportInfo.ClassifyNameFirst,
|
|
|
+ ClassifyIdSecond: this.reportInfo.ClassifyIdSecond,
|
|
|
+ ClassifyNameSecond: this.reportInfo.ClassifyNameSecond,
|
|
|
+ ClassifyIdThird: this.reportInfo.ClassifyIdThird,
|
|
|
+ ClassifyNameThird: this.reportInfo.ClassifyNameThird,
|
|
|
+ Title: this.reportInfo.Title,
|
|
|
+ Abstract: this.reportInfo.Abstract,
|
|
|
+ Author: this.reportInfo.Author,
|
|
|
+ Frequency: this.reportInfo.Frequency,
|
|
|
Content: $('.fr-element').html(),
|
|
|
- CreateTime: this.aeForm.create_time,
|
|
|
+ CreateTime: this.reportInfo.CreateTime,
|
|
|
+ State: 1
|
|
|
};
|
|
|
- if (this.aeForm.classifynameArr.length == 2) {
|
|
|
- params.ClassifyIdSecond = JSON.parse(
|
|
|
- this.aeForm.classifynameArr[1]
|
|
|
- ).v;
|
|
|
- params.ClassifyNameSecond = JSON.parse(
|
|
|
- this.aeForm.classifynameArr[1]
|
|
|
- ).l;
|
|
|
- }
|
|
|
- params.State = 1;
|
|
|
- if (tp == 'yl') {
|
|
|
- sessionStorage.setItem('reportdtl', JSON.stringify(params));
|
|
|
- let { href } = this.$router.resolve({ name: '预览报告' });
|
|
|
- window.open(href, '_blank');
|
|
|
- return false;
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
if(tp=='fb'||tp=='submit'){
|
|
|
this.isPublishloading = true;
|
|
|
}
|
|
|
- const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_sendMsg)&&(!this.isApprove)
|
|
|
+ const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_sendMsg)&&(!this.hasApproveFlow)
|
|
|
if (tp == 'fb') {
|
|
|
// 判断是否要推送客群
|
|
|
let hasTel=0
|
|
|
- if(this.aeForm.classifynameArr.length == 2){
|
|
|
- this.optionsArr.forEach(item=>{
|
|
|
- item.children&&item.children.forEach(childItem=>{
|
|
|
- if(JSON.parse(item.value).v==params.ClassifyIdSecond){
|
|
|
- hasTel=childItem.HasTeleconference
|
|
|
- }
|
|
|
- })
|
|
|
- })
|
|
|
- }else{
|
|
|
- this.optionsArr.forEach(item=>{
|
|
|
- if(JSON.parse(item.value).v==params.ClassifyIdFirst){
|
|
|
- hasTel=item.HasTeleconference
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+
|
|
|
console.log(hasTel);
|
|
|
if(hasTel==1||this.ThsMsgIsSend==1){
|
|
|
this.isMessagePost = false;
|
|
@@ -377,15 +370,15 @@ export default {
|
|
|
console.log(action, instance);
|
|
|
if(action==='close') {
|
|
|
//右上角
|
|
|
- this.isPublishloading = false;
|
|
|
+ this.isPublishloading = false;
|
|
|
} else if(action==='cancel') {
|
|
|
//cancelButton
|
|
|
- this.isMessagePost = false;
|
|
|
- this.reporteditMsg(params,tp)
|
|
|
+ this.isMessagePost = false;
|
|
|
+ this.reporteditMsg(params,tp)
|
|
|
}else {
|
|
|
//confirmButton
|
|
|
- this.isMessagePost = true;
|
|
|
- this.reporteditMsg(params,tp)
|
|
|
+ this.isMessagePost = true;
|
|
|
+ this.reporteditMsg(params,tp)
|
|
|
}
|
|
|
done()
|
|
|
}
|
|
@@ -399,19 +392,24 @@ export default {
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+
|
|
|
+ //发布报告
|
|
|
publishreport(id,code) {
|
|
|
- //发布报告
|
|
|
reportpublish({ ReportIds: String(id) ,ReportUrl:this.generatePdfLinks(code)}).then((res) => {
|
|
|
if (res.Ret == 200) {
|
|
|
this.isPublishloading = false;
|
|
|
- this.$router.push({ path: '/reportlist' });
|
|
|
+ this.$router.push({ path: '/reportNew' });
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+
|
|
|
generatePdfLinks(Code){
|
|
|
const baseUrl= localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ReportViewUrl : '';
|
|
|
- return `${baseUrl}/reportshare_pdf?code=${Code}&flag=${this.waterMarkStr}`
|
|
|
+ let waterMarkStr= localStorage.getItem('waterMarkStr') || '';
|
|
|
+
|
|
|
+ return `${baseUrl}/reportshare_pdf?code=${Code}&flag=${waterMarkStr}`
|
|
|
},
|
|
|
+
|
|
|
// 定时发布报告
|
|
|
handleSetReportPrepublish(){
|
|
|
if(!this.taskTime){
|
|
@@ -434,7 +432,7 @@ export default {
|
|
|
}).then(res=>{
|
|
|
if(res.Ret===200){
|
|
|
this.$message.success(this.$t('ReportManage.smart_msg.timed_success'))
|
|
|
- this.$router.push({ path: '/reportlist' });
|
|
|
+ this.$router.push({ path: '/reportNew' });
|
|
|
}
|
|
|
})
|
|
|
return
|
|
@@ -459,7 +457,7 @@ export default {
|
|
|
}).then(res=>{
|
|
|
if(res.Ret===200){
|
|
|
this.$message.success(this.$t('ReportManage.smart_msg.timed_success'))
|
|
|
- this.$router.push({ path: '/reportlist' });
|
|
|
+ this.$router.push({ path: '/reportNew' });
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -473,7 +471,7 @@ export default {
|
|
|
}).then(res=>{
|
|
|
if(res.Ret===200){
|
|
|
this.$message.success(this.$t('ReportManage.smart_msg.timed_success'))
|
|
|
- this.$router.push({ path: '/reportlist' });
|
|
|
+ this.$router.push({ path: '/reportNew' });
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -485,7 +483,7 @@ export default {
|
|
|
|
|
|
getclassifylist() {
|
|
|
//获取分类列表
|
|
|
- let params = { Enabled:1, KeyWord: '' ,HideDayWeek:1,/*不显示晨报/周报*/ };
|
|
|
+ let params = { CurrentIndex: 1, PageSize: 1000, KeyWord: '' };
|
|
|
classifylist(params).then((res) => {
|
|
|
if (res.Ret == 200 && Array.isArray(res.Data.List)) {
|
|
|
this.optionsArr = [];
|
|
@@ -520,20 +518,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- getSystemUserInfo(){
|
|
|
- departInterence.systemUserInfo().then(res=>{
|
|
|
- if(res.Ret===200){
|
|
|
- const systemUserInfo=res.Data
|
|
|
- // 设置水印文案
|
|
|
- let waterMarkString=''
|
|
|
- if(systemUserInfo){
|
|
|
- waterMarkString=`${systemUserInfo.RealName}${systemUserInfo.Mobile?systemUserInfo.Mobile:systemUserInfo.Email}`
|
|
|
- waterMarkString=encodeURIComponent(waterMarkString)
|
|
|
- this.waterMarkStr=Base64.encode(waterMarkString)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -599,7 +583,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
#leftfroala {
|
|
|
- flex: 1;
|
|
|
+ min-width: 500px;
|
|
|
+ width: 800px;
|
|
|
+ margin: 0 auto;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
|