|
@@ -23,8 +23,8 @@ export default{
|
|
lastSaveTime:'',//自动保存时间
|
|
lastSaveTime:'',//自动保存时间
|
|
isSaved:false,//是否已点击了保存/发布
|
|
isSaved:false,//是否已点击了保存/发布
|
|
|
|
|
|
- reflashLoading:null,//一键刷新的loading
|
|
|
|
- reflashBtnLoading:false,//一键刷新的按钮loading
|
|
|
|
|
|
+ refreshLoading:null,//一键刷新的loading
|
|
|
|
+ refreshBtnLoading:false,//一键刷新的按钮loading
|
|
}
|
|
}
|
|
},
|
|
},
|
|
directives: {
|
|
directives: {
|
|
@@ -288,8 +288,8 @@ export default{
|
|
//渲染图表
|
|
//渲染图表
|
|
await this.initCharts(chartElements, page); */
|
|
await this.initCharts(chartElements, page); */
|
|
|
|
|
|
- chartElements.length&&await this.reflashPageChart(chartElements,page)
|
|
|
|
- SheetElements.length&&await this.reflashPageSheet(SheetElements,page)
|
|
|
|
|
|
+ chartElements.length&&await this.refreshPageChart(chartElements,page)
|
|
|
|
+ SheetElements.length&&await this.refreshPageSheet(SheetElements,page)
|
|
page.isUpdating = false
|
|
page.isUpdating = false
|
|
//this.$message.success(this.$t('MsgPrompt.refresh_success_msg'))
|
|
//this.$message.success(this.$t('MsgPrompt.refresh_success_msg'))
|
|
this.pageList.splice(index,1,page)
|
|
this.pageList.splice(index,1,page)
|
|
@@ -297,10 +297,10 @@ export default{
|
|
this.autoSave()
|
|
this.autoSave()
|
|
},
|
|
},
|
|
//更新图表
|
|
//更新图表
|
|
- async reflashPageChart(chartElements,page){
|
|
|
|
|
|
+ async refreshPageChart(chartElements,page){
|
|
const codeArr = [...new Set (chartElements.map(i=>i.chartId))]
|
|
const codeArr = [...new Set (chartElements.map(i=>i.chartId))]
|
|
//改成批量刷新图表的接口
|
|
//改成批量刷新图表的接口
|
|
- await this.reflashCharts(codeArr,'',Date.now().toString().slice(-6))
|
|
|
|
|
|
+ await this.refreshCharts(codeArr,'',Date.now().toString().slice(-6))
|
|
//重新获取图表数据
|
|
//重新获取图表数据
|
|
for(let i=0;i<chartElements.length;i++){
|
|
for(let i=0;i<chartElements.length;i++){
|
|
await this.getchartData(chartElements[i].chartId);
|
|
await this.getchartData(chartElements[i].chartId);
|
|
@@ -316,9 +316,9 @@ export default{
|
|
await this.initCharts(chartElements, page);
|
|
await this.initCharts(chartElements, page);
|
|
},
|
|
},
|
|
//更新表格
|
|
//更新表格
|
|
- async reflashPageSheet(sheetElements,page){
|
|
|
|
|
|
+ async refreshPageSheet(sheetElements,page){
|
|
const codeArr = [...new Set (sheetElements.map(i=>i.sheetId))]
|
|
const codeArr = [...new Set (sheetElements.map(i=>i.sheetId))]
|
|
- await this.reflashSheets(codeArr,'',Date.now().toString().slice(-6))
|
|
|
|
|
|
+ await this.refreshSheets(codeArr,'',Date.now().toString().slice(-6))
|
|
//重新获取表格数据
|
|
//重新获取表格数据
|
|
for(let i=0;i<sheetElements.length;i++){
|
|
for(let i=0;i<sheetElements.length;i++){
|
|
await this.getsheetData(sheetElements[i].sheetId);
|
|
await this.getsheetData(sheetElements[i].sheetId);
|
|
@@ -438,10 +438,10 @@ export default{
|
|
//一键刷新 图表/表格
|
|
//一键刷新 图表/表格
|
|
async refleshFormatEl(){
|
|
async refleshFormatEl(){
|
|
//全局遮罩,按钮禁用
|
|
//全局遮罩,按钮禁用
|
|
- this.reflashBtnLoading = true
|
|
|
|
- this.reflashLoading = this.$loading({
|
|
|
|
|
|
+ this.refreshBtnLoading = true
|
|
|
|
+ this.refreshLoading = this.$loading({
|
|
lock: true,
|
|
lock: true,
|
|
- text: `${this.$t('Slides.reflash_ppt_el')}...`,
|
|
|
|
|
|
+ text: `${this.$t('Slides.refresh_ppt_el')}...`,
|
|
spinner: 'el-icon-loading',
|
|
spinner: 'el-icon-loading',
|
|
customClass:'loading',
|
|
customClass:'loading',
|
|
target:document.querySelector('.page-wrap'),
|
|
target:document.querySelector('.page-wrap'),
|
|
@@ -449,16 +449,16 @@ export default{
|
|
});
|
|
});
|
|
//刷新图表
|
|
//刷新图表
|
|
let chartArr = this.getPPTElIds('chart','chartId')
|
|
let chartArr = this.getPPTElIds('chart','chartId')
|
|
- chartArr.length&&await this.reflashCharts(chartArr,this.$route.query.id,Date.now().toString().slice(-6))
|
|
|
|
|
|
+ chartArr.length&&await this.refreshCharts(chartArr,this.$route.query.id,Date.now().toString().slice(-6))
|
|
//刷新表格
|
|
//刷新表格
|
|
let sheetArr = this.getPPTElIds('sheet','sheetId')
|
|
let sheetArr = this.getPPTElIds('sheet','sheetId')
|
|
- sheetArr.length&&await this.reflashSheets(sheetArr,this.$route.query.id,Date.now().toString().slice(-6))
|
|
|
|
- this.reflashLoading&&this.reflashLoading.close()
|
|
|
|
|
|
+ sheetArr.length&&await this.refreshSheets(sheetArr,this.$route.query.id,Date.now().toString().slice(-6))
|
|
|
|
+ this.refreshLoading&&this.refreshLoading.close()
|
|
if(!chartArr.length&&!sheetArr.length){
|
|
if(!chartArr.length&&!sheetArr.length){
|
|
- this.reflashBtnLoading = false
|
|
|
|
- return this.$message.warning(this.$t('Slides.reflash_ppt_hint'))
|
|
|
|
|
|
+ this.refreshBtnLoading = false
|
|
|
|
+ return this.$message.warning(this.$t('Slides.refresh_ppt_hint'))
|
|
}
|
|
}
|
|
- this.reflashLoading = this.$loading({
|
|
|
|
|
|
+ this.refreshLoading = this.$loading({
|
|
lock: true,
|
|
lock: true,
|
|
text: `${this.$t('Slides.retrieving_ppt_data')}...`,
|
|
text: `${this.$t('Slides.retrieving_ppt_data')}...`,
|
|
spinner: 'el-icon-loading',
|
|
spinner: 'el-icon-loading',
|
|
@@ -495,8 +495,8 @@ export default{
|
|
}
|
|
}
|
|
this.$store.commit('SET_CHART_INFO_MAP',chartInfoMap)
|
|
this.$store.commit('SET_CHART_INFO_MAP',chartInfoMap)
|
|
//移除遮罩,按钮启用
|
|
//移除遮罩,按钮启用
|
|
- this.reflashLoading&&this.reflashLoading.close()
|
|
|
|
- this.reflashBtnLoading = false
|
|
|
|
|
|
+ this.refreshLoading&&this.refreshLoading.close()
|
|
|
|
+ this.refreshBtnLoading = false
|
|
},
|
|
},
|
|
getPPTElIds(type,typeKey){
|
|
getPPTElIds(type,typeKey){
|
|
let code_arr = []
|
|
let code_arr = []
|
|
@@ -509,7 +509,7 @@ export default{
|
|
}
|
|
}
|
|
return [...new Set(code_arr)]
|
|
return [...new Set(code_arr)]
|
|
},
|
|
},
|
|
- async reflashCharts(code_arr,id,replaceId){
|
|
|
|
|
|
+ async refreshCharts(code_arr,id,replaceId){
|
|
//获取所有图表code
|
|
//获取所有图表code
|
|
let res = await dataBaseInterface.getReportrefreshStatus({
|
|
let res = await dataBaseInterface.getReportrefreshStatus({
|
|
Source:this.currentLang==='en'?'en_ppt':'ppt',
|
|
Source:this.currentLang==='en'?'en_ppt':'ppt',
|
|
@@ -524,7 +524,7 @@ export default{
|
|
if(Ret!==200) return
|
|
if(Ret!==200) return
|
|
this.$message.success(Msg)
|
|
this.$message.success(Msg)
|
|
},
|
|
},
|
|
- async reflashSheets(code_arr,id,replaceId){
|
|
|
|
|
|
+ async refreshSheets(code_arr,id,replaceId){
|
|
let res = await sheetInterface.getRefreshResult({
|
|
let res = await sheetInterface.getRefreshResult({
|
|
Source:this.currentLang==='en'?'en_ppt':'ppt',
|
|
Source:this.currentLang==='en'?'en_ppt':'ppt',
|
|
PrimaryId: Number(id||replaceId)
|
|
PrimaryId: Number(id||replaceId)
|