Просмотр исходного кода

章节报告有权限直接进入编辑

Karsa 9 месяцев назад
Родитель
Сommit
887d5a83f1

+ 4 - 0
src/assets/img/icons/publish_ico.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M4.74769 17.4324C4.19134 17.4317 3.658 17.2233 3.2646 16.8528C2.8712 16.4823 2.64985 15.98 2.64908 15.4561C2.64908 14.3664 3.59054 13.4798 4.74769 13.4798H10.1965C10.2716 13.0217 10.4212 12.5773 10.6401 12.1622H7.85772L9.28769 8.59764C9.3011 8.58447 9.31451 8.55921 9.3285 8.53451C9.36916 8.46974 9.39556 8.39792 9.40613 8.32334C9.41669 8.24876 9.4112 8.17294 9.38999 8.1004C9.36877 8.02785 9.33226 7.96008 9.28264 7.90111C9.23301 7.84213 9.17129 7.79318 9.10115 7.75715C8.63788 7.50327 8.25371 7.13905 7.98725 6.70107C7.72079 6.26309 7.58142 5.76679 7.58315 5.26202C7.58315 3.68204 8.94142 2.40346 10.6063 2.40346C12.2835 2.40346 13.6411 3.69357 13.6411 5.27464C13.6405 5.77884 13.5002 6.27415 13.2342 6.71171C12.9682 7.14927 12.5857 7.51396 12.1243 7.76978C12.0975 7.78185 12.0707 7.79448 12.0573 7.81918C11.8183 7.99486 11.7512 8.30778 11.9115 8.55921C11.9244 8.58447 11.9506 8.60862 11.964 8.63388L12.5983 10.2122C12.9629 10.0179 13.3529 9.86893 13.7583 9.76917L13.2162 8.43405C13.6411 8.12561 13.9983 7.74225 14.2678 7.30534C14.6541 6.68603 14.8562 5.98024 14.8531 5.26202C14.8564 4.73596 14.7487 4.21452 14.5361 3.72802C14.3236 3.24153 14.0104 2.79968 13.6149 2.42816C12.8157 1.66343 11.7512 1.25005 10.6063 1.25005C10.0467 1.24751 9.49211 1.35043 8.97532 1.55276C8.45853 1.75508 7.98994 2.05273 7.59714 2.42816C6.80253 3.18152 6.3573 4.20072 6.35896 5.26257C6.35896 5.97734 6.55891 6.69212 6.94424 7.30588C7.22405 7.74507 7.58315 8.13375 8.00987 8.44722L6.50819 12.1622H4.74769C4.28837 12.1622 3.83354 12.2474 3.40918 12.4129C2.98482 12.5785 2.59924 12.8211 2.27445 13.127C1.94966 13.4328 1.69202 13.7959 1.51625 14.1956C1.34047 14.5952 1.25 15.0235 1.25 15.4561C1.25 15.8887 1.34047 16.317 1.51625 16.7166C1.69202 17.1163 1.94966 17.4794 2.27445 17.7852C2.59924 18.0911 2.98482 18.3337 3.40918 18.4993C3.83354 18.6648 4.28837 18.75 4.74769 18.75H15C13.7211 18.7511 12.4932 18.2778 11.5822 17.4324H4.74769Z" fill="#0052D9"/>
+<path d="M14.3747 10C12.0124 10 10 11.6502 10 13.7503C10 15.7751 11.9252 17.5 14.3747 17.5C16.8248 17.5 18.75 15.8504 18.75 13.7503C18.75 11.6502 16.7376 10 14.3747 10ZM16.3871 13.3004H14.9002V16.225H13.9376V13.3004H12.4501L14.3747 11.2003L16.3871 13.3004Z" fill="#0052D9"/>
+</svg>

+ 4 - 0
src/assets/img/icons/timing_ico.svg

@@ -0,0 +1,4 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M9.375 5V10.4862L12.5003 13.75L13.3842 12.8661L10.625 9.96839V5H9.375Z" fill="#0052D9"/>
+<path d="M18.75 10C18.75 14.8325 14.8325 18.75 10 18.75C5.16751 18.75 1.25 14.8325 1.25 10C1.25 5.16751 5.16751 1.25 10 1.25C14.8325 1.25 18.75 5.16751 18.75 10ZM17.5 10C17.5 5.85786 14.1421 2.5 10 2.5C5.85786 2.5 2.5 5.85786 2.5 10C2.5 14.1421 5.85786 17.5 10 17.5C14.1421 17.5 17.5 14.1421 17.5 10Z" fill="#0052D9"/>
+</svg>

+ 14 - 0
src/assets/img/icons/wx_round.svg

@@ -0,0 +1,14 @@
+<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g clip-path="url(#clip0_6030_16278)">
+<path d="M6.23633 7.52735C6.23633 7.70094 6.30529 7.86743 6.42804 7.99018C6.55079 8.11293 6.71728 8.18189 6.89087 8.18189C7.06447 8.18189 7.23096 8.11293 7.35371 7.99018C7.47646 7.86743 7.54542 7.70094 7.54542 7.52735C7.54542 7.35375 7.47646 7.18727 7.35371 7.06451C7.23096 6.94176 7.06447 6.8728 6.89087 6.8728C6.71728 6.8728 6.55079 6.94176 6.42804 7.06451C6.30529 7.18727 6.23633 7.35375 6.23633 7.52735Z" fill="#50B674"/>
+<path d="M9.16357 7.50904C9.16357 7.68263 9.23253 7.84912 9.35529 7.97187C9.47804 8.09462 9.64452 8.16358 9.81812 8.16358C9.99172 8.16358 10.1582 8.09462 10.281 7.97187C10.4037 7.84912 10.4727 7.68263 10.4727 7.50904C10.4727 7.33544 10.4037 7.16896 10.281 7.0462C10.1582 6.92345 9.99172 6.85449 9.81812 6.85449C9.64452 6.85449 9.47804 6.92345 9.35529 7.0462C9.23253 7.16896 9.16357 7.33544 9.16357 7.50904Z" fill="#50B674"/>
+<path d="M10.7998 10.4365C10.7998 10.557 10.8477 10.6726 10.9329 10.7579C11.0182 10.8431 11.1338 10.891 11.2543 10.891C11.3749 10.891 11.4905 10.8431 11.5758 10.7579C11.661 10.6726 11.7089 10.557 11.7089 10.4365C11.7089 10.3159 11.661 10.2003 11.5758 10.1151C11.4905 10.0298 11.3749 9.98193 11.2543 9.98193C11.1338 9.98193 11.0182 10.0298 10.9329 10.1151C10.8477 10.2003 10.7998 10.3159 10.7998 10.4365Z" fill="#50B674"/>
+<path d="M13.1089 10.4726C13.1089 10.5932 13.1568 10.7088 13.242 10.794C13.3273 10.8793 13.4429 10.9272 13.5634 10.9272C13.684 10.9272 13.7996 10.8793 13.8848 10.794C13.9701 10.7088 14.018 10.5932 14.018 10.4726C14.018 10.3521 13.9701 10.2364 13.8848 10.1512C13.7996 10.066 13.684 10.0181 13.5634 10.0181C13.4429 10.0181 13.3273 10.066 13.242 10.1512C13.1568 10.2364 13.1089 10.3521 13.1089 10.4726Z" fill="#50B674"/>
+<path d="M10 0C4.47273 0 0 4.47273 0 10C0 15.5273 4.47273 20 10 20C15.5273 20 20 15.5273 20 10C20 4.47273 15.5273 0 10 0ZM8.29091 12.3091C7.76364 12.3091 7.34545 12.2 6.81818 12.0909L5.34545 12.8182L5.76364 11.5636C4.70909 10.8364 4.09091 9.89091 4.09091 8.72727C4.09091 6.72727 5.98182 5.16364 8.29091 5.16364C10.3455 5.16364 12.1636 6.41818 12.5273 8.10909C12.4 8.09091 12.2545 8.09091 12.1273 8.09091C10.1273 8.09091 8.56364 9.58182 8.56364 11.4182C8.56364 11.7273 8.61818 12.0182 8.69091 12.2909C8.54545 12.2909 8.41818 12.3091 8.29091 12.3091ZM14.4364 13.7818L14.7455 14.8364L13.6 14.2C13.1818 14.3091 12.7636 14.4182 12.3455 14.4182C10.3455 14.4182 8.78182 13.0545 8.78182 11.3818C8.78182 9.70909 10.3455 8.34545 12.3455 8.34545C14.2364 8.34545 15.9091 9.70909 15.9091 11.3818C15.9091 12.3091 15.2909 13.1455 14.4364 13.7818Z" fill="#50B674"/>
+</g>
+<defs>
+<clipPath id="clip0_6030_16278">
+<rect width="20" height="20" fill="white"/>
+</clipPath>
+</defs>
+</svg>

+ 1 - 1
src/views/approve_manage/approveEdit.vue

@@ -118,7 +118,7 @@ export default {
                 ReportType:classify[0],
                 ClassifyFirstId:classify[1]||0,
                 ClassifySecondId:classify[2]||0,
-                ClassifyThirdId:classify[classify.length-1]||0,
+                ClassifyThirdId:classify[3]||0,
                 Nodes
             }
             let res

+ 76 - 30
src/views/report_manage/reportV2/components/chapterEditWrapper.vue

@@ -5,17 +5,32 @@
 
       <ul class="handle-list">
         <li v-if="reportBase.ReportLayout===2&&isCreator" @click="openTerritorySet">
-          <img src="~@/assets/img/icons/submit_ico.svg" alt="">
-          <el-button type="text"><!-- 版图设置 -->{{$t('ReportManage.ReportList.img_set_btn')}}</el-button>
+          <el-tooltip
+            effect="dark" 
+            :content="$t('ReportManage.ReportList.information_title')" 
+            placement="top"
+          >
+            <i class="el-icon-setting" style="color:#0052D9;font-size:20px;"></i>
+          </el-tooltip>
         </li>
 
         <li @click="$emit('openBaseInfo')" v-if="isCreator">
-          <img src="~@/assets/img/icons/baseinfo_ico.svg" alt="">
-          <el-button type="text"><!-- 基础信息 -->{{$t('ReportManage.ReportList.information_title')}}</el-button>
+          <el-tooltip
+            effect="dark" 
+            :content="$t('ReportManage.ReportList.information_title')" 
+            placement="top"
+          >
+            <img src="~@/assets/img/icons/baseinfo_ico.svg" class="handle-icon" alt="">
+          </el-tooltip>
         </li>
         <li @click="$emit('handlePreviewReport')">
-          <img src="~@/assets/img/icons/preview_ico.svg" alt="">
-          <el-button type="text"><!-- 预览 -->{{$t('ReportManage.ReportList.preview_btn')}}</el-button>
+          <el-tooltip
+            effect="dark" 
+            :content="$t('ReportManage.ReportList.preview_btn')" 
+            placement="top"
+          >
+            <img src="~@/assets/img/icons/preview_ico.svg" class="handle-icon" alt="">
+          </el-tooltip>
         </li>
         
         <template v-if="!isApprove||!hasApproveFlow">
@@ -25,8 +40,13 @@
                 @click="handlePublishReport('dsfb')"
                 v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)&&isCreator"
                 >
-                <img src="~@/assets/img/icons/submit_ico.svg" alt="">
-                <el-button type="text">{{$t('ReportManage.ReportList.scheduled_publish_btn')}}</el-button>
+                  <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>
             <li 
                 class="action-item" 
@@ -34,8 +54,13 @@
                 @click="handlePublishReport('fb')"
                 v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)&&isCreator"
             >
-                <img src="~@/assets/img/icons/submit_ico.svg" alt="">
-                <el-button type="text">{{$t('ReportManage.ReportList.publish_btn')}}</el-button>
+                <el-tooltip
+                  effect="dark" 
+                  :content="$t('ReportManage.ReportList.publish_btn')" 
+                  placement="top"
+                >
+                  <img src="~@/assets/img/icons/publish_ico.svg" class="handle-icon" alt="">
+                </el-tooltip>
             </li>
         </template>
         <template v-if="isApprove&&hasApproveFlow">
@@ -45,8 +70,13 @@
                 @click="handlePublishReport('submit')"
                 v-if="permissionBtn.checkPermissionBtn(permissionBtn.reportManageBtn.reportManage_publish)&&isCreator"
             >
-                <img src="~@/assets/img/icons/submit_ico.svg" alt="">
-                <el-button type="text"><!--提交  -->{{$t('ReportManage.ReportList.submission_btn')}}</el-button>
+              <el-tooltip
+                effect="dark" 
+                :content="$t('ReportManage.ReportList.submission_btn')" 
+                placement="top"
+              >
+                <img src="~@/assets/img/icons/submit_ico.svg" class="handle-icon" alt="">
+              </el-tooltip>
             </li>
         </template>
       </ul>
@@ -87,13 +117,15 @@
                   trigger="click"
               >   
                   <img style="width:150px" :src="item.QRCodeImg" alt="">
-                  <i 
-                    slot="reference" 
-                    class="el-icon-share" 
+
+                  <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)"
-                  ></i>
+                  />
               </el-popover>
             </div>
 
@@ -111,15 +143,15 @@
                 <img
                   src="~@/assets/img/data_m/move_ico.png"
                   alt=""
-                  style="width: 16px; height: 16px;"
+                  style="width: 16px; height: 16px;margin-right:5px;"
                 />
 
-                <i 
+                <!-- <i 
                   class="el-icon-edit editsty" 
                   v-if="item.CanEdit&&item.IsAuth" 
                   @click.stop="chooseChapter(item,'edit')"
                   style="font-size: 18px;margin:0 10px;"
-                />
+                /> -->
                 
                 <el-dropdown 
                   trigger="click" 
@@ -441,27 +473,33 @@ export default {
       this.reportBase.CanvasColor = info.bgColor;
     },
 
+    async handleMarkOver(ReportChapterId=0) {
+      await markReport({
+        Status: 3,
+        ReportId: Number(this.$route.query.id),
+        ReportChapterId,
+      });
+    },
 
     //选择章节 预览
-    async chooseChapter(item,type='') {
-      this.selectChapterId = item.ReportChapterId;
-      this.editChapterId = type==='edit'?item.ReportChapterId:0;
+    async chooseChapter(item) {
+      this.editChapterId && this.handleMarkOver(this.editChapterId);
 
-      if(type === 'edit') {
+      if(item.IsAuth) {
          //编辑前标记一下
           const res = await markReport({
             Status: 1,
             ReportId: Number(this.$route.query.id),
-            ReportChapterId: this.editChapterId
+            ReportChapterId: item.ReportChapterId
           });
           
           if (res.Ret === 200) {
-            if (res.Data.Status == 1) {
+            if (res.Data.Status === 1) {
               this.$message.warning(res.Data.Msg || "该研报正在编辑,不可重复编辑");
               item.CanEdit = false;
               item.Editor = res.Data.Editor || "";
               return;
-            } else if (res.Data.Status == 0) {
+            } else if (res.Data.Status === 0) {
               item.CanEdit = true;
               item.Editor = res.Data.Editor || "";
             }
@@ -469,6 +507,11 @@ export default {
             this.$message.error(res.ErrMsg || "未知错误,请稍后重试");
             return;
           }
+
+        this.editChapterId = item.ReportChapterId;
+        this.selectChapterId = item.ReportChapterId;
+      }else {
+        this.selectChapterId = item.ReportChapterId;
       }
 
       this.$emit('change',{ selectChapterId: this.selectChapterId,editChapterId:this.editChapterId })
@@ -732,10 +775,9 @@ export default {
   .box-top {
     padding-bottom: 0;
     .handle-list {
-      margin-top: 30px;
+      margin: 30px 0 10px;
       display: flex;
-      /* flex-wrap: wrap; */
-      gap: 0 10px;
+      gap: 0 20px;
       li { 
         cursor: pointer;display: flex;align-items: center;
           &.disabled {
@@ -743,7 +785,11 @@ export default {
               cursor: not-allowed;
               color:#999;
           }
-    }
+          .handle-icon {
+            width: 18px;
+            height: 18px;
+          }
+      }
     }
   }
   .box-main {

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

@@ -881,24 +881,26 @@ export default {
     //编辑报告
     async editreport(item, type) {
 
-      //编辑前标记一下
-      const res = await markReport({
-        Status: 1,
-        ReportId: item.Id,
-      });
-      if (res.Ret === 200) {
-        if (res.Data.Status == 1) {
-          this.$message.warning(res.Data.Msg || "该研报正在编辑,不可重复编辑");
-          item.CanEdit = false;
-          item.Editor = res.Data.Editor || "";
-          return;
-        } else if (res.Data.Status == 0) {
-          item.CanEdit = true;
-          item.Editor = res.Data.Editor || "";
-        }
-      } else {
-        this.$message.error(res.ErrMsg || "未知错误,请稍后重试");
-        return;
+      if(item.CollaborateType===1) {
+        //编辑前标记一下
+          const res = await markReport({
+            Status: 1,
+            ReportId: item.Id,
+          });
+          if (res.Ret === 200) {
+            if (res.Data.Status == 1) {
+              this.$message.warning(res.Data.Msg || "该研报正在编辑,不可重复编辑");
+              item.CanEdit = false;
+              item.Editor = res.Data.Editor || "";
+              return;
+            } else if (res.Data.Status == 0) {
+              item.CanEdit = true;
+              item.Editor = res.Data.Editor || "";
+            }
+          } else {
+            this.$message.error(res.ErrMsg || "未知错误,请稍后重试");
+            return;
+          }
       }
 
       sessionStorage.setItem("searchform", JSON.stringify(this.searchform));

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

@@ -149,6 +149,7 @@ import {
 	getChapterReportIsLast,
 	reportMessageSend
 } from '@/api/modules/reportV2';
+import { getPublicSettingsApi } from '@/api/modules/oldApi';
 import http from '@/api/http.js';
 import mixinMsg from './mixins/messagePush'
 import reportMixin from './mixins/reportMixin';
@@ -186,6 +187,7 @@ export default {
 	},
 	created() {
 		this.reportCoopType = Number(this.$route.query.coopType)
+		this.getPublicSettings()
 	},
 	mounted() {
 		
@@ -211,6 +213,8 @@ export default {
 	methods: {
 		/* 当前章节信息 */
 		handleChapterInfo({ selectChapterId,editChapterId }) {
+			this.timer && clearInterval(this.timer);
+
 			this.selectChapterId = selectChapterId;
 			this.editChapterId = editChapterId;
 			
@@ -278,6 +282,7 @@ export default {
       if (res.Ret === 200) {
         this.$message.success(this.$t('MsgPrompt.publish_msg'))
 
+				this.$refs.chapterContRef.handleMarkOver(this.reportInfo.ReportChapterId)
         setTimeout(() => {
 					this.timer && clearInterval(this.timer);
           this.$router.go(-1);
@@ -570,6 +575,14 @@ export default {
 				}
 			});
 		},
+
+		/* 获取动态配置 外部动态链接 */
+		async getPublicSettings() {
+				const res =  await getPublicSettingsApi();
+				if(res.Ret !== 200) return
+				
+				this.$store.commit('SET_DYNAMIC_LINK',res.Data)
+		},
 	},
 };
 </script>

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

@@ -3,7 +3,7 @@
 		<header>{{reportInfo.Title}}</header>
 		<div style="padding:0 35px 0; box-sizing:border-box; color:#666; font-size:24px; overflow:hidden;">
 		  <span>{{reportInfo.Author}}</span>
-		  <span style="float:right;">{{reportInfo.PublishTime}}</span>
+		  <span style="float:right;" v-if="reportInfo.PublishState===2||reportInfo.State===2">{{reportInfo.PublishTime}}</span>
 		</div>
 		
 		<div id="abstract" v-if="reportInfo.Abstract">

+ 5 - 2
src/views/report_manage/reportV2/smartReport/editReport.vue

@@ -53,7 +53,7 @@
                     @openBaseInfo="showReportBaseInfo=true"
                     @handleRefreshAllChart="handleRefreshAllChart"
                     @handlePreviewReport="reportInfo.ReportChapterId?handlePreviewChapter():handlePreviewReport()"
-                    @handleSaveContent="reportInfo.ReportChapterId?handleAutoSaveChapter('save'):handleSaveContent()"
+                    @handleSaveContent="reportInfo.ReportChapterId?handleAutoSaveChapter('save'):handleSaveContent({isAutoSave:false})"
                     @handlePublishOpt="(type) =>{reportInfo.ReportChapterId?handlePublishChapter():handlePublishOpt(type)}"
                 />
                 
@@ -422,6 +422,8 @@ export default {
     methods: {
         /* 当前章节信息 */
 		handleChapterInfo({ selectChapterId,editChapterId }) {
+            this.timer && clearInterval(this.timer);
+
 			this.selectChapterId = selectChapterId;
 			this.editChapterId = editChapterId;
 			
@@ -487,13 +489,14 @@ export default {
 
 		/* 单章节发布 */
 		async handlePublishChapter() {
-
+            
 			const res = await publishChapterReport({
                 ReportChapterId: this.reportInfo.ReportChapterId
             });
             if (res.Ret === 200) {
                 this.$message.success(this.$t('MsgPrompt.publish_msg'))
 
+                this.$refs.chapterContRef.handleMarkOver(this.reportInfo.ReportChapterId)
                 setTimeout(() => {
                     this.timer && clearInterval(this.timer);
                     this.$router.go(-1);

+ 0 - 5
src/views/report_manage/reportV2/smartReport/reportDetail.vue

@@ -84,11 +84,6 @@
                     class="qrcode"
                 ></vue-qr>
             </div>
-            <!-- 去除详情页导出图片 放到报告列表页去 -->
-            <!-- <div class="item" v-if="reportInfo.State == 2" @click="handleGetReportImg" v-permission="permissionBtn.smartReportManageBtn.reportManage_reportView_exportImg">
-                <img src="~@/assets/img/smartReport/icon16.png" alt="" style="width:30px;height:30px;marginRight:10px;">
-                <span>导&nbsp;&nbsp;图</span>
-            </div> -->
         </div>
 
         <!-- 报告图片 -->