Commit e09a49ae authored by 曹雷's avatar 曹雷

fix statistics.html in ie

parent a61a90e6
...@@ -256,7 +256,7 @@ ...@@ -256,7 +256,7 @@
] ]
}; };
let params = { var params = {
clientId: this.app, clientId: this.app,
year: this.year, year: this.year,
month: this.month month: this.month
...@@ -284,7 +284,7 @@ ...@@ -284,7 +284,7 @@
}) })
}, },
initAppEnv: function () { initAppEnv: function () {
let params = { var params = {
clientId: this.app, clientId: this.app,
year: this.year, year: this.year,
month: this.month month: this.month
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
var legendSystem = [], dataSystem = [], legendBroswer = [], dataBrowser = []; var legendSystem = [], dataSystem = [], legendBroswer = [], dataBrowser = [];
if (result.data.os.length) { 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 others = { name: '其他', value: 0 };
var t = 0; var t = 0;
...@@ -317,7 +317,7 @@ ...@@ -317,7 +317,7 @@
} }
if (result.data.browser.length) { 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 }; others = { name: '其他', value: 0 };
t = 0; t = 0;
...@@ -472,7 +472,7 @@ ...@@ -472,7 +472,7 @@
// ] // ]
// }; // };
let params = { var params = {
clientId: _this.app, clientId: _this.app,
year: _this.year, year: _this.year,
month: _this.month month: _this.month
...@@ -493,7 +493,7 @@ ...@@ -493,7 +493,7 @@
// legend.push(element.name); // legend.push(element.name);
// data.push({ value: element.count, name: 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 // optionNums.series[0].data = data
// myChartNums.setOption(optionNums); // myChartNums.setOption(optionNums);
}, },
...@@ -563,7 +563,7 @@ ...@@ -563,7 +563,7 @@
} }
}] }]
}; };
let params = { var params = {
clientId: this.app, clientId: this.app,
year: this.year, year: this.year,
month: this.month month: this.month
...@@ -627,7 +627,7 @@ ...@@ -627,7 +627,7 @@
} }
] ]
}; };
let params = { var params = {
clientId: this.app, clientId: this.app,
year: this.year, year: this.year,
month: this.month month: this.month
...@@ -653,7 +653,7 @@ ...@@ -653,7 +653,7 @@
}) })
}, },
initUserOrg: function () { initUserOrg: function () {
let params = { var params = {
clientId: this.app, clientId: this.app,
year: this.year, year: this.year,
month: this.month month: this.month
...@@ -671,15 +671,15 @@ ...@@ -671,15 +671,15 @@
}, },
getParams: function (params) { getParams: function (params) {
if (!params) return ''; if (!params) return '';
let res = ''; var res = '';
let keys = Object.keys(params); var keys = Object.keys(params);
if (this.time === 'month') { if (this.time === 'month') {
var date = new Date(); var date = new Date();
var year = date.getFullYear(); var year = date.getFullYear();
params.year = year; params.year = year;
params.month = year + '-' + (this.month < 10 ? ('0' + this.month) : this.month); 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 (this.time !== 'month' && keys[i] === 'month') continue;
if (params[keys[i]] !== 'all') { if (params[keys[i]] !== 'all') {
if (res !== '') res += '&' if (res !== '') res += '&'
...@@ -689,9 +689,9 @@ ...@@ -689,9 +689,9 @@
return res; return res;
}, },
randomFun: function (arr) { randomFun: function (arr) {
for(let i=0, len = arr.length; i < len; i++) { for(var i=0, len = arr.length; i < len; i++) {
let index = parseInt(Math.random() * (len - 1)); var index = parseInt(Math.random() * (len - 1));
let tempValue = arr[i]; var tempValue = arr[i];
arr[i] = arr[index]; arr[i] = arr[index];
arr[index] = tempValue; 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