Commit e09a49ae authored by 曹雷's avatar 曹雷

fix statistics.html in ie

parent a61a90e6
......@@ -256,7 +256,7 @@
]
};
let params = {
var params = {
clientId: this.app,
year: this.year,
month: this.month
......@@ -284,7 +284,7 @@
})
},
initAppEnv: function () {
let params = {
var params = {
clientId: this.app,
year: this.year,
month: this.month
......@@ -296,7 +296,7 @@
var legendSystem = [], dataSystem = [], legendBroswer = [], dataBrowser = [];
if (result.data.os.length) {
result.data.os.sort((a, b) => { return b.count - a.count })
result.data.os.sort(function(a, b) { return b.count - a.count })
}
var others = { name: '其他', value: 0 };
var t = 0;
......@@ -317,7 +317,7 @@
}
if (result.data.browser.length) {
result.data.browser.sort((a, b) => { return b.count - a.count })
result.data.browser.sort(function (a, b) { return b.count - a.count })
}
others = { name: '其他', value: 0 };
t = 0;
......@@ -472,7 +472,7 @@
// ]
// };
let params = {
var params = {
clientId: _this.app,
year: _this.year,
month: _this.month
......@@ -493,7 +493,7 @@
// legend.push(element.name);
// data.push({ value: element.count, name: element.name })
// }
// _this.numsIdpList = data.filter(element => { return element.value > 0 });
// _this.numsIdpList = data.filter(function (element) { return element.value > 0 });
// optionNums.series[0].data = data
// myChartNums.setOption(optionNums);
},
......@@ -563,7 +563,7 @@
}
}]
};
let params = {
var params = {
clientId: this.app,
year: this.year,
month: this.month
......@@ -627,7 +627,7 @@
}
]
};
let params = {
var params = {
clientId: this.app,
year: this.year,
month: this.month
......@@ -653,7 +653,7 @@
})
},
initUserOrg: function () {
let params = {
var params = {
clientId: this.app,
year: this.year,
month: this.month
......@@ -671,15 +671,15 @@
},
getParams: function (params) {
if (!params) return '';
let res = '';
let keys = Object.keys(params);
var res = '';
var keys = Object.keys(params);
if (this.time === 'month') {
var date = new Date();
var year = date.getFullYear();
params.year = year;
params.month = year + '-' + (this.month < 10 ? ('0' + this.month) : this.month);
}
for (let i = 0; i < keys.length; i++) {
for (var i = 0; i < keys.length; i++) {
if (this.time !== 'month' && keys[i] === 'month') continue;
if (params[keys[i]] !== 'all') {
if (res !== '') res += '&'
......@@ -689,9 +689,9 @@
return res;
},
randomFun: function (arr) {
for(let i=0, len = arr.length; i < len; i++) {
let index = parseInt(Math.random() * (len - 1));
let tempValue = arr[i];
for(var i=0, len = arr.length; i < len; i++) {
var index = parseInt(Math.random() * (len - 1));
var tempValue = arr[i];
arr[i] = arr[index];
arr[index] = tempValue;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment