|
@@ -160,6 +160,7 @@
|
|
type="primary" @click="handlePublish">{{ result.ReportSource===1?'去发布':'去提交' }}</el-button>
|
|
type="primary" @click="handlePublish">{{ result.ReportSource===1?'去发布':'去提交' }}</el-button>
|
|
<el-button @click="handleSave('save')">{{$t('Slides.operations_save')}}</el-button>
|
|
<el-button @click="handleSave('save')">{{$t('Slides.operations_save')}}</el-button>
|
|
<el-button type="text" @click="handleChangeEditModal"><i class="el-icon-sort" style="transform: rotate(90deg);margin-right:5px;"></i>{{isEditLayer? $t('Slides.ppt_edit_btn'):$t('Slides.layer_editing')}}</el-button>
|
|
<el-button type="text" @click="handleChangeEditModal"><i class="el-icon-sort" style="transform: rotate(90deg);margin-right:5px;"></i>{{isEditLayer? $t('Slides.ppt_edit_btn'):$t('Slides.layer_editing')}}</el-button>
|
|
|
|
+ <el-button type="text" v-permission="permissionBtn.pptPermission.ppt_history" @click="handleVersionHistory"><i class="el-icon-time" style="margin-right:5px;"></i>{{$t('Slides.version_history')}}</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="richtext-tool"></div>
|
|
<div class="richtext-tool"></div>
|
|
<!-- 防止el-tabs未渲染时触发scrollToActiveTab 报错,v-if改为v-show-->
|
|
<!-- 防止el-tabs未渲染时触发scrollToActiveTab 报错,v-if改为v-show-->
|
|
@@ -278,6 +279,10 @@
|
|
@textChange="handleTextChange"
|
|
@textChange="handleTextChange"
|
|
@applyToAll="changeSettingAll"/>
|
|
@applyToAll="changeSettingAll"/>
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- 历史记录编辑 -->
|
|
|
|
+ <div class="history-edit-box" v-if="isVersionHistory">
|
|
|
|
+ <VersionRecord :PptId="PptId" @handleRestore="handleRestore"/>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -347,6 +352,7 @@ import {pptInterface} from '@/api/api.js';
|
|
import * as sheetInterface from '@/api/modules/sheetApi.js';
|
|
import * as sheetInterface from '@/api/modules/sheetApi.js';
|
|
import ShapePreview from './components/layer/shapePreview.vue';
|
|
import ShapePreview from './components/layer/shapePreview.vue';
|
|
import LayerEditTool from './components/layer/layerEditTool.vue';
|
|
import LayerEditTool from './components/layer/layerEditTool.vue';
|
|
|
|
+import VersionRecord from './components/layer/VersionRecord.vue';
|
|
import DeletePageDialog from './components/editor/DeletePageDialog.vue';
|
|
import DeletePageDialog from './components/editor/DeletePageDialog.vue';
|
|
import ChangeFormatDialog from './components/editor/ChangeFormatDialog.vue';
|
|
import ChangeFormatDialog from './components/editor/ChangeFormatDialog.vue';
|
|
import InsertPageDialog from './components/editor/InsertPageDialog.vue';
|
|
import InsertPageDialog from './components/editor/InsertPageDialog.vue';
|
|
@@ -365,7 +371,7 @@ export default {
|
|
components: {
|
|
components: {
|
|
IndexItem, ChooseCover, AddFormat, ShapePreview,
|
|
IndexItem, ChooseCover, AddFormat, ShapePreview,
|
|
LayerEditTool, DeletePageDialog, ChangeFormatDialog, InsertPageDialog, addMyClassifyDia, InsertCharts, ContextMenu, InsertSemantics,
|
|
LayerEditTool, DeletePageDialog, ChangeFormatDialog, InsertPageDialog, addMyClassifyDia, InsertCharts, ContextMenu, InsertSemantics,
|
|
- ChooseCoverNew,TitleEditorTool
|
|
|
|
|
|
+ ChooseCoverNew, TitleEditorTool, VersionRecord
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -423,7 +429,8 @@ export default {
|
|
search_have_more: true,
|
|
search_have_more: true,
|
|
|
|
|
|
chart_source: 1,//图表来源 1 eta 2 商品价格
|
|
chart_source: 1,//图表来源 1 eta 2 商品价格
|
|
- isShowMe: false
|
|
|
|
|
|
+ isShowMe: false,
|
|
|
|
+ isVersionHistory: false,//是否显示版本历史
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed:{
|
|
computed:{
|
|
@@ -778,10 +785,12 @@ export default {
|
|
this.activeLayerEl = {}
|
|
this.activeLayerEl = {}
|
|
|
|
|
|
this.isEditTitle = false
|
|
this.isEditTitle = false
|
|
|
|
+ this.isVersionHistory = false
|
|
}
|
|
}
|
|
//点击当前页时,退出标题编辑模式
|
|
//点击当前页时,退出标题编辑模式
|
|
if(this.currentItem&&this.currentItem.id===id){
|
|
if(this.currentItem&&this.currentItem.id===id){
|
|
this.isEditTitle = false
|
|
this.isEditTitle = false
|
|
|
|
+ this.isVersionHistory = false
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.pageList.map((item,index)=>{
|
|
this.pageList.map((item,index)=>{
|
|
@@ -1032,6 +1041,19 @@ export default {
|
|
el.push(temp);
|
|
el.push(temp);
|
|
return el;
|
|
return el;
|
|
},
|
|
},
|
|
|
|
+ // 版本记录列表
|
|
|
|
+ handleVersionHistory(item) {
|
|
|
|
+ this.isVersionHistory = true;
|
|
|
|
+ },
|
|
|
|
+ //
|
|
|
|
+ async handleRestore(Id) {
|
|
|
|
+ let res = await pptInterface.getPptHistoryRevert({
|
|
|
|
+ Id
|
|
|
|
+ });
|
|
|
|
+ if (res.Ret !== 200) return;
|
|
|
|
+ this.$message.success('恢复成功!');
|
|
|
|
+ this.init()
|
|
|
|
+ },
|
|
//更新ppt页元素(数据)
|
|
//更新ppt页元素(数据)
|
|
refleshElements(els){
|
|
refleshElements(els){
|
|
this.currentItem.elements = els;
|
|
this.currentItem.elements = els;
|