修订
This commit is contained in:
@@ -2,7 +2,10 @@ import formatDate from 'dateformat'
|
||||
import axios from 'axios'
|
||||
import XLSX from 'xlsx'
|
||||
export const dateFormat = (date) => {
|
||||
return formatDate(date, 'yyyy-mm-dd')
|
||||
if(date ==null)
|
||||
{ return ''}
|
||||
else{return formatDate(date, 'yyyy-mm-dd')}
|
||||
|
||||
}
|
||||
|
||||
export const dateFormatFull = (date) => {
|
||||
@@ -70,6 +73,14 @@ export const gethours = (k) => {
|
||||
return ar
|
||||
}
|
||||
|
||||
export const sortByKey=(array,key)=> {
|
||||
return array.sort(function(a,b){
|
||||
var y = a[key];
|
||||
var x = b[key];
|
||||
return ((x<y)?-1:((x<y)?1:0));;
|
||||
})
|
||||
}
|
||||
|
||||
export const pageingData = (data, pagesize, index) => {
|
||||
if (!data) return []
|
||||
let pageNo = 1
|
||||
|
||||
Reference in New Issue
Block a user