Selaa lähdekoodia

报告列表全分类

Karsa 11 kuukautta sitten
vanhempi
commit
a3c04ac47d

+ 2 - 2
src/views/classify_manage/chapterSettingV2.vue

@@ -69,7 +69,7 @@
                     :placeholder="$t('ReportManage.CategoryList.related_variety_inputhint')"></el-input>
                 </el-form-item>
                 <!-- 关联品种 -->
-                <el-form-item prop="variety" :label="$t('ReportManage.CategoryList.related_variety')">
+                <el-form-item prop="variety" :label="$t('ReportManage.CategoryList.related_variety')" v-if="reportVarietyList.length">
                     <template slot="label">
                         <el-tooltip class="item" effect="dark" :content="$t('ReportManage.CategoryList.related_variety_hint')">
                             <div>
@@ -79,7 +79,6 @@
                         </el-tooltip>
                     </template>
                     <el-cascader
-                        v-if="reportVarietyList.length"
                         :options="reportVarietyList" 
                         v-model="addForm.ChartPermissionIdList" 
                         :placeholder="$t('ReportManage.CategoryList.related_variety_inputhint')"
@@ -149,6 +148,7 @@ export default {
             this.addDialogShow=true
             this.addForm.ReportChapterTypeName=''
             this.addForm.ChartPermissionIdList=''
+            this.addForm.ReportChapterTypeId=0
             console.log(this.addForm);
         },
 

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

@@ -160,7 +160,7 @@
                 placeholder="请输入章节名称"
               />
           </el-form-item>
-          <el-form-item prop="editors">
+          <el-form-item prop="varietys">
               <template slot="label">
                   <el-tooltip class="item" effect="dark" :content="$t('ReportManage.CategoryList.related_variety_hint')">
                       <div>
@@ -211,7 +211,7 @@
       </div>
       <div slot="footer" style="margin-top: 20px;">
         <el-button
-          @click="isOpenChapterDia=false"
+          @click="$refs.formRef.resetFields();isOpenChapterDia=false"
           style="width: 132px; height: 40px"
         ><!-- 取消 -->{{$t('Dialog.cancel_btn')}}</el-button>
         <el-button
@@ -480,6 +480,8 @@ export default {
 
     /* 保存章节编辑 */
     async handleSaveChapter() {
+      await this.$refs.formRef.validate()
+
       let params = {
         Title: this.chapterInfo.chapterName,
         PermissionIdList: this.chapterInfo.varietys,

+ 23 - 18
src/views/report_manage/reportV2/components/reportBaseInfoDia.vue

@@ -39,6 +39,11 @@
             ref="cascader"
             :options="classifyArr"
             v-model="formData.classify"
+            :props="{
+              value: 'Id',
+              label: 'ClassifyName',
+              children: 'Child'
+            }"
             :placeholder="$t('ReportManage.ReportList.please_select_category')"
             size="medium"
             style="width: 400px"
@@ -526,24 +531,24 @@ export default {
 
       classifylist(params).then((res) => {
         if (res.Ret == 200 && Array.isArray(res.Data.List)) {
-          this.classifyOptions = [];
-          res.Data.List.forEach(item => {
-            let newitem = {
-              label: item.ClassifyName,
-              value: item.Id,
-            };
-            if (item.Child) {
-              let childnode = [];
-              item.Child.forEach((itemchild, i) => {
-                childnode.push({
-                  label: itemchild.ClassifyName,
-                  value: itemchild.Id,
-                });
-              });
-              newitem.children = childnode;
-            }
-            this.classifyArr.push(newitem);
-          });
+          this.classifyArr = res.Data.List||[];
+          // res.Data.List.forEach(item => {
+          //   let newitem = {
+          //     label: item.ClassifyName,
+          //     value: item.Id,
+          //   };
+          //   if (item.Child) {
+          //     let childnode = [];
+          //     item.Child.forEach((itemchild, i) => {
+          //       childnode.push({
+          //         label: itemchild.ClassifyName,
+          //         value: itemchild.Id,
+          //       });
+          //     });
+          //     newitem.children = childnode;
+          //   }
+          //   this.classifyArr.push(newitem);
+          // });
         }
       });
     },

+ 29 - 20
src/views/report_manage/reportV2/list.vue

@@ -33,6 +33,11 @@
                           @change="filterChange"
                           :options="classifyOptions"
                           v-model="searchform.classifyIds"
+                          :props="{
+                            value: 'Id',
+                            label: 'ClassifyName',
+                            children: 'Child'
+                          }"
                           clearable
                           :placeholder="$t('ReportManage.smart_type_filtering')"
                           style="width:100%;"
@@ -627,6 +632,8 @@ export default {
 
       isShowPreview: false,//预览报告弹窗
       previewReportInfo: {},
+
+      linkPdfUrl: '',//生成pdf链接的url
     }
   },
   mounted(){
@@ -650,24 +657,24 @@ export default {
 
       classifylist(params).then((res) => {
         if (res.Ret == 200 && Array.isArray(res.Data.List)) {
-          this.classifyOptions = [];
-          res.Data.List.forEach(item => {
-            let newitem = {
-              label: item.ClassifyName,
-              value: item.Id,
-            };
-            if (item.Child) {
-              let childnode = [];
-              item.Child.forEach((itemchild, i) => {
-                childnode.push({
-                  label: itemchild.ClassifyName,
-                  value: itemchild.Id,
-                });
-              });
-              newitem.children = childnode;
-            }
-            this.classifyOptions.push(newitem);
-          });
+          this.classifyOptions = res.Data.List||[];
+          // res.Data.List.forEach(item => {
+          //   let newitem = {
+          //     label: item.ClassifyName,
+          //     value: item.Id,
+          //   };
+          //   if (item.Child) {
+          //     let childnode = [];
+          //     item.Child.forEach((itemchild, i) => {
+          //       childnode.push({
+          //         label: itemchild.ClassifyName,
+          //         value: itemchild.Id,
+          //       });
+          //     });
+          //     newitem.children = childnode;
+          //   }
+          //   this.classifyOptions.push(newitem);
+          // });
         }
       });
     },
@@ -932,6 +939,9 @@ export default {
       this.publishReportCode = item.ReportCode
       this.isDSFB=item.PrePublishTime?true:false
 
+      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){
         this.handlePublic(1)
         return
@@ -978,8 +988,7 @@ export default {
       });
     },
     generatePdfLinks(Code){
-			const baseUrl= localStorage.getItem('dynamicOutLinks') ? JSON.parse(localStorage.getItem('dynamicOutLinks')).ReportViewUrl : '';
-			return `${baseUrl}/reportshare_pdf?code=${Code}&flag=${this.waterMarkStr}`
+			return `${this.linkPdfUrl}?code=${Code}&flag=${this.waterMarkStr}`
 		},
 
     //取消发布

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

@@ -478,6 +478,7 @@ export default {
                 path: '/smartReportDetail',
                 query:{
                     id:this.$route.query.id,
+                    chapterId: this.reportInfo.ReportChapterId,
                     type:'preview'
                 }
             });

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

@@ -30,7 +30,7 @@
             <!-- 内容 -->
             <template>
                 <!-- 章节报告 -->
-                <template v-if="reportInfo&&reportInfo.CollaborateType===2">
+                <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">
                             <span class="type" v-if="item.TypeName">{{item.TypeName}}</span>
@@ -307,7 +307,7 @@ div{
     }
     .main-box{
         width: 800px;
-        padding: 20px;
+        padding: 20px 20px 20px 44px;
         margin: 20px auto;
         border: 1px solid var(--gary-gy-5-line, #C8CDD9);
         border-radius: 4px;