8 Commits 15df83dbc4 ... 3d46c36ca5

Author SHA1 Message Date
  shanbinzhang 3d46c36ca5 Merge branch 'gn2.1' into debug 2 days ago
  shanbinzhang 35ecac452e 合并ppt 2 days ago
  shanbinzhang 4688844821 切分支删注释 2 days ago
  shanbinzhang 030ebe803b 分类接口 6 days ago
  shanbinzhang eab6cbd255 设置研报审批去掉 6 days ago
  shanbinzhang 7d666ac5f1 checkout branch 1 week ago
  shanbinzhang 7595e08494 checkout branch 1 week ago
  shanbinzhang 50ccc4a0a6 研报,分类部分改动 1 week ago
29 changed files with 1133 additions and 1266 deletions
  1. 1 1
      config/index.js
  2. 49 0
      src/api/modules/pptApi.js
  3. BIN
      src/assets/img/smartReport/back.png
  4. 1 1
      src/components/notificationMsg.vue
  5. 1 1
      src/lang/modules/Slides/commonLang.js
  6. 1 1
      src/lang/modules/Slides/pptList.js
  7. 1 0
      src/utils/buttonConfig.js
  8. 8 8
      src/views/approve_manage/approveList.vue
  9. 8 8
      src/views/approve_manage/approveSetting.vue
  10. 83 11
      src/views/classify_manage/classifylistV2.vue
  11. 9 2
      src/views/ppt_manage/mixins/pptEditorMixins.js
  12. 6 4
      src/views/ppt_manage/mixins/pptMixins.js
  13. 417 0
      src/views/ppt_manage/newVersion/components/catalog/addPptBaseDia.vue
  14. 267 222
      src/views/ppt_manage/newVersion/components/catalog/mergePPTDialog.vue
  15. 141 716
      src/views/ppt_manage/newVersion/pptCatalog.vue
  16. 2 2
      src/views/ppt_manage/newVersion/pptEditor.vue
  17. 22 4
      src/views/ppt_manage/newVersion/pptPublish.vue
  18. 20 12
      src/views/ppt_manage/newVersion/utils/config.js
  19. 16 14
      src/views/ppt_manage/newVersion/utils/untils.js
  20. 4 37
      src/views/report_manage/reportV2/components/chapterEditWrapper.vue
  21. 22 11
      src/views/report_manage/reportV2/components/chooseInherReportDia.vue
  22. 8 20
      src/views/report_manage/reportV2/components/reportBaseInfoDia.vue
  23. 14 38
      src/views/report_manage/reportV2/components/reportEditHeader.vue
  24. 8 41
      src/views/report_manage/reportV2/list.vue
  25. 9 47
      src/views/report_manage/reportV2/normalReport/editReport.vue
  26. 2 2
      src/views/report_manage/reportV2/normalReport/reportdtl.vue
  27. 7 50
      src/views/report_manage/reportV2/smartReport/editReport.vue
  28. 2 9
      src/views/report_manage/reportV2/smartReport/reportDetail.vue
  29. 4 4
      src/views/system_manage/etaBaseConfig.vue

+ 1 - 1
config/index.js

@@ -37,7 +37,7 @@ module.exports = {
     assetsPublicPath: '/',
     proxyTable:{
 		'/adminapi': {
-      target: "http://gneta.hzinsights.com",
+      target: "http://gneta.hzinsights.com/ybeta",
       // target: "http://192.168.77.27:8606",
 			// secure:false,  // 如果是https接口,需要配置这个参数
 			changeOrigin:true, // 如果接口跨域,需要进行这个参数配置

+ 49 - 0
src/api/modules/pptApi.js

@@ -269,6 +269,55 @@ export default{
      */
     pptEditLock:params=>{
         return http.post('pptv2/editing',params)
+    },
+
+    /**
+     * 获取ppt分类
+     * @param {*} params  Source 1-我的;2-协作;3-公共
+     * @returns 
+     */
+    getCatalogsListV2: params => {
+        return http.get('pptv2/report/classify',params)
+    },
+
+    /**
+     * ppt列表
+     * @param {
+     *  PageSize CurrentIndex Source ClassifyId Keyword
+     * } params 
+     * 
+     * @returns 
+     */
+    getPptListV2: params => {
+        return http.get('pptv2/report/list',params)
+    },
+    
+    /**
+     * 新增ppt
+     * @param {*
+     *  "Title",
+     *  "ClassifyId",
+     *  "AddType",
+     *  "InheritPptId",
+     *  "CollaborateType",
+     *  "CollaborateUserIds"
+     * } params 
+     * @returns 
+     */
+    addpptV2: params => {
+        return http.post('pptv2/report/add',params)
+    },
+
+    /**
+     * 获取有权限的ppt
+     * @param {*} params 
+     * ClassifyId Keyword CurrentIndex PageSize
+     * @returns 
+     */
+    getAuthPPtList: params => {
+        return http.get('pptv2/report/auth_list',params)
     }
 
+
+
 }

BIN
src/assets/img/smartReport/back.png


+ 1 - 1
src/components/notificationMsg.vue

@@ -9,7 +9,7 @@
                 <!-- 防止tabs在popover前渲染,会导致tab选中状态不正确 -->
                 <el-tabs v-model="activeName" v-if="visible" @tab-click="getMsgList">
                     <!-- 研报审批 -->
-                    <el-tab-pane v-if="tabsShow.first" :label="`${$t('AprrovalPage.research_approval_btn')}${activeName==='first'?'('+UnreadTotal+')':''}`" name="first"></el-tab-pane>
+                    <el-tab-pane v-if="tabsShow.first" :label="`报告通知${activeName==='first'?'('+UnreadTotal+')':''}`" name="first"></el-tab-pane>
                     <!-- bi看板审批 -->
                     <el-tab-pane v-if="tabsShow.second" :label="`${$t('SystemManage.BaseConfig.bIDashboard_approval')}${activeName==='second'?'('+UnreadTotal+')':''}`" name="second"></el-tab-pane>
                     <!-- 资产数据 -->

+ 1 - 1
src/lang/modules/Slides/commonLang.js

@@ -46,7 +46,7 @@ export const operationsZh = {
   operations_share: "设置共享",
   operations_unshare: "取消共享",
   operations_english: "转英文PPT",
-  operations_preview: "预览发布",
+  operations_preview: "发布",
   operations_presentation: "演示",
   go_to_publish: "去发布",
   operations_save: "保存",

+ 1 - 1
src/lang/modules/Slides/pptList.js

@@ -245,7 +245,7 @@ export const listZh = {
   last_save_time: "最近保存时间",
 
   //列表页操作栏
-  list_ppt_item_publish:'预览发布',
+  list_ppt_item_publish:'发布',
   list_ppt_item_preview:'演示',
   list_ppt_item_download:'下载',
   list_ppt_item_edit:'编辑'

+ 1 - 0
src/utils/buttonConfig.js

@@ -96,6 +96,7 @@ export const classifyBtn={
     classifyList_cnClassify_connect_variety:'classifyList:cnClassify:variety',//关联品种
     classifyList_cnClassify_chapterSetting:'classifyList:cnClassify:chapterSetting',//晨周报章节设置
     classifyList_cnClassify_enable:'classifyList:cnClassify:enable',//启用\禁用
+    classifyList_cnClassify_delete:'classifyList:cnClassify:delete',//分类删除
 
 
     // classifyList_cnClassify_relateSetting:'classifyList:cnClassify:relateSetting',//表单项:关联设置

+ 8 - 8
src/views/approve_manage/approveList.vue

@@ -1,11 +1,11 @@
 <template>
     <!-- 审批管理列表页 -->
     <div class="approve-list-wrap approve-page-wrap" v-if="isETAApprove || IsBIApprove">
-        <div class="head-tab">
+        <!-- <div class="head-tab">
             <el-radio-group v-model="activeMainTab" style="margin-bottom: 10px;" @input="handleMainClick">
                 <el-radio-button v-for="item in mainTabs" :key="item.name" :label="item.name">{{ item.label }}</el-radio-button>
             </el-radio-group>
-        </div>
+        </div> -->
         <div class="head-tab">
             <el-tabs v-model="activeTab" @tab-click="handleClick">
                 <el-tab-pane :label="$t('AprrovalPage.be_processed_tab')" name="pending"></el-tab-pane>
@@ -356,11 +356,11 @@ export default {
             }
         },
         afterGetBaseConfig(){  //执行完reportApproveConfig中getBaseConfig之后执行  mounted之后执行
-           if(this.isETAApprove) 
-            this.mainTabs.push({
-                    label:this.$t('AprrovalPage.research_approval_btn'),
-                    name:'report' 
-            });
+        //    if(this.isETAApprove) 
+        //     this.mainTabs.push({
+        //             label:this.$t('AprrovalPage.research_approval_btn'),
+        //             name:'report' 
+        //     });
            if(this.IsBIApprove)
            this.mainTabs.push({
                 label:this.$t('SystemManage.BaseConfig.bIDashboard_approval'),
@@ -387,7 +387,7 @@ export default {
         },
     },
     mounted(){
-        this.getClassifyTree();
+        // this.getClassifyTree();
         this.getBIClassifyTree();
     },
     components: { RejectDialog }

+ 8 - 8
src/views/approve_manage/approveSetting.vue

@@ -1,11 +1,11 @@
 <template>
     <!-- 审批流配置列表 -->
     <div class="approve-setting-wrap approve-page-wrap" v-if="isETAApprove || IsBIApprove">
-        <div style="margin-bottom: 10px;">
+        <!-- <div style="margin-bottom: 10px;">
             <el-radio-group v-model="activeMainTab" style="margin-bottom: 10px;" @input="handleTabClick">
                     <el-radio-button v-for="item in mainTabs" :key="item.name" :label="item.name">{{ item.label }}</el-radio-button>
             </el-radio-group>
-        </div>
+        </div> -->
         <div class="head-box">
             <el-input v-model="Keyword" @input="handleCurrentChange(1)"
                 :placeholder="$t('SystemManage.ReportApprove.placeholder02')" prefix-icon="el-icon-search" clearable style="width:360px;"></el-input>
@@ -226,11 +226,11 @@ export default {
             }).catch(()=>{})
         },
         afterGetBaseConfig(){ //执行完reportApproveConfig中getBaseConfig之后执行  mounted之后执行
-            if(this.isETAApprove) 
-                this.mainTabs.push({
-                        label:this.$t('AprrovalPage.research_approval_btn'),
-                        name:'report' 
-                });
+            // if(this.isETAApprove) 
+            //     this.mainTabs.push({
+            //             label:this.$t('AprrovalPage.research_approval_btn'),
+            //             name:'report' 
+            //     });
            if(this.IsBIApprove)
                 this.mainTabs.push({
                     label:this.$t('SystemManage.BaseConfig.bIDashboard_approval'),
@@ -248,7 +248,7 @@ export default {
         },
     },
     mounted(){
-        this.getClassifyTree();
+        // this.getClassifyTree();
         this.getBIClassifyTree();
     },
 };

+ 83 - 11
src/views/classify_manage/classifylistV2.vue

@@ -62,11 +62,18 @@
                     <div class="opt-box">
                         <!-- 章节设置 -->
                         <span class="editsty" 
-                            v-if="!data.Child || (data.Child&&!data.Child.length)" 
+                            v-if="(!data.Child||(data.Child&&!data.Child.length)) && data.ClassifyType===1" 
                             @click="chapterSetting(data)" 
                             v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_chapterSetting">
                             {{ $t('ReportManage.CategoryList.section_settings') }}
                         </span>
+
+                        <el-button
+                            v-if="data.ReportNum===0&&permissionBtn.checkPermissionBtn(permissionBtn.classifyBtn.classifyList_cnClassify_delete)"
+                            type="text" 
+                            style="color:#f00" 
+                            @click.stop="handleDel(data)"
+                        >删除</el-button>
                         <img class="icon-drag" src="~@/assets/img/data_m/move_ico2.png" alt="">
                         <img class="icon-set" src="~@/assets/img/icons/variety_set.png" alt="" @click.stop="handleEdit(data)" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_classifyEdit">
                     </div>
@@ -118,6 +125,44 @@
                         >
                         </el-cascader>
                     </el-form-item>
+
+                    <!-- 报告类型 -->
+                    <el-form-item prop="reportType" label="报告类型">
+                        <template slot="label">
+                            <span>报告类型</span>
+                            <el-tooltip content="研报对应研报中心可选分类,PPT对应PPT中心可选分类">
+                                <i class="el-icon-warning"/>
+                            </el-tooltip>
+                        </template>
+
+                        <el-select v-model="classifyForm.reportType" style="width:400px" :disabled="classifyForm.classify_id||classifyForm.parent_id">
+                            <el-option label="研报" :value="1"/>
+                            <el-option label="PPT" :value="2"/>
+                        </el-select>
+                        
+                    </el-form-item>
+
+                    <!-- 报告提醒 -->
+                    <el-form-item prop="warnTime" label="报告提醒">
+                        <template slot="label">
+                            <span>报告提醒</span>
+                            <el-tooltip content="开启后,指定的报告编辑人将在课题结束前定时收到写报告提醒">
+                                <i class="el-icon-warning"/>
+                            </el-tooltip>
+                        </template>
+                        <el-switch
+                            v-model="classifyForm.isReportWarn"
+                            :active-value="1"
+                            :inactive-value="0"
+                        />
+                        <el-time-picker
+                            v-if="classifyForm.isReportWarn"
+                            v-model="classifyForm.warnTime"
+                            value-format="HH:mm:ss"
+                            style="width:120px;margin-left:20px"
+                        >
+                        </el-time-picker>
+                    </el-form-item>
                    
                 </el-form>
                 <div v-html="tips" style="color:#999;"></div>
@@ -192,10 +237,8 @@
 
 <script>
 import mDialog from '@/components/mDialog.vue';
-import { classifylist,classifyparent,classifyadd,classifyedit } from 'api/api.js';
-import {reportVarietyInterence} from '@/api/modules/reportVariety'
+import { classifylist,classifyparent,classifyadd,classifyedit,classifydelete } from 'api/api.js';
 import {classifyPermissionInterface} from '@/api/modules/classifyApi.js'
-import { reportV2Interface } from '@/api/modules/reportV2.js'
 export default {
     components:{mDialog},
     computed: {
@@ -222,6 +265,9 @@ export default {
                 classify_name:"",
                 parent_id: 0,
                 variety:'',//关联的品种
+                reportType: 1,
+                isReportWarn: 0,
+                warnTime:'09:00:00'
             },
             formRules: {
                 classify_name: [{ required:true,message:this.$t('ReportManage.CategoryList.category_name_hint'),trigger:'blur'}]
@@ -234,7 +280,7 @@ export default {
             isTransferReport: false,
             transferForm: {},
 
-            tips: `注:若上级分类已关联报告,则新建的第一个子分类默认继承上级分类(父分类)关联的品种、报告、审批流。`
+            tips: `注:若上级分类已关联报告,则新建的第一个子分类默认继承上级分类(父分类)关联的报告。`
         }
     },
     mounted(){
@@ -267,12 +313,13 @@ export default {
             }
         },
 
-        /* 添加分类默认关联父级品种 */
+        /* 添加分类默认关联父级报告类型 */
         async changeClassify(id) {
-            if(!this.classifyForm.classify_id) {
                 let item = this.$refs.classifyRef.getCheckedNodes(true)
                 console.log(item)
-            }
+                if(item&&item[0]) {
+                    this.classifyForm.reportType = item[0].data.ClassifyType
+                }
         },
 
         // 去设置章节
@@ -297,24 +344,32 @@ export default {
                 classify_name:"",
                 parent_id: 0,
                 variety:'',//关联的品种
+                reportType: 1,
+                isReportWarn: 0,
+                warnTime:'09:00:00'
             }
         },
         async handleEdit(item){
-            
             this.classifyForm={
                 show:true,
                 classify_id:item.Id,
                 classify_name:item.ClassifyName,
                 parent_id: item.ParentId,
-                isLastLevel: !item.Child
+                isLastLevel: !item.Child,
+                reportType: item.ClassifyType,
+                isReportWarn: item.IsRemind,
+                warnTime: item.RemindTime
             }
         },
         async setClassifyHandle(){
             await this.$refs.formRef.validate();
-            const { classify_name,parent_id,classify_id } = this.classifyForm;
+            const { classify_name,parent_id,classify_id,reportType,isReportWarn,warnTime } = this.classifyForm;
             let params = {
                 ClassifyName: classify_name,
                 ParentId: parent_id,
+                ClassifyType: reportType,
+                IsRemind: isReportWarn,
+                RemindTime: warnTime
             }
 
             const { Ret,Msg } = classify_id 
@@ -337,6 +392,20 @@ export default {
             this.classifyForm.show = false;
         },
 
+        /* 删除分类 */
+        async handleDel(item) {
+            console.log(item)
+            await this.$confirm('分类删除后不可恢复,是否确认删除?', '提示', {
+                type: 'warning'
+            })
+            const res = await classifydelete({ClassifyId:item.Id})
+            
+            if(res.Ret!==200) return
+            this.$message.success('删除成功')
+            this.getList()
+            
+        },
+
         //启用\禁用设置
         handleEnableSet(item){
             // 判断权限
@@ -477,6 +546,9 @@ export default {
             }
         }
         .opt-box{
+            display: flex;
+            align-items: center;
+            gap: 10px;
             .icon-drag,.icon-set{
                 width: 16px;
                 height: 16px;

+ 9 - 2
src/views/ppt_manage/mixins/pptEditorMixins.js

@@ -93,11 +93,18 @@ export default{
         e.preventDefault()
         //只获取文字
         const text = e.clipboardData.getData('text/plain')
+        
         if(!text.trim().length){
             this.$message.warning(this.$t('Slides.title_paste_hint'))
         }
-        e.target.innerHTML += text.trim()
-        item.title += text.trim()
+        if(e.target.nodeName==='BR'&&e.target.parentNode.className.includes('title-editor')) { //不知道怎么冒出个br这玩意,处理下
+          e.target.parentNode.innerHTML = text.trim()
+          item.title = text.trim()
+        }else {
+          e.target.innerHTML += text.trim()
+          item.title += text.trim()
+          
+        }
     },
     handleInput(e,item){
         const text = e.target.innerHTML

+ 6 - 4
src/views/ppt_manage/mixins/pptMixins.js

@@ -217,17 +217,18 @@ export default {
             Editor,
             CoverContent,
             TitleSetting,
-            AdminId
+            AdminId,
+            ReportSource
         } = res.Data
         const pptDate = formatPPTDate(this.currentLang, PptDate)
-        let legalContent = JSON.parse(Content)
+        let legalContent = Content ? JSON.parse(Content) : []
         legalContent = legalContent.map(page => {
             page.elements = checkPPTpageElemant(page)
             return page
         })
         let legalTitleSetting = null
         try{
-            legalTitleSetting = JSON.parse(TitleSetting)
+            legalTitleSetting = TitleSetting ? JSON.parse(TitleSetting) : null
         }catch(e){
             console.log(e)
             legalTitleSetting = null
@@ -250,7 +251,8 @@ export default {
             Editor,
             CoverContent,
             TitleSetting:legalTitleSetting,
-            AdminId
+            AdminId,
+            ReportSource
         }
       }else{
         this.result = {status:'',content:'获取ppt数据失败!'}

+ 417 - 0
src/views/ppt_manage/newVersion/components/catalog/addPptBaseDia.vue

@@ -0,0 +1,417 @@
+<template>
+  <div>
+    <el-dialog
+      title="添加ppt"
+      :visible.sync="show"
+      :modal-append-to-body="false"
+      :close-on-click-modal="false"
+      :center="true"
+      v-dialogDrag
+      width="800px"
+      top="5vh"
+      @close="handleClose"
+    >
+      <el-form
+        :model="formData"
+        :rules="rules"
+        ref="baseinfoForm"
+        class="ppt-baseInfo-wrap"
+        label-width="125px"
+      >
+        <el-form-item prop="type" :label="$t('ReportManage.ReportList.label_add_way')">
+          <el-radio-group
+            v-model="formData.type"
+            :disabled="id"
+            @change="handleUpdateBaseInfo"
+          >
+            <el-radio :label="1">{{
+              $t("ReportManage.ReportList.new_report_radio")
+            }}</el-radio>
+            <el-radio :label="2">{{
+              $t("ReportManage.ReportList.inherit_report_radio")
+            }}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
+        <el-form-item prop="classify" :label="$t('ReportManage.ReportList.label_report_classify')">
+          <el-cascader
+            ref="cascader"
+            :options="classifyArr"
+            :disabled="id"
+            v-model="formData.classify"
+            :props="{
+              value: 'Id',
+              label: 'ClassifyName',
+              children: 'Child',
+              emitPath: false
+            }"
+            :placeholder="$t('ReportManage.ReportList.please_select_category')"
+            size="medium"
+            style="width: 400px"
+            @change="handleChangeClassify"
+          />
+        </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="cooperationType" :label="$t('ReportManage.ReportList.label_coop')">
+          <el-radio-group
+            v-model="formData.cooperationType"
+            :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>
+          </el-radio-group>
+
+          <el-button 
+            type="text" 
+            v-if="formData.cooperationType===2"
+            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>
+      <div style="text-align: center; margin-top: 60px; margin-bottom: 40px">
+        <el-button
+          type="primary"
+          plain
+          style="width: 120px"
+          @click="handleClose"
+          >{{ $t("Dialog.cancel_btn") }}</el-button
+        >
+        <el-button type="primary" style="width: 120px" @click="handleConfirm">{{
+          $t("Dialog.confirm_btn")
+        }}</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 选择协作人弹窗 -->
+    <chooseCooperaUserDia
+      :isShow.sync="isChooseCooperaUser"
+      :users="formData.cooperationUsers"
+      @save="getChooseCooperaUser"
+    />
+
+    <!-- 选择继承报告弹窗 -->
+    <chooseInherReportDia
+      :isShow.sync="isChooseInherReport"
+      source="ppt"
+      @success="chooseInheritReport"
+    />
+  </div>
+</template>
+
+<script>
+import { pptInterface } from '@/api/api.js';
+import chooseCooperaUserDia from '@/views/report_manage/reportV2/components/chooseCooperaUserDia.vue';
+import chooseInherReportDia from '@/views/report_manage/reportV2/components/chooseInherReportDia.vue';
+export default {
+  name: "BaseInfo",
+  components: { chooseCooperaUserDia,chooseInherReportDia },
+  model: {
+    prop: "show",
+    event: "showChange",
+  },
+  props: {
+    show: {
+      type: Boolean,
+      default: false,
+    },
+    id: {
+      type: Number,
+      default: 0,
+    },
+    reportInfo: {
+      type: Object
+    }
+  },
+  watch: {
+    show(n) {
+      if (!n) return
+      
+      this.getclassifylist();
+      
+      if (this.reportInfo) {
+          this.formData = {
+            type: this.reportInfo.AddType,
+            inheritId: 0,
+            classify: this.reportInfo.ClassifyId,
+            title: this.reportInfo.Title,
+            cooperationType: this.reportInfo.CollaborateType,//协作方式
+            cooperationUsers: this.reportInfo.GrandAdminList
+              ? this.reportInfo.GrandAdminList.map(_ => ({
+                  NodeId: _.AdminId,
+                  NodeName: _.AdminName
+                }))
+              : []
+          }
+
+      }
+    },
+  },
+  data() {
+    return {
+      formData: {
+        type: 1,
+        inheritId: 0,//继承report id
+        classify: 0,
+        title: "",
+        cooperationType: 1,//协作方式
+        cooperationUsers: []
+      },
+
+      classifyArr: [],
+      authorlist: [],
+
+      //协作人弹窗
+      isChooseCooperaUser: false,
+
+      //继承报告弹窗
+      isChooseInherReport:false,
+    };
+  },
+  computed: {
+    rules() {
+      return {
+        type: [
+          {
+            required: true,
+            message: this.$t("ReportManage.ReportList.please_report_type_select"),
+            trigger: "change",
+          },
+        ],
+        classify: [
+          {
+            required: true,
+            message: this.$t("ReportManage.ReportList.please_report_type_select"),
+            trigger: "change",
+          },
+        ],
+        title: [
+          {
+            required: true,
+            message: this.$t("ReportManage.ReportList.please_report_title_input"),
+            trigger: "blur",
+          },
+        ],
+      };
+    },
+  },
+  methods: {
+    handleClose() {
+      this.$refs.baseinfoForm.resetFields()
+      this.formData = {
+        type: 1,
+        inheritId: 0,
+        classify: 0,
+        title: "",
+        cooperationType: 1,//协作方式
+        cooperationUsers: []
+      }
+
+      this.$emit("update:show", false);
+    },
+
+    async handleConfirm() {
+      await this.$refs.baseinfoForm.validate()
+
+      const params = {
+        AddType: this.formData.type,
+        ClassifyId: this.formData.classify,
+        Title: this.formData.title,
+        CollaborateType: this.formData.cooperationType,
+        InheritPptId: this.formData.inheritId,
+        CollaborateUserIds: this.formData.cooperationUsers.map(_ => _.NodeId)
+      };
+
+      // 编辑
+      if (this.id) {
+        this.$emit("save", params);
+        return;
+      }
+      pptInterface.addpptV2(params).then((res) => {
+        if (res.Ret === 200) {
+
+          let { href } = this.$router.resolve({
+            path: '/ppteditor',
+            query: { 
+              id: res.Data.PptId
+            },
+          });
+          window.open(href, "_blank");
+
+          this.handleClose();
+        }
+      });
+    },
+
+
+    //分类变化 
+    handleChangeClassify(val) {
+      this.formData.type===2&&this.handleUpdateBaseInfo()
+    },
+
+    handleUpdateBaseInfo() {
+      this.formData.inheritId = 0;
+
+      if(!this.formData.classify) return
+
+      
+      //获取上次报告
+      pptInterface.getAuthPPtList({
+        ClassifyId: this.formData.classify,
+        CurrentIndex: 1,
+        PageSize:1,
+        Keyword:''
+      }).then((res) => {
+        if (res.Ret !== 200) return;
+        if (!res.Data.List&&this.formData.type===2) {
+          this.$message.warning(
+            this.$t("ReportManage.ReportList.no_reports_msg")
+          );
+          return false;
+        }
+
+        this.chooseInheritReport(res.Data.List[0])
+      });
+    },
+
+    /* 选择继承报告 */
+    async chooseInheritReport(item) {
+      const { PptId,Title,CollaborateType,CollaborateUsers,ClassifyId } = item;
+
+      this.formData.title = Title;
+      this.formData.cooperationType = CollaborateType;
+      this.formData.inheritId = PptId;
+      this.formData.classify = ClassifyId
+      
+      //继承的章节报告默认带出协作人
+      if(CollaborateType===1) {
+        this.formData.cooperationUsers = [];
+      }else {
+       
+        this.formData.cooperationUsers = CollaborateUsers
+          ? CollaborateUsers.map(_ => ({
+              NodeId: _.AdminId,
+              NodeName: _.RealName
+            }))
+          : [];
+      }
+    },
+
+    //选择协作人
+    handleChooseCooper() {
+      this.isChooseCooperaUser = true
+    },
+
+    getChooseCooperaUser(val) {
+      this.formData.cooperationUsers = val;
+    },
+
+    removeCooper(index) {
+      this.formData.cooperationUsers.splice(index,1)
+    },
+
+
+    // 获取选择的分类名称
+    getSelectClassifyName() {
+      let arr = [];
+      this.classifyArr.forEach((item) => {
+        if (
+          this.formData.classify[0] &&
+          item.value === this.formData.classify[0]
+        ) {
+          arr.push(item.label);
+          if (item.children && item.children.length > 0) {
+            item.children.forEach((_item) => {
+              if (
+                this.formData.classify[1] &&
+                _item.value === this.formData.classify[1]
+              ) {
+                arr.push(_item.label);
+              }
+            });
+          }
+        }
+      });
+      return arr;
+    },
+
+    // 获取分类
+    getclassifylist() {
+      //获取分类列表
+      pptInterface.getCatalogsListV2({Source: 1}).then((res) => {
+        if (res.Ret == 200 && Array.isArray(res.Data)) {
+          this.classifyArr = res.Data||[];
+          this.filterNodes(this.classifyArr)
+        }
+      });
+    },
+
+    filterNodes(arr) {
+			arr.length && arr.forEach(item => {
+				if(item.Child && item.Child.length) {
+          this.filterNodes(item.Child)
+        }else {
+          delete item.Child
+        }
+			})
+		}
+  },
+};
+</script>
+
+<style lang="scss">
+.ppt-baseInfo-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;
+  }
+  .permission-wrap {
+    width: 80%;
+    display: flex;
+    flex-wrap: wrap;
+    gap: 5px;
+  }
+}
+</style>

+ 267 - 222
src/views/ppt_manage/newVersion/components/catalog/mergePPTDialog.vue

@@ -1,82 +1,129 @@
 <template>
-  <!-- ↓ @click="handleMouseDown" -->
   <div class="merge-ppt-dialog-wrap">
      <el-dialog
       v-if="mergePptShow"  
       :visible.sync="mergePptShow" 
       :close-on-click-modal="false" 
       :modal-append-to-body="false"
-      @close="cancelHandle" v-dialogDrag center width="40%" top="8vh">
+      @close="cancelHandle" v-dialogDrag center width="650px" top="8vh">
       <div slot="title" style="display: flex; alignitems: center">
         <span style="fontsize: 16px">{{$t('Slides.ppt_merge_btn')}}</span>
       </div>
       <div class="dialog-container">
         <div class="ppt-form">
           <div class="input-item" style="position:relative;">
-            <h3>{{$t('Slides.please_select_ppt_title')}}</h3>
+            <h3>
+              <span>{{$t('Slides.please_select_ppt_title')}}</span>
+              <el-cascader
+                  @change="getPPtList"
+                  :options="classifyOptions"
+                  v-model="searchClassifyId"
+                  :props="{
+                    value: 'Id',
+                    label: 'ClassifyName',
+                    children: 'Child',
+                    emitPath:false
+                  }"
+                  clearable
+                  :placeholder="$t('ReportManage.smart_type_filtering')"
+                  style="width:200px;"
+              ></el-cascader>
+            </h3>
             <div class="select-ppt-wrap select-wrap">
-              <el-tabs value="public">
-                <el-tab-pane :label="$t('Slides.public_ppt_tabs')" name="public">
-                  <div class="tree-container">
-                    <div class="tree-list" :key="treeKey">
-                      <div class="list-item" v-for="(item,index) in publicList" :key="item.nodeKeyId" @click.stop="expandList(index,'public')">
-                        <p class="item-label"><span @click.stop="expandList(index,'public')"><i :class="item.expand?'el-icon-caret-bottom':'el-icon-caret-right'"></i></span> {{item.label}}</p>
-                        <template v-if="item.expand">
-                          <div class="list-child" v-for="i in item.children" :key="i.nodeKeyId">
-                            <el-checkbox
-                              :disabled="disabled&&!choosedIdArr.includes(i.PptId)||i.disabled"
-                              v-model="i.checked"
-                              @change="(checked)=>{changeCheck(checked,i,'public')}"
-                            >{{i.label}}</el-checkbox>
-                          </div>
-                        </template>
-                      </div>
-                    </div>
-                  </div>
+              <el-tabs value="public" v-model="panelSource" @tab-click="()=>{getCatalogsList();getPPtList()}">
+                <el-tab-pane :label="$t('Slides.public_ppt_tabs')" :name="3">
                 </el-tab-pane>
-                <el-tab-pane :label="$t('Slides.my_ppt_tabs')" name="private">
-                  <div class="tree-container">
-                    <div class="tree-list" :key="treeKey">
-                      <div class="list-item" v-for="(item,index) in privateList" :key="item.nodeKeyId" @click.stop="expandList(index,'private')">
-                        <p class="item-label"><span @click.stop="expandList(index,'private')"><i :class="item.expand?'el-icon-caret-bottom':'el-icon-caret-right'"></i></span> {{item.label}}</p>
-                        <template v-if="item.expand">
-                          <div class="list-child" v-for="i in item.children" :key="i.nodeKeyId">
-                            <el-checkbox
-                              :disabled="disabled&&!choosedIdArr.includes(i.PptId)||i.disabled"
-                              v-model="i.checked"
-                              @change="(checked)=>{changeCheck(checked,i,'private')}"
-                            >{{i.label}}</el-checkbox>
-                          </div>
-                        </template>
-                      </div>
-                    </div>
-                  </div>
+                <el-tab-pane :label="$t('Slides.my_ppt_tabs')" :name="1">
                 </el-tab-pane>
               </el-tabs>
+              
+              <ul class="tree-container" v-if="catalogPPTList.length">
+                <li v-for="item in catalogPPTList" :key="item.PptId" class="list-item">
+                  <el-checkbox
+                    v-model="item.checked"
+                    @change="(checked)=>{changeCheck(checked,item)}" 
+                  >{{item.Title}}</el-checkbox>
+                </li>
+              </ul>
+
+              <tableNoData text="暂无ppt" size="mini" v-else/>
             </div>
             <div class="selected-ppt-wrap ">
               <span>{{$t('Slides.selected_pages')}}:</span>
               <div class="selected-ppt">
                 <div class="select-node" v-for="item in choosedItemArr" :key="item.PptId">
-                  <span>{{ item.Title }}  {{translatePageNumber(item.PptPage)}}</span>
-                  <i class="el-icon-error" @click.stop="changeCheck(false,item,'unknow')"></i>
+                  <span>{{ item.Title }}  {{item.PptPage}}页)</span>
+                  <i class="el-icon-error" @click.stop="changeCheck(false,item,'list')"></i>
                 </div>
               </div>  
             </div>
           </div>
-          <div class="input-item">
-            <h3>{{$t('Slides.please_selecdirectory_into')}}</h3>
-            <div class="select-catalog-wrap select-wrap">
-              <el-radio-group v-model="selectedCatalogId">
-                <el-radio v-for="item in MyPrivateList" :key="item.GroupId" 
-                :label="item.GroupId">{{item.GroupName}}</el-radio>
+          
+          <el-form
+            :model="pptInfo"
+            :rules="rules"
+            ref="baseinfoForm"
+            class="ppt-baseInfo"
+            label-width="100px"
+          >
+            <el-form-item prop="classify" :label="$t('ReportManage.ReportList.label_report_classify')">
+              <el-cascader
+                ref="cascader"
+                :options="privateClassifyList"
+                v-model="pptInfo.classify"
+                :props="{
+                  value: 'Id',
+                  label: 'ClassifyName',
+                  children: 'Child',
+                  emitPath:false
+                }"
+                :placeholder="$t('ReportManage.ReportList.please_select_category')"
+                size="medium"
+                style="width: 400px"
+              />
+            </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="pptInfo.Title"
+                style="width:400px"
+              >
+              </el-input>
+
+            </el-form-item>
+            
+            <el-form-item prop="cooperationType" :label="$t('ReportManage.ReportList.label_coop')">
+              <el-radio-group
+                v-model="pptInfo.cooperationType"
+                :disabled="pptInfo.type===2"
+                @change="pptInfo.cooperationUsers=[]"
+              >
+                <el-radio :label="1"><!-- 个人 -->{{$t('ReportManage.ReportList.coop_own')}}</el-radio>
+                <el-radio :label="2"><!-- 多人协作 -->{{$t('ReportManage.ReportList.coop_more')}}</el-radio>
               </el-radio-group>
-            </div>
-          </div>
-          <div class="input-item">
-            <h3>{{$t('Slides.ppt_title_input')}}</h3>
-            <el-input  :placeholder="$t('Slides.input_ppt_title')" v-model="pptInfo.Title" required ></el-input>
-          </div>
+
+              <el-button 
+                type="text" 
+                v-if="pptInfo.cooperationType===2"
+                style="margin-left: 20px"
+                @click="isChooseCooperaUser = true"
+              ><!-- 选择协作人 -->{{$t('ReportManage.ReportList.choose_cooper')}}</el-button>
+              
+              <div class="choosed-cooper" v-if="pptInfo.cooperationUsers.length">
+                <el-tag
+                  v-for="(item,index) in pptInfo.cooperationUsers"
+                  :key="item.NodeId"
+                  size="mini"
+                  effect="dark"
+                  closable
+                  @close="removeCooper(index)"
+                >
+                  {{ item.NodeName }}
+                </el-tag>
+              </div>
+            </el-form-item>
+          </el-form>  
         </div>
       </div>
       <div slot="footer" class="foot-container">
@@ -84,16 +131,25 @@
         <el-button @click="cancelHandle">{{$t('Dialog.cancel_btn')}}</el-button>
       </div>
     </el-dialog>
+
+
+    <!-- 选择协作人弹窗 -->
+    <chooseCooperaUserDia
+      :isShow.sync="isChooseCooperaUser"
+      :users="pptInfo.cooperationUsers"
+      @save="getChooseCooperaUser"
+    />
   </div>
    
 </template>
 
 <script>
 import {pptInterface} from '@/api/api.js';
-import {pptEnInterface} from '@/api/modules/pptEnApi.js';
 import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
 import {changeCatalogArr,createRandomCode} from '../../utils/untils';
+import chooseCooperaUserDia from '@/views/report_manage/reportV2/components/chooseCooperaUserDia.vue';
 export default {
+  components: { chooseCooperaUserDia },
   props:{
     mergePptShow:{
       type:Boolean,
@@ -106,28 +162,53 @@ export default {
         Title:'',
         ImgUrl:'',//读取etaBaseConfig中封面页的第一个
         BackIndex:0,
-        TemplateType:1
+        TemplateType:1,
+        classify: 0,
+        cooperationType: 1,//协作方式
+        cooperationUsers:[],
+
       },//PPT的标题信息
       publicList:[],
-      privateList:[],
-      treeKey:0,
+      catalogPPTList:[],
+
       disabled:false,//判断所有的checkbox是否应该是启用/禁用状态
       choosedIdArr:[],//选中的PPTIds
       choosedItemArr:[],//选中的PPT item
-      choosedTreesName:{},//选中的ppt分别来自哪个目录
+
       PptId:0,//合并后的pptId
-      showCatalog:false,
-      selectedCatalogId:0,//选择的目录Id
       saveLoading:null,//加载loading
-      MyPrivateList:[]
+
+      classifyOptions: [],
+      privateClassifyList: [],
+      rules: {
+        classify: [
+          {
+            required: true,
+            message: '报告分类不能为空',
+            trigger: "change",
+          },
+        ],
+        Title: [
+          {
+            required: true,
+            message: '报告标题不能为空',
+            trigger: "blur",
+          },
+        ],
+      },
+
+      panelSource: 1,
+      searchClassifyId:0,
+      //协作人弹窗
+      isChooseCooperaUser: false,
     };
   },
   watch:{
     mergePptShow(newValue){
       if(newValue){
         this.init()
-        this.getCatalogsList()
-        this.getPrivateList()
+        this.getCatalogsList('init')
+        this.getPPtList()
         this.getBaseConfig()
       }
       if(!newValue){
@@ -138,19 +219,44 @@ export default {
     }
   },
   methods: {
+
+    //ppt列表
+    async getPPtList() {
+      const res = await pptInterface.getPptListV2({
+        PageSize: 1000,
+        CurrentIndex: 1,
+        Source: this.panelSource,
+        ClassifyId: this.searchClassifyId,
+        Keyword: ''
+      })
+        
+      if(res.Ret!==200) return
+      let data = res.Data.List||[];
+      this.catalogPPTList = data.map(_ => ({
+        ..._,
+        checked: this.choosedIdArr.includes(_.PptId)?true:false
+      }))
+    },
+
+    getChooseCooperaUser(val) {
+      this.pptInfo.cooperationUsers = val;
+    },
+    
+    removeCooper(index) {
+      this.pptInfo.cooperationUsers.splice(index,1)
+    },
+
     cancelHandle(){
       this.$emit('cancel')
     },
-    translatePageNumber(num){
-      let str = this.$i18n.locale == 'zh' ?`({${num}}页)`:`(Slide{${num}})`
-      return str
-    },
+
     async saveChange(){
       const {result,msg} = this.checkForm()
       if(!result){
         this.$message.warning(msg)
         return
       }
+      await this.$refs.baseinfoForm.validate()
       this.saveLoading = this.$loading({
         fullscreen:true,
         lock: true,
@@ -160,14 +266,12 @@ export default {
         background: 'rgba(255, 255, 255, 0.8)'
       })
       await this.getPptsDetail()
-      if(this.$parent.currentLang==='en'){
-        this.pptInfo.PptDate = (new Date().getFullYear())+'.'+(new Date().getMonth()+1)
-      }
+      
       await this.addNewPpt()
       if(this.PptId!==0){
         this.saveLoading.close()
         //跳转至ppt编辑页
-        const path = this.$parent.currentLang!=='en'?'/ppteditor':'/ppteneditor'
+        const path = '/ppteditor'
         this.$router.push({
             path,
             query:{
@@ -182,10 +286,7 @@ export default {
       if(this.choosedIdArr.length!==2){
         return {result:false,msg: this.$t('Slides.please_select_two_msg')}
       }
-      if(!this.pptInfo.Title.length){
-        return {result:false,msg:this.$t('Slides.please_fill_title_msg')}
-      }
-      if(this.selectedCatalogId===0){
+      if(this.pptInfo.classify===0){
         return {result:false,msg:this.$t('Slides.please_select_directory_msg') }
       }
       return {result:true,msg:''}
@@ -194,26 +295,21 @@ export default {
     async getPptsDetail(){
       //只需要content
       let content_font = [],content_back=[]
-      const res_font = this.$parent.currentLang!=='en'
-      ? await pptInterface.getpptDetail({
-          PptId:this.choosedIdArr[0]
-        })
-      : await pptEnInterface.getpptDetail({
-          PptId:this.choosedIdArr[0]
-        })
+      const res_font = await pptInterface.getpptDetail({
+        PptId:this.choosedIdArr[0]
+      })
+
       if(res_font.Ret===200){
         content_font = JSON.parse(res_font.Data.Content)
       } 
-      const res_back = this.$parent.currentLang!=='en'
-      ? await pptInterface.getpptDetail({
-          PptId:this.choosedIdArr[1]
-        })
-      : await pptEnInterface.getpptDetail({
-          PptId:this.choosedIdArr[1]
-        })
+      const res_back = await pptInterface.getpptDetail({
+        PptId:this.choosedIdArr[1]
+      })
+
       if(res_back.Ret===200){
         content_back = JSON.parse(res_back.Data.Content)
       }
+
       //合并两个content,并给每个重新赋id,保证id唯一
       let content = content_font.concat(content_back)
       this.content = content.map(item=>{
@@ -223,17 +319,29 @@ export default {
     },
     //添加PPT
     async addNewPpt(){
-      const res = this.$parent.currentLang!=='en'
-      ? await pptInterface.addppt({
-          FirstPage:this.pptInfo,
-          Content:JSON.stringify(this.content),
-          GroupId:this.selectedCatalogId
-        })
-      : await pptEnInterface.addppt({
-          FirstPage:this.pptInfo,
+      const { 
+        Title,
+        ImgUrl,
+        BackIndex,
+        TemplateType, 
+      } = this.pptInfo
+
+      const res = await pptInterface.addpptV2({
+          FirstPage:{
+            Title,
+            ImgUrl,
+            BackIndex,
+            TemplateType 
+          },
           Content:JSON.stringify(this.content),
-          GroupId:this.selectedCatalogId
+          AddType: 1,
+          ClassifyId: this.pptInfo.classify,
+          Title: Title,
+          CollaborateType: this.pptInfo.cooperationType,
+          InheritPptId: 0,
+          CollaborateUserIds: this.pptInfo.cooperationUsers.map(_ => _.NodeId)
         })
+      
       if(res.Ret===200){
         this.$message.success(this.$t('Slides.merging_successful_msg'))
         this.PptId = res.Data.PptId
@@ -245,96 +353,47 @@ export default {
       }  
     },
     //PPT的选中和取消选中处理
-    changeCheck(type,i,treeName){
-      let ListName = treeName==='public'?'privateList':'publicList'
-      //从已选择的PPT内点击,只能是取消选中
-      if(treeName==='unknow'){
-        ListName = this.choosedTreesName[i.PptId]+'List'
-      }
-      if(type){
+    changeCheck(type,i,treeName=''){
+      if(type) {
+        if(this.choosedIdArr.length===2){
+          i.checked=false;
+          return this.$message.warning('最多只能选择两个ppt')
+        }
         this.choosedIdArr.push(i.PptId)
         this.choosedItemArr.push(i)
-        this.choosedTreesName[i.PptId] = treeName
-        //选中时,同时要将另一个List的对应i也勾选,如果有
-        this.setNodeChecked(ListName,i.PptId,true)  
-      }else{
+      }else {
         const index = this.choosedIdArr.findIndex(item=>item===i.PptId)
         index!==-1&&this.choosedIdArr.splice(index,1)
         index!==-1&&this.choosedItemArr.splice(index,1)
-        //取消选中时,同时要将另一个List的对应i也取消勾选,如果有
-        this.setNodeChecked(ListName,i.PptId,false)
-        if(treeName==='unknow'){
-          ListName = this.choosedTreesName[i.PptId]==='public'?'privateList':'publicList'
-          this.setNodeChecked(ListName,i.PptId,false)
-        }
-        delete this.choosedTreesName[i.PptId]
-      }
-      if(this.choosedIdArr.length===2){
-        this.disabled = true
-      }else if(this.choosedIdArr.length<2){
-        if(this.disabled){
-          this.disabled=false
-        }
-      }
-    },
-    //设置ppt的选中取消和禁用启用属性
-    setNodeChecked(listName,PptId,checked){
-      this[listName].forEach(item=>{
-        if(item.children.length>0){
-          item.children.forEach(i=>{
-            if(i.PptId===PptId){
-              i.checked = checked
-              //顺便禁用下,不然看起来就像选了四个
-              i.disabled = checked
-            }
-          })
-        }
-      })
-    },
-    //展开收起列表
-    expandList(index,treeName){
-      const {expand} = this[`${treeName}List`][index]
-      this.$set(this[`${treeName}List`][index],'expand',!expand)
-      this.treeKey++
-    },
-    //获取PPT目录
-    async getCatalogsList(){
-      const res = this.$parent.currentLang!=='en'
-        ? await pptInterface.getCatalogsList({IsNewPpt:1})
-        : await pptEnInterface.getCatalogsList({IsNewPpt:1})
-      if(res.Ret===200){
-        const {PublicList,PrivateList} = res.Data
-        this.publicList = changeCatalogArr(PublicList)
-        this.privateList = changeCatalogArr(PrivateList)
-        this.publicList.forEach(item=>{
-          item.expand = false
-        })
-        this.privateList.forEach(item=>{
-          item.expand = false
+        
+        treeName==='list' && this.catalogPPTList.forEach(_ => {
+          if(_.PptId===i.PptId) {
+            _.checked = false
+          }
         })
       }
     },
-    //获取私有PPT目录
-    async getPrivateList(){
-      const res = this.$parent.currentLang!=='en'
-        ? await pptInterface.getPrivateCatalogList()
-        : await pptEnInterface.getPrivateCatalogList()
+
+    //获取PPT目录
+    async getCatalogsList(type=''){
+      const res = await pptInterface.getCatalogsListV2({Source: 3})
       if(res.Ret===200){
-        this.MyPrivateList = res.Data.List||[]
-        this.selectedCatalogId = this.MyPrivateList[0].GroupId
+        this.classifyOptions = res.Data||[]
+        this.filterNode(this.classifyOptions)
+
+        type==='init' && (this.privateClassifyList = this.classifyOptions)
       }
     },
-    //模拟blur事件,隐藏展开的目录框
-    handleMouseDown(target){
-      //console.log(target)
-      const {path} = target
-      for(let i=0;i<path.length;i++){
-        if(path[i].className==="catalog-wrap")return
-      }
-      if(this.showCatalog){
-        this.showCatalog = false
-      }
+    filterNode(arr) {
+      arr.forEach(item => {
+        if(item.Child&&item.Child.length) {
+          this.filterNode(item.Child)
+        }else {
+          delete item.Child
+        }
+      })
     },
+
     //重置data的值
     init(){
       Object.assign(this.$data,this.$options.data())
@@ -343,7 +402,7 @@ export default {
         etaBaseConfigInterence.getBaseConfig().then(res=>{
                 if(res.Ret!==200) return
                 const {CnPptCoverImgs='',EnPptCoverImgs=''} = res.Data||{}
-                this.pptInfo.ImgUrl = this.$parent.currentLang!=='en'?CnPptCoverImgs.split(',')[0]:EnPptCoverImgs.split(',')[0]
+                this.pptInfo.ImgUrl = CnPptCoverImgs.split(',')[0]
         })
     }
   },
@@ -382,7 +441,7 @@ export default {
           font-size: 14px;
           color:#999999FF;
           &.is-active{
-            color: #409EFF
+            color: #0052D9;
           }
         }
         .el-tabs__nav-wrap.is-top{
@@ -417,33 +476,6 @@ export default {
     width: 100%;
     display: flex;
     justify-content: space-between;
-    .public-tree,.private-tree{
-     /*  flex: 1; */
-      width:47.5%;
-      .tree-container{
-        margin-top: 10px;
-        width:100%;
-        height:300px;
-        overflow-y: scroll;
-        border: 1px dashed #999;
-        .tree-list{
-          .list-item{
-            cursor: pointer;
-            .item-label{
-              &:hover{
-                background-color: #f0f4ff;
-              }
-            }
-            .list-child{
-              margin-left: 10px;
-              &:hover{
-                background-color: #f0f4ff;
-              }
-            }
-          }
-        }
-      }
-    }
     
   }
   .ppt-form{
@@ -456,6 +488,11 @@ export default {
     .input-item{
       width: 90%;
       margin-top:20px;
+      h3 {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+      }
       &:first-child{
         margin-top: 0;
       }
@@ -522,25 +559,23 @@ export default {
         .tree-container{
           height:200px;
           overflow-y: scroll;
-          .tree-list{
-            .list-item{
-              margin-left: 20px;
-              margin-top: 6px;
-              cursor: pointer;
-              &:first-child{
-                margin-top:0;
-              }
-              .item-label{
-                &:hover{
-                  background-color: #f0f4ff;
-                }
+          .list-item{
+            margin-left: 20px;
+            margin-top: 6px;
+            cursor: pointer;
+            &:first-child{
+              margin-top:0;
+            }
+            .item-label{
+              &:hover{
+                background-color: #f0f4ff;
               }
-              .list-child{
-                margin-left: 10px;
-                margin-top: 6px;
-                &:hover{
-                  background-color: #f0f4ff;
-                }
+            }
+            .list-child{
+              margin-left: 10px;
+              margin-top: 6px;
+              &:hover{
+                background-color: #f0f4ff;
               }
             }
           }
@@ -598,6 +633,16 @@ export default {
         border: 1px solid #DCDFE6;
       }
     }
+
+    .ppt-baseInfo {
+      width: 100%;
+      margin-top: 30px;
+      .choosed-cooper {
+        display: flex;
+        flex-wrap: wrap;
+        gap: 10px;
+      }
+    }
   }
 }
 </style>

File diff suppressed because it is too large
+ 141 - 716
src/views/ppt_manage/newVersion/pptCatalog.vue


+ 2 - 2
src/views/ppt_manage/newVersion/pptEditor.vue

@@ -157,7 +157,7 @@
             <div class="tool-btn">
                 <el-button type="primary" :loading="refreshBtnLoading" @click="refleshFormatEl">{{$t('Slides.operations_refresh')}}</el-button>
                 <el-button v-permission="permissionBtn.pptPermission.ppt_publish"
-                 type="primary" @click="handlePublish">{{$t('Slides.go_to_publish')}}</el-button>
+                 type="primary" @click="handlePublish">{{ result.ReportSource===1?'去发布':'去提交' }}</el-button>
                 <el-button @click="handleSave('save')">{{$t('Slides.operations_save')}}</el-button>
                 <el-button type="text" @click="handleChangeEditModal"><i class="el-icon-sort" style="transform: rotate(90deg);margin-right:5px;"></i>{{isEditLayer? $t('Slides.ppt_edit_btn'):$t('Slides.layer_editing')}}</el-button>
             </div>
@@ -1062,7 +1062,7 @@ export default {
       if(this.$route.query.id||this.pptId){
         await this.editPPT(FirstPage,Content,type)
       }else{
-        await this.addPPT(FirstPage,Content)
+        // await this.addPPT(FirstPage,Content)
       }
     },
     async addPPT(FirstPage,Content){

+ 22 - 4
src/views/ppt_manage/newVersion/pptPublish.vue

@@ -5,7 +5,8 @@
 
         <!-- 下载配置 -->
         <el-button  type="primary" style="width:182px;height:40px;margin-left: 0;" @click="downloadPPT" :disabled="isPublish">{{$t('Slides.operations_download')}}</el-button>
-        <el-dropdown split-button style="width:182px;height:40px;" type="primary" @click="transHandle" @command="handleCommand" :disabled="isPublish">
+        <!-- 发布 -->
+        <el-dropdown split-button style="width:182px;height:40px;" type="primary" @click="transHandle" @command="handleCommand" :disabled="isPublish" v-if="result.ReportSource===1">
           {{layoutStr}}
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :command="1">10:7</el-dropdown-item>
@@ -13,6 +14,13 @@
             <el-dropdown-item :command="3">4:3</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
+        <!-- 提交 -->
+        <el-button 
+          v-else-if="result.ReportSource===2"
+          type="primary" 
+          :disabled="isPublish" 
+          @click="handleSubmitPPt" 
+        >提交</el-button>
       </div>
       <!--全加载-->
       <template v-if="loadingAll">
@@ -82,7 +90,7 @@ export default {
   mixins:[pptmixin,mixins],
   data() {
     return {
-        coverInfo:{
+      coverInfo:{
         id:0,
         title:'封面',
         index:{
@@ -126,6 +134,17 @@ export default {
 
   },
   methods: {
+    /* 提交 */
+    async handleSubmitPPt() {
+      await this.$confirm('是否确认提交报告进入审批流程?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      })
+
+      this.transHandle()
+    },
+
     //计算title的字节数
     getStrCount(title){
         return countStrSize(title)
@@ -494,7 +513,6 @@ export default {
 
         
         // 上传到阿里云oss
-        // this.handleUploadToOSS(data)
         let clientType = this.$setting.dynamicOutLinks.ObjectStorageClient ||
                         this.$store.state.dynamicOutLinks.ObjectStorageClient ||
                         JSON.parse(localStorage.getItem('dynamicOutLinks')).ObjectStorageClient
@@ -524,7 +542,7 @@ export default {
           PptxUrl:url
         })
       if(res.Ret===200){
-        this.$message.success(this.$t('MsgPrompt.publish_msg'))
+        this.$message.success(this.$t(this.result.ReportSource===1?'MsgPrompt.publish_msg':'MsgPrompt.submit_msg'))
         this.publishLoading.close()
       }
     },

+ 20 - 12
src/views/ppt_manage/newVersion/utils/config.js

@@ -609,6 +609,14 @@ export const pptCoverEn = [
 export const pptBaseSize = {width:906,height:906*0.7}
 //ppt列表操作项
 export const toolList = [
+    {
+        label:'撤销',
+        key:'cancel'
+    },
+    {
+        label:'提交',
+        key:'submit'
+    },
     {
         label:'预览发布',
         key:'publish'
@@ -621,22 +629,22 @@ export const toolList = [
         label:'下载',
         key:'download'
     },
-    {
-        label:'',
-        key:'transform'
-    },
-    {
-      label:'转英文PPT',
-      key:'transEn'
-    },
+    // {
+    //     label:'',
+    //     key:'transform'
+    // },
+    // {
+    //   label:'转英文PPT',
+    //   key:'transEn'
+    // },
     {
         label:'编辑',
         key:'edit'
     },
-    {
-        label:'复制',
-        key:'copy'
-    },
+    // {
+    //     label:'复制',
+    //     key:'copy'
+    // },
     {
         label:'删除',
         key:'delete'

+ 16 - 14
src/views/ppt_manage/newVersion/utils/untils.js

@@ -1,5 +1,6 @@
 import { modelMap,pptLayout,pptSlideMaster,pptSlideMasterEn } from "./config";
 import { parse } from "himalaya";
+import md5 from "@/utils/md5.js";
 //根据modelId返回组件名,用于component:is
 export const countComponentName = (modelId,type)=>{
     let componentName = type==='pre'?'formatPre':'format'
@@ -265,19 +266,19 @@ export const getImgRealSize = ({imgWidth,imgHeight,naturalWidth,naturalHeight})=
 //格式化目录数组数据,返回树形数据结构格式
 export const changeCatalogArr = (arr)=>{
     let tempArr = arr.map((item)=>{
-        item.label = item.GroupName
-        item.copyIconShow = false
-        item.isShare = item.IsShare
-        item.nodeKeyId = item.GroupId
-        item.children = item.PptList?item.PptList.map((i)=>{
-          i.nodeKeyId = 'ppt'+i.PptId //避免和目录id重复的情况
-          i.label = i.Title
-          i.catalogId = item.GroupId
-          i.isShare = i.IsSingleShare
-          i.copyIconShow = false
-          i.isTrans = i.ReportId===0?false:true
-          return i
-        }):[]
+        item.label = item.ClassifyName
+        item.nodeKeyId = item.Id
+        
+        if(item.Child&&item.Child.length){
+          item.children = item.Child
+          changeCatalogArr(item.children)
+        }else {
+          item.children = item.PptList?item.PptList.map((i)=>{
+            i.nodeKeyId = 'ppt'+i.PptId //避免和目录id重复的情况
+            i.label = i.Title
+            return i
+          }):[]
+        }
         return item
       })
     return tempArr
@@ -291,7 +292,8 @@ export const changeCatalogArr = (arr)=>{
     const randomIndex = Math.floor(Math.random() * maxLen)
     ret += charset[randomIndex]
   }
-  return ret
+  let timp = new Date().getTime()
+  return md5.hex_md5(`${ret}${timp}`)
 }
 //计算各个版式下,文本框占据的真实宽度
 //基准:编辑页ppt-item的最大宽高:w:900px;h:630

+ 4 - 37
src/views/report_manage/reportV2/components/chapterEditWrapper.vue

@@ -33,21 +33,8 @@
           </el-tooltip>
         </li>
         
-        <template v-if="!isApprove||!hasApproveFlow">
-            <!-- <li 
-                class="action-item" 
-                :class="{'disabled':puiblishLoading}"
-                @click="handlePublishReport('dsfb')"
-                v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)"
-                >
-                  <el-tooltip
-                    effect="dark" 
-                    :content="$t('ReportManage.ReportList.scheduled_publish_btn')" 
-                    placement="top"
-                  >
-                    <img src="~@/assets/img/icons/timing_ico.svg" class="handle-icon" alt="">
-                  </el-tooltip>
-            </li> -->
+        <!-- 系统内报告 -->
+        <template v-if="reportBase.ReportSource===1">
             <li 
                 class="action-item" 
                 :class="{'disabled':puiblishLoading}"
@@ -63,7 +50,8 @@
                 </el-tooltip>
             </li>
         </template>
-        <template v-if="isApprove&&hasApproveFlow">
+        <!-- 来源智力共享报告 -->
+        <template v-else-if="reportBase.ReportSource===2">
             <li 
                 class="action-item" 
                 :class="{'disabled':puiblishLoading}"
@@ -123,21 +111,6 @@
                 v-if="item.CanEdit"
               >
                 {{item.PublishState===2 ? $t('ReportManage.ReportList.chapter_has_submit') : $t('ReportManage.ReportList.chapter_no_submit') }}
-                <el-popover
-                    placement="top"
-                    trigger="click"
-                >   
-                    <img style="width:150px" :src="item.QRCodeImg" alt="">
-
-                    <img 
-                      src="~@/assets/img/icons/wx_round.svg" 
-                      class="handle-icon"
-                      slot="reference"
-                      v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportMange_chapter_share)&&item.PublishState===2"
-                      style="font-size:18px;color:#0052D9;cursor:pointer;"
-                      @click.stop="handleGetWechatImg(item)"
-                    />
-                </el-popover>
               </span>
               <span v-else style="color:#E37318">{{item.Editor}}<!-- 编辑中... -->{{$t('ReportManage.smart_btn.editing')}}</span>
               <div>
@@ -669,12 +642,6 @@ export default {
 
       if(res.Data.PrePublishTime) this.$parent.taskTime = res.Data.PrePublishTime;
 
-      if(type!=='notCheck') {
-        let classify = [res.Data.ClassifyIdFirst,res.Data.ClassifyIdSecond,res.Data.ClassifyIdThird]
-        this.$emit('checkClassifyNameArr',classify)
-      }
-
-      // this.reportVarietyOpts = res.Data.PermissionList||[];
       this.userOpts = res.Data.GrandAdminList||[];
 
     },

+ 22 - 11
src/views/report_manage/reportV2/components/chooseInherReportDia.vue

@@ -61,9 +61,14 @@
               </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>
+                <template v-if="source==='ppt'">
+                  {{ row.FullClassify }}
+                </template>
+                <template v-else>
+                  {{ row.ClassifyNameFirst }}
+                  <span v-if="row.ClassifyNameSecond">/ {{ row.ClassifyNameSecond }}</span>
+                  <span v-if="row.ClassifyNameThird">/ {{ row.ClassifyNameThird }}</span>
+                </template>
               </span>
 
               <span v-else-if="item.key==='CreateTime'">
@@ -98,6 +103,7 @@
 </template>
 <script>
 import { reportV2Interface } from '@/api/modules/reportV2.js';
+import { pptInterface } from '@/api/api.js';
 import mPage from '@/components/mPage.vue'
 export default {
   components: { mPage },
@@ -108,6 +114,10 @@ export default {
     id: {
       type: Number,
       default: 0
+    },
+    source: {
+      type: String,
+      default:'report'
     }
   },
   computed: {
@@ -166,18 +176,19 @@ export default {
       this.getReportList()
     },
 
-    getReportList() {
-      reportV2Interface.getAuthReportList({
-          CurrentIndex: this.pageNo,
-          PageSize:this.pageSize,
-          Keyword:this.searchTxt
-        })
-        .then((res) => {
+    async getReportList() {
+      let params = {
+        CurrentIndex: this.pageNo,
+        PageSize:this.pageSize,
+        Keyword:this.searchTxt
+      }
+      const res =  this.source === 'ppt'
+        ? await pptInterface.getAuthPPtList(params)
+        : await reportV2Interface.getAuthReportList(params)
           if (res.Ret !== 200) return;
           
           this.reportList = res.Data.List || [];
           this.total = res.Data.Paging.Totals;
-        })
     }
   },
 }

+ 8 - 20
src/views/report_manage/reportV2/components/reportBaseInfoDia.vue

@@ -58,6 +58,7 @@
             :placeholder="$t('ReportManage.ReportList.input_title_please')"
             v-model="formData.title"
             style="width:400px"
+            :disabled="reportInfo&&reportInfo.ReportSource===2"
           >
             <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>
@@ -90,18 +91,6 @@
           </el-select>
         </el-form-item>
 
-        <el-form-item prop="time" :label="$t('ReportManage.ReportList.label_createtime')">
-          <el-date-picker
-            v-model="formData.time"
-            type="date"
-            value-format="yyyy-MM-dd"
-            :placeholder="$t('ReportManage.ReportList.please_select_date')"
-            size="medium"
-            :clearable="false"
-            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"
@@ -114,7 +103,7 @@
 
           <el-button 
             type="text" 
-            v-if="formData.cooperationType===2"
+            v-if="formData.cooperationType===2&&(!id||(id&&reportInfo.ReportSource!==2))"
             style="margin-left: 20px"
             @click="handleChooseCooper"
           ><!-- 选择协作人 -->{{$t('ReportManage.ReportList.choose_cooper')}}</el-button>
@@ -125,7 +114,7 @@
               :key="item.NodeId"
               size="mini"
               effect="dark"
-              closable
+              :closable="(reportInfo&&reportInfo.ReportSource===2)?false:true"
               @close="removeCooper(index)"
             >
               {{ item.NodeName }}
@@ -141,9 +130,9 @@
             <el-radio :label="2"><!-- 智能布局 -->{{$t('ReportManage.ReportList.layout_smart')}}</el-radio>
           </el-radio-group>
         </el-form-item>
-        <el-form-item prop="isPublcPublish">
+        <!-- <el-form-item prop="isPublcPublish">
           <template slot="label">
-            <span><!-- 公开发布 -->{{$t('ReportManage.ReportList.label_public')}}</span>
+            <span>{{$t('ReportManage.ReportList.label_public')}}</span>
             <el-tooltip class="item" effect="dark" placement="top">
               <div slot="content" v-html="publishTip"></div>
               <i class="el-icon-info"/>
@@ -156,7 +145,7 @@
             <el-radio :label="1">{{$t('Common.yes_text')}}</el-radio>
             <el-radio :label="2">{{$t('Common.no_text')}}</el-radio>
           </el-radio-group>
-        </el-form-item>
+        </el-form-item> -->
 
       </el-form>
       <div style="text-align: center; margin-top: 60px; margin-bottom: 40px">
@@ -235,7 +224,7 @@ export default {
             abstract: this.reportInfo.Abstract,
             author: this.reportInfo.Author?this.reportInfo.Author.split(","):[],
             frequency: this.reportInfo.Frequency,
-            time: this.reportInfo.CreateTime,
+            // time: this.reportInfo.CreateTime,
             cooperationType: this.reportInfo.CollaborateType,//协作方式
             cooperationUsers: this.reportInfo.GrandAdminList
               ? this.reportInfo.GrandAdminList.map(_ => ({
@@ -247,7 +236,6 @@ export default {
             isPublcPublish: this.reportInfo.IsPublicPublish
           }
 
-          // this.getRelationPermission()
       }
     },
   },
@@ -352,7 +340,7 @@ export default {
           this.formData.author.length > 0
             ? this.formData.author.join(",")
             : "",
-        CreateTime: this.formData.time,
+        // CreateTime: this.formData.time,
         ReportLayout: this.formData.reportLayout,
         CollaborateType: this.formData.cooperationType,
         IsPublicPublish: this.formData.isPublcPublish,

+ 14 - 38
src/views/report_manage/reportV2/components/reportEditHeader.vue

@@ -1,25 +1,16 @@
 <template>
   <div class="top-action-wrap">
-    <template>
-      <el-input 
-        v-if="reportInfo&&reportInfo.ReportChapterId" 
-        v-model="reportInfo.Title"
-        style="width:240px;"
-        :placeholder="$t('ReportManage.ReportList.label_chap_name')"
-        @change="handleUpdateTitle"
-      ></el-input>
       
-      <div v-else class="title text_oneLine">{{reportInfo&&reportInfo.Title}}</div>
-    </template>
+      <div class="title text_oneLine">{{reportInfo&&reportInfo.Title}}</div>
+
     
       <ul class="action-list">
           <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>
+            class="action-item"
+            @click="goBackList"
+          >
+              <img src="~@/assets/img/smartReport/back.png" alt="">
+              <span>返回列表</span>
           </li>
           <li v-if="!reportInfo.ReportChapterId" class="action-item" @click="$emit('openBaseInfo')">
               <img src="~@/assets/img/smartReport/icon01.png" alt="">
@@ -52,16 +43,8 @@
 
         <!-- 单人报告 -->
         <template v-else>
-            <template v-if="!isApprove||!hasApproveFlow">
-                <!-- <li 
-                    class="action-item editsty" 
-                    :class="{'disabled':checkLoading}"
-                    @click="$emit('handlePublishOpt','dsfb')"
-                    v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)"
-                    >
-                    <img src="~@/assets/img/icons/timing_ico.svg" alt="">
-                    <span>{{$t('ReportManage.ReportList.scheduled_publish_btn')}}</span>
-                </li> -->
+            <!-- 系统内报告 -->
+            <template v-if="reportInfo&&reportInfo.ReportSource===1">
                 <li 
                     class="action-item editsty" 
                     :class="{'disabled':checkLoading}"
@@ -72,7 +55,8 @@
                     <span>{{$t('ReportManage.ReportList.publish_btn')}}</span>
                 </li>
             </template>
-            <template v-if="isApprove&&hasApproveFlow">
+            <!-- 来源智力共享报告 -->
+            <template v-else-if="reportInfo&&reportInfo.ReportSource===2">
                 <li 
                     class="action-item editsty" 
                     :class="{'disabled':checkLoading}"
@@ -90,9 +74,6 @@
   </div>
 </template>
 <script>
-import {
-	reportV2Interface
-} from '@/api/modules/reportV2';
 export default {
   props: {
     reportInfo: {
@@ -106,14 +87,9 @@ export default {
     }
   },
   methods:{
-    async handleUpdateTitle() {
-      let res = await reportV2Interface.saveChapterTitle({
-        ReportChapterId: this.reportInfo.ReportChapterId,
-        Title: this.reportInfo.Title
-      })
-      if(res.Ret !== 200) return
-      this.$emit('update')
-    }
+			goBackList() {
+				this.$router.replace({ path: '/reportNew' });
+			}
   },
   mounted() {
   }

+ 8 - 41
src/views/report_manage/reportV2/list.vue

@@ -53,10 +53,10 @@
                           style="width:100%;"
                           @change="filterChange"
                       >
-                        <el-option :label="$t('ReportManage.smart_unpublished')" :value="1" v-if="!isOtherApprove"></el-option>
+                          <el-option :label="$t('ReportManage.smart_unpublished')" :value="1"></el-option>
                           <el-option :label="$t('ReportManage.smart_published')" :value="2"></el-option>
-                          <el-option :label="$t('ReportManage.smart_pending')" :value="3" v-if="isApprove"></el-option>
-                          <el-option :label="$t('ReportManage.smart_awaiting_approval')" :value="4" v-if="isApprove"></el-option>
+                          <el-option :label="$t('ReportManage.smart_pending')" :value="3" ></el-option>
+                          <el-option :label="$t('ReportManage.smart_awaiting_approval')" :value="4"></el-option>
                           <el-option :label="$t('ReportManage.smart_rejected')" :value="5"></el-option>
                           <el-option :label="$t('ReportManage.smart_approved')" :value="6"></el-option>
                         </el-select>
@@ -139,27 +139,7 @@
               <div @click="lookreportdtl(scope.row)">
                 <span
                   style="cursor: pointer; color: #4099ef"
-                >{{ scope.row.Title }}</span
-                >
-                <span
-                  style="cursor: pointer; color: #4099ef"
-                  v-if="scope.row.MsgSendTime"
-                  >({{ scope.row.MsgSendTime.substring(5, 7)
-                  }}{{ scope.row.MsgSendTime.substring(8, 10) }})</span
-                >
-                <span
-                  style="cursor: pointer; color: #4099ef"
-                  v-else-if="scope.row.PublishTime"
-                  >({{ scope.row.PublishTime.substring(5, 7)
-                  }}{{ scope.row.PublishTime.substring(8, 10) }})</span
-                >
-                <span
-                  style="cursor: pointer; color: #4099ef"
-                  v-else-if="scope.row.CreateTime"
-                  >({{ scope.row.CreateTime.substring(5, 7)
-                  }}{{ scope.row.CreateTime.substring(8, 10) }})</span
-                >
-
+                >{{ scope.row.Title }}</span>
               </div>
             </template>
           </el-table-column>
@@ -190,7 +170,7 @@
             align="center"
             min-width="100"
           ></el-table-column>
-          <el-table-column :label="$t('ReportManage.smart_status_table')" align="center" v-if="isApprove">
+          <el-table-column :label="$t('ReportManage.smart_status_table')" align="center">
             <template slot-scope="scope">
                 <span v-if="scope.row.State == '1'">{{$t('ReportManage.smart_unpublished')}}</span>
                 <span v-if="scope.row.State == '2'">{{$t('ReportManage.smart_published')}}</span>
@@ -232,19 +212,7 @@
             align="center"
             :formatter="formatterColumn"
           ></el-table-column>
-          <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="hasUV?'PV / UV':'PV'"
-            align="center"
-            :render-header="renderHeader"
-            width="140"
-          >
-            <template slot-scope="scope"
-              >{{ hasUV? scope.row.Pv+'/'+scope.row.Uv:scope.row.Pv }}</template
-            >
-          </el-table-column>
+         
           <el-table-column :label="$t('Table.column_operations')" align="center" min-width="130" fixed="right">
             <!-- 操作 -->
             <template slot-scope="scope">
@@ -507,13 +475,12 @@ import {
 } 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 reportApproveConfig from "@/mixins/reportApproveConfig.js";
 import reportBaseInfo from './components/reportBaseInfoDia.vue';
 import reportPreview from './components/reportPreview.vue';
 export default {
   name:'reportV2',
   components: { reportBaseInfo,reportPreview },
-  mixins:[reportApproveConfig],
   computed: {
     exportUrlDl() {
       let url = process.env.VUE_APP_API_ROOT + "/report/report_view_record/export";
@@ -929,7 +896,7 @@ export default {
       let baseUrl= localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ReportViewUrl : '';
 			this.linkPdfUrl = item.ReportLayout===1 ? `${baseUrl}/reportshare_pdf` : `${baseUrl}/reportshare_smart_pdf`;
 
-      if(this.isApprove){
+      if(item.ReportSource===2){
         this.handlePublic(1)
         return
       }

+ 9 - 47
src/views/report_manage/reportV2/normalReport/editReport.vue

@@ -6,10 +6,7 @@
 			<chapterWrapper
 				v-show="isLeftWrapShow"
 				ref="chapterContRef"
-				:isApprove="isApprove"
-				:hasApproveFlow="hasApproveFlow"
 				@change="handleChapterInfo"
-				@checkClassifyNameArr="handleCheckClassifyNameArr"
 				@openBaseInfo="showReportBaseInfo=true"
 				@handlePreviewReport="handlePreviewReport"
 				@handlePublish="handlePublishReport"
@@ -48,8 +45,6 @@
 			<template v-else>
 					<!-- 顶部操作栏 -->
 					<editHeader
-						:isApprove="isApprove"
-						:hasApproveFlow="hasApproveFlow"
 						:reportInfo="reportInfo"
 						@handleClearContent="handleClearContent"
 						@openBaseInfo="showReportBaseInfo=true"
@@ -185,6 +180,7 @@ export default {
 			showReportBaseInfo: false,
 
 			isLeftWrapShow: true,//展开章节区
+			timer:null
 		};
 	},
 	created() {
@@ -322,8 +318,8 @@ export default {
 				
 				console.log(params);
 				//检查classifynameArr是否有审批流
-				let classify = [e.ClassifyIdFirst,e.ClassifyIdSecond,e.ClassifyIdThird]
-				this.handleCheckClassifyNameArr(classify)
+				// let classify = [e.ClassifyIdFirst,e.ClassifyIdSecond,e.ClassifyIdThird]
+				// this.handleCheckClassifyNameArr(classify)
 
 				reportedit(params).then(res=>{
 						if(res.Ret===200){
@@ -402,8 +398,8 @@ export default {
 			if(data.PrePublishTime){
 				this.taskTime=data.PrePublishTime
 			}
-			let classify = [data.ClassifyIdFirst,data.ClassifyIdSecond,data.ClassifyIdThird]
-			this.handleCheckClassifyNameArr(classify)
+			// let classify = [data.ClassifyIdFirst,data.ClassifyIdSecond,data.ClassifyIdThird]
+			// this.handleCheckClassifyNameArr(classify)
 		},
 		
 		/* 发布报告 */
@@ -415,45 +411,11 @@ export default {
 			if(tp==='dsfb'){
         this.showDSFB=true
 				return
-			}else if(tp==='submit'){
-				this.handleSubmitReport(Number(this.$route.query.id))
-				return
+			}else{
+				this.isPublishloading = true;
+				this.publishreport()
 			}
 
-			this.isPublishloading = true;
-
-			let sendMsg = this.reportCoopType===2 ? this.$refs.chapterContRef.reportBase.MsgIsSend : this.ThsMsgIsSend;
-			if(sendMsg===1){
-				this.publishreport({sendMsg: false})
-			}else {
-				const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_sendMsg)
-
-				this.$confirm(
-						isPost?this.$t('ReportManage.smart_msg.publishing_messages'):this.$t('ReportManage.smart_msg.should_published_immediately'), 
-						this.$t('ReportManage.smart_release_prompt_btn'), 
-						{
-								confirmButtonText: isPost?this.$t('ReportManage.smart_btn.push'):this.$t('ReportManage.smart_btn.publish'),
-								cancelButtonText: isPost?this.$t('ReportManage.smart_btn.not_push'):this.$t('Dialog.cancel_btn'),
-								type: 'warning',
-								distinguishCancelAndClose:true,
-						
-								beforeClose:(action, instance,done)=>{
-										if(action==='close') {
-												//右上角
-												this.isPublishloading = false;
-										} else if(action==='cancel') {
-												//cancelButton
-												if(isPost) this.publishreport({sendMsg: false});
-										}else {
-												//confirmButton
-												this.publishreport({sendMsg: isPost?true:false})
-										}
-										done()
-								}
-						}
-				)
-
-			}
 		},
 
 		//发布报告
@@ -466,7 +428,7 @@ export default {
 
 				if (res.Ret !== 200) return
 
-				sendMsg && reportMessageSend({ReportId: Number(this.$route.query.id)})
+				// sendMsg && reportMessageSend({ReportId: Number(this.$route.query.id)})
 
 				this.$message.success(this.$t('MsgPrompt.publish_msg'))
 				setTimeout(() => {

+ 2 - 2
src/views/report_manage/reportV2/normalReport/reportdtl.vue

@@ -16,10 +16,10 @@
 			<!-- 章节报告 -->
 			<block v-if="reportInfo.CollaborateType===2">
 				<div class="chapter-item" v-for="item in reportInfo.ChapterList" :key="item.ReportChapterId">
-					<div style="margin-bottom:10px">
+					<!-- <div style="margin-bottom:10px">
 						<span class="type" v-if="item.TypeName">{{item.TypeName}}</span>
 						<span class="title">{{item.Title}}</span>
-					</div>
+					</div> -->
 					<div id="resetcss" style="overflow:hidden;" v-html="item.Content"></div>
 				</div>
 			</block>

+ 7 - 50
src/views/report_manage/reportV2/smartReport/editReport.vue

@@ -5,10 +5,7 @@
 			<chapterWrapper
 				v-show="isLeftWrapShow"
                 ref="chapterContRef"
-                :isApprove="isApprove"
-				:hasApproveFlow="hasApproveFlow"
 				@change="handleChapterInfo"
-				@checkClassifyNameArr="handleCheckClassifyNameArr"
 				@openBaseInfo="showReportBaseInfo=true"
 				@handlePreviewReport="handlePreviewReport"
                 @handlePublish="handlePublishOpt"
@@ -47,8 +44,6 @@
             <template v-else>
                 <!-- 顶部操作栏 -->
                 <editHeader
-                    :isApprove="isApprove"
-                    :hasApproveFlow="hasApproveFlow"
                     :reportInfo="reportInfo"
                     @handleClearContent="handleClearContent"
                     @openBaseInfo="showReportBaseInfo=true"
@@ -971,8 +966,8 @@ export default {
             }
             console.log(params);
             //检查classifynameArr是否有审批流
-            let classify = [e.ClassifyIdFirst,e.ClassifyIdSecond,e.ClassifyIdThird]
-            this.handleCheckClassifyNameArr(classify)
+            // let classify = [e.ClassifyIdFirst,e.ClassifyIdSecond,e.ClassifyIdThird]
+            // this.handleCheckClassifyNameArr(classify)
 
             reportedit({...params}).then(res=>{
                 if(res.Ret===200){
@@ -1046,8 +1041,8 @@ export default {
                     this.$nextTick(()=>{
                         this.contentChange=false
                     })
-                    let classify = [res.Data.ClassifyIdFirst,res.Data.ClassifyIdSecond]
-                    this.handleCheckClassifyNameArr(classify)
+                    // let classify = [res.Data.ClassifyIdFirst,res.Data.ClassifyIdSecond]
+                    // this.handleCheckClassifyNameArr(classify)
                 }
             })
         },
@@ -1168,44 +1163,8 @@ export default {
             if(type==='dsfb'){
                 this.showDSFB=true
                 return
-            }
-            // 发布
-            if(type==='submit'){
-                this.submitReport()
-                return
-            }
-            //截止至ETA1.3.8 智能研报无推送模板消息,所有的reportInfo.MsgIsSend都为1
-            let sendMsg = this.reportCoopType===2 ? this.$refs.chapterContRef.reportBase.MsgIsSend : this.reportInfo.MsgIsSend;
-            if(sendMsg===1){//该报告已经推送过模板消息
-                this.reportPublish({sendMsg:false})
-            }else{
-                const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.reportManageBtn.reportManage_sendMsg)
-                this.$confirm(
-                    isPost?this.$t('ReportManage.smart_msg.publishing_messages'):this.$t('ReportManage.smart_msg.should_published_immediately'), 
-                    this.$t('ReportManage.smart_release_prompt_btn'), 
-                    {
-                        confirmButtonText: isPost?this.$t('ReportManage.smart_btn.push'):this.$t('ReportManage.smart_btn.publish'),
-				        cancelButtonText: isPost?this.$t('ReportManage.smart_btn.not_push'):this.$t('Dialog.cancel_btn'),
-                        type: 'warning',
-                        distinguishCancelAndClose:true,
-                    
-                        beforeClose:(action, instance,done)=>{
-                            if(action==='close') {
-                                //右上角
-                                // this.isPublishloading = false;
-                            } else if(action==='cancel') {
-                                //cancelButton
-                                if(isPost){
-                                    this.reportPublish({sendMsg:false})
-                                }
-                            }else {
-                                //confirmButton
-                                this.reportPublish({sendMsg:isPost?true:false})
-                            }
-                            done()
-                        }
-                    }
-                )
+            }else {
+                this.reportPublish()
             }
         },
         //提交报告
@@ -1306,9 +1265,7 @@ export default {
                 ReportUrl:this.generatePdfLinks()
             }).then(res=>{
                 if(res.Ret===200){
-                    if(sendMsg){
-                        this.reportSendMsg()
-                    }
+
                     this.$message.success(this.$t('MsgPrompt.publish_msg'))
 
                     setTimeout(() => {

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

@@ -35,10 +35,10 @@
                 <!-- 章节报告 -->
                 <template v-if="reportInfo&&reportInfo.CollaborateType===2&&!$route.query.chapterId">
                     <div class="chapter-item" v-for="item in reportInfo.ChapterList" :key="item.ReportChapterId">
-                        <div style="margin-bottom:10px">
+                        <!-- <div style="margin-bottom:10px">
                             <span class="type" v-if="item.TypeName">{{item.TypeName}}</span>
                             <span class="title">{{item.Title}}</span>
-                        </div>
+                        </div> -->
                         <div class="html-wrap" v-html="item.Content"></div>
                     </div>
                 </template>
@@ -117,13 +117,6 @@ export default {
 			}
 			return str
 		},
-        //是否开启审批流,若开启,导图按钮在非已审批的状态不显示
-        isApprove(){
-            const type = this.$setting.dynamicOutLinks.ApprovalFlow ||
-                        this.$store.state.dynamicOutLinks.ApprovalFlow ||
-                        JSON.parse(localStorage.getItem('dynamicOutLinks')).ApprovalFlow||''
-            return ['2','3'].includes(type)
-        }
     },
     props:{
         reportId:{//审批详情-预览报告

+ 4 - 4
src/views/system_manage/etaBaseConfig.vue

@@ -194,7 +194,7 @@
                             
                         </div>
                         <!-- 研报审批 -->
-                        <div v-if="isShowApprove">
+                        <!-- <div v-if="isShowApprove">
                             <div style="width:100%;margin-bottom: 20px;">
                                 <span style="color:#606266;">{{$t('SystemManage.BaseConfig.report_approval')}}</span> 
                                 <el-switch v-model="approve"></el-switch>
@@ -214,7 +214,7 @@
                                     </el-radio-group>
                                 </el-form-item>
                             </div>
-                        </div>
+                        </div> -->
 
                         
 
@@ -792,7 +792,7 @@ export default {
                 const {WatermarkChart='',UseXf='',IsReportApprove='',CnPptCoverImgs='',EnPptCoverImgs='',IsBIApprove=''} = res.Data
                 this.checkList = WatermarkChart==='true'?['研报图表']:[]
                 this.Iflytek = UseXf==='true'?true:false
-                this.approve = IsReportApprove==='true'?true:false
+                // this.approve = IsReportApprove==='true'?true:false
                 this.BIApprove = IsBIApprove==='true'?true:false
                 if(res.Data){
                     // this.$set(this,'formData',res.Data)
@@ -847,7 +847,7 @@ export default {
                     this.formData.LoginEmailTemplateContent = this.formData.LoginEmailTemplateContent.replace(/<p data-f-id=\"pbf\".*?<\/p>/g, "");
                     this.formData.WatermarkChart = ''+(this.checkList.includes('研报图表')?true:false)
                     this.formData.UseXf = ''+(this.Iflytek?true:false)
-                    this.formData.IsReportApprove = ''+(this.approve?true:false)
+                    // this.formData.IsReportApprove = ''+(this.approve?true:false)
                     this.formData.IsBIApprove = ''+(this.BIApprove?true:false)
                     const CnPptCoverImgs = this.formData.CnPptCoverImgs.join(',')
                     const EnPptCoverImgs = this.formData.EnPptCoverImgs.join(',')

Some files were not shown because too many files changed in this diff