Browse Source

fix:点击保存时刷新版本记录

chenlei 1 month ago
parent
commit
6e79a7c68e

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

@@ -281,7 +281,7 @@
             </div>
             <!-- 历史记录编辑 -->
              <div class="history-edit-box" v-if="isVersionHistory">
-                <VersionRecord :PptId="PptId" @handleRestore="handleRestore"/>
+                <VersionRecord ref="version" :PptId="PptId" @handleRestore="handleRestore"/>
              </div>
           </div>
     </div>
@@ -1083,6 +1083,7 @@ export default {
       this.isSaved = true
       if(this.$route.query.id||this.pptId){
         await this.editPPT(FirstPage,Content,type)
+        this.$refs.version.getSandBoxList() // 刷新版本列表
       }else{
         // await this.addPPT(FirstPage,Content)
       }

+ 4 - 1
src/views/report_manage/reportV2/normalReport/components/insertContent.vue

@@ -20,7 +20,7 @@
     <!-- 语义分析 -->
     <SemanticAnalysis v-if="actTab==='semanticAnalysis'" @insertHtml="item => {$emit('insertHtml',{item,type:'image'})}"/>
     <!-- 版本记录 -->
-    <VersionRecord v-if="actTab==='versionRecord'" :selectChapterId="selectChapterId" @handleRestore="handleRestore"/>
+    <VersionRecord v-if="actTab==='versionRecord'" ref="version" :selectChapterId="selectChapterId" @handleRestore="handleRestore"/>
   </div>
 </template>
 <script>
@@ -51,6 +51,9 @@ export default {
       },
       handleRestore(data){
           this.$emit('handleRestore',data)
+      },
+      getSandBoxList(){
+        this.$refs.version.getSandBoxList() // 刷新版本列表
       }
   }
 }

+ 7 - 2
src/views/report_manage/reportV2/normalReport/editReport.vue

@@ -74,6 +74,7 @@
 
 						<!-- 可插入内容 -->
 						<insertContent
+							ref="insertContRef"
 							v-show="activeTab"
 							:actTab="activeTab"
 							:selectChapterId="selectChapterId"
@@ -264,7 +265,9 @@ export default {
 				})
 				if(res.Ret !== 200) return
 				resolve(true)
-	
+				if(type !== '')  {
+					this.$refs.insertContRef.getSandBoxList() // 刷新版本列表
+				}
 				this.lastsavetime = http.dateFormatter(new Date(), true);
 				type==='save' && this.$message.success(res.Msg);
 
@@ -383,7 +386,9 @@ export default {
 				}).then((res) => {
 					if (res.Ret === 200) {
 						resolve(true)
-
+						if(IsManualSave)  {
+                            this.$refs.insertContRef.getSandBoxList() // 刷新版本列表
+                        }
 						this.lastsavetime = http.dateFormatter(new Date(), true);
 						type==='save' && this.$message.success(res.Msg);
 					}

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

@@ -175,7 +175,7 @@
                                 :style="{fontFamily:item.family,fontSize:(item.size*2)+'px',fontWeight:item.weight,textAlign:item.align,color:item.color,
                                     width:item.width,height:item.height,left:item.left,top:item.top
                                 }">
-                                    {{ layoutBaseInfo[item.value] }}
+                                    {{ layoutBaseInfo[item.value] }}111
                                 </div>
                             </div>
                         </div>
@@ -215,7 +215,7 @@
                         <!-- 语义分析 -->
                         <SemanticAnalysis v-if="rightType==='semanticAnalysis'"/>
                         <!-- 版本记录 -->
-                        <VersionRecord v-if="rightType==='versionRecord'" :selectChapterId="selectChapterId" @handleRestore="handleRestore"/>
+                        <VersionRecord v-if="rightType==='versionRecord'" ref="version" :selectChapterId="selectChapterId" @handleRestore="handleRestore"/>
                         <!-- 版图资源库 -->
                         <ImgSource v-if="rightType==='imgSource'" @change="handleInsertImgSource" @close="handleCloseRight"/>
                         </div>
@@ -497,7 +497,9 @@ export default {
                 })
                 if(res.Ret !== 200) return 
                 resolve(true)
-
+                if(type !== '')  {
+					this.$refs.version.getSandBoxList() // 刷新版本列表
+				}
                 type==='save' && this.$message.success(res.Msg);
             })
 		},
@@ -1189,6 +1191,9 @@ export default {
                         if(!isAutoSave){
                             this.$message.success(this.$t('MsgPrompt.saved_msg'))
                         }
+                        if(IsManualSave)  {
+                            this.$refs.version.getSandBoxList() // 刷新版本列表
+                        }
                     }
                 })
             })