Browse Source

Merge branch 'gn2.1' into debug

shanbinzhang 10 hours ago
parent
commit
495c4710a5

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

@@ -105,8 +105,29 @@ export const reportV2Interface = {
 	 */
 	saveChapterTitle: params => {
 		return http.post('/report/chapter/title/edit',params)
+	},
+
+	/**
+	 * 研报通知
+	 * @param {*} params 
+	 * @returns 
+	 */
+	getReportNotice: params => {
+		return http.get('/report/message/list',params)
+	},
+	
+
+	/**
+	 * 通知已读
+	 * @param {*} params 
+	 * @returns 
+	 */
+	readReportNotice: params => {
+		return http.post('/report/message/read',params)
 	}
 
+
+
 }
 
 

+ 58 - 5
src/components/notificationMsg.vue

@@ -118,10 +118,41 @@
                 </div>
             </div>
         </m-dialog>
+
+
+        <!-- 驳回弹窗 -->
+        <m-dialog
+            :show.sync="isOpenRejectDia"
+            width="40%"
+            title="驳回意见"
+            @close="isOpenRejectDia = false"
+            center
+        >
+
+            <ul class="notice-reject-container" v-if="rejectInfo">
+                <li>
+                    <label>报告标题:</label>
+                    <div>{{rejectInfo.ApproveMsg.Title}}</div>
+                </li>
+                <li>
+                    <label>驳回人: </label>
+                    <div>{{rejectInfo.ApproveMsg.ApproveUserName}}</div>
+                </li>
+                <li>
+                    <label>被驳回意见:</label>
+                    <div>{{rejectInfo.ApproveMsg.ApproveRemark}}</div>
+                </li>
+            </ul>
+
+            <span slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="isOpenRejectDia = false">知道了</el-button>
+            </span>
+        </m-dialog>
     </div>
 </template>
 
 <script>
+import { reportV2Interface } from '@/api/modules/reportV2';
 import {approveInterence} from '@/api/modules/approve.js';
 import { operateAuthInterface } from '@/api/modules/setApi';
 import {etaBaseConfigInterence} from '@/api/modules/etaBaseConfigApi.js';
@@ -151,10 +182,14 @@ export default {
                 SubSource: 0,
             },
             tabsShow:{
-              first:false, //研报
+              first:true, //研报
               second:false, //BI
               third:true, //资产
             },
+
+            //驳回弹窗
+            isOpenRejectDia:false,
+            rejectInfo: null
         };
     },
     computed: {
@@ -216,6 +251,15 @@ export default {
         }
     },
     methods:{
+        handleReportNotice(item) {
+            if(item.ReportState===4) {
+                return this.$message.warning('报告已提交,无需编辑!')
+            }else if(item.ReportState===5) {
+                this.isOpenRejectDia = true;
+                this.rejectInfo = item
+            }
+        },
+
         async handleTabs(){
             return new Promise(async resolve=>{
                 const res = await etaBaseConfigInterence.getBaseConfig()
@@ -224,7 +268,7 @@ export default {
                 let isETAApprove = (IsReportApprove==='true'?true:false) && ReportApproveType==='eta'
                 let IsBIApprove_v = IsBIApprove==='true'?true:false
                 
-                if(isETAApprove) this.tabsShow.first = true;
+                // if(isETAApprove) this.tabsShow.first = true;
                 if(IsBIApprove_v) this.tabsShow.second = true;
                 if(!tabNames.includes(this.activeName)){//默认选中第一个显示的tab   
                     this.activeName = Object.entries(this.tabsShow).filter(_=>_[1])[0][0] || 'third'; 
@@ -234,7 +278,7 @@ export default {
         },
         async readMsg(msg){
             const res = this.activeName === 'first'    
-                ? await approveInterence.readApproveMsg({MessageId:msg.Id})
+                ? await reportV2Interface.readReportNotice({MessageId:msg.Id})
                 : this.activeName === 'second' ? await approveInterence.readBiApproveMsg({MessageId:msg.Id})
                   : await operateAuthInterface.redMessage({ MessageId: msg.DataPermissionMessageId })
 
@@ -242,7 +286,8 @@ export default {
             this.getMsgList()
             this.getUnreadNum()
 
-            if(this.activeName === 'first' || this.activeName === 'second'){
+            this.activeName === 'first' && this.handleReportNotice(msg)
+            if(this.activeName === 'second'){
                 const type = msg.ApproveState===1?'approve':msg.ApproveState===4?'detail':'myself' 
                 this.$router.push({
                     path:'/approveDetail',
@@ -257,7 +302,7 @@ export default {
         },
         async getMsgList(){
             const res = this.activeName === 'first' 
-                ? await approveInterence.getApproveMsgList({
+                ? await reportV2Interface.getReportNotice({
                     CurrentIndex:1,
                     PageSize:1000
                 })
@@ -424,4 +469,12 @@ export default {
         margin-top: 30px;
     }
 }
+
+.notice-reject-container {
+    padding:  0 30px;
+    li {
+        margin: 20px 0;
+        font-size: 15px;
+    }
+}
 </style>

+ 4 - 4
src/views/ppt_manage/newVersion/pptCatalog.vue

@@ -385,12 +385,12 @@ export default {
       const {checkPermissionBtn,pptPermission} = this.permissionBtn
       const btnAuthMap = {
           'cancel':checkPermissionBtn(pptPermission.ppt_publish)&&item.HasAuth&&item.ReportSource===2,
-          'submit':checkPermissionBtn(pptPermission.ppt_publish)&&item.HasAuth&&item.ReportSource===2,
+          'submit':checkPermissionBtn(pptPermission.ppt_publish)&&item.HasAuth&&item.ReportSource===2&&item.State===3,
           '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)&&item.HasAuth,
-          'delete':checkPermissionBtn(pptPermission.ppt_del)&&item.HasAuth,
+          'download':checkPermissionBtn(pptPermission.ppt_download)&&[2,6].includes(item.State),
+          'edit':checkPermissionBtn(pptPermission.ppt_save)&&item.HasAuth&&item.State===1,
+          'delete':checkPermissionBtn(pptPermission.ppt_del)&&item.HasAuth&&item.ReportSource===1&&item.State===1,
       }
 
       return toolList.filter((i)=>btnAuthMap[i.key]) 

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

@@ -1166,7 +1166,7 @@ export default {
       }
       //检验每一页
       for(let i=0;i<this.pageList.length;i++){
-        if(!this.pageList[i].title){
+        if(!this.pageList[i].title||this.pageList[i].title==='<br>'){
           return {result:false,hintText:this.$t('Slides.please_ppt_title_msg',{count:i+1}) }
         }
         //无内容

+ 4 - 4
src/views/ppt_manage/newVersion/utils/config.js

@@ -609,10 +609,10 @@ export const pptCoverEn = [
 export const pptBaseSize = {width:906,height:906*0.7}
 //ppt列表操作项
 export const toolList = [
-    {
-        label:'撤销',
-        key:'cancel'
-    },
+    // {
+    //     label:'撤销',
+    //     key:'cancel'
+    // },
     {
         label:'提交',
         key:'submit'

+ 2 - 2
src/views/report_manage/reportV2/components/chapterEditWrapper.vue

@@ -139,9 +139,9 @@
                       :command="{type:'del',item}"
                       v-if="isCreator"
                     ><!-- 删除 -->{{$t('Table.delete_btn')}}</el-dropdown-item>
-                    <el-dropdown-item 
+                    <!-- <el-dropdown-item 
                       :command="{type:'adTag',item}" 
-                      v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportMange_chapter_editTag)"><!-- 添加标签 -->{{$t('ReportManage.ReportList.add_labels_section')}}</el-dropdown-item>
+                      v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportMange_chapter_editTag)">{{$t('ReportManage.ReportList.add_labels_section')}}</el-dropdown-item> -->
                     
                   </el-dropdown-menu>
                 </el-dropdown>