Browse Source

切分支删注释

shanbinzhang 2 days ago
parent
commit
4688844821

+ 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


+ 10 - 5
src/views/classify_manage/classifylistV2.vue

@@ -62,13 +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 type="text" style="color:#f00" @click.stop="handleDel(data)" v-permission="permissionBtn.classifyBtn.classifyList_cnClassify_delete">删除</el-button>
+                        <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>
@@ -308,7 +313,7 @@ export default {
             }
         },
 
-        /* 添加分类默认关联父级品种 */
+        /* 添加分类默认关联父级报告类型 */
         async changeClassify(id) {
                 let item = this.$refs.classifyRef.getCheckedNodes(true)
                 console.log(item)
@@ -345,7 +350,6 @@ export default {
             }
         },
         async handleEdit(item){
-            console.log(item)
             this.classifyForm={
                 show:true,
                 classify_id:item.Id,
@@ -390,10 +394,11 @@ export default {
 
         /* 删除分类 */
         async handleDel(item) {
+            console.log(item)
             await this.$confirm('分类删除后不可恢复,是否确认删除?', '提示', {
                 type: 'warning'
             })
-            const res = await classifydelete({ClassifyId:item.ClassifyId})
+            const res = await classifydelete({ClassifyId:item.Id})
             
             if(res.Ret!==200) return
             this.$message.success('删除成功')

+ 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数据失败!'}

+ 52 - 91
src/views/ppt_manage/newVersion/components/catalog/addPptBaseDia.vue

@@ -42,7 +42,8 @@
             :props="{
               value: 'Id',
               label: 'ClassifyName',
-              children: 'Child'
+              children: 'Child',
+              emitPath: false
             }"
             :placeholder="$t('ReportManage.ReportList.please_select_category')"
             size="medium"
@@ -120,14 +121,14 @@
     <!-- 选择继承报告弹窗 -->
     <chooseInherReportDia
       :isShow.sync="isChooseInherReport"
+      source="ppt"
       @success="chooseInheritReport"
     />
   </div>
 </template>
 
 <script>
-import { apiSmartReport } from "@/api/modules/smartReport";
-import { reportV2Interface,classifylist,reportadd } from '@/api/modules/reportV2.js';
+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 {
@@ -160,11 +161,7 @@ export default {
           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],
+            classify: this.reportInfo.ClassifyId,
             title: this.reportInfo.Title,
             cooperationType: this.reportInfo.CollaborateType,//协作方式
             cooperationUsers: this.reportInfo.GrandAdminList
@@ -183,7 +180,7 @@ export default {
       formData: {
         type: 1,
         inheritId: 0,//继承report id
-        classify: [],
+        classify: 0,
         title: "",
         cooperationType: 1,//协作方式
         cooperationUsers: []
@@ -196,7 +193,7 @@ export default {
       isChooseCooperaUser: false,
 
       //继承报告弹窗
-      isChooseInherReport:false
+      isChooseInherReport:false,
     };
   },
   computed: {
@@ -232,7 +229,7 @@ export default {
       this.formData = {
         type: 1,
         inheritId: 0,
-        classify: [],
+        classify: 0,
         title: "",
         cooperationType: 1,//协作方式
         cooperationUsers: []
@@ -246,59 +243,25 @@ export default {
 
       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: "",
+        ClassifyId: this.formData.classify,
         Title: this.formData.title,
-        Abstract: this.formData.abstract,
-        Author:
-          this.formData.author.length > 0
-            ? this.formData.author.join(",")
-            : "",
-        ReportLayout: this.formData.reportLayout,
         CollaborateType: this.formData.cooperationType,
-        IsPublicPublish: this.formData.isPublcPublish,
-        InheritReportId: this.formData.inheritId,
-        GrantAdminIdList: this.formData.cooperationUsers.map(_ => _.NodeId)
+        InheritPptId: this.formData.inheritId,
+        CollaborateUserIds: 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;
       }
-      reportadd(params).then((res) => {
+      pptInterface.addpptV2(params).then((res) => {
         if (res.Ret === 200) {
 
           let { href } = this.$router.resolve({
             path: '/ppteditor',
             query: { 
-              id: res.Data.ReportId
+              id: res.Data.PptId
             },
           });
           window.open(href, "_blank");
@@ -309,65 +272,54 @@ export default {
     },
 
 
-    //分类变化 获取关联品种 
+    //分类变化 
     handleChangeClassify(val) {
-      this.formData.type!==1&&this.handleUpdateBaseInfo()
+      this.formData.type===2&&this.handleUpdateBaseInfo()
     },
 
     handleUpdateBaseInfo() {
       this.formData.inheritId = 0;
 
-      if(!this.formData.classify.length) return
+      if(!this.formData.classify) return
 
       
       //获取上次报告
-      reportV2Interface
-        .getAuthReportList({
-          ClassifyIdFirst: this.formData.classify[0],
-          ClassifyIdSecond: this.formData.classify[1],
-          ClassifyIdThird: this.formData.classify[2],
-          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;
-          }
+      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])
-        });
+        this.chooseInheritReport(res.Data.List[0])
+      });
     },
 
     /* 选择继承报告 */
     async chooseInheritReport(item) {
-      const { Id,Title,Abstract,Author,CollaborateType,ReportLayout,IsPublicPublish,ClassifyIdFirst,ClassifyIdSecond,ClassifyIdThird } = item;
+      const { PptId,Title,CollaborateType,CollaborateUsers,ClassifyId } = item;
 
       this.formData.title = Title;
       this.formData.cooperationType = CollaborateType;
-      this.formData.inheritId = Id;
-      this.formData.classify = ClassifyIdThird
-        ? [ClassifyIdFirst,ClassifyIdSecond,ClassifyIdThird]
-        : ClassifyIdSecond 
-        ? [ClassifyIdFirst,ClassifyIdSecond]
-        : [ClassifyIdFirst]
+      this.formData.inheritId = PptId;
+      this.formData.classify = ClassifyId
       
       //继承的章节报告默认带出协作人
       if(CollaborateType===1) {
         this.formData.cooperationUsers = [];
       }else {
-        const res = await reportV2Interface.getRportBase({
-          ReportId: Id
-        })
-        if(res.Ret!==200) return
-        
-        this.formData.cooperationUsers = res.Data.GrandAdminList
-          ? res.Data.GrandAdminList.map(_ => ({
+       
+        this.formData.cooperationUsers = CollaborateUsers
+          ? CollaborateUsers.map(_ => ({
               NodeId: _.AdminId,
-              NodeName: _.AdminName
+              NodeName: _.RealName
             }))
           : [];
       }
@@ -414,14 +366,23 @@ export default {
     // 获取分类
     getclassifylist() {
       //获取分类列表
-      let params = { CurrentIndex: 0, PageSize: 1000, KeyWord: "",Enabled:1 };
-
-      classifylist(params).then((res) => {
-        if (res.Ret == 200 && Array.isArray(res.Data.List)) {
-          this.classifyArr = res.Data.List||[];
+      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>

+ 142 - 209
src/views/ppt_manage/newVersion/components/catalog/mergePPTDialog.vue

@@ -12,53 +12,48 @@
       <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>
@@ -74,7 +69,7 @@
             <el-form-item prop="classify" :label="$t('ReportManage.ReportList.label_report_classify')">
               <el-cascader
                 ref="cascader"
-                :options="classifyOptions"
+                :options="privateClassifyList"
                 v-model="pptInfo.classify"
                 :props="{
                   value: 'Id',
@@ -87,10 +82,10 @@
               />
             </el-form-item>
 
-            <el-form-item prop="title" :label="$t('ReportManage.ReportList.label_report_tit')">
+            <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"
+                v-model="pptInfo.Title"
                 style="width:400px"
               >
               </el-input>
@@ -149,9 +144,7 @@
 
 <script>
 import {pptInterface} from '@/api/api.js';
-import {pptEnInterface} from '@/api/modules/pptEnApi.js';
 import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
-import { classifylist } from '@/api/modules/reportV2.js';
 import {changeCatalogArr,createRandomCode} from '../../utils/untils';
 import chooseCooperaUserDia from '@/views/report_manage/reportV2/components/chooseCooperaUserDia.vue';
 export default {
@@ -169,26 +162,23 @@ export default {
         ImgUrl:'',//读取etaBaseConfig中封面页的第一个
         BackIndex:0,
         TemplateType:1,
-        classify: [],
-        title: "",
+        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: [
           {
@@ -197,7 +187,7 @@ export default {
             trigger: "change",
           },
         ],
-        title: [
+        Title: [
           {
             required: true,
             message: '报告标题不能为空',
@@ -205,6 +195,9 @@ export default {
           },
         ],
       },
+
+      panelSource: 1,
+      searchClassifyId:0,
       //协作人弹窗
       isChooseCooperaUser: false,
     };
@@ -213,10 +206,9 @@ export default {
     mergePptShow(newValue){
       if(newValue){
         this.init()
-        this.getCatalogsList()
-        this.getPrivateList()
+        this.getCatalogsList('init')
+        this.getPPtList()
         this.getBaseConfig()
-        this.getclassifylist();
       }
       if(!newValue){
         if(this.saveLoading){
@@ -226,16 +218,23 @@ export default {
     }
   },
   methods: {
-    // 获取分类
-    getclassifylist() {
-      //获取分类列表
-      let params = { CurrentIndex: 0, PageSize: 1000, KeyWord: "",Enabled:1 };
 
-      classifylist(params).then((res) => {
-        if (res.Ret == 200 && Array.isArray(res.Data.List)) {
-          this.classifyOptions = res.Data.List||[];
-        }
-      });
+    //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) {
@@ -249,10 +248,7 @@ export default {
     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){
@@ -269,14 +265,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:{
@@ -291,7 +285,7 @@ export default {
       if(this.choosedIdArr.length!==2){
         return {result:false,msg: this.$t('Slides.please_select_two_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:''}
@@ -300,26 +294,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=>{
@@ -329,17 +318,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.addppt({
+          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
@@ -351,84 +352,45 @@ 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
-        }
+        
+        treeName==='list' && this.catalogPPTList.forEach(_ => {
+          if(_.PptId===i.PptId) {
+            _.checked = 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})
+    async getCatalogsList(type=''){
+      const res = await pptInterface.getCatalogsListV2({Source: 3})
       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
-        })
+        this.classifyOptions = res.Data||[]
+        this.filterNode(this.classifyOptions)
+
+        type==='init' && (this.privateClassifyList = this.classifyOptions)
       }
     },
-    //获取私有PPT目录
-    async getPrivateList(){
-      const res = this.$parent.currentLang!=='en'
-        ? await pptInterface.getPrivateCatalogList()
-        : await pptEnInterface.getPrivateCatalogList()
-      if(res.Ret===200){
-        this.MyPrivateList = res.Data.List||[]
-        this.selectedCatalogId = this.MyPrivateList[0].GroupId
-      }
+    filterNode(arr) {
+      arr.forEach(item => {
+        if(item.Child&&item.Child.length) {
+          this.filterNode(item.Child)
+        }else {
+          delete item.Child
+        }
+      })
     },
 
     //重置data的值
@@ -478,7 +440,7 @@ export default {
           font-size: 14px;
           color:#999999FF;
           &.is-active{
-            color: #409EFF
+            color: #0052D9;
           }
         }
         .el-tabs__nav-wrap.is-top{
@@ -513,33 +475,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{
@@ -618,25 +553,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;
               }
             }
           }

+ 80 - 152
src/views/ppt_manage/newVersion/pptCatalog.vue

@@ -42,20 +42,14 @@
           ref="publicTree"
           class="target-tree"
           :empty-text="$t('Slides.no_categories_empty')"
-          :data="publicList"
+          :data="classifyList"
           node-key="nodeKeyId"
           :expand-on-click-node="false"
           :default-expanded-keys="publicExpandKeys"
           @node-expand="(data,node,item)=>{handleNodeExpand(data,node,item)}"
           @node-collapse="(data,node,item)=>{handleNodeCollapse(data,node,item)}"
           @current-change="(data,node)=>{nodeChange(data,node)}"
-        >
-          <span class="custom-tree-node" slot-scope="{ data }"
-            @mouseover="data.copyIconShow=true" @mouseout="data.copyIconShow=false"
-          >
-            <span class="tree-label">{{ data.label }}</span>
-          </span>
-        </el-tree>
+        ></el-tree>
 
       </div>
       <span class="slide-icon slide-left" @click="slideHandle">
@@ -80,7 +74,7 @@
             @start="dragStartHandler"
             @update="dragenter"
             @end="moveListPPT"
-            :disabled="(treeName==='private'&&!selectNode)||treeName!=='private'"
+            :disabled="treeName!=='private'"
             >
             <div class="list-item" 
                 v-for="item in catalogPPTList" :key="item.PptId"
@@ -88,7 +82,7 @@
                 <div class="item-image" 
                     :style="{'background-image':`url(${require('@/assets/img/ppt_m/list_bg.png')})`}">
                         <span>{{item.Title}}</span>
-                        <div class="status">{{getReportStatus(1)}}</div>
+                        <div class="status">{{getReportStatus(item.State)}}</div>
                 </div>
                 <div class="item-opt">
 
@@ -128,14 +122,18 @@
             <div> 创建人:{{pptItem.AdminRealName}}</div>
             <div>
               更新时间:<br/>
-              {{$moment(pptItem.PptModifyTime).format('YYYY-MM-DD HH:mm:ss')}}
+              {{$moment(pptItem.ModifyTime).format('YYYY-MM-DD HH:mm:ss')}}
             </div>
-            <div>
+            <div v-if="pptItem.ReportSource===1&&pptItem.PublishTime">
               发布时间:<br/>
               {{$moment(pptItem.PublishTime).format('YYYY-MM-DD HH:mm:ss')}}
             </div>
+            <div v-else-if="pptItem.ReportSource===2&&pptItem.ApproveTime">
+              审批时间:<br/>
+              {{$moment(pptItem.ApproveTime).format('YYYY-MM-DD HH:mm:ss')}}
+            </div>
             <div>
-              报告状态:{{getReportStatus(1)}}
+              报告状态:{{getReportStatus(pptItem.State)}}
 
             </div>
           </div>
@@ -219,7 +217,7 @@ export default {
   data() {
     return {
       toolList,
-      publicList:[],//公共目录
+      classifyList:[],//目录
       privateList:[],//我的目录
       catalogPPTList:[],//目录的ppt列表
    
@@ -233,11 +231,15 @@ export default {
       dragPpt:null,//当前拖拽的ppt
       dragPrepPpt:null,//ppt拖拽后,在它前面的ppt
       dragNextPpt:null,//ppt拖拽后,在它后面的ppt
-      publicExpandKeys:[],//公共ppt目录默认展开的项
+      publicExpandKeys:[],//目录默认展开的项
       searchOptions:[],//ppt搜索项
       searchTitle:'',
       mergePptShow:false,//合并ppt弹窗
 
+      total: 0,
+      pageSize: 50,
+      pageNo: 1,
+
       //添加ppt弹窗
       isAddPptBaseShow:false
 
@@ -257,37 +259,24 @@ export default {
       return  Number(localStorage.getItem('AdminId'))
     },
 
+    panelSource() {
+      let tabSourceMap = new Map([
+        ['private',1],
+        ['shared',2],
+        ['public',3],
+      ])
+
+      return tabSourceMap.get(this.treeName)
+    }
+
   },
   watch:{
     searchTitle(newVal){
-      let data = null
-      let search='private'
-      this.privateList.forEach((item)=>{
-        item.children.forEach(i=>{
-            if(i.PptId===newVal){
-                data = i
-                search='private'
-            }
-        })
-      })
-      if(!data){
-        this.publicList.forEach((item)=>{
-            item.children.forEach(i=>{
-                if(i.PptId===newVal){
-                    data = i
-                    search='public'
-                }
-            })
-        })
-      }
+      let data = this.searchOptions.find(_ =>_.PptId===newVal);
+      
       if(data){
-        this.treeName = search;
-        //选中该节点
-        this.$refs[`${search}Tree`].setCurrentKey('ppt'+newVal)
-        //展开该节点的父节点...
-        const node = this.$refs[`${search}Tree`].getCurrentNode()
-        this[`${search}ExpandKeys`].push(node.catalogId)
-        this.nodeChange(data,_,search)
+        // this.treeName = data.AdminId===this.RoleId ? 'private' : data.HasAuth ? 'shared' : 'public';
+        this.changeModel('ppt',data)
       }
       this.searchOptions=[]
     },
@@ -324,20 +313,23 @@ export default {
           //找到该节点的父节点,展开,获取父节点id
           const node = this.$refs.publicTree.getCurrentNode()
           if(!node) return
-          !this.publicExpandKeys.includes(node.catalogId)&&this.publicExpandKeys.push(node.catalogId)
-          this.pptItem.catalogId = node.catalogId||''
+          !this.publicExpandKeys.includes(node.ClassifyId)&&this.publicExpandKeys.push(node.ClassifyId)
+          this.pptItem.ClassifyId = node.ClassifyId||''
           this.selectNode = item
         })
       }else{
-        //获取目录下的ppt列表:getCatalogListByGroupId/getCatalogListByAdminId
-        const res = await pptInterface.getCatalogListByAdminId({ AdminId:item.AdminId||''})
+
+        const res = await pptInterface.getPptListV2({
+          PageSize: this.pageSize,
+          CurrentIndex: this.pageNo,
+          Source: this.panelSource,
+          ClassifyId: item.Id,
+          Keyword: ''
+        })
           
         if(res.Ret!==200) return
         this.catalogPPTList = res.Data.List.map(item=>{
           item.nodeKeyId = 'ppt'+item.PptId //避免和目录id重复的情况
-          //item.isTrans = item.ReportId===0?false:true
-          //需求池272 PPT可转多次报告,PPT和转的报告不做同步
-          item.isTrans = false
           return item
         })
       }
@@ -366,14 +358,13 @@ export default {
     getAuthToolList(item) {
       const {checkPermissionBtn,pptPermission} = this.permissionBtn
       const btnAuthMap = {
-          'cancel':checkPermissionBtn(pptPermission.ppt_publish)&&item.source==='gn',
-          'submit':checkPermissionBtn(pptPermission.ppt_publish)&&item.source==='gn',
-          'publish':checkPermissionBtn(pptPermission.ppt_publish)&&item.source!=='gn',
+          'cancel':checkPermissionBtn(pptPermission.ppt_publish)&&item.HasAuth&&item.ReportSource===2,
+          'submit':checkPermissionBtn(pptPermission.ppt_publish)&&item.HasAuth&&item.ReportSource===2,
+          'publish':checkPermissionBtn(pptPermission.ppt_publish)&&item.HasAuth&&item.ReportSource===1,
           'present':checkPermissionBtn(pptPermission.ppt_show),
           'download':checkPermissionBtn(pptPermission.ppt_download),
-          'edit':checkPermissionBtn(pptPermission.ppt_save),
-          'delete':checkPermissionBtn(pptPermission.ppt_del),
-          // &&item.AdminId===this.RoleId
+          'edit':checkPermissionBtn(pptPermission.ppt_save)&&item.HasAuth,
+          'delete':checkPermissionBtn(pptPermission.ppt_del)&&item.HasAuth,
       }
 
       return toolList.filter((i)=>btnAuthMap[i.key]) 
@@ -539,74 +530,7 @@ export default {
         $('.ppt-item').css('height',$('.ppt-item').width()*0.7);
       })
     },
-    //判断节点是否能拖拽:目录和ppt均可拖拽
-    checkAllowDrag(node){
-      return true
-    },
-
-    //ppt拖动事件
-    /**
-     * item:当前拖动的ppt;
-     * target:拖动后进入的目录or ppt;
-     * position:当前拖动ppt放置的位置(before,after,inner) 
-     *  如果target是目录,则position只能是inner;如果tatger是ppt,则position为before/after
-     *  其他情况在checkAllowDrop已排除
-     */
-    handleDragPpt(item,target,position){
-      let preGroupPptId=0,nextGroupPptId=0
-      let targetIndexByCatalog = 0
-      //console.log('item',item.data.catalogId,item.data.GroupPptId,'target',target.data.GroupPptId,'position',position)
-      //target为目录
-      if(target.level===1){
-        preGroupPptId=0
-        nextGroupPptId=0
-      }
-      //target为ppt
-      if(target.level===2){
-        //找到拖动后,item在哪个目录下
-        //item.catalogId是ppt对应的目录id,在changeCatalogArr中赋值
-        const catalogId = item.data.catalogId===target.data.catalogId?item.data.catalogId:target.data.catalogId
-        const catalog = this.privateList.find(i=>i.GroupId===catalogId)
-        //找到target在该目录下的哪个位置
-        targetIndexByCatalog = catalog.PptList.findIndex(i=>i.PptId===target.data.PptId)
-        //position:before && targetIndexByCatalog===0
-        //说明拖动后,item在该目录下置顶
-        if(position==='before'&&targetIndexByCatalog===0){
-          preGroupPptId=0
-          nextGroupPptId=catalog.PptList[targetIndexByCatalog].GroupPptId
-        }
-        //position:before && targetIndexByCatalog!==0
-        //说明拖动后,item不在目录下第一个
-        if(position==='before'&&targetIndexByCatalog!==0){
-          preGroupPptId=catalog.PptList[targetIndexByCatalog-1].GroupPptId
-          nextGroupPptId=catalog.PptList[targetIndexByCatalog].GroupPptId
-        }
-        //position:after && targetIndexByCatalog=== list.length-1
-        //说明拖动后,item在该目录下置底
-        if(position==='after'&&targetIndexByCatalog===catalog.PptList.length-1){
-          preGroupPptId=catalog.PptList[targetIndexByCatalog].GroupPptId
-          nextGroupPptId=0
-        }
-        //position:after && targetIndexByCatalog!==list.length-1
-        //说明拖动后,item不在目录下第一个
-        if(position==='after'&&targetIndexByCatalog!==catalog.PptList.length-1){
-          preGroupPptId=catalog.PptList[targetIndexByCatalog].GroupPptId
-          nextGroupPptId=catalog.PptList[targetIndexByCatalog+1].GroupPptId
-        }  
-      }
-      //console.log('preGroupPptId',preGroupPptId,'nextGroupPptId',nextGroupPptId)
-      pptInterface.movePPT({
-        GroupId:target.level===1?target.data.GroupId:target.data.catalogId,
-        GroupPptId:item.data.GroupPptId,
-        PrevGroupPptId:preGroupPptId,
-        NextGroupPptId:nextGroupPptId
-      }).then(res=>{
-        if(res.Ret===200){
-          this.$message.success(this.$t('Slides.move_success_msg') )
-          this.getCatalogsList()
-        }
-      })
-    },
+    
     //ppt列表拖动事件
     //拖动开始,记录当前拖动的ppt
     dragStartHandler({oldIndex}){
@@ -640,17 +564,17 @@ export default {
         return
       }
       //movePPT
-      pptInterface.movePPT({
-        GroupPptId:this.dragPpt.GroupPptId,
-        GroupId:this.selectNode.GroupId,
-        PrevGroupPptId:this.dragPrepPpt?this.dragPrepPpt.GroupPptId:0,
-        NextGroupPptId:this.dragNextPpt?this.dragNextPpt.GroupPptId:0
-      }).then(res=>{
-        if(res.Ret===200){
-          this.$message.success(this.$t('Slides.move_success_msg') )
-          this.getCatalogsList()
-        }
-      })
+      // pptInterface.movePPT({
+      //   GroupPptId:this.dragPpt.PptId,
+      //   GroupId:this.selectNode.ClassifyId,
+      //   PrevGroupPptId:this.dragPrepPpt?this.dragPrepPpt.PptId:0,
+      //   NextGroupPptId:this.dragNextPpt?this.dragNextPpt.PptId:0
+      // }).then(res=>{
+      //   if(res.Ret===200){
+      //     this.$message.success(this.$t('Slides.move_success_msg') )
+      //     this.getCatalogsList()
+      //   }
+      // })
     },
     //节点展开事件
     handleNodeExpand(data,node,item){
@@ -665,12 +589,19 @@ export default {
 
     //搜索ppt标题
     searchHandle(keyword){
-      //searchPPT->searchPPTByKeyWorld
-      pptInterface.searchPPTByKeyWorldV2({
-        Keyword:keyword
+      pptInterface.getPptListV2({
+        Keyword:keyword,
+        PageSize: 100,
+        CurrentIndex: 1,
+        Source: this.panelSource,
+        ClassifyId: 0,
       }).then(res=>{
         if(res.Ret===200){
-          this.searchOptions = res.Data.List||[]
+          let data = res.Data.List||[]
+          this.searchOptions = data.map(item=>{
+            item.nodeKeyId = 'ppt'+item.PptId //避免和目录id重复的情况
+            return item
+          })
         }
       })
     },
@@ -700,17 +631,10 @@ export default {
 
     //获取所有目录
     async getCatalogsList(){
-      const res = await pptInterface.getCatalogsList()
-      const currentKey = this.$refs.publicTree.getCurrentKey()
+      const res = await pptInterface.getCatalogsListV2({Source: this.panelSource})
       if(res.Ret===200){
-        const {PublicList,PrivateList,GrantList} = res.Data
-        this.publicList = 
-          this.treeName==='public' ? changeCatalogArr(PublicList)
-          : this.treeName==='private' ? changeCatalogArr(PrivateList)
-          : changeCatalogArr(GrantList)
-
+        this.classifyList = changeCatalogArr(res.Data||[])
         this.$nextTick(()=>{
-          this.$refs.publicTree.setCurrentKey(currentKey)
           if(this.selectNode&&this.selectNode.GroupId){
             this.changeModel('list',this.selectNode)
           }else if(!this.selectNode){
@@ -719,17 +643,21 @@ export default {
         })
       }
     },
+
     //检测当前账号是否有私有目录
     handleOpenMergeDialog(){
-      if(this.privateList.length===0){
-        this.$message.warning(this.$t('Slides.add_table_msg') )
-      }else{
+      // if(this.privateList.length===0){
+      //   this.$message.warning(this.$t('Slides.add_table_msg') )
+      // }else{
         this.mergePptShow = true
-      }
+      // }
     },
 
     //切换tab时,展开选中tab的全部目录
     handleTabClick(){
+      this.selectNode = null;
+      this.publicExpandKeys = [];
+      this.searchTitle = '';
       this.getCatalogsList()
     },
 
@@ -1021,7 +949,7 @@ export default {
           padding: 16px 12px;
           border-bottom: 2px solid rgba($color: #333333, $alpha: 0.03);
           >div {
-            margin: 5px 0;
+            margin: 7px 0;
           }
         }
         .tool-list-operation{

+ 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()
       }
     },

+ 13 - 13
src/views/ppt_manage/newVersion/utils/untils.js

@@ -266,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

+ 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;
-        })
     }
   },
 }

+ 3 - 14
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 }}

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

@@ -7,8 +7,9 @@
       <ul class="action-list">
           <li 
             class="action-item"
-            >
-              <img src="" alt="">
+            @click="goBackList"
+          >
+              <img src="~@/assets/img/smartReport/back.png" alt="">
               <span>返回列表</span>
           </li>
           <li v-if="!reportInfo.ReportChapterId" class="action-item" @click="$emit('openBaseInfo')">
@@ -86,6 +87,9 @@ export default {
     }
   },
   methods:{
+			goBackList() {
+				this.$router.replace({ path: '/reportNew' });
+			}
   },
   mounted() {
   }

+ 5 - 38
src/views/report_manage/reportV2/normalReport/editReport.vue

@@ -180,6 +180,7 @@ export default {
 			showReportBaseInfo: false,
 
 			isLeftWrapShow: true,//展开章节区
+			timer:null
 		};
 	},
 	created() {
@@ -410,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()
-								}
-						}
-				)
-
-			}
 		},
 
 		//发布报告
@@ -461,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(() => {

+ 3 - 41
src/views/report_manage/reportV2/smartReport/editReport.vue

@@ -1163,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()
             }
         },
         //提交报告
@@ -1301,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(() => {