function regionSort(d1, d2) {
var p1 = d1['商机运营认购占比'];
var p2 = d2['商机运营认购占比'];
p1 = p1 == '-' ? -Infinity : Number(p1);
p2 = p2 == '-' ? -Infinity : Number(p2);
return p2 - p1;
}
function processData(columnStr, dataStr, paramStr) {
var datas = JSON.parse(dataStr);
var queryParams = JSON.parse(paramStr);
var orders = JSON.stringify(queryParams['orders']);
var order;
if (orders != undefined) {
orders = JSON.parse(orders);
order = orders.length > 0 ? JSON.parse(JSON.stringify(orders[0])) : undefined;
}
if (order === undefined || (order['direction'] != 'asc' && order['direction'] != 'desc')) {
datas.sort(regionSort);
}
return JSON.stringify(datas);
}
console