doway-coms 2.5.8 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/utils/common.js +21 -0
package/package.json
CHANGED
package/packages/utils/common.js
CHANGED
|
@@ -611,4 +611,25 @@ export function getGridPagerButton(datas,dataCode){
|
|
|
611
611
|
}
|
|
612
612
|
})
|
|
613
613
|
return returnButtons
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* 获取最大排序步长
|
|
617
|
+
* @param {} datas
|
|
618
|
+
* @param {*} fieldCode
|
|
619
|
+
* @param {*} step
|
|
620
|
+
*/
|
|
621
|
+
export function getStepMaxValue(datas,fieldCode,step){
|
|
622
|
+
let tempSortStep = step
|
|
623
|
+
let tempMaxObj = XEUtils.max(
|
|
624
|
+
datas,
|
|
625
|
+
fieldCode
|
|
626
|
+
)
|
|
627
|
+
let tempDtlMaxSort = 0
|
|
628
|
+
if(tempMaxObj){
|
|
629
|
+
tempDtlMaxSort = tempMaxObj.sort
|
|
630
|
+
}
|
|
631
|
+
tempDtlMaxSort = XEUtils.divide(tempDtlMaxSort, tempSortStep)
|
|
632
|
+
tempDtlMaxSort = XEUtils.floor(tempDtlMaxSort, 0)
|
|
633
|
+
tempDtlMaxSort = XEUtils.add(tempDtlMaxSort, 1)
|
|
634
|
+
tempDtlMaxSort = XEUtils.multiply(tempDtlMaxSort, tempSortStep)
|
|
614
635
|
}
|