Browse Source

分类接口

shanbinzhang 6 days ago
parent
commit
030ebe803b

+ 18 - 12
src/views/classify_manage/classifylistV2.vue

@@ -130,7 +130,7 @@
                             </el-tooltip>
                         </template>
 
-                        <el-select v-model="classifyForm.reportType" style="width:400px">
+                        <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>
@@ -232,10 +232,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: {
@@ -312,10 +310,11 @@ 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
+                }
         },
 
         // 去设置章节
@@ -346,24 +345,27 @@ export default {
             }
         },
         async handleEdit(item){
-            
+            console.log(item)
             this.classifyForm={
                 show:true,
                 classify_id:item.Id,
                 classify_name:item.ClassifyName,
                 parent_id: item.ParentId,
                 isLastLevel: !item.Child,
-                reportType: 1,
-                isReportWarn: 0,
-                warnTime:'09:00:00'
+                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 
@@ -391,7 +393,11 @@ export default {
             await this.$confirm('分类删除后不可恢复,是否确认删除?', '提示', {
                 type: 'warning'
             })
-
+            const res = await classifydelete({ClassifyId:item.ClassifyId})
+            
+            if(res.Ret!==200) return
+            this.$message.success('删除成功')
+            this.getList()
             
         },
 

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

@@ -33,7 +33,8 @@
           </el-tooltip>
         </li>
         
-        <template v-if="!isApprove">
+        <!-- 系统内报告 -->
+        <template v-if="reportBase.ReportSource===1">
             <li 
                 class="action-item" 
                 :class="{'disabled':puiblishLoading}"
@@ -49,7 +50,8 @@
                 </el-tooltip>
             </li>
         </template>
-        <template v-if="isApprove">
+        <!-- 来源智力共享报告 -->
+        <template v-else-if="reportBase.ReportSource===2">
             <li 
                 class="action-item" 
                 :class="{'disabled':puiblishLoading}"

+ 4 - 12
src/views/report_manage/reportV2/components/reportEditHeader.vue

@@ -1,12 +1,5 @@
 <template>
   <div class="top-action-wrap">
-      <!-- <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 class="title text_oneLine">{{reportInfo&&reportInfo.Title}}</div>
 
@@ -49,7 +42,8 @@
 
         <!-- 单人报告 -->
         <template v-else>
-            <template v-if="!isApprove">
+            <!-- 系统内报告 -->
+            <template v-if="reportInfo&&reportInfo.ReportSource===1">
                 <li 
                     class="action-item editsty" 
                     :class="{'disabled':checkLoading}"
@@ -60,7 +54,8 @@
                     <span>{{$t('ReportManage.ReportList.publish_btn')}}</span>
                 </li>
             </template>
-            <template v-if="isApprove">
+            <!-- 来源智力共享报告 -->
+            <template v-else-if="reportInfo&&reportInfo.ReportSource===2">
                 <li 
                     class="action-item editsty" 
                     :class="{'disabled':checkLoading}"
@@ -78,9 +73,6 @@
   </div>
 </template>
 <script>
-import {
-	reportV2Interface
-} from '@/api/modules/reportV2';
 export default {
   props: {
     reportInfo: {

+ 1 - 1
src/views/report_manage/reportV2/list.vue

@@ -896,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(item.IsGN){
+      if(item.ReportSource===2){
         this.handlePublic(1)
         return
       }

+ 0 - 4
src/views/report_manage/reportV2/normalReport/editReport.vue

@@ -6,8 +6,6 @@
 			<chapterWrapper
 				v-show="isLeftWrapShow"
 				ref="chapterContRef"
-				:isApprove="isApprove"
-				:hasApproveFlow="hasApproveFlow"
 				@change="handleChapterInfo"
 				@openBaseInfo="showReportBaseInfo=true"
 				@handlePreviewReport="handlePreviewReport"
@@ -47,8 +45,6 @@
 			<template v-else>
 					<!-- 顶部操作栏 -->
 					<editHeader
-						:isApprove="isApprove"
-						:hasApproveFlow="hasApproveFlow"
 						:reportInfo="reportInfo"
 						@handleClearContent="handleClearContent"
 						@openBaseInfo="showReportBaseInfo=true"

+ 0 - 4
src/views/report_manage/reportV2/smartReport/editReport.vue

@@ -5,8 +5,6 @@
 			<chapterWrapper
 				v-show="isLeftWrapShow"
                 ref="chapterContRef"
-                :isApprove="isApprove"
-				:hasApproveFlow="hasApproveFlow"
 				@change="handleChapterInfo"
 				@openBaseInfo="showReportBaseInfo=true"
 				@handlePreviewReport="handlePreviewReport"
@@ -46,8 +44,6 @@
             <template v-else>
                 <!-- 顶部操作栏 -->
                 <editHeader
-                    :isApprove="isApprove"
-                    :hasApproveFlow="hasApproveFlow"
                     :reportInfo="reportInfo"
                     @handleClearContent="handleClearContent"
                     @openBaseInfo="showReportBaseInfo=true"