|
@@ -60,7 +60,8 @@ export default {
|
|
sheetInit:false,
|
|
sheetInit:false,
|
|
option:{},
|
|
option:{},
|
|
updateTime:'',
|
|
updateTime:'',
|
|
- sheetButton:''
|
|
|
|
|
|
+ sheetButton:'',
|
|
|
|
+ cancelAutoSave:false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
beforeRouteEnter(to, from, next) {
|
|
beforeRouteEnter(to, from, next) {
|
|
@@ -158,7 +159,7 @@ export default {
|
|
|
|
|
|
},
|
|
},
|
|
autoSaveFun:_.debounce(async function(){
|
|
autoSaveFun:_.debounce(async function(){
|
|
- if(!this.sheetId && this.sheetInit) return
|
|
|
|
|
|
+ if(!this.sheetId && this.sheetInit || this.cancelAutoSave) return
|
|
const { name,classify,infoId } = this.sheetForm;
|
|
const { name,classify,infoId } = this.sheetForm;
|
|
luckysheet.exitEditMode()
|
|
luckysheet.exitEditMode()
|
|
let data = luckysheet.getAllSheets()[0];
|
|
let data = luckysheet.getAllSheets()[0];
|
|
@@ -179,7 +180,7 @@ export default {
|
|
},1500),
|
|
},1500),
|
|
/* 保存表格 */
|
|
/* 保存表格 */
|
|
saveSheetHandle: _.debounce(async function() {
|
|
saveSheetHandle: _.debounce(async function() {
|
|
- const { name,classify } = this.sheetForm;
|
|
|
|
|
|
+ const { name,classify} = this.sheetForm;
|
|
luckysheet.exitEditMode()
|
|
luckysheet.exitEditMode()
|
|
let data = luckysheet.getAllSheets()[0]
|
|
let data = luckysheet.getAllSheets()[0]
|
|
if(!name || !classify) return this.$message.warning(name ? '请选择表格分类' : '请输入表格名称')
|
|
if(!name || !classify) return this.$message.warning(name ? '请选择表格分类' : '请输入表格名称')
|
|
@@ -215,7 +216,11 @@ export default {
|
|
|
|
|
|
this.sheetId = this.sheetId || res.Data.ExcelInfoId;
|
|
this.sheetId = this.sheetId || res.Data.ExcelInfoId;
|
|
this.$message.success(res.Msg);
|
|
this.$message.success(res.Msg);
|
|
- isAdd && this.$router.replace({path:'/addsheet',query:{id:this.sheetId}})
|
|
|
|
|
|
+ if(isAdd){
|
|
|
|
+ this.$router.replace({path:'/addsheet',query:{id:this.sheetId}})
|
|
|
|
+ this.cancelAutoSave=true
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
// const { ExcelInfoId, UniqueCode } = res.Data;
|
|
// const { ExcelInfoId, UniqueCode } = res.Data;
|
|
|
|
|