ソースを参照

个人报告智能布局,普通布局添加,编辑

Karsa 10 ヶ月 前
コミット
f7fb7d2d19
27 ファイル変更1384 行追加994 行削除
  1. 373 0
      src/api/modules/reportV2.js
  2. 10 2
      src/lang/modules/ReportManagement/ReportList.js
  3. 2 2
      src/lang/modules/ReportManagement/SmartReport.js
  4. 5 2
      src/mixins/reportApproveConfig.js
  5. 10 2
      src/routes/modules/oldRoutes.js
  6. 8 1
      src/utils/buttonConfig.js
  7. 50 22
      src/views/report_manage/reportV2/components/chapterEditWrapper.vue
  8. 8 2
      src/views/report_manage/reportV2/components/chooseCooperaUserDia.vue
  9. 191 0
      src/views/report_manage/reportV2/components/chooseInherReportDia.vue
  10. 196 134
      src/views/report_manage/reportV2/components/reportBaseInfoDia.vue
  11. 31 15
      src/views/report_manage/reportV2/components/reportEditHeader.vue
  12. 23 127
      src/views/report_manage/reportV2/components/reportPreview.vue
  13. 65 61
      src/views/report_manage/reportV2/list.vue
  14. 5 2
      src/views/report_manage/reportV2/normalReport/components/ETAPriceChart.vue
  15. 5 2
      src/views/report_manage/reportV2/normalReport/components/ETASandBox.vue
  16. 6 2
      src/views/report_manage/reportV2/normalReport/components/ETASheet.vue
  17. 5 3
      src/views/report_manage/reportV2/normalReport/components/ImportETAChart.vue
  18. 6 2
      src/views/report_manage/reportV2/normalReport/components/SemanticAnalysis.vue
  19. 5 2
      src/views/report_manage/reportV2/normalReport/components/StatisticAnalysis.vue
  20. 7 2
      src/views/report_manage/reportV2/normalReport/components/importMyChart.vue
  21. 37 12
      src/views/report_manage/reportV2/normalReport/components/insertContent.vue
  22. 251 265
      src/views/report_manage/reportV2/normalReport/editReport.vue
  23. 7 49
      src/views/report_manage/reportV2/normalReport/mixins/messagePush.js
  24. 1 227
      src/views/report_manage/reportV2/normalReport/mixins/reportMixin.js
  25. 7 21
      src/views/report_manage/reportV2/normalReport/reportdtl.vue
  26. 61 33
      src/views/report_manage/reportV2/smartReport/editReport.vue
  27. 9 2
      src/views/report_manage/reportV2/smartReport/reportDetail.vue

+ 373 - 0
src/api/modules/reportV2.js

@@ -0,0 +1,373 @@
+//研报改版  一些接口复用以前的 一些新增的 都捞过来放一块
+import http from "@/api/http.js"
+
+
+/* 新增的接口 */
+export const reportV2Interface = {
+
+  /**
+   * 获取有权限的列表 
+   * @param {
+   *  CurrentIndex PageSize KeyWord ClassifyIdFirst ClassifyIdSecond ClassifyIdThird
+   * } params 
+   * @returns 
+   */
+  getAuthReportList: params => {
+    return http.get('/report/list/authorized',params)
+  },
+
+  /**
+   * 报告基础信息
+   * @param {*ReportId} params 
+   * @returns 
+   */
+  getRportBase: params => {
+    return http.get('/report/detail/base',params)
+  },
+
+  /**
+   * 修改章节基础信息
+   * @param {*} params 
+   * @returns 
+   */
+  editChapterBase: params => {
+    return http.post('/report/chapter/base_info/edit',params)
+  },
+
+  /**
+   * 章节拖动排序
+   * @param {*ReportChapterId PrevReportChapterId NextReportChapterId} params 
+   * @returns 
+   */
+  moveChapter: params => {
+    return http.post('/report/chapter/move',params)
+  },
+
+	/**
+	 * 删除章节
+	 * @param {*ReportChapterId} params 
+	 * @returns 
+	 */
+	removeChapter: params => {
+		return http.post('/report/chapter/del')
+	}
+}
+
+
+const reportlist = params => { return http.get('/report/list',params); };  //获取报告列表
+
+const classifylist = params => { return http.get('/classify/list',params); };  //获取分类列表
+
+ const reportpublish = params => { return http.post('/report/publish',params); };  //批量发布报告
+ const reportpublishcancle = params => { return http.post('/report/publish/cancle',params); };  //取消发布报告
+ const voiceupload = params => { return http.post('/voice/upload',params); };  //上传音频
+ const resourceVoiceupload = params => { return http.post('/resource/voice/upload',params); };  //上传音频
+ const reportadd = params => { return http.post('/report/add',params); };  //新增报告
+ const reportedit = params => { return http.post('/report/edit',params); };  //编辑报告
+ const reportdelete = params => { return http.post('/report/delete',params); };  //删除报告
+ const reportdetail = params => { return http.get('/report/detail',params); };  //获取报告详情
+ const classifyIdDetail = params => { return http.get('/report/classifyIdDetail',params); };  //通过二级分类id获取报告详情
+ const sendTemplateMsg = params => { return http.post('/report/sendTemplateMsg',params); };  //推送消息
+ const reportauthor = params => { return http.get('/report/author',params); };  //获取作者
+ const getDraft = params => { return http.get('/report/getDraft',params); };  //获取草稿
+ const autosave = params => { return http.post('/report/saveReportContent',params); };  //保存
+ const reportSetPrepublish=params=>{return http.post('/report/pre_publish',params);};//报告设置定时发布
+
+ const classifyparent = params => { return http.get('/classify/parent',params); };  //获取父级分类
+ const classifyadd = params => { return http.post('/classify/add',params); };  //新增分类
+ const classifydelete = params => { return http.post('/classify/delete',params); };  //删除分类
+ const classifyedit = params => { return http.post('/classify/edit',params); };  //编辑分类
+ const checkDeleteClassify = params => { return http.get('/classify/checkDeleteClassify',params); };  //检测分类
+ const classifyTelList = params=>{return http.get('/classify/tel_list',params)};//电话会分类
+
+
+
+ /* 客群消息推送接口 */
+const messagePushPost= params => {
+	return http.post('/report/ths/sendTemplateMsg',params)
+}
+
+// 晨周报章节类型列表
+const dayWeekReportChapterList=params=>{
+	return http.get('/report/getDayWeekReportChapterTypeList',params)
+}
+
+//新增晨周报
+const addDayWeekReport=params=>{
+	return http.post('/report/addDayWeekReport',params)
+}
+
+//编辑晨周报
+const editDayWeekReport=params=>{
+	return http.post('/report/editDayWeekReport',params)
+}
+
+// 晨周报章节列表
+const dayWeekChapterList=params=>{
+	return http.get('/report/getReportChapterList',params)
+}
+
+//章节标签列表
+const chapterTrendTagList=()=>{
+	return http.get('/report/getChapterTrendTag',{})
+}
+
+//编辑章节标签
+const editChapterTrendTag=params=>{
+	return http.post('/report/editChapterTrendTag',params)
+}
+
+//晨报周报章节详情
+const chapterDetail=params=>{
+	return http.get('/report/getDayWeekChapter',params)
+}
+
+//晨报数据指标列表
+const dayTicketList=params=>{
+	return http.get('/report/getDayReportTickerList',params)
+}
+
+//保存晨报周报章节报告
+const saveChapterReport=params=>{
+	return http.post('/report/editDayWeekChapter',params)
+}
+
+//获取晨报/周报上一篇内容
+const getChapterReportBefore=params=>{
+	return http.get('/report/getLastDayWeekReportChapter',params)
+}
+
+//判断晨报周报当前章节是否为最后一篇发布的
+const getChapterReportIsLast=params=>{
+	return http.get('/report/isLastDayWeekReportChapter',params)
+}
+
+//发布晨报周报章节
+const publishChapterReport=params=>{
+	return http.post('/report/publishDayWeekReportChapter',params)
+}
+
+//发布晨报周报
+const publishDayOrWeekReport=params=>{
+	return http.post('/report/publishDayWeekReport',params)
+}
+
+//晨报周报更新暂停的时间
+const dayWeekPauseTime=params=>{
+	return http.get('/report/getDayWeekReportPauseTime',{})
+}
+
+//晨报周报设置更新规则
+const dayWeekUpdateRule=params=>{
+	return http.post('/report/setDayWeekReportUpdateRule',params)
+}
+
+// 周报校验音频
+const weekReportValidAudio=params=>{
+	return http.get('/report/CheckDayWeekReportChapterVideo',params)
+}
+
+
+const chapterQRCodeImg=params=>{
+	return http.post('/report/getSunCode',params)
+}
+
+/* 推送客户群设置 */
+// 获取待推送报告类型
+/**
+ * @returns 
+ * List - 报告类型列表
+ * 
+ */
+const getBeingPushedReportType=()=>{
+	return http.get('/yb/ths_send/report_type',{})
+}
+// 获取待推送列表
+/**
+ * 
+ * @param {
+ * Title 推送标题
+ * ReportType 内容类型
+ * CreateTimeStart 创建开始日期
+ * CreateTimeEnd 创建结束日期
+ * PushTimeStart 推送开始日期
+ * PushTimeEnd 推送结束日期
+ * PageSize 每页条数
+ * CurrentIndex 当前页数
+ * } params 
+ * @returns 
+ */
+const getBeingPushedReportList=params=>{
+	return http.get('/yb/ths_send/list',params)
+}
+// 设置推送时间
+/** 
+ * @param {
+ * SendId 序号
+ * PushTime 新的推送时间
+ * } params 
+ * @returns 
+ */
+const setPushingTime=params=>{
+	return http.post('/yb/ths_send/modify_push_time',params)
+}
+
+//研报标记状态
+/**
+ * 
+ * @param {
+ * Status 编辑状态
+ * ReportId 报告ID
+ * } params
+ * @returns 
+ */
+const markReport = params =>{
+  return http.post('/report/mark',params)
+}
+
+// 获取章节类型列表
+/**
+ * @param params.ReportType Enum-报告类型:day-晨报;week-周报
+ * @param params.PageSize Integer-每页条数
+ * @param params.CurrentIndex Integer-当前页数
+ * @returns 章节类型列表
+ */
+const getchapterTypeList=params=>{
+ return http.get('/report/chapter_type/list',params)
+}
+
+// 新增章节类型
+/**
+ * @param params.ReportChapterTypeName String-章节名称
+ * @param params.Sort Integer-排序
+ * @param params.ReportType Enum-报告类型:day-晨报;week-周报
+ * @param params.SelectedImage String-选中的icon
+ * @param params.UnselectedImage String-未选中的icon
+ * @param params.WordsImage String-带字的icon
+ * @param params.EditImgUrl String-后台-章节列表封面图
+ * @param params.IsShow Enum-小程序端是否展示:0-隐藏;1-显示
+ */
+const addChapterType=params=>{
+	return http.post('/report/chapter_type/add',params)
+ }
+
+ // 编辑章节类型
+/**
+ * @param params.ReportChapterTypeId Integer-章节ID
+ * @param params.ReportChapterTypeName String-章节名称
+ * @param params.Sort Integer-排序
+ * @param params.ReportType Enum-报告类型:day-晨报;week-周报
+ * @param params.SelectedImage String-选中的icon
+ * @param params.UnselectedImage String-未选中的icon
+ * @param params.WordsImage String-带字的icon
+ * @param params.EditImgUrl String-后台-章节列表封面图
+ * @param params.IsShow Enum-小程序端是否展示:0-隐藏;1-显示
+ */
+const editChapterType=params=>{
+	return http.post('/report/chapter_type/edit',params)
+ }
+ 
+// 删除章节
+/**
+ * @param params.ReportChapterTypeId Integer-章节ID
+ */
+const deleteChapterType=params=>{
+	return http.post('/report/chapter_type/del',params)
+}
+
+// 获取章节类型的权限列表
+/**
+ * @param params.ReportChapterTypeId Integer-章节ID
+ * @returns 权限列表
+ */
+const getchapterTPermissionList=params=>{
+	return http.get('/report/chapter_type/permission_list',params)
+ }
+
+// 设置章节类型的权限
+/**
+ * @param params.ReportChapterTypeId Integer-章节ID
+ * @param params.ChartPermissionIdList Array<Integer>-权限IDs
+ */
+const setchapterTPermission=params=>{
+	return http.post('/report/chapter_type/auth_setting',params)
+}
+
+//章节启用\禁用
+const setChapterEnable=params=>{
+	return http.post('/report/chapter_type/enabled/set',params)
+}
+
+//章节拖动排序
+const setChapterSort=params=>{
+	return http.post('/report/chapter_type/move',params)
+}
+
+// 同时推送客群和模板消息
+const reportMessageSend=params=>{
+	return http.post('/report/sendMsg',params)
+}
+
+// 中英文研报、智能研报转pdf和长图
+const report2PdfImg=params=>{
+	return http.post('/smart_report/get_pdf_url',params)
+}
+
+
+
+export {
+	reportlist,
+	reportpublish,
+	reportpublishcancle,
+	voiceupload,
+	resourceVoiceupload,
+	reportadd,
+	reportedit,
+	reportdelete,
+	reportdetail,
+	classifyIdDetail,
+	sendTemplateMsg,
+	reportauthor,
+	getDraft,
+	autosave,
+	reportSetPrepublish,
+	classifylist,
+	classifyparent,
+	classifyadd,
+	classifydelete,
+	classifyedit,
+	checkDeleteClassify,
+	messagePushPost,
+	dayWeekReportChapterList,
+	addDayWeekReport,
+	dayWeekChapterList,
+	chapterTrendTagList,
+	editChapterTrendTag,
+	editDayWeekReport,
+	chapterDetail,
+	dayTicketList,
+	saveChapterReport,
+	getChapterReportBefore,
+	getChapterReportIsLast,
+	publishChapterReport,
+	publishDayOrWeekReport,
+	dayWeekPauseTime,
+	dayWeekUpdateRule,
+	chapterQRCodeImg,
+  classifyTelList,
+	getBeingPushedReportType,
+	getBeingPushedReportList,
+	setPushingTime,
+  markReport,
+	getchapterTypeList,
+	addChapterType,
+	editChapterType,
+	deleteChapterType,
+	getchapterTPermissionList,
+	setchapterTPermission,
+	reportMessageSend,
+	weekReportValidAudio,
+	setChapterEnable,
+	setChapterSort,
+	report2PdfImg
+}

+ 10 - 2
src/lang/modules/ReportManagement/ReportList.js

@@ -56,7 +56,7 @@ export const ReportListEn = {
   intercommodity_analysis_radio: "Cross-Comm",
   just_mine_radio: "Just Mine",
   insert_sandbox_tabs: "Insert Sandbox",
-  no_reports_msg: "Sandbox Name/Commodity",
+  no_sandbox_msg: "Sandbox Name/Commodity",
   insert_table_tabs: "Insert Table",
   table_name_tabs: "Table Name",
   bulk_insertion_tabs: "My gallery batch insert",
@@ -150,6 +150,10 @@ export const ReportListEn = {
   /* 添加章节弹窗 */
   label_chap_name:'Section Name',
   label_chap_editor:'Editor',
+  tit_choose_inher:'Select Report',
+  ph_report_tit: 'Please input the report title',
+  check_report_len: 'Only one report can be selected',
+  ph_select_user: 'Please select user',
 };
 
 /* 中文 */
@@ -207,7 +211,7 @@ export const ReportListZh = {
   intercommodity_analysis_radio: "跨品种分析",
   just_mine_radio: "只看我的",
   insert_sandbox_tabs: "沙盘插入",
-  no_reports_msg: "沙盘名称/品种",
+  no_sandbox_msg: "沙盘名称/品种",
   insert_table_tabs: "表格插入",
   table_name_tabs: "表格名称",
   bulk_insertion_tabs: "我的图库批量插入",
@@ -300,4 +304,8 @@ export const ReportListZh = {
   /* 添加章节弹窗 */
   label_chap_name:'章节名称',
   label_chap_editor:'编辑人',
+  tit_choose_inher:'选择报告',
+  ph_report_tit: '请输入报告标题',
+  check_report_len: '只能选择一篇报告',
+  ph_select_user: '请选择用户',
 };

+ 2 - 2
src/lang/modules/ReportManagement/SmartReport.js

@@ -35,7 +35,7 @@ export const SmartReportEn = {
   smart_notification_pushed: "Notification Pushed",
   smart_filtering_criteria_btn: "Filter options",
   smart_title_creator_btn: "Title/Creator",
-  smart_report_type: "Report type",
+  smart_report_type: "Category",
   smart_creator_btn: "Creator",
   table_col02:'Operator',
   smart_release_approval_time: "Release/Approval Time",
@@ -163,7 +163,7 @@ export const SmartReportZh = {
   smart_notification_pushed: "已推送消息",
   smart_filtering_criteria_btn: "筛选条件",
   smart_title_creator_btn: "标题 / 创建人",
-  smart_report_type: "报告类型",
+  smart_report_type: "分类",
   smart_creator_btn: "创建人",
   table_col02:'更新人',
   smart_release_approval_time: "发布/审批时间",

+ 5 - 2
src/mixins/reportApproveConfig.js

@@ -43,14 +43,17 @@ export default{
             const {IsReportApprove='',ReportApproveType=''} = res.Data
             this.IsReportApprove = IsReportApprove==='true'?true:false,
             this.ReportApproveType = ReportApproveType
+
+            console.log(this.isApprove)
         },
         //检查是否有审批流
         checkClassifyNameArr(type=1,classify=[]){
             this.checkLoading=true
             let params = {
                 ReportType:type,
-                ClassifyFirstId:classify[classify.length-2]||0,
-                ClassifySecondId:classify[classify.length-1]||0,
+                ClassifyFirstId:classify[0]||0,
+                ClassifySecondId:classify[1]||0,
+                ClassifyThirId:classify[2]||0,
             }
             approveInterence.checkClassifyApprove(params).then(res=>{
                 this.checkLoading=false

+ 10 - 2
src/routes/modules/oldRoutes.js

@@ -62,9 +62,10 @@ export default [
   {
     path: "/smartReportDetail",
     name: "智能报告",
-    component: () => import("@/views/smartReport/reportDetail.vue"),
+    component: () => import("@/views/report_manage/reportV2/smartReport/reportDetail.vue"),
   },
 
+
   {
     path: '/reportEditV2',
     name:'编辑研报',
@@ -76,6 +77,13 @@ export default [
     component: () => import("@/views/report_manage/reportV2/smartReport/editReport.vue")
   },
 
+  {
+    path: "/reportdtlV2",
+    component: () => import("@/views/report_manage/reportV2/normalReport/reportdtl.vue"),
+    name: "预览报告",
+    hidden: true,
+  },
+
   // 主页
   {
     path: "/",
@@ -304,7 +312,7 @@ export default [
       },
       {
         path: 'reportNew',
-        name:'研报列表',
+        name:'研报',
         component: () => import("@/views/report_manage/reportV2/list.vue")
       }
     ],

+ 8 - 1
src/utils/buttonConfig.js

@@ -33,8 +33,15 @@ export const reportManageBtn={
     reportManage_reportList:'reportManage:reportList',//研报列表的选项
     reportManage_reportList_uv:'reportManage:reportList:uv',//研报列表-PV/UV
     reportManage_reportList_sendTime:'reportManage:reportList:sendTime',//研报列表-报告推送时间
-    reportManage_dayWeekReportAdd:'reportManage:dayWeekReportAdd',//添加晨报周报
+    // reportManage_dayWeekReportAdd:'reportManage:dayWeekReportAdd',//添加晨报周报
     reportManage_reportAdd:'reportManage:reportAdd',//添加研报
+
+    reportManage_clearCont:'reportMange:clearCont',//一键清空内容
+
+    reportMange_chapter_add: 'reportMange:chapter:add',//章节添加
+    reportMange_chapter_sort: 'reportMange:chapter:sort',//章节排序
+    reportMange_chapter_share: 'reportMange:chapter:share',//章节分享
+    reportMange_chapter_editTag: 'reportMange:chapter:editTag',//章节添加标签
 }
 /*
  *--------智能研报列表----------- 

+ 50 - 22
src/views/report_manage/reportV2/components/chapterEditWrapper.vue

@@ -22,7 +22,11 @@
     <div class="box-main">
       <div class="main-top">
         <h3><!-- 研报章节 -->{{$t('ReportManage.ReportList.tit_report_chap')}}</h3>
-        <el-button type="primary" size="small" @click="openAddChapter"><!-- 添加章节 -->{{$t('ReportManage.ReportList.btn_add_chap')}}</el-button>
+        <el-button 
+          type="primary" 
+          size="small" 
+          @click="openAddChapter"
+        ><!-- 添加章节 -->{{$t('ReportManage.ReportList.btn_add_chap')}}</el-button>
       </div>
       
       <ul class="chapter-list">
@@ -55,9 +59,14 @@
                   <el-dropdown-menu slot="dropdown">
                     <el-dropdown-item :command="{type:'beseInfo',item}"><!-- 基础信息 -->{{$t('ReportManage.ReportList.information_title')}}</el-dropdown-item>
                     <el-dropdown-item :command="{type:'del',item}"><!-- 删除 -->{{$t('Table.delete_btn')}}</el-dropdown-item>
-                    <el-dropdown-item :command="{type:'adTag',item}"><!-- 添加标签 -->{{$t('ReportManage.ReportList.add_labels_section')}}</el-dropdown-item>
+                    <el-dropdown-item 
+                      :command="{type:'adTag',item}" 
+                      v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportMange_chapter_editTag)"><!-- 添加标签 -->{{$t('ReportManage.ReportList.add_labels_section')}}</el-dropdown-item>
                     <el-dropdown-item :command="{type:'upAudio',item}"><!-- 上传录音 -->{{$t('ReportManage.ReportList.up_recording_lable')}}</el-dropdown-item>
-                    <el-dropdown-item :command="{type:'wxShare',item}"><!-- 微信分享 -->{{$t('ReportManage.ReportList.weChat_share')}}</el-dropdown-item>
+                    <el-dropdown-item 
+                      :command="{type:'wxShare',item}"
+                      v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportMange_chapter_share)"
+                    ><!-- 微信分享 -->{{$t('ReportManage.ReportList.weChat_share')}}</el-dropdown-item>
                   </el-dropdown-menu>
                 </el-dropdown>
               </div>
@@ -189,6 +198,10 @@ import draggable from 'vuedraggable';
 import mDialog from '@/components/mDialog.vue';
 import {reportVarietyInterence} from '@/api/modules/reportVariety';
 import { dataAuthInterface,chapterTrendTagList } from '@/api/api.js';
+import { 
+  dayWeekChapterList,
+  reportV2Interface
+} from '@/api/modules/reportV2'
 export default {
   components: { draggable,mDialog },
   data() {
@@ -224,9 +237,14 @@ export default {
         },
       ],
 
+      reportBase: {},
+
       startIndex: 0,
       preIndex: 0,
       nextIndex: 0,
+      
+      selectChapterId: 0, //选中章节Id
+      editChapterId: 0,//编辑章节Id
 
       /* 章节弹窗 */
       isOpenChapterDia: false,
@@ -253,14 +271,14 @@ export default {
     }
   },
   mounted(){
-    this.getReportVarietyList();
-    this.getUserList();
-    this.getChapterTrendTagList();
+    this.getChapterList();
+    this.getReportBaseInfo()
+    // this.getChapterTrendTagList();
   },
   methods:{
+    //添加章节弹窗
     openAddChapter() {
       this.isOpenChapterDia = true;
-      
     },
 
     /* 保存章节编辑 */
@@ -296,22 +314,32 @@ export default {
       
     },
 
-     // 获取品种数据
-    async getReportVarietyList(){
-      const res = await reportVarietyInterence.filterVarietyOpts();
-      if(res.Ret !== 200) return
-      
-      this.reportVarietyOpts=res.Data||[]
+    /* 获取章节列表 */
+    async getChapterList() {
+      if(!this.$route.query.id) return 
+
+      const res = await dayWeekChapterList({
+        ReportId: Number(this.$route.query.id)
+      })
     },
 
-    /* 获取用户列表 */
-    async getUserList() {
-      const res = await dataAuthInterface.userSearch();
-      if (res.Ret !== 200) return
+    /* 获取报告基础信息用户范围 品种范围 */
+    async getReportBaseInfo() {
+      if(!this.$route.query.id) return 
+
+      const res = await reportV2Interface.getRportBase({
+         ReportId: Number(this.$route.query.id)
+      })
+
+      if(res.Ret!==200) return
+      this.reportBase = res.Data;
+
+      this.reportVarietyOpts = res.Data.PermissionList||[];
+      this.userOpts = res.Data.GrandAdminList||[];
 
-      this.userOpts = res.Data || []
     },
 
+
      //获取章节标签数据(仅在获取章节列表成功后获取一次)
     async getChapterTrendTagList(){
         const res=await chapterTrendTagList()
@@ -353,15 +381,14 @@ export default {
 <style scoped lang='scss'>
 *{box-sizing: border-box;}
 .left-chapter-box {
+  width: 300px;
   margin-right: 20px;
+  background: #fff;
   .box-top,.box-main {
     padding: 15px;
-    background: #fff;
-    border-radius: 4px;
   }
 
   .box-top {
-    margin-bottom: 15px;
     padding-bottom: 0;
     .handle-list {
       margin-top: 30px;
@@ -371,6 +398,7 @@ export default {
   }
   .box-main {
     padding-right: 0;
+    border-top: 1px solid #DCDFE6;
     .main-top {
       padding-right: 15px;
       display: flex;
@@ -382,7 +410,7 @@ export default {
   .chapter-list {
     margin-top: 20px;
     padding-right: 15px;
-    height: calc(100vh - 240px);
+    height: calc(100vh - 200px);
     overflow-y: auto;
     li {
       padding: 15px;

+ 8 - 2
src/views/report_manage/reportV2/components/chooseCooperaUserDia.vue

@@ -86,13 +86,19 @@ export default {
   },
   methods:{
     closeDia() {
+      this.choosedList = []
       this.$emit('update:isShow',false)
     },
 
     handleSaveChecked() {
-      if(!choosedList) return this.$message.warning('请选择用户')
+      if(!this.choosedList) return this.$message.warning('请选择用户')
+
+      this.$emit('save',this.choosedList.map(_ => ({
+        NodeId: _.NodeId,
+        NodeName: _.NodeName
+      })))
 
-      this.$emit('save',choosedList.filter(_ => _.NodeId))
+      this.closeDia()
     },
 
     async getTreeData() {

+ 191 - 0
src/views/report_manage/reportV2/components/chooseInherReportDia.vue

@@ -0,0 +1,191 @@
+<template>
+  <el-dialog
+    v-dialogDrag
+    :title="$t('ReportManage.ReportList.tit_choose_inher')"
+    width="650px"
+    :visible.sync="isShow"
+    :modal-append-to-body="false"
+    :append-to-body="false"
+    @close="closeDia"
+  >
+      <div class="dialog-wrap">
+        <div style="margin-bottom: 20px;">
+          <el-input
+              @input="filterChange"
+              :placeholder="$t('ReportManage.ReportList.ph_report_tit')"
+              v-model="searchTxt"
+              clearable
+              size="medium"
+              style="width:250px"
+              prefix-icon="el-icon-search"
+          />
+        </div>
+        <el-table
+          :data="reportList"
+          style="box-shadow: 0px 3px 6px rgba(155, 170, 219, 0.2)"
+          border
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column
+            type="selection"
+            width="55">
+          </el-table-column>
+          <el-table-column
+            v-for="item in tableColums"
+            :key="item.label"
+            :label="item.label"
+            :width="item.widthsty"
+            :min-width="item.minwidthsty"
+            align="center"
+          >
+            <template slot-scope="{row}">
+              <span v-if="item.key==='Title'">
+                <span
+                >{{ row.Title }}</span
+                >
+                <span
+                  v-if="row.MsgSendTime"
+                  >({{ row.MsgSendTime.substring(5, 7)
+                  }}{{ row.MsgSendTime.substring(8, 10) }})</span
+                >
+                <span
+                  v-else-if="row.PublishTime"
+                  >({{ row.PublishTime.substring(5, 7)
+                  }}{{ row.PublishTime.substring(8, 10) }})</span
+                >
+                <span
+                  v-else-if="row.CreateTime"
+                  >({{ row.CreateTime.substring(5, 7)
+                  }}{{ row.CreateTime.substring(8, 10) }})</span
+                >
+              </span>
+
+              <span v-else-if="item.key==='Classify'">
+                {{ row.ClassifyNameFirst }}
+                <span v-if="row.ClassifyNameSecond">/ {{ row.ClassifyNameSecond }}</span>
+                <span v-if="row.ClassifyNameThird">/ {{ row.ClassifyNameThird }}</span>
+              </span>
+
+              <span v-else>{{ row[item.key] }}</span>
+            </template>
+          </el-table-column>
+          <div slot="empty" style="padding: 30px 0;">
+            <tableNoData text="暂无数据" size="mini"/>
+          </div>
+        </el-table>
+        <div style="margin-top:10px;height:40px;">
+          <m-page 
+              class="table-page"
+              :total="total" 
+              :pageSize="pageSize"
+              :page_no="pageNo"
+              :pagercount="5"
+              @handleCurrentChange="pageNumberChange"
+          />
+
+        </div>
+       
+      </div>
+      <div class="dialog-btn">
+          <el-button type="primary" plain @click="closeDia">{{$t('Dialog.cancel_btn')}}</el-button>
+          <el-button type="primary" @click="handleSave">{{$t('Dialog.confirm_btn')}}</el-button>
+      </div>
+  </el-dialog>
+</template>
+<script>
+import { reportV2Interface } from '@/api/modules/reportV2.js';
+import mPage from '@/components/mPage.vue'
+export default {
+  components: { mPage },
+  props: {
+    isShow: {
+      type: Boolean
+    },
+    id: {
+      type: Number,
+      default: 0
+    }
+  },
+  computed: {
+    tableColums() {
+      return [
+        { label: this.$t('ReportManage.smart_report_title'),key: 'Title' },
+        { label: this.$t('ReportManage.smart_report_type'),key: 'Classify' },
+        { label: '创建时间',key: 'CreateTime' },
+      ]
+    }
+  },
+  data() {
+    return {
+      reportList: [],
+      pageNo: 1,
+      pageSize: 5,
+      total: 0,
+      searchTxt: '',
+      checkList: []
+    }
+  },
+  watch: {
+    isShow(nval) {
+      if(!nval) return
+    }
+  },
+  methods:{
+    closeDia() {
+      this.reportList = [];
+      this.pageNo = 1;
+      this.total = 0
+      this.searchTxt = '';
+      this.checkList = [];
+
+      this.$emit('update:isShow',false)
+    },
+
+    handleSave() {
+      if(this.checkList.length!==1) return this.$message.warning(/* '只能选择一篇报告' */this.$t('ReportManage.ReportList.check_report_len'))
+
+      this.$emit('success',this.checkList[0])
+      this.closeDia();
+    },
+
+    handleSelectionChange(val) {
+      this.checkList = val;
+    },
+
+    filterChange() {
+      this.pageNo = 1;
+      this.getReportList()
+    },
+
+    pageNumberChange(page) {
+      this.pageNo = page;
+      this.getReportList()
+    },
+
+    getReportList() {
+      reportV2Interface.getAuthReportList({
+          CurrentIndex: this.pageNo,
+          PageSize:this.pageSize,
+          Keyword:this.searchTxt
+        })
+        .then((res) => {
+          if (res.Ret !== 200) return;
+          
+          this.reportList = res.Data.List || [];
+          this.total = res.Data.Paging.Totals;
+        })
+    }
+  },
+}
+</script>
+<style scoped lang='scss'>
+.dialog-wrap {
+
+}
+.dialog-btn{
+    margin:40px 0;
+    text-align: center;
+    display: flex;
+    justify-content: center;
+}
+</style>

+ 196 - 134
src/views/report_manage/reportV2/components/reportBaseInfoDia.vue

@@ -8,7 +8,8 @@
       :center="true"
       v-dialogDrag
       custom-class="dialogclass"
-      width="650px"
+      width="800px"
+      top="5vh"
       @close="handleClose"
     >
       <el-form
@@ -33,17 +34,6 @@
           </el-radio-group>
         </el-form-item>
 
-        <el-form-item prop="title" :label="$t('ReportManage.ReportList.label_report_tit')">
-          <el-input
-            :placeholder="$t('ReportManage.ReportList.input_title_please')"
-            v-model="formData.title"
-            style="width: 350px"
-          >
-          </el-input>
-          
-          <el-button type="text" v-if="formData.type===2"><!-- 选择继承报告 -->{{$t('ReportManage.ReportList.choose_inherit_report')}}</el-button>
-        </el-form-item>
-
         <el-form-item prop="classify" :label="$t('ReportManage.ReportList.label_report_classify')">
           <el-cascader
             ref="cascader"
@@ -51,7 +41,7 @@
             v-model="formData.classify"
             :placeholder="$t('ReportManage.ReportList.please_select_category')"
             size="medium"
-            style="width: 350px"
+            style="width: 400px"
             @change="handleUpdateBaseInfo"
           />
         </el-form-item>
@@ -61,13 +51,24 @@
             <el-tag v-for="item in formData.relationVariety" :key="item"></el-tag>
           </div>
         </el-form-item>
+
+        <el-form-item prop="title" :label="$t('ReportManage.ReportList.label_report_tit')">
+          <el-input
+            :placeholder="$t('ReportManage.ReportList.input_title_please')"
+            v-model="formData.title"
+            style="width:400px"
+          >
+            <el-button slot="append" type="primary" v-if="formData.type===2&&!id" @click="isChooseInherReport=true"><!-- 选择继承报告 -->{{$t('ReportManage.ReportList.choose_inherit_report')}}</el-button>
+          </el-input>
+
+        </el-form-item>
         
         <el-form-item prop="abstract" :label="$t('ReportManage.ReportList.label_report_abstract')">
           <el-input
             type="textarea"
             :placeholder="$t('ReportManage.ReportList.please_input_abstract')"
             v-model="formData.abstract"
-            style="width: 350px"
+            style="width: 400px"
           ></el-input>
         </el-form-item>
 
@@ -77,7 +78,7 @@
             multiple
             :placeholder="$t('ReportManage.ReportList.please_select_author')"
             size="medium"
-            style="width: 350px"
+            style="width: 400px"
           >
             <el-option
               v-for="(item, i) in authorlist"
@@ -88,22 +89,6 @@
           </el-select>
         </el-form-item>
 
-        <el-form-item prop="frequency" :label="$t('ReportManage.ReportList.label_frequency')">
-          <el-select
-            v-model="formData.frequency"
-            :placeholder="$t('ReportManage.ReportList.please_select_frequency')"
-            size="medium"
-            style="width: 350px"
-          >
-            <el-option 
-              v-for="item in reportFrequencyOption" 
-              :key="item.value"
-              :label="item.label" 
-              :value="item.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-
         <el-form-item prop="time" :label="$t('ReportManage.ReportList.label_createtime')">
           <el-date-picker
             v-model="formData.time"
@@ -112,15 +97,15 @@
             :placeholder="$t('ReportManage.ReportList.please_select_date')"
             size="medium"
             :clearable="false"
-            style="width: 350px"
+            style="width: 400px"
           ></el-date-picker>
         </el-form-item>
 
         <el-form-item prop="cooperationType" :label="$t('ReportManage.ReportList.label_coop')">
           <el-radio-group
             v-model="formData.cooperationType"
-            :disabled="id"
-            @change="handleUpdateBaseInfo"
+            :disabled="id||formData.type===2"
+            @change="formData.cooperationUsers=[]"
           >
             <el-radio :label="1"><!-- 个人 -->{{$t('ReportManage.ReportList.coop_own')}}</el-radio>
             <el-radio :label="2"><!-- 多人协作 -->{{$t('ReportManage.ReportList.coop_more')}}</el-radio>
@@ -128,16 +113,28 @@
 
           <el-button 
             type="text" 
-            v-if="formData.cooperationType===2"
+            v-if="formData.cooperationType===2&&!id"
             style="margin-left: 20px"
             @click="handleChooseCooper"
           ><!-- 选择协作人 -->{{$t('ReportManage.ReportList.choose_cooper')}}</el-button>
+          
+          <div class="choosed-cooper" v-if="formData.cooperationUsers.length">
+            <el-tag
+              v-for="(item,index) in formData.cooperationUsers"
+              :key="item.NodeId"
+              size="mini"
+              effect="dark"
+              closable
+              @close="removeCooper(index)"
+            >
+              {{ item.NodeName }}
+            </el-tag>
+          </div>
         </el-form-item>
         <el-form-item prop="reportLayout" :label="$t('ReportManage.ReportList.label_report_layout')">
           <el-radio-group
             v-model="formData.reportLayout"
-            :disabled="id"
-            @change="handleUpdateBaseInfo"
+            :disabled="id||formData.type===2"
           >
             <el-radio :label="1"><!-- 常规布局 -->{{$t('ReportManage.ReportList.layout_default')}}</el-radio>
             <el-radio :label="2"><!-- 智能布局 -->{{$t('ReportManage.ReportList.layout_smart')}}</el-radio>
@@ -154,11 +151,9 @@
 
           <el-radio-group
             v-model="formData.isPublcPublish"
-            :disabled="id"
-            @change="handleUpdateBaseInfo"
           >
-            <el-radio :label="true">{{$t('Common.yes_text')}}</el-radio>
-            <el-radio :label="false">{{$t('Common.no_text')}}</el-radio>
+            <el-radio :label="1">{{$t('Common.yes_text')}}</el-radio>
+            <el-radio :label="0">{{$t('Common.no_text')}}</el-radio>
           </el-radio-group>
         </el-form-item>
 
@@ -181,17 +176,25 @@
     <chooseCooperaUserDia
       :isShow.sync="isChooseCooperaUser"
       :users="formData.cooperationUsers"
+      @save="getChooseCooperaUser"
+    />
+
+    <!-- 选择继承报告弹窗 -->
+    <chooseInherReportDia
+      :isShow.sync="isChooseInherReport"
+      @success="chooseInheritReport"
     />
   </div>
 </template>
 
 <script>
 import { apiSmartReport } from "@/api/modules/smartReport";
-import { reportFrequencyOption } from '../common/constants';
+import { reportV2Interface,classifylist,reportadd } from '@/api/modules/reportV2.js';
 import chooseCooperaUserDia from './chooseCooperaUserDia.vue';
+import chooseInherReportDia from './chooseInherReportDia.vue';
 export default {
   name: "BaseInfo",
-  components: {chooseCooperaUserDia},
+  components: { chooseCooperaUserDia,chooseInherReportDia },
   model: {
     prop: "show",
     event: "showChange",
@@ -205,40 +208,47 @@ export default {
       type: Number,
       default: 0,
     },
+    reportInfo: {
+      type: Object
+    }
   },
   watch: {
     show(n) {
       if (!n) return
+      
+      this.getclassifylist();
+      this.getreportauthor();
+      
+      if (this.reportInfo) {
+          this.formData = {
+            type: this.reportInfo.AddType,
+            inheritId: 0,
+            classify: this.reportInfo.ClassifyIdThird
+              ? [this.reportInfo.ClassifyIdFirst,this.reportInfo.ClassifyIdSecond,this.reportInfo.ClassifyIdThird]
+              : this.reportInfo.ClassifyIdSecond 
+              ? [this.reportInfo.ClassifyIdFirst,this.reportInfo.ClassifyIdSecond]
+              : [this.reportInfo.ClassifyIdFirst],
+            relationVariety: [],
+            title: this.reportInfo.Title,
+            abstract: this.reportInfo.Abstract,
+            author: this.reportInfo.Author?this.reportInfo.Author.split(","):[],
+            frequency: this.reportInfo.Frequency,
+            time: this.reportInfo.CreateTime,
+            cooperationType: this.reportInfo.CollaborateType,//协作方式
+            cooperationUsers: [],
+            reportLayout: this.reportInfo.ReportLayout,//报告布局
+            isPublcPublish: this.reportInfo.IsPublicPublish
+          }
 
-      if (this.id) {
-        apiSmartReport
-          .reportDetail({
-            SmartReportId: Number(this.id),
-          })
-          .then((res) => {
-            if (res.Ret === 200) {
-              this.formData.type = res.Data.AddType;
-              this.formData.classify = [
-                res.Data.ClassifyIdFirst,
-                res.Data.ClassifyIdSecond,
-              ];
-              this.formData.title = res.Data.Title;
-              this.formData.abstract = res.Data.Abstract;
-              this.formData.author = res.Data.Author
-                ? res.Data.Author.split(",")
-                : [];
-              this.formData.frequency = res.Data.Frequency;
-              this.formData.time = res.Data.CreateTime;
-            }
-          });
+          console.log(this.formData)
       }
     },
   },
   data() {
     return {
-      reportFrequencyOption,
       formData: {
         type: 1,
+        inheritId: 0,//继承report id
         classify: [],
         relationVariety: [],
         title: "",
@@ -249,7 +259,7 @@ export default {
         cooperationType: 1,//协作方式
         cooperationUsers: [],
         reportLayout: 1,//报告布局
-        isPublcPublish: true
+        isPublcPublish: 1
       },
       publishTip: `若选择是,则发布后所有人可见;<br>
         若选择否,则发布后,仅创建人和审批人可见;`,
@@ -261,7 +271,7 @@ export default {
       isChooseCooperaUser: false,
 
       //继承报告弹窗
-      isSelectReport:false
+      isChooseInherReport:false
     };
   },
   computed: {
@@ -295,6 +305,7 @@ export default {
     handleClose() {
       this.formData = {
         type: 1,
+        inheritId: 0,
         classify: [],
         relationVariety: [],
         title: "",
@@ -303,101 +314,145 @@ export default {
         frequency: "日度",
         time: this.$moment().format("YYYY-MM-DD") || "",
         cooperationType: 1,//协作方式
+        cooperationUsers: [],
         reportLayout: 1,//报告布局
-        isPublcPublish: true
+        isPublcPublish: 1
       }
 
       this.$emit("showChange", false);
     },
 
-    handleConfirm() {
-      this.$refs.baseinfoForm.validate((valid) => {
-        if (valid) {
-          const params = {
-            AddType: this.formData.type,
-            ClassifyIdFirst: this.formData.classify[0]
-              ? this.formData.classify[0]
-              : 0,
-            ClassifyNameFirst: "",
-            ClassifyIdSecond: this.formData.classify[1]
-              ? this.formData.classify[1]
-              : 0,
-            ClassifyNameSecond: "",
-            Title: this.formData.title,
-            Abstract: this.formData.abstract,
-            Author:
-              this.formData.author.length > 0
-                ? this.formData.author.join(",")
-                : "",
-            Frequency: this.formData.frequency,
-            CreateTime: this.formData.time,
-          };
-          this.classifyArr.forEach((item) => {
-            if (item.value === params.ClassifyIdFirst) {
-              params.ClassifyNameFirst = item.label;
-              const arr = item.children || [];
-              arr.forEach((_item) => {
-                if (_item.value === params.ClassifyIdSecond) {
-                  params.ClassifyNameSecond = _item.label;
+    async handleConfirm() {
+      await this.$refs.baseinfoForm.validate()
+
+      const params = {
+        AddType: this.formData.type,
+        ClassifyIdFirst: this.formData.classify[0]
+          ? this.formData.classify[0]
+          : 0,
+        ClassifyNameFirst: "",
+        ClassifyIdSecond: this.formData.classify[1]
+          ? this.formData.classify[1]
+          : 0,
+        ClassifyNameSecond: "",
+        ClassifyIdThird: this.formData.classify[2]
+          ? this.formData.classify[2]
+          : 0,
+        ClassifyNameThird: "",
+        Title: this.formData.title,
+        Abstract: this.formData.abstract,
+        Author:
+          this.formData.author.length > 0
+            ? this.formData.author.join(",")
+            : "",
+        CreateTime: this.formData.time,
+        ReportLayout: this.formData.reportLayout,
+        CollaborateType: this.formData.cooperationType,
+        IsPublicPublish: this.formData.isPublcPublish,
+        InheritReportId: this.formData.inheritId,
+        GrantAdminIdList: this.formData.cooperationUsers.map(_ => _.NodeId)
+      };
+
+      this.classifyArr.forEach((item) => {
+        if (item.value === params.ClassifyIdFirst) {
+          params.ClassifyNameFirst = item.label;
+          const arr = item.children || [];
+          arr.forEach((_item) => {
+            if (_item.value === params.ClassifyIdSecond) {
+              params.ClassifyNameSecond = _item.label;
+              _item.children && _item.children.forEach(last_item => {
+                if (last_item.value === params.ClassifyIdThird) {
+                  params.ClassifyNameThird = last_item.label
                 }
-              });
+              })
             }
           });
-          // 编辑
-          if (this.id) {
-            this.$emit("save", params);
-            return;
-          }
-          apiSmartReport.reportAdd(params).then((res) => {
-            if (res.Ret === 200) {
-              this.handleClose();
-              
-              let { href } = this.$router.resolve({
-                path: "/smartReportEdit",
-                query: { id: res.Data.SmartReportId },
-              });
-              window.open(href, "_blank");
-            }
+        }
+      });
+      // 编辑
+      if (this.id) {
+        this.$emit("save", params);
+        return;
+      }
+      reportadd(params).then((res) => {
+        if (res.Ret === 200) {
+
+          let { href } = this.$router.resolve({
+            path: this.formData.reportLayout===1 
+              ? '/reportEditV2'
+              : "/smpartReportEditV2",
+            query: { id: res.Data.ReportId },
           });
+          window.open(href, "_blank");
+
+          this.handleClose();
         }
       });
     },
 
     handleUpdateBaseInfo() {
+      this.formData.inheritId = 0;
+
       if (this.formData.type === 1) {
         if (this.formData.classify.length === 2) {
           this.formData.title = this.getSelectClassifyName()[1];
         }
         return;
       }
+      if(!this.formData.classify.length&&this.formData.type===2) return
+
+      
       //获取上次报告
-      apiSmartReport
-        .getLastReport({
+      reportV2Interface
+        .getAuthReportList({
           ClassifyIdFirst: this.formData.classify[0],
           ClassifyIdSecond: this.formData.classify[1],
-        })
-        .then((res) => {
+          ClassifyIdThird: this.formData.classify[3],
+          CurrentIndex: 1,
+          PageSize:1,
+          Keyword:''
+        }).then((res) => {
           if (res.Ret !== 200) return;
-          if (res.Data == null) {
+          if (!res.Data.List) {
             this.$message.warning(
               this.$t("ReportManage.ReportList.no_reports_msg")
             );
             return false;
           }
-          this.formData.title = res.Data.Title;
-          this.formData.abstract = res.Data.Abstract;
-          this.formData.author = res.Data.Author
-            ? res.Data.Author.split(",")
-            : "";
-          this.formData.frequency = res.Data.Frequency;
+
+          this.chooseInheritReport(res.Data.List[0])
         });
     },
 
+    /* 选择继承报告 */
+    chooseInheritReport(item) {
+      const { Id,Title,Abstract,Author,CollaborateType,ReportLayout,IsPublicPublish } = item;
+
+      this.formData.title = Title;
+      this.formData.abstract = Abstract;
+      this.formData.author = Author
+        ? Author.split(",")
+        : "";
+      this.formData.cooperationType = CollaborateType;
+      this.formData.inheritId = Id;
+      // this.formData.cooperationUsers: [],
+      this.formData.reportLayout = ReportLayout;
+      this.formData.isPublcPublish = IsPublicPublish;
+    },
+
     //选择协作人
     handleChooseCooper() {
       this.isChooseCooperaUser = true
     },
 
+    getChooseCooperaUser(val) {
+      this.formData.cooperationUsers = val;
+    },
+
+    removeCooper(index) {
+      this.formData.cooperationUsers.splice(index,1)
+    },
+
     // 获取选择的分类名称
     getSelectClassifyName() {
       let arr = [];
@@ -424,15 +479,13 @@ export default {
 
     // 获取分类
     getclassifylist() {
-      let params = {
-        Enabled: 1,
-        KeyWord: "",
-        HideDayWeek: 1 /*不显示晨报/周报*/,
-      };
-      apiSmartReport.classifyList(params).then((res) => {
+      //获取分类列表
+      let params = { CurrentIndex: 0, PageSize: 1000, KeyWord: "" };
+
+      classifylist(params).then((res) => {
         if (res.Ret == 200 && Array.isArray(res.Data.List)) {
-          this.classifyArr = [];
-          res.Data.List.forEach((item, index) => {
+          this.classifyOptions = [];
+          res.Data.List.forEach(item => {
             let newitem = {
               label: item.ClassifyName,
               value: item.Id,
@@ -462,20 +515,29 @@ export default {
     },
   },
   mounted() {
-    this.getclassifylist();
-    this.getreportauthor();
   },
 };
 </script>
 
 <style lang="scss">
 .baseinfo-form-wrap {
+  width: 85%;
+  margin: 0 auto;
   .el-input {
     width: 100%;
   }
+  .el-input-group__append {
+    background-color: #0052D9;
+    color: #fff;
+  }
   .el-form-item {
     margin-left: auto;
     margin-right: auto;
   }
+  .choosed-cooper {
+    display: flex;
+    flex-wrap: wrap;
+    gap: 10px;
+  }
 }
 </style>

+ 31 - 15
src/views/report_manage/reportV2/components/reportEditHeader.vue

@@ -2,7 +2,11 @@
   <div class="top-action-wrap">
       <div class="title">{{reportInfo&&reportInfo.Title}}</div>
       <ul class="action-list">
-          <li class="action-item" @click="$emit('handleClearContent')">
+          <li 
+            class="action-item" 
+            @click="$emit('handleClearContent')"
+            v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_clearCont)"
+            >
               <img src="~@/assets/img/smartReport/icon01.png" alt="">
               <span><!-- 一键清空内容 -->{{$t('ReportManage.ReportList.click_clear_btn')}}</span>
           </li>
@@ -23,20 +27,32 @@
               <span>{{$t('ReportManage.ReportList.save_draft_btn')}}</span>
           </li>
           <template v-if="!isApprove||!hasApproveFlow">
-              <li class="action-item" :class="{'disabled':checkLoading}"
-                  @click="$emit('handlePublishOpt','dsfb')">
+              <li 
+                class="action-item" 
+                :class="{'disabled':checkLoading}"
+                @click="$emit('handlePublishOpt','dsfb')"
+                v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)"
+                >
                   <img src="~@/assets/img/smartReport/icon01.png" alt="">
                   <span>{{$t('ReportManage.ReportList.scheduled_publish_btn')}}</span>
               </li>
-              <li class="action-item" :class="{'disabled':checkLoading}"
-                  @click="$emit('handlePublishOpt','fb')">
+              <li 
+                class="action-item" 
+                :class="{'disabled':checkLoading}"
+                @click="$emit('handlePublishOpt','fb')"
+                v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)"
+              >
                   <img src="~@/assets/img/smartReport/icon01.png" alt="">
                   <span>{{$t('ReportManage.ReportList.publish_btn')}}</span>
               </li>
           </template>
           <template v-if="isApprove&&hasApproveFlow">
-              <li class="action-item" :class="{'disabled':checkLoading}"
-                  @click="$emit('handlePublishOpt','submit')">
+              <li 
+                class="action-item" 
+                :class="{'disabled':checkLoading}"
+                @click="$emit('handlePublishOpt','submit')"
+                v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)"
+              >
                   <img src="~@/assets/img/smartReport/icon01.png" alt="">
                   <span>{{$t('ReportManage.ReportList.submission_btn')}}</span>
               </li>
@@ -50,19 +66,19 @@ export default {
   props: {
     reportInfo: {
         type: Object
+    },
+    isApprove: {
+        type: Boolean
+    },
+    hasApproveFlow: {
+        type: Boolean
     }
-  },
-  data() {
-    return {
-      
-    }
-  },
-  mounted(){
-
   },
   methods:{
 
   },
+  mounted() {
+  }
 }
 </script>
 <style scoped lang='scss'>

+ 23 - 127
src/views/report_manage/reportV2/components/reportPreview.vue

@@ -14,30 +14,15 @@
         <i class="el-icon-close" @click="handleClose"></i>
       </div>
     </template>
-    <div id="reportdtl" :loading="loading">
-      <header>{{reportInfo.Title}}</header>
-      <div style="padding:0 35px 0; box-sizing:border-box; color:#666; font-size:24px; overflow:hidden;">
-        <span>{{reportInfo.Author}}</span>
-        <span style="float:right;">{{reportInfo.PublishTime}}</span>
-      </div>
-      
-      <div id="abstract" v-if="reportInfo.Abstract">
-        <div><!-- 摘要 -->{{$t('ReportManage.ReportList.abstract_ipt')}}:{{reportInfo.Abstract}}</div>
-      </div>
-      <div id="resetsty" style="padding:30px; box-sizing:border-box; overflow:hidden;">
-        <block v-if="reportInfo.ChapterType=='day'||reportInfo.ChapterType=='week'">
-          <div class="chapter-item" v-for="item in reportInfo.ChapterList" :key="item.ReportChapterId">
-            <div style="margin-bottom:10px">
-              <span class="type">{{item.TypeName}}</span>
-              <span class="title">{{item.Title}}</span>
-            </div>
-            <div id="resetcss" style="overflow:hidden;" v-html="item.Content"></div>
-          </div>
-        </block>
-        <block v-else>
-          <div id="resetcss" style="overflow:hidden;" v-html="reportInfo.Content"></div>
-        </block>
-      </div>
+
+    <div style="max-width:1200px; margin:10px auto 70px;" v-loading="isLoading" element-loading-text="研报加载中...">
+      <component
+        v-if="show"
+        :is="reportIdInfo.ReportLayout===1?'reportDetail':'smartReportDetail'"
+        :reportId="reportIdInfo.Id"
+        @reportStartLoading="loading=true"
+        @reportEndLoading="loading=false"
+      />
     </div>
 
     <ul class="fixed-handles">
@@ -49,10 +34,10 @@
 
           <vue-qr :text="linkUrl" :margin="0" colorDark="#333" colorLight="#fff" :dotScale="1" :size="100" style="position:absolute;left:-20px;top:-120px;" v-if="isShowCode"></vue-qr>
         </li>
-        <li>
+        <li v-if="showDownPDF">
             <el-button type="text" @click="$emit('itemclick',{type:'下载Pdf',data: reportIdInfo})"><!-- 下载PDF -->{{$t('ReportManage.smart_btn.download_pdf')}}</el-button>
         </li>
-        <li>
+        <li v-if="showDowmImg">
             <el-button type="text" @click="$emit('itemclick',{type:'下载长图',data: reportIdInfo})"><!-- 下载长图 -->{{$t('ReportManage.smart_btn.download_long_image')}}</el-button>
         </li>
 
@@ -64,6 +49,8 @@
 import { reportdetail,departInterence } from 'api/api.js';
 import http from '@/api/http.js';
 import vueQr from 'vue-qr'
+import reportDetail from '../normalReport/reportdtl.vue';
+import smartReportDetail from '../smartReport/reportDetail.vue';
 export default {
   props: {
     show: {
@@ -73,31 +60,33 @@ export default {
       type: Object
     }
   },
+  components: { reportDetail,smartReportDetail,vueQr },
   computed: {
     linkUrl(){
       let str=''
       const baseUrl= localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ReportViewUrl : '';
       if(this.reportIdInfo.ReportCode){
         // 设置水印文案
-        let waterMarkStr=''
-        if(this.systemUserInfo){
-          waterMarkStr=`${this.systemUserInfo.RealName}${this.systemUserInfo.Mobile?this.systemUserInfo.Mobile:this.systemUserInfo.Email}`
-          const base64=new http.Base64()
-          waterMarkStr=encodeURIComponent(waterMarkStr)
-          waterMarkStr=base64.encode(waterMarkStr)
-        }
+        let waterMarkStr= localStorage.getItem('waterMarkStr');
 
         str=`${baseUrl}/reportshare_crm_report?code=${this.reportIdInfo.ReportCode}&flag=${waterMarkStr}`
       }
       
       return str
+    },
+
+    showDownPDF() {
+      return [2,6].includes(this.reportIdInfo.State) && this.permissionBtn.isShowBtn('reportManageBtn','reportManage_exportPdf') && this.reportIdInfo.DetailPdfUrl
+    },
+
+    showDowmImg() {
+       return [2,6].includes(this.reportIdInfo.State) && this.permissionBtn.isShowBtn('reportManageBtn','reportManage_exportImg') && this.reportIdInfo.DetailImgUrl
     }
   },
   watch: {
     show(nval) {
       if(!nval) return
 
-      this.getReportDetail()
     }
   },
   data() {
@@ -115,35 +104,12 @@ export default {
       isShowCode: false
     }
   },
-  mounted(){
-    this.getSystemUserInfo()
-  },
   methods:{
     handleClose() {
       $('.el-drawer__body')[0].scrollTop = 0
       this.$emit('update:show',false)
     },
 
-    async getReportDetail() {
-
-      this.loading = true;
-      const res = await reportdetail({ReportId:parseInt(this.reportIdInfo.Id)})
-			if( res.Ret!==200 ) return 
-
-      this.reportInfo=res.Data;
-      
-      this.loading = false;
-      this.isShow=true;
-    },
-
-    getSystemUserInfo(){
-      departInterence.systemUserInfo().then(res=>{
-        if(res.Ret===200){
-          this.systemUserInfo=res.Data
-        }
-      })
-    },
-
     /* 复制链接 */
     copyHandle() {
       var clipboard = new this.Clipboard('.copy')
@@ -184,76 +150,6 @@ export default {
   color: #333;
 }
 
-	#reportdtl{ background:#fff;  max-width:1200px; margin:10px auto 70px;position:relative;
-		img{ display:'block'; width:'100%'; margin:'0 auto'; }
-		header{ padding:10px 30px; box-sizing:border-box; font-size:28px; font-weight:500; color:#333; background:#fff; }
-		#abstract{ padding:10px 30px 0; box-sizing:border-box; font-size:22px; line-height:36px;
-		  >div{ padding:10px 20px; box-sizing:border-box; background:rgba(20,121,253,0.1); color:#0052D9; border-radius:10px;border:1px solid #0052D9; }
-		}
-		#resetsty{ 
-			img{ display:block; max-width:100%; height:auto; margin:0 auto; }
-		}
-		table{ border-top:1px solid #eaeaea; border-left:1px solid #eaeaea; border-collapse:collapse; 
-			th,td{ border-right:1px solid #eaeaea; border-bottom:1px solid #eaeaea; padding:5px 10px; box-sizing:border-box; }
-		}
-
-		.chapter-item{
-			margin-bottom: 20px;
-			padding-bottom: 20px;
-			border-bottom: 1px dashed #ccc;
-			.type{
-				font-size: 15px;
-				color: #fff;
-				padding: 5px 10px;
-				background-color: #E6A23C;
-				border-radius: 4px;
-			}
-			.title{
-				font-size: 15px;
-				margin-left: 10px;
-				font-weight: bold;
-			}
-		}
-    #abstract-en{
-      margin:35px 35px;
-      padding:20px;
-      background-color: rgba(77, 130, 191, 0.1);
-      border: 1px solid #E2E2E2;
-      .abstract{
-        font-size: 24px;
-        font-weight: 600;
-        padding-bottom: 20px;
-        border-bottom: 1px solid #C1C1C1;
-      }
-      #overview{
-        margin-top:20px;
-        font-size: 24px;
-        .overview{
-          margin-top:20px;
-          font-size: 18px;
-        }
-      }
-    }
-		#resetcss{
-      img,video {
-        display:'block';margin:'0 auto'
-      }
-      pre {
-        display: "block";
-        white-space: "pre-wrap";
-      }
-			p{
-				font-size: 18px !important;
-			}
-			span{
-				font-size: 18px !important;
-			}
-			ul,ol {
-				list-style-position: inside !important;
-			}
-		}
-	}
-
 
   .fixed-handles {
     width: 100%;

+ 65 - 61
src/views/report_manage/reportV2/list.vue

@@ -12,7 +12,7 @@
             >
 
             <el-input
-              @input="search"
+              @input="filterChange"
               :placeholder="$t('ReportManage.smart_title_creator_btn')"
               v-model="searchform.key_word"
               clearable
@@ -32,7 +32,7 @@
                       <el-cascader
                           @change="filterChange"
                           :options="classifyOptions"
-                          v-model="searchform.classifynameArr"
+                          v-model="searchform.classifyIds"
                           clearable
                           :placeholder="$t('ReportManage.smart_type_filtering')"
                           style="width:100%;"
@@ -59,19 +59,15 @@
 
                   <div class="select-item">
                       <el-select
-                          @change="filterChange"
-                          v-model="searchform.frequency"
-                          :placeholder="$t('ReportManage.smart_update_frequency_filter')"
+                          v-model="searchform.timeType"
+                          :placeholder="$t('ReportManage.smart_select_time_type_btn')"
                           size="medium"
-                          clearable
                           style="width:100%;"
+                          @change="filterChange"
                       >
-                          <el-option 
-                            v-for="item in reportFrequencyOption" 
-                            :key="item.value"
-                            :label="item.label" 
-                            :value="item.value"
-                          ></el-option>
+                          <el-option :label="$t('ReportManage.smart_publish_time')" value="publish_time"></el-option>
+                          <el-option :label="$t('ReportManage.smart_approval_time')" value="approve_time"></el-option>
+                          <el-option :label="$t('ReportManage.smart_update_time')" value="modify_time"></el-option>
                       </el-select>
                   </div>
                 
@@ -132,7 +128,7 @@
         >
           <el-table-column
             prop="Title"
-           :label="$t('ReportManage.smart_report_title')"
+            :label="$t('ReportManage.smart_report_title')"
             align="center"
             min-width="140"
             fixed="left"
@@ -174,12 +170,11 @@
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column :label="$t('ReportManage.smart_report_type')" align="center" min-width="140">
-            <template slot-scope="scope"
-              >{{ scope.row.ClassifyNameFirst }}
-              <span v-if="scope.row.ClassifyNameSecond"
-                >/ {{ scope.row.ClassifyNameSecond }}</span
-              ></template
-            >
+            <template slot-scope="scope">
+              {{ scope.row.ClassifyNameFirst }}
+              <span v-if="scope.row.ClassifyNameSecond">/ {{ scope.row.ClassifyNameSecond }}</span>
+              <span v-if="scope.row.ClassifyNameThird">/ {{ scope.row.ClassifyNameThird }}</span>
+            </template>
           </el-table-column>
           <el-table-column
             prop="AdminRealName"
@@ -187,6 +182,12 @@
             align="center"
             min-width="100"
           ></el-table-column>
+          <el-table-column
+            prop="LastModifyAdminName"
+            :label="$t('ReportManage.table_col02')"
+            align="center"
+            min-width="100"
+          ></el-table-column>
           <el-table-column :label="$t('ReportManage.smart_status_table')" align="center" v-if="isApprove">
             <template slot-scope="scope">
                 <span v-if="scope.row.State == '1'">{{$t('ReportManage.smart_unpublished')}}</span>
@@ -232,9 +233,6 @@
           <el-table-column :label="$t('ReportManage.smart_issue_number_btn')" align="center">
             <template slot-scope="scope">第{{ scope.row.Stage }}期</template>
           </el-table-column>
-          <el-table-column :label="$t('ReportManage.smart_frequency_btn')" align="center">
-            <template slot-scope="scope">{{ scope.row.Frequency }}</template>
-          </el-table-column>
           <el-table-column
             :label="hasUV?'PV / UV':'PV'"
             align="center"
@@ -289,7 +287,11 @@
               </div>
             </template>
           </el-table-column>
+          <template slot="empty">
+            <tableNoData text="暂无数据"/>
+          </template>
         </el-table>
+
       </template>
       
       <el-col :span="24" class="toolbar">
@@ -490,16 +492,13 @@ import {
   reportpublishcancle,
   voiceupload,
   reportdelete,
-  sendTemplateMsg,
-  messagePushPost,
   markReport,
   reportMessageSend,
   weekReportValidAudio,
-  departInterence
-} from "api/api.js";
+} from '@/api/modules/reportV2.js';
+import { departInterence } from "api/api.js";
 import {approveInterence} from '@/api/modules/approve.js';
 import reportApproveConfig from "@/mixins/reportApproveConfig.js";
-import { reportFrequencyOption } from './common/constants';
 import reportBaseInfo from './components/reportBaseInfoDia.vue';
 import reportPreview from './components/reportPreview.vue';
 export default {
@@ -514,10 +513,6 @@ export default {
       let param_token = localStorage.getItem("auth") || "";
       return `${url}?ReportIds=${ids}&${param_token}`;
     },
-    Role() {
-      let role = localStorage.getItem("Role") || "";
-      return role;
-    },
     checkAllAudio() {
       return (
         this.downloadAudio.list.length === this.downloadAudio.select.length
@@ -543,21 +538,20 @@ export default {
 
     reportTypes(){
       return [
-        { label: /* '公共研报' */this.$t('ReportManage.ReportList.tab_public'),key:'public' },
-        { label: /* '共享研报' */this.$t('ReportManage.ReportList.tab_share'),key:'share' },
-        { label: /* '我的研报' */this.$t('ReportManage.ReportList.tab_mine'),key:'mine' },
+        { label: /* '公共研报' */this.$t('ReportManage.ReportList.tab_public'),key:'1' },
+        { label: /* '共享研报' */this.$t('ReportManage.ReportList.tab_share'),key:'2' },
+        { label: /* '我的研报' */this.$t('ReportManage.ReportList.tab_mine'),key:'3' },
       ]
     }
   },
   data() {
     return {
-      reportFrequencyOption,
       searchform: {
-        listType: 'public',
+        listType: '3',
         timeType:'publish_time',
         dateValue: "",
         frequency: "",
-        classifynameArr: "",
+        classifyIds: '',
         state: "",
         key_word: "",
         publish_sort: "desc",
@@ -660,14 +654,14 @@ export default {
           res.Data.List.forEach(item => {
             let newitem = {
               label: item.ClassifyName,
-              value: item.ClassifyName,
+              value: item.Id,
             };
             if (item.Child) {
               let childnode = [];
               item.Child.forEach((itemchild, i) => {
                 childnode.push({
                   label: itemchild.ClassifyName,
-                  value: itemchild.ClassifyName,
+                  value: itemchild.Id,
                 });
               });
               newitem.children = childnode;
@@ -684,20 +678,25 @@ export default {
         CurrentIndex: this.PageIndex,
         PageSize: this.pageSize,
         Frequency: this.searchform.frequency,
-        ClassifyNameFirst: this.searchform.classifynameArr
-          ? this.searchform.classifynameArr[0]
+        ClassifyIdFirst: this.searchform.classifyIds
+          ? this.searchform.classifyIds[0]
           : "",
-        ClassifyNameSecond:
-          this.searchform.classifynameArr &&
-          this.searchform.classifynameArr.length > 1
-            ? this.searchform.classifynameArr[1]
+        ClassifyIdSecond:
+          this.searchform.classifyIds &&
+          this.searchform.classifyIds.length > 1
+            ? this.searchform.classifyIds[1]
+            : "",
+        ClassifyIdThird:
+          this.searchform.classifyIds &&
+          this.searchform.classifyIds.length > 1
+            ? this.searchform.classifyIds[2]
             : "",
         State: this.searchform.state ? this.searchform.state : null,
         KeyWord: this.searchform.key_word,
         MsgIsSend: this.searchform.msgIsSend,
-        // PublishSort:this.searchform.publish_sort,
         State:this.searchform.publishState,
-        TimeType:this.searchform.timeType
+        TimeType:this.searchform.timeType,
+        FilterReportType: this.searchform.listType
       };
       
       if (this.searchform.dateValue) {
@@ -911,27 +910,30 @@ export default {
         return;
       }
       // 晨报周报
-      if (["day", "week"].includes(item.ChapterType)) {
-        sessionStorage.setItem("dayWeek", JSON.stringify(item));
-        this.$router.push({
-          path: "/dayorweek",
-          query: {
-            reportid: item.Id,
-            isEdit: true,
-            type: item.ChapterType,
-          },
-        });
-        return;
-      }
+      // if (["day", "week"].includes(item.ChapterType)) {
+      //   sessionStorage.setItem("dayWeek", JSON.stringify(item));
+      //   this.$router.push({
+      //     path: "/dayorweek",
+      //     query: {
+      //       reportid: item.Id,
+      //       isEdit: true,
+      //       type: item.ChapterType,
+      //     },
+      //   });
+      //   return;
+      // }
 
       sessionStorage.setItem("searchform", JSON.stringify(this.searchform));
       sessionStorage.setItem("PageIndex", this.PageIndex);
 
+      let pathV2 = item.ReportLayout===1 ? '/reportEditV2' : "/smpartReportEditV2";
+
       this.$router.push({
-        // path: item.ReportVersion === 2 ? "/editreportNew" : "/editreport",
-        path: '/reportEditV2',
+        // path: item.ReportVersion === 2 ? pathV2 : "/editreport",
+        path: pathV2,
         query: {
           id: item.Id,
+          coopType: item.CollaborateType
         },
       });
     },
@@ -1144,6 +1146,8 @@ export default {
             waterMarkString=`${systemUserInfo.RealName}${systemUserInfo.Mobile?systemUserInfo.Mobile:systemUserInfo.Email}`
             waterMarkString=encodeURIComponent(waterMarkString)
             this.waterMarkStr=Base64.encode(waterMarkString)
+            
+            localStorage.setItem('waterMarkStr',this.waterMarkStr)
           }
         }
       })

+ 5 - 2
src/views/report_manage/reportV2/normalReport/components/ETAPriceChart.vue

@@ -122,13 +122,16 @@ div{
         .list-wrap{
             flex: 1;
             overflow-y: auto;
+            display: flex;
+            flex-wrap: wrap;
+            gap: 0 20px;
 
         }
     }
 }
 .chart-item {
-    width: 100%;
-    margin: 20px 0;
+    width: 250px;
+    margin: 10px 0;
     padding: 20px;
     border: 1px solid #eaeaea;
     border-radius: 10px;

+ 5 - 2
src/views/report_manage/reportV2/normalReport/components/ETASandBox.vue

@@ -115,13 +115,16 @@ div{
         .list-wrap{
             flex: 1;
             overflow-y: auto;
+            display: flex;
+            flex-wrap: wrap;
+            gap: 0 20px;
 
         }
     }
 }
 .chart-item {
-    width: 100%;
-    margin: 20px 0;
+    width: 250px;
+    margin: 10px 0;
     padding: 20px;
     border: 1px solid #eaeaea;
     border-radius: 10px;

+ 6 - 2
src/views/report_manage/reportV2/normalReport/components/ETASheet.vue

@@ -100,11 +100,14 @@ div{
         .list-wrap{
             flex: 1;
             overflow-y: auto;
+            display: flex;
+            flex-wrap: wrap;
+            gap: 0 20px;
 
         }
         .sheet-item{
-            width: 100%;
-            margin: 20px 0;
+            width: 250px;
+            margin: 10px 0;
             padding: 20px;
             border: 1px solid #eaeaea;
             border-radius: 10px;
@@ -112,6 +115,7 @@ div{
             text-align: center;
             img {
                 width: 100%;
+                height: 200px;
             }
         }
     }

+ 5 - 3
src/views/report_manage/reportV2/normalReport/components/ImportETAChart.vue

@@ -101,12 +101,14 @@ div{
     .list-wrap{
         flex: 1;
         overflow-y: auto;
-
+        display: flex;
+        flex-wrap: wrap;
+        gap: 0 20px;
     }
 }
 .chart-item {
-    width: 100%;
-    margin: 20px 0;
+    width: 250px;
+    margin: 10px 0;
     padding: 20px;
     border: 1px solid #eaeaea;
     border-radius: 10px;

+ 6 - 2
src/views/report_manage/reportV2/normalReport/components/SemanticAnalysis.vue

@@ -115,13 +115,16 @@ div{
         .list-wrap{
             flex: 1;
             overflow-y: auto;
+            display: flex;
+            flex-wrap: wrap;
+            gap: 0 20px;
 
         }
     }
 }
 .chart-item {
-    width: 100%;
-    margin: 20px 0;
+    width: 250px;
+    margin: 10px 0;
     padding: 20px;
     border: 1px solid #eaeaea;
     border-radius: 10px;
@@ -129,6 +132,7 @@ div{
     text-align: center;
     img {
         width: 100%;
+        height: 200px;
     }
 }
 </style>

+ 5 - 2
src/views/report_manage/reportV2/normalReport/components/StatisticAnalysis.vue

@@ -203,13 +203,16 @@ div{
         .list-wrap{
             flex: 1;
             overflow-y: auto;
+            display: flex;
+            flex-wrap: wrap;
+            gap: 0 20px;
 
         }
     }
 }
 .chart-item {
-    width: 100%;
-    margin: 20px 0;
+    width: 250px;
+    margin: 10px 0;
     padding: 20px;
     border: 1px solid #eaeaea;
     border-radius: 10px;

+ 7 - 2
src/views/report_manage/reportV2/normalReport/components/importMyChart.vue

@@ -126,13 +126,18 @@ export default {
 
 <style lang="scss" scoped>
 .import-mychart-wrap{
+    background: #fff;
+    padding: 20px;
     .list{
         height: calc(100vh - 320px);
         overflow-x: hidden;
 		overflow-y: auto;
+        display: flex;
+        flex-wrap: wrap;
+        gap: 0 20px;
         .item{
-            width: 100%;
-            margin: 20px 0;
+            width: 250px;
+            margin: 10px 0;
             padding: 20px;
             box-sizing: border-box;
             border: 1px solid #eaeaea;

+ 37 - 12
src/views/report_manage/reportV2/normalReport/components/insertContent.vue

@@ -1,5 +1,8 @@
 <template>
   <div class="insert-content">
+    <div class="close-icon" @click="$emit('slide')">
+        <img src="~@/assets/img/smartReport/icon14.png" alt="">
+    </div>
     <!-- 图库插入 -->
     <ETAChart 
         v-if="actTab==='etaChart'"
@@ -17,12 +20,6 @@
     <!-- 语义分析 -->
     <SemanticAnalysis v-if="actTab==='semanticAnalysis'" @insertHtml="item => {$emit('insertHtml',{item,type:'image'})}"/>
 
-    <span
-			class="slide-icon"
-			@click="$emit('slide')"
-		>
-			<i :class="'el-icon-d-arrow-right'"></i>
-		</span>
   </div>
 </template>
 <script>
@@ -53,13 +50,41 @@ export default {
 <style scoped lang='scss'>
 *{ box-sizing: border-box; }
 .insert-content {
-  width: 400px;
-  margin-left: 20px;
-  border: 1px solid #ccc;
-  padding: 15px;
-  background: #fff;
-  border-radius: 6px;
+  /* width: 400px; */
+  height: calc(100vh - 100px);
+  flex: 1;
+  margin-left: 30px;
+  padding: 30px;
   position: relative;
+  &::before{
+      display: block;
+      content: '';
+      width: 1px;
+      height: 100%;
+      background-color: #C8CDD9;
+      position: absolute;
+      left: 0;
+      top: 0;
+  }
+
+  .close-icon{
+      width: 20px;
+      height: 20px;
+      border-radius: 4px;
+      background: #FFF;
+      box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      cursor: pointer;
+      position: absolute;
+      left: -10px;
+      top: 22px;
+      img{
+          width: 16px;
+          height: 16px;
+      }
+  }
 
   .slide-icon {
 		padding: 20px 0;

+ 251 - 265
src/views/report_manage/reportV2/normalReport/editReport.vue

@@ -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;
 	}
 

+ 7 - 49
src/views/report_manage/reportV2/normalReport/mixins/messagePush.js

@@ -1,4 +1,5 @@
-import { reportadd, reportedit, messagePushPost,dataBaseInterface,reportMessageSend } from "@/api/api.js";
+import { reportedit,reportMessageSend } from "@/api/modules/reportV2";
+import { dataBaseInterface } from '@/api/api';
 import {approveInterence} from '@/api/modules/approve.js';
 import * as sheetInterface from '@/api/modules/sheetApi.js';
 import { getUrlParams } from '@/utils/common'
@@ -16,50 +17,9 @@ export default {
         if (res.Ret == 200) {
           this.$message.success(res.Msg);
           this.reportCode=res.Data.ReportCode
-          if (tp == "yl") {
-            // this.$router.push({name:'预览报告',query:{id:res.report_id}});
-            let { href } = this.$router.resolve({
-              name: "预览报告",
-              query: { id: res.Data.ReportId },
-            });
-            window.open(href, "_blank");
-          } else if (tp == "fb") {
-            if(this.isApprove){
-                await this.publishreport(res.Data.ReportId,res.Data.ReportCode);
-                return 
-            }
-            if (this.isMessagePost) {
-              await this.publishreport(res.Data.ReportId,res.Data.ReportCode);
-              await reportMessageSend({
-                ReportId: res.Data.ReportId,
-              }).then(() => {});
-            } else {
-              this.publishreport(res.Data.ReportId,res.Data.ReportCode);
-            }
-          } else if(tp=='dsfb'){
-            this.showDSFB=true
-            // this.$router.push({path:'/reportlist'});
-          }else if(tp=='submit'){
-            this.handleSubmitReport(res.Data.ReportId)
-          }
-        }
-      });
-    },
-    reportaddMsg(params, tp) {
-      reportadd(params).then(async (res) => {
-        if (res.Ret == 200) {
-          this.$message.success(res.Msg);
-          this.report_draft_id = res.Data.ReportId;
-          this.reportCode=res.Data.ReportCode
-          if (tp == "yl") {
-            // this.$router.push({name:'预览报告',query:{id:res.report_id}});
-            let { href } = this.$router.resolve({
-              name: "预览报告",
-              query: { id: res.Data.ReportId },
-            });
-            window.open(href, "_blank");
-          } else if (tp == "fb") {
-            if(this.isApprove){
+
+          if (tp == "fb") {
+            if(this.hasApproveFlow){
                 await this.publishreport(res.Data.ReportId,res.Data.ReportCode);
                 return 
             }
@@ -73,12 +33,9 @@ export default {
             }
           } else if(tp=='dsfb'){
             this.showDSFB=true
-            // this.$router.push({path:'/reportlist'});
           }else if(tp=='submit'){
             this.handleSubmitReport(res.Data.ReportId)
           }
-          //已经添加过报告
-          this.isAddEnter = true;
         }
       });
     },
@@ -102,7 +59,7 @@ export default {
 
       if(!code_arr.length&&!sheet_code_arr.length) return this.$message.warning(this.$t('ReportManage.smart_msg.chart_is_table_msg'))
 
-      const fromPage = this.$route.path === "/reportEnEditor" ? "english_report" : "report";
+      const fromPage = "report";
       if(this.$route.query.id&&code_arr.length) {
         let res = await dataBaseInterface.getReportrefreshStatus({
           Source: fromPage,
@@ -149,6 +106,7 @@ export default {
           }
       }
     },1000),
+
     //展示提交审批弹窗
     handleSubmitReport(id){
         this.submitId = id

+ 1 - 227
src/views/report_manage/reportV2/normalReport/mixins/reportMixin.js

@@ -360,234 +360,8 @@ export default {
 			})
 		},
 
-    /* 设置英文配置 */
-    async setEnHandle({ UniqueCode }) {
-      this.formItemArray = { chartInfo: [], chartsList: [] };
-
-      const { Ret, Data } = this.chart_source === 2
-        ? await futuresInterface.getChartBasicInfo({ UniqueCode })
-        : await dataBaseInterface.getChartByCode({ UniqueCode })
-
-      if (Ret !== 200) return;
-      let chartInfo = Data.ChartInfo;
-      let tableData = [2, 5].includes(chartInfo.Source)
-        ? [Data.EdbInfoList[0]]
-        : Data.EdbInfoList;
-
-      this.enChartInfo = chartInfo;
-      this.enEdblist = tableData;
-
-      this.formItemArray.chartInfo.push(
-        {
-          label: "图表名称",
-          value: chartInfo.ChartName,
-          key: "ChartName",
-          id: chartInfo.ChartInfoId,
-          source: chartInfo.Source,
-          notEdit: true,
-        },
-        {
-          label: "英文图表名称",
-          value: chartInfo.ChartNameEn,
-          key: "ChartNameEn",
-          id: chartInfo.ChartInfoId,
-          placeholder: "请输入英文图表名称",
-        }
-      );
-      if ([1,2,5].includes(chartInfo.Source)) {
-        this.formItemArray.chartsList = tableData.map((item) => {
-          return item.Unit
-            ? [
-                {
-                  label: "指标名称",
-                  value: item.EdbName,
-                  key: "EdbName",
-                  id: item.EdbInfoId,
-                  notEdit: true,
-                },
-                {
-                  label: "单位",
-                  value: item.Unit,
-                  key: "Unit",
-                  id: item.EdbInfoId,
-                  notEdit: true,
-                },
-                {
-                  label: "英文指标名称",
-                  value: item.EdbNameEn,
-                  key: "EdbNameEn",
-                  id: item.EdbInfoId,
-                  placeholder: "请输入英文指标名称",
-                },
-                {
-                  label: "英文单位",
-                  value: item.UnitEn,
-                  key: "UnitEn",
-                  id: item.EdbInfoId,
-                  placeholder: "请输入英文单位",
-                },
-              ]
-            : [
-                {
-                  label: "指标名称",
-                  value: item.EdbName,
-                  key: "EdbName",
-                  id: item.EdbInfoId,
-                  notEdit: true,
-                },
-                {
-                  label: "英文指标名称",
-                  value: item.EdbNameEn,
-                  key: "EdbNameEn",
-                  id: item.EdbInfoId,
-                  placeholder: "请输入英文指标名称",
-                },
-              ];
-        });
-      }
-
-      //价格曲线
-      if (chartInfo.Source === 2) {
-        this.formItemArray.chartInfo.push(
-          {
-            label: "期货名称",
-            value: Data.EdbInfoList[1].EdbName,
-            key: "FutureGoodName",
-            id: chartInfo.ChartInfoId,
-            notEdit: true,
-          },
-          {
-            label: "英文期货名称",
-            value: Data.EdbInfoList[1].EdbNameEn,
-            key: "FutureGoodNameEn",
-            id: chartInfo.ChartInfoId,
-            placeholder: "请输入英文期货名称",
-          }
-        );
-      }
-
-      //利润曲线
-      else if (chartInfo.Source === 5) {
-        this.formItemArray.chartInfo.push(
-          {
-            label: "盘面利润名称",
-            value: Data.DataResp.ProfitName,
-            key: "ProfitName",
-            id: chartInfo.ChartInfoId,
-            notEdit: true,
-          },
-          {
-            label: "英文盘面利润名称",
-            value: Data.DataResp.ProfitNameEn,
-            key: "ProfitNameEn",
-            id: chartInfo.ChartInfoId,
-            placeholder: "请输入英文盘面利润名称",
-          }
-        );
-      }
-
-       //跨品种分析
-      else if(chartInfo.Source===10) {
-        let res = await crossVarietyInterface.chartLangOption({ChartInfoId: chartInfo.ChartInfoId})
-
-        const { TagList,VarietyList } = res.Data;
-
-        this.formItemArray.chartInfo.push({
-          label:'X轴名称',
-          value:Data.DataResp.XName,
-          key:'XName',
-          id:TagList[0].ChartTagId,
-          notEdit:true
-        },
-        {
-          label:'英文X轴名称',
-          value:Data.DataResp.XNameEn,
-          key:'XNameEn',
-          id:TagList[0].ChartTagId,
-          placeholder:'请输入英文X轴名称'
-        },{
-          label:'Y轴名称',
-          value:Data.DataResp.YName,
-          key:'YName',
-          id:TagList[1].ChartTagId,
-          notEdit:true
-        },
-        {
-          label:'英文Y轴名称',
-          value:Data.DataResp.YNameEn,
-          key:'YNameEn',
-          id:TagList[1].ChartTagId,
-          placeholder:'请输入英文Y轴名称'
-        })
-
-        VarietyList.forEach(item => {
-          this.formItemArray.chartsList.push([
-            {
-              label:'品种名称',
-              value:item.ChartVarietyName,
-              key:'ChartVarietyName',
-              id:item.ChartVarietyId,
-              notEdit:true
-            },
-            {
-              label:'英文品种名称',
-              value:item.ChartVarietyNameEn,
-              key:'ChartVarietyNameEn',
-              id:item.ChartVarietyId,
-              placeholder:'请输入英文品种名称'
-            }
-          ])
-        })
-      }
-      this.setEnName = true;
-    },
-
-    // 更新英文信息
-    async updateEnName(enNameData) {
-      let res = null;
-      if (this.chart_source === 1) {
-        res = await dataBaseInterface.chartInfoEditEn(enNameData);
-      } else if ([2, 5].includes(this.chart_source)) {
-        res = await futuresInterface.editChartEn({
-          ChartInfoId: enNameData.ChartInfoId,
-          ChartNameEn: enNameData.ChartNameEn,
-          UnitEn: enNameData.ChartEdbInfoList[0].UnitEn || "",
-          EdbNameEn: enNameData.ChartEdbInfoList[0].EdbNameEn || "",
-          FutureGoodNameEn: enNameData.FutureGoodNameEn || "",
-          ProfitNameEn: enNameData.ProfitNameEn || "",
-        });
-      } else if (this.chart_source === 3) {
-        res = await chartRelevanceApi.editChartEn({
-          ChartInfoId: enNameData.ChartInfoId,
-          ChartNameEn: enNameData.ChartNameEn,
-        });
-      } else if (this.chart_source === 6) {
-        //拟合方程
-        res = await fittingEquationInterface.editChartEn({
-          ChartInfoId: enNameData.ChartInfoId,
-          ChartNameEn: enNameData.ChartNameEn,
-        });
-      } else if (this.chart_source === 7) {
-        //统计特征
-        res = await statisticFeatureInterface.editChartEn({
-          ChartInfoId: enNameData.ChartInfoId,
-          ChartNameEn: enNameData.ChartNameEn,
-        });
-      }else if (this.chart_source === 10) {
-        res=await crossVarietyInterface.editChartEn(enNameData)
-      }
-
-      if (res.Ret !== 200) return;
-
-      this.$message({
-        message: res.Msg,
-        type: "success",
-      });
-      this.setEnName = false;
-    },
-
     handleClearContent() {
-      this.aeForm.content = ''
+      this.reportInfo.Content = ''
     }
   },
 

+ 7 - 21
src/views/report_manage/reportV2/normalReport/reportdtl.vue

@@ -6,11 +6,11 @@
 		  <span style="float:right;">{{reportInfo.PublishTime}}</span>
 		</div>
 		
-		<div id="abstract">
+		<div id="abstract" v-if="reportInfo.Abstract">
 		  <div>摘要:{{reportInfo.Abstract}}</div>
 		</div>
 		<div id="resetsty" style="padding:30px; box-sizing:border-box; overflow:hidden;">
-			<block v-if="reportInfo.ChapterType=='day'||reportInfo.ChapterType=='week'">
+			<block v-if="reportInfo.CollaborateType===2">
 				<div class="chapter-item" v-for="item in reportInfo.ChapterList" :key="item.ReportChapterId">
 					<div style="margin-bottom:10px">
 						<span class="type">{{item.TypeName}}</span>
@@ -19,6 +19,7 @@
 					<div id="resetcss" style="overflow:hidden;" v-html="item.Content"></div>
 				</div>
 			</block>
+
 			<block v-else>
 				<div id="resetcss" style="overflow:hidden;" v-html="reportInfo.Content"></div>
 			</block>
@@ -28,13 +29,13 @@
                 ?permissionBtn.enReportManageBtn.enReport_reportView_copyWechat
                 :permissionBtn.reportManageBtn.reportManage_reportView_copyWechat"
                 style="display:flex;alignItems:center;color:#333;" :data-clipboard-text='linkUrl' @click="copyHandle" class="copy">
-				<img src="../../assets/img/icons/cop.png" alt="" style="width:30px;height:30px;marginRight:10px;">复制链接
+				<img src="@/assets/img/icons/cop.png" alt="" style="width:30px;height:30px;marginRight:10px;">复制链接
 			</div>
 			<div v-permission="$route.query.fromPage==='en'
                 ?permissionBtn.enReportManageBtn.enReport_reportView_wechatShare
                 :permissionBtn.reportManageBtn.reportManage_reportView_wechartShare"
                 style="display:flex;alignItems:center;color:#333;marginTop:20px;"  @mouseenter="isShowCode=true" @mouseleave="isShowCode=false">
-				<img src="../../assets/img/icons/wechat.png" alt="" style="width:30px;height:30px;marginRight:10px;">微信分享
+				<img src="@/assets/img/icons/wechat.png" alt="" style="width:30px;height:30px;marginRight:10px;">微信分享
 			</div>
 			<vue-qr :text="linkUrl" :margin="0" colorDark="#333" colorLight="#fff" :dotScale="1" :size="100" style="position:absolute;right:0;top:100px;" v-if="isShowCode"></vue-qr>
 		</div>
@@ -54,13 +55,7 @@
 				const baseUrl= localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ReportViewUrl : '';
 				if(this.$route.query.code){
 					// 设置水印文案
-					let waterMarkStr=''
-					if(this.systemUserInfo){
-						waterMarkStr=`${this.systemUserInfo.RealName}${this.systemUserInfo.Mobile?this.systemUserInfo.Mobile:this.systemUserInfo.Email}`
-						const base64=new http.Base64()
-						waterMarkStr=encodeURIComponent(waterMarkStr)
-						waterMarkStr=base64.encode(waterMarkStr)
-					}
+					let waterMarkStr= localStorage.getItem('waterMarkStr') || '';
 					
 					if(this.$route.query.fromPage == 'en'){
 						str=`${baseUrl}/reportshare_crm_report_en?code=${this.$route.query.code}&flag=${waterMarkStr}`
@@ -90,7 +85,6 @@
 				isShowCode:false,
 
 				systemUserInfo:null,
-				// linkUrl:this.$route.query.code?'https://share.hzinsights.com/reportdtl?code='+this.$route.query.code:''
 			}
 		},
 		components: {
@@ -106,7 +100,6 @@
 				console.log(this.reportInfo);
 				this.isshow=true;
 			}
-			this.getSystemUserInfo()
 		},
 		updated(){
 		  $('#resetcss').find('img').css({display:'block',margin:'0 auto'});
@@ -114,13 +107,6 @@
 			$("#resetcss").find("pre").css({display: "block",whiteSpace: "pre-wrap"});
 		},
 		methods: {
-			getSystemUserInfo(){
-				departInterence.systemUserInfo().then(res=>{
-					if(res.Ret===200){
-						this.systemUserInfo=res.Data
-					}
-				})
-			},
 			async getreportdetail(){
 				let res
 				let reportId = this.id||this.reportId
@@ -140,7 +126,7 @@
 
 				this.reportInfo=res.Data;
 				this.isshow=true;
-		},
+			},
 			/* 复制链接 */
 			copyHandle() {
 				var clipboard = new this.Clipboard('.copy')

+ 61 - 33
src/views/report_manage/reportV2/smartReport/editReport.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="edit-smart-box">
         <!-- 章节编辑区 -->
-		<div class="left-wrap">
+		<div class="left-wrap" v-if="reportInfo&&reportInfo.CollaborateType===2">
 			<chapterWrapper
 				v-show="isLeftWrapShow"
 			/>
@@ -15,9 +15,12 @@
 			</span>
 		</div>
 
+
         <div class="edit-smart-report-page">
             <!-- 顶部操作栏 -->
             <editHeader
+                :isApprove="isApprove"
+				:hasApproveFlow="hasApproveFlow"
                 :reportInfo="{Title: reportInfo&&reportInfo.title}"
                 @handleClearContent="handleClearContent"
                 @openBaseInfo="showReportBaseInfo=true"
@@ -196,7 +199,12 @@
             </div>
 
             <!-- 报告基础信息 -->
-            <BaseInfo  v-model="showReportBaseInfo" :id="$route.query.id" @save="handleReportEdit" />
+            <reportBaseInfo  
+                v-model="showReportBaseInfo" 
+                :reportInfo="reportInfo" 
+                :id="$route.query.id"
+                @save="handleReportEdit"
+            />
 
             <!-- 定时发布弹窗 -->
             <el-dialog 
@@ -242,10 +250,16 @@ import ETAChart from './components/ETAChart.vue'
 import ETASheet from './components/ETASheet.vue'
 import { getPublicSettingsApi } from '@/api/modules/oldApi';
 import { dataBaseInterface } from "@/api/api.js";
-import {apiSmartReport}  from '@/api/modules/smartReport'
+import {
+	autosave,
+	reportedit,
+	reportdetail,
+	reportpublish,
+	reportSetPrepublish
+} from '@/api/modules/reportV2';
 import {approveInterence} from '@/api/modules/approve.js';
 import * as sheetInterface from '@/api/modules/sheetApi.js';
-import BaseInfo from './components/BaseInfo.vue'
+import reportBaseInfo from '../components/reportBaseInfoDia.vue'
 import StatisticAnalysis from './components/StatisticAnalysis.vue'
 import ETAPriceChart from './components/ETAPriceChart.vue'
 import ETASandBox from './components/ETASandBox.vue'
@@ -257,10 +271,10 @@ import editHeader from '../components/reportEditHeader.vue';
 import chapterWrapper from '../components/chapterEditWrapper.vue';
 export default {
     mixins:[reportApproveConfig],
-    name:"smartReportEdit",
+    name:"smartReportEditV2",
     components: {
         draggable,
-        BaseInfo,
+        reportBaseInfo,
         TextComp,
         ChartComp,
         ImgComp,
@@ -354,8 +368,8 @@ export default {
             bgColor:'',//背景色
             headImg:'',//版头图片
             endImg:'',//版尾图片
-            headImgId:'',//版头Id
-            endImgId:'',//版尾Id
+            headImgId:0,//版头Id
+            endImgId:0,//版尾Id
             headImgStyle:'',//版头style
             endImgStyle:'',//版尾style
             layoutBaseInfo:{
@@ -368,6 +382,17 @@ export default {
         }
     },
     methods: {
+        //清空内容 
+        handleClearContent() {
+            document.getElementById('report-html-content').innerHTML = '';
+            this.conList = [];
+            this.bgColor =''//背景色
+            this.headImg = ''//版头图片
+            this.endImg = ''//版尾图片
+            this.headImgId = 0//版头Id
+            this.endImgId = 0//版尾Id
+        },
+
         // 大盒子的高度缩放
         handleResizeP(e,index){
             this.isDragResize=true
@@ -773,9 +798,10 @@ export default {
         // 编辑保存报告
         handleReportEdit(e){
             const html=document.getElementById('report-html-content').outerHTML.replace(/contenteditable="true"/g,'contenteditable="false"');
+            
             const params={
-                SmartReportId:Number(this.$route.query.id)||0,
                 ...e,
+                ReportId:Number(this.$route.query.id)||0,
                 Content:html,
                 ContentStruct:JSON.stringify(this.conList),
                 HeadImg:this.headImg,
@@ -786,10 +812,10 @@ export default {
             }
             console.log(params);
             //检查classifynameArr是否有审批流
-            let classify = [e.ClassifyIdFirst,e.ClassifyIdSecond]
-            this.checkClassifyNameArr(3,classify)
+            let classify = [e.ClassifyIdFirst,e.ClassifyIdSecond,e.ClassifyIdThird]
+            this.checkClassifyNameArr(1,classify)
 
-            apiSmartReport.reportEdit({...params}).then(res=>{
+            reportedit({...params}).then(res=>{
                 if(res.Ret===200){
                     this.$message.success(this.$t('MsgPrompt.saved_msg'))
                     this.reportInfo.Title=params.Title
@@ -813,11 +839,13 @@ export default {
         getReportDetail(){
             const id=this.$route.query.id||0
             if(!id) return
-            apiSmartReport.reportDetail({
-                SmartReportId:Number(id)
+
+            reportdetail({
+                ReportId:Number(id)
             }).then(res=>{
                 if(res.Ret===200){
                     this.reportInfo=res.Data
+                    
                     this.conList=res.Data.ContentStruct?JSON.parse(res.Data.ContentStruct):[]
                     this.headImg=res.Data.HeadImg
                     this.endImg=res.Data.EndImg
@@ -918,8 +946,8 @@ export default {
             return new Promise((resolve,reject)=>{
                 const id=this.$route.query.id||0
                 if(!id) return
-                apiSmartReport.saveReportContent({
-                    SmartReportId:Number(id),
+                autosave({
+                    ReportId: Number(this.$route.query.id),
                     Content:html,
                     ContentStruct:JSON.stringify(this.conList),
                     NoChange:this.contentChange?2:1,
@@ -936,7 +964,7 @@ export default {
                         }
                     }
                     if(res.Msg==='报告已发布, 不允许编辑'){
-                        this.$router.replace({ path: '/smartReportList' });
+                        this.$router.replace({ path: '/reportNew' });
                     }
                 })
             })
@@ -996,12 +1024,13 @@ export default {
                 cancelButtonText: this.$t('Dialog.cancel_btn'),
                 type:'warning',
             }).then(()=>{
-                approveInterence.reportSmartSubmit({
+
+                approveInterence.reportCnSubmit({
                     ReportId:Number(this.$route.query.id)
                 }).then(res=>{
                     if(res.Ret!==200) return 
                     this.$message.success(this.$t('ReportManage.smart_msg.submit_success'))
-                    this.$router.replace({ path: '/smartReportList' });
+                    this.$router.replace({ path: '/reportNew' });
                 })
             })
         },
@@ -1021,15 +1050,15 @@ export default {
 			}
             // 如果该报告已经推送过模板消息
             if(this.reportInfo.MsgIsSend==1){
-                apiSmartReport.prePublishReport({
-                    SmartReportId:Number(this.$route.query.id),
+                reportSetPrepublish({
+                    ReportId:Number(this.$route.query.id),
                     PrePublishTime:this.taskTime,
                     PreMsgSend:0,
                     ReportUrl:this.generatePdfLinks(this.reportInfo.ReportCode)
                 }).then(res=>{
                     if(res.Ret===200){
                         this.$message.success(this.$t('ReportManage.smart_msg.timed_success'))
-                        this.$router.replace({ path: '/smartReportList' });
+                        this.$router.replace({ path: '/reportNew' });
                     }
                 })
                 return
@@ -1047,29 +1076,29 @@ export default {
 					if(action==='close'||action==='cancel') {
 						//右上角或者不推送
 						if(isPost){
-							apiSmartReport.prePublishReport({
-								SmartReportId:Number(this.$route.query.id),
+							reportSetPrepublish({
+								ReportId:Number(this.$route.query.id),
 								PrePublishTime:this.taskTime,
 								PreMsgSend:0,
                                 ReportUrl:this.generatePdfLinks(this.reportInfo.ReportCode)
 							}).then(res=>{
 								if(res.Ret===200){
 									this.$message.success(this.$t('ReportManage.smart_msg.timed_success'))
-									this.$router.replace({ path: '/smartReportList' });
+									this.$router.replace({ path: '/reportNew' });
 								}
 							})
 						}
 					} else {
 						//confirmButton
-						apiSmartReport.prePublishReport({
-							SmartReportId:Number(this.$route.query.id),
+						reportSetPrepublish({
+							ReportId:Number(this.$route.query.id),
 							PrePublishTime:this.taskTime,
 							PreMsgSend:isPost?1:0,
                             ReportUrl:this.generatePdfLinks(this.reportInfo.ReportCode)
 						}).then(res=>{
 							if(res.Ret===200){
 								this.$message.success(this.$t('ReportManage.smart_msg.timed_success'))
-								this.$router.replace({ path: '/smartReportList' });
+								this.$router.replace({ path: '/reportNew' });
 							}
 						})
 					}
@@ -1080,16 +1109,15 @@ export default {
 
         // 发布报告
         reportPublish({sendMsg}){
-            apiSmartReport.publishReport({
-                SmartReportId:Number(this.$route.query.id),
-                PublishState:2,
+            reportpublish({
+                ReportIds:String(this.$route.query.id),
                 ReportUrl:this.generatePdfLinks(this.reportInfo.ReportCode)
             }).then(res=>{
                 if(res.Ret===200){
                     if(sendMsg){
                         this.reportSendMsg()
                     }
-                    this.$router.replace({ path: '/smartReportList' });
+                    this.$router.replace({ path: '/reportNew' });
                 }
             })
         },
@@ -1099,7 +1127,7 @@ export default {
         },
         //报告消息推送
         reportSendMsg(){
-            apiSmartReport.reportMsgSend({SmartReportId:Number(this.$route.query.id)}).then(res=>{})
+            reportMessageSend({ReportId:Number(this.$route.query.id)}).then(res=>{})
         },
 
         // 插入版头版尾

+ 9 - 2
src/views/report_manage/reportV2/smartReport/reportDetail.vue

@@ -83,6 +83,13 @@
 
 <script>
 import {apiSmartReport}  from '@/api/modules/smartReport'
+import {
+	autosave,
+	reportedit,
+	reportdetail,
+	reportpublish,
+	reportSetPrepublish
+} from '@/api/modules/reportV2';
 import vueQr from 'vue-qr'
 export default {
     computed: {
@@ -136,8 +143,8 @@ export default {
             const id=this.$route.query.id||this.reportId||0
             if(!id) return
             this.$emit("reportStartLoading")
-            apiSmartReport.reportDetail({
-                SmartReportId:Number(id)
+            reportdetail({
+                ReportId:Number(id)
             }).then(res=>{
                 this.$emit("reportEndLoading")
                 if(res.Ret===200){