//将序列化成json格式后日期(毫秒数)转成日期格式 YYYY-MM-DD HH:MI:SS
function ChangeDateFormat(cellval, type) {
var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10));
var year = date.getFullYear();
var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
var min = date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
var sec = date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
var result;
switch (type) {
case "0":
result = year + "-" + month + "-" + day;
break;
case "1":
result = hours + ":" + min + ":" + sec;
break;
case "2":
result = year + "-" + month + "-" + day + " " + hours + ":" + min + ":" + sec;
break;
case "3":
result = hours + ":" + min;
break;
default: "不符合格式"
}