|
@@ -719,6 +719,13 @@ export default {
|
|
|
});
|
|
|
this.loading.close();
|
|
|
if (res.Ret !== 200) return;
|
|
|
+ if(res.Data.Status==1){
|
|
|
+ this.$message.warning(res.Data.Msg)
|
|
|
+ this.refreshOnlineExcel()
|
|
|
+ this.onlineExcelEditing=false
|
|
|
+ this.editButtonText = `${res.Data.Editor}编辑中`
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$message.success("保存成功");
|
|
|
this.markFinishStatus()
|
|
|
|
|
@@ -726,7 +733,7 @@ export default {
|
|
|
this.getDetailHandle();
|
|
|
}, 300),
|
|
|
autoSaveFun:_.debounce(async function(){
|
|
|
- console.log("自动保存");
|
|
|
+ // console.log("自动保存");
|
|
|
if(!this.onlineExcelEditing || this.cancelAutoSave){
|
|
|
this.cancelAutoSave=false
|
|
|
return
|
|
@@ -745,6 +752,14 @@ export default {
|
|
|
Content: JSON.stringify(data),
|
|
|
});
|
|
|
if (res.Ret !== 200) return;
|
|
|
+ if(res.Data.Status==1){
|
|
|
+ this.$message.warning(res.Data.Msg)
|
|
|
+ this.refreshOnlineExcel()
|
|
|
+ this.onlineExcelEditing=false
|
|
|
+ this.editButtonText = `${res.Data.Editor}编辑中`
|
|
|
+ this.autoSaveType=''
|
|
|
+ return
|
|
|
+ }
|
|
|
if(this.autoSaveType == "nameEdit"){
|
|
|
this.getTreeData();
|
|
|
this.autoSaveType=''
|
|
@@ -841,19 +856,7 @@ export default {
|
|
|
if(this.sheetDetailInfo.Source === 1) {
|
|
|
if(this.editButtonText.indexOf('编辑中')!=-1){
|
|
|
// 编辑中的状态 重新获取最新的详情数据
|
|
|
- sheetInterface.sheetDetail({
|
|
|
- ExcelInfoId: this.select_id,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- if (res.Ret !== 200) return;
|
|
|
-
|
|
|
- this.sheetDetailInfo = res.Data;
|
|
|
- this.saveTime = this.$moment(this.sheetDetailInfo.ModifyTime).format('YYYY-MM-DD HH:mm:ss')||''
|
|
|
-
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.sheetRef.init();
|
|
|
- });
|
|
|
- });
|
|
|
+ this.refreshOnlineExcel()
|
|
|
}
|
|
|
|
|
|
this.onlineExcelEditing=true
|
|
@@ -960,6 +963,22 @@ export default {
|
|
|
// 保持连接 让请求不会因为页面关闭而中断
|
|
|
keepalive: true
|
|
|
});
|
|
|
+ },
|
|
|
+ // 刷新在线excel详情数据
|
|
|
+ refreshOnlineExcel(){
|
|
|
+ sheetInterface.sheetDetail({
|
|
|
+ ExcelInfoId: this.select_id,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.Ret !== 200) return;
|
|
|
+
|
|
|
+ this.sheetDetailInfo = res.Data;
|
|
|
+ this.saveTime = this.$moment(this.sheetDetailInfo.ModifyTime).format('YYYY-MM-DD HH:mm:ss')||''
|
|
|
+
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.sheetRef.init();
|
|
|
+ });
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|