Browse Source

fix(bug): bug

bug
master
wpxp123456 5 years ago
parent
commit
735d1c8b5c
  1. 9
      src/controllers/postil.js
  2. 16
      src/controllers/select.js
  3. 2
      src/controllers/selection.js
  4. 15
      src/controllers/server.js
  5. 20
      src/controllers/sheetmanage.js
  6. 1
      src/css/luckysheet-core.css
  7. 542
      src/global/api.js
  8. 2
      src/global/formula.js
  9. 4
      src/global/refresh.js

9
src/controllers/postil.js

@ -825,7 +825,14 @@ const luckysheetPostil = {
let r = id.split("luckysheet-postil-show_")[1].split("_")[0]; let r = id.split("luckysheet-postil-show_")[1].split("_")[0];
let c = id.split("luckysheet-postil-show_")[1].split("_")[1]; let c = id.split("luckysheet-postil-show_")[1].split("_")[1];
_this.buildPs(r, c, Store.flowdata[r][c].ps); let cell = Store.flowdata[r][c];
if(cell != null && cell.ps != null){
_this.buildPs(r, c, cell.ps);
}
else{
$("#" + id).hide();
}
}); });
} }
} }

16
src/controllers/select.js

@ -286,15 +286,19 @@ function selectTitlesRange(map) {
} }
//选区是否重叠 //选区是否重叠
function selectIsOverlap() { function selectIsOverlap(range) {
if(range == null){
range = Store.luckysheet_select_save;
}
let overlap = false; let overlap = false;
let map = {}; let map = {};
for(let s = 0; s < Store.luckysheet_select_save.length; s++){ for(let s = 0; s < range.length; s++){
let str_r = Store.luckysheet_select_save[s].row[0], let str_r = range[s].row[0],
end_r = Store.luckysheet_select_save[s].row[1]; end_r = range[s].row[1];
let str_c = Store.luckysheet_select_save[s].column[0], let str_c = range[s].column[0],
end_c = Store.luckysheet_select_save[s].column[1]; end_c = range[s].column[1];
for(let r = str_r; r <= end_r; r++){ for(let r = str_r; r <= end_r; r++){
for(let c = str_c; c <= end_c; c++){ for(let c = str_c; c <= end_c; c++){

2
src/controllers/selection.js

@ -26,7 +26,7 @@ const selection = {
Store.luckysheet_selection_range = []; Store.luckysheet_selection_range = [];
selectionCopyShow(); selectionCopyShow();
Store.luckysheet_copy_save = {}; // Store.luckysheet_copy_save = {};
if (!clipboardData) { if (!clipboardData) {
let textarea = $("#luckysheet-copy-content").css("visibility", "hidden"); let textarea = $("#luckysheet-copy-content").css("visibility", "hidden");

15
src/controllers/server.js

@ -714,17 +714,12 @@ const server = {
multipleRangeShow: function(id, name, r, c) { multipleRangeShow: function(id, name, r, c) {
let _this = this; let _this = this;
let r2 = Store.luckysheet_select_save[0].row[1], let row = Store.visibledatarow[r],
c2 = Store.luckysheet_select_save[0].column[1]; row_pre = r - 1 == -1 ? 0 : Store.visibledatarow[r - 1],
let r1 = r2 = r; col = Store.visibledatacolumn[c],
let c1 = c2 = c; col_pre = c - 1 == -1 ? 0 : Store.visibledatacolumn[c - 1];
let row = Store.visibledatarow[r2], let margeset = menuButton.mergeborer(Store.flowdata, r, c);
row_pre = r1 - 1 == -1 ? 0 : Store.visibledatarow[r1 - 1],
col = Store.visibledatacolumn[c2],
col_pre = c1 - 1 == -1 ? 0 : Store.visibledatacolumn[c1 - 1];
let margeset = menuButton.mergeborer(Store.flowdata, r1, c1);
if(!!margeset){ if(!!margeset){
row = margeset.row[1]; row = margeset.row[1];
row_pre = margeset.row[0]; row_pre = margeset.row[0];

20
src/controllers/sheetmanage.js

@ -865,16 +865,6 @@ const sheetmanage = {
formula.execFunctionGroupData = null; formula.execFunctionGroupData = null;
window.luckysheet_getcelldata_cache = null; window.luckysheet_getcelldata_cache = null;
//批注
luckysheetPostil.buildAllPs(Store.flowdata);
//图片
imageCtrl.images = file.images;
imageCtrl.allImagesShow();
//数据验证
dataVerificationCtrl.dataVerification = file.dataVerification;
this.sheetParamRestore(file, Store.flowdata); this.sheetParamRestore(file, Store.flowdata);
if(file["freezen"] == null){ if(file["freezen"] == null){
@ -888,9 +878,17 @@ const sheetmanage = {
rhchInit(Store.flowdata.length, Store.flowdata[0].length); rhchInit(Store.flowdata.length, Store.flowdata[0].length);
createFilterOptions(file["filter_select"], file["filter"]); //批注
luckysheetPostil.buildAllPs(Store.flowdata);
//图片
imageCtrl.images = file.images;
imageCtrl.allImagesShow();
//数据验证
dataVerificationCtrl.dataVerification = file.dataVerification;
createFilterOptions(file["filter_select"], file["filter"]);
}, },
restoreselect: function() { restoreselect: function() {
let index = this.getSheetIndex(Store.currentSheetIndex); let index = this.getSheetIndex(Store.currentSheetIndex);

1
src/css/luckysheet-core.css

@ -7185,4 +7185,5 @@ fieldset[disabled] .btn-danger.focus {
z-index: 1000; z-index: 1000;
user-select: none; user-select: none;
cursor: default; cursor: default;
white-space: nowrap;
} }

542
src/global/api.js

File diff suppressed because it is too large

2
src/global/formula.js

@ -4912,7 +4912,7 @@ const luckysheetformula = {
let _locale = locale(); let _locale = locale();
let locale_formulaMore = _locale.formulaMore; let locale_formulaMore = _locale.formulaMore;
console.log(txt,r,c)
if(txt.indexOf(_this.error.r) > -1){ if(txt.indexOf(_this.error.r) > -1){
return [false, _this.error.r, txt]; return [false, _this.error.r, txt];
} }

4
src/global/refresh.js

@ -413,7 +413,7 @@ function jfrefreshgrid_adRC(data, cfg, ctrlType, ctrlValue, calc, filterObj, cf,
for(let i = 0; i < calc.length; i++){ for(let i = 0; i < calc.length; i++){
let clc = calc[i]; let clc = calc[i];
let clc_r = clc.r, clc_c = clc.c, clc_i = clc.index, clc_funcStr = getcellFormula(clc_r, clc_c, clc_i); let clc_r = clc.r, clc_c = clc.c, clc_i = clc.index, clc_funcStr = getcellFormula(clc_r, clc_c, clc_i, data);
let clc_result = formula.execfunction(clc_funcStr, clc_r, clc_c, null, true); let clc_result = formula.execfunction(clc_funcStr, clc_r, clc_c, null, true);
clc.func = clc_result; clc.func = clc_result;
@ -624,7 +624,7 @@ function jfrefreshgrid_deleteCell(data, cfg, ctrl, calc, filterObj, cf, dataVeri
for(let i = 0; i < calc.length; i++){ for(let i = 0; i < calc.length; i++){
let clc = calc[i]; let clc = calc[i];
let clc_r = clc.r, clc_c = clc.c, clc_i = clc.index, clc_funcStr = getcellFormula(clc_r, clc_c, clc_i); let clc_r = clc.r, clc_c = clc.c, clc_i = clc.index, clc_funcStr = getcellFormula(clc_r, clc_c, clc_i, data);
let clc_result = formula.execfunction(clc_funcStr, clc_r, clc_c, null, true); let clc_result = formula.execfunction(clc_funcStr, clc_r, clc_c, null, true);
clc.func = clc_result; clc.func = clc_result;

Loading…
Cancel
Save