Browse Source

fix(bug): pivotTable

1.pivotTable digital accuracy 2.collaborative empty data is not sent to back end

fix #474
master
dushusir 5 years ago
parent
commit
950f2bebda
  1. 6
      docs/guide/api.md
  2. 8
      docs/zh/guide/api.md
  3. 3
      src/controllers/pivotTable.js
  4. 12
      src/global/refresh.js

6
docs/guide/api.md

@ -1930,9 +1930,9 @@ Use note:
+ `"flipLeftRight"`: flip left and right
+ `"flipClockwise"`: rotate clockwise
+ `"flipCounterClockwise"`: rotate counterclockwise
+ `"Transpose"`: Transpose
+ `"DeleteZeroByRow"`: delete 0 values at both ends by row
+ `"DeleteZeroByColumn"`: delete zero values at both ends by column
+ `"transpose"`: Transpose
+ `"deleteZeroByRow"`: delete 0 values at both ends by row
+ `"deleteZeroByColumn"`: delete zero values at both ends by column
+ `"removeDuplicateByRow"`: delete duplicate values by row
+ `"removeDuplicateByColumn"`: remove duplicate values by column
+ `"newMatrix"`: Produce a new matrix

8
docs/zh/guide/api.md

@ -1900,10 +1900,10 @@ Luckysheet针对常用的数据操作需求,开放了主要功能的API,开
+ `"flipUpDown"`: 上下翻转
+ `"flipLeftRight"`: 左右翻转
+ `"flipClockwise"`: 顺时针旋转
+ `"flipCounterClockwise"`: 逆时针旋转
+ `"Transpose"`: 转置
+ `"DeleteZeroByRow"`: 按行删除两端0值
+ `"DeleteZeroByColumn"`: 按列删除两端0值
+ `"flipCounterClockwise"`: 逆时针旋转api
+ `"transpose"`: 转置
+ `"deleteZeroByRow"`: 按行删除两端0值
+ `"deleteZeroByColumn"`: 按列删除两端0值
+ `"removeDuplicateByRow"`: 按行删除重复值
+ `"removeDuplicateByColumn"`: 按列删除重复值
+ `"newMatrix"`: 生产新矩阵

3
src/controllers/pivotTable.js

@ -2631,7 +2631,8 @@ const pivotTable = {
}
if (isdatatypemulti(d_value)["num"] === true) {
let num = numFormat(d_value);
//fix issue 265
let num = numFormat(d_value,6);
dataposition[indicator]["digitaldata"].push(num);
dataposition[indicator]["count"] += 1;
dataposition[indicator]["sum"] += num;

12
src/global/refresh.js

@ -121,8 +121,8 @@ function jfrefreshgrid(data, range, allParam, isRunExecFunction = true, isRefres
editor.webWorkerFlowDataCache(Store.flowdata);//worker存数据
file.data = Store.flowdata;
//config
if(cfg != null){
//config, null or empty object are not processed
if(cfg != null && Object.keys(cfg).length !== 0){
Store.config = cfg;
file.config = Store.config;
@ -133,15 +133,15 @@ function jfrefreshgrid(data, range, allParam, isRunExecFunction = true, isRefres
}
}
//条件格式
if(cdformat != null){
//condition format, null or empty array are not processed
if(cdformat != null && cdformat.length !== 0){
file["luckysheet_conditionformat_save"] = cdformat;
server.saveParam("all", Store.currentSheetIndex, cdformat, { "k": "luckysheet_conditionformat_save" });
}
//数据验证
if(dataVerification != null){
//data Verification, null or empty object are not processed
if(dataVerification != null && Object.keys(dataVerification).length !== 0){
dataVerificationCtrl.dataVerification = dataVerification;
file["dataVerification"] = dataVerification;
server.saveParam("all", Store.currentSheetIndex, dataVerification, { "k": "dataVerification" });

Loading…
Cancel
Save