|
@@ -301,10 +301,16 @@ export default {
|
|
this.cycle = this.verifyList(appli, source, keys, false);
|
|
this.cycle = this.verifyList(appli, source, keys, false);
|
|
this.channel = this.verifyList(appCLi, appC, keys, true);
|
|
this.channel = this.verifyList(appCLi, appC, keys, true);
|
|
this.version = this.verifyList(appVLi, appV, keys, false);
|
|
this.version = this.verifyList(appVLi, appV, keys, false);
|
|
|
|
+ let V = [];
|
|
|
|
+ const len = this.version.length > 5 ? 5 : this.version.length;
|
|
|
|
+ for (let i = 0; i < len; i++) {
|
|
|
|
+ const item = this.version[i];
|
|
|
|
+ V.push(item.value);
|
|
|
|
+ }
|
|
this.form = {
|
|
this.form = {
|
|
// app: (this.cycle[0] || { value: "" }).value,
|
|
// app: (this.cycle[0] || { value: "" }).value,
|
|
app: "起点新闻",
|
|
app: "起点新闻",
|
|
- version: [(this.version[0] || { value: "" }).value],
|
|
|
|
|
|
+ version: V,
|
|
channel: [(this.channel[0] || { value: "" }).value],
|
|
channel: [(this.channel[0] || { value: "" }).value],
|
|
date: [new Date(Date.now() - 604800000), new Date(Date.now() - 86400000)],
|
|
date: [new Date(Date.now() - 604800000), new Date(Date.now() - 86400000)],
|
|
};
|
|
};
|
|
@@ -342,9 +348,9 @@ export default {
|
|
if ((resChart || []).length && chart && chart.clear) chart.clear();
|
|
if ((resChart || []).length && chart && chart.clear) chart.clear();
|
|
for (let index = 0; index < (Object.keys(c) || []).length; index++) {
|
|
for (let index = 0; index < (Object.keys(c) || []).length; index++) {
|
|
const v = (Object.keys(c) || [])[index];
|
|
const v = (Object.keys(c) || [])[index];
|
|
- valueList.push((c[v]||[]).map(v=> v[this.numType]));
|
|
|
|
|
|
+ valueList.push((c[v] || []).map(v => v[this.numType]));
|
|
titles.push(v);
|
|
titles.push(v);
|
|
- if(!keyList.length) keyList = (c[v]||[]).map(v=> v.dt)
|
|
|
|
|
|
+ if (!keyList.length) keyList = (c[v] || []).map(v => v.dt);
|
|
}
|
|
}
|
|
this.createImage(keyList, valueList, titles);
|
|
this.createImage(keyList, valueList, titles);
|
|
});
|
|
});
|
|
@@ -366,15 +372,14 @@ export default {
|
|
if ((resChart || []).length && chart && chart.clear) chart.clear();
|
|
if ((resChart || []).length && chart && chart.clear) chart.clear();
|
|
for (let index = 0; index < (Object.keys(c) || []).length; index++) {
|
|
for (let index = 0; index < (Object.keys(c) || []).length; index++) {
|
|
const v = (Object.keys(c) || [])[index];
|
|
const v = (Object.keys(c) || [])[index];
|
|
- valueList.push((c[v]||[]).map(v=> v[this.numType]));
|
|
|
|
|
|
+ valueList.push((c[v] || []).map(v => v[this.numType]));
|
|
titles.push(v);
|
|
titles.push(v);
|
|
- if(!keyList.length) keyList = (c[v]||[]).map(v=> v.dt)
|
|
|
|
|
|
+ if (!keyList.length) keyList = (c[v] || []).map(v => v.dt);
|
|
}
|
|
}
|
|
this.createImage(keyList, valueList, titles);
|
|
this.createImage(keyList, valueList, titles);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
createImage(keyList, valueList, title) {
|
|
createImage(keyList, valueList, title) {
|
|
-
|
|
|
|
if (!chart) {
|
|
if (!chart) {
|
|
chart = echarts.init(this.$refs.regionChart);
|
|
chart = echarts.init(this.$refs.regionChart);
|
|
window.onresize = chart.resize;
|
|
window.onresize = chart.resize;
|
|
@@ -382,7 +387,7 @@ export default {
|
|
chart.resize({
|
|
chart.resize({
|
|
height: (this.$refs.regionChart.offsetWidth * 4) / 16,
|
|
height: (this.$refs.regionChart.offsetWidth * 4) / 16,
|
|
});
|
|
});
|
|
- chart.clear()
|
|
|
|
|
|
+ chart.clear();
|
|
chart.setOption({
|
|
chart.setOption({
|
|
tooltip: {
|
|
tooltip: {
|
|
confine: true,
|
|
confine: true,
|
|
@@ -562,9 +567,15 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
this.version = version;
|
|
this.version = version;
|
|
|
|
+ let V = [];
|
|
|
|
+ const len = this.version.length > 5 ? 5 : this.version.length;
|
|
|
|
+ for (let i = 0; i < len; i++) {
|
|
|
|
+ const item = this.version[i];
|
|
|
|
+ V.push(item.value);
|
|
|
|
+ }
|
|
this.form = {
|
|
this.form = {
|
|
...this.form,
|
|
...this.form,
|
|
- version: [(version[0]||{}).value],
|
|
|
|
|
|
+ version: V,
|
|
};
|
|
};
|
|
});
|
|
});
|
|
getSearchData({
|
|
getSearchData({
|
|
@@ -593,7 +604,8 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
changeversion(v) {
|
|
changeversion(v) {
|
|
- if (!v.length) return (this.form.version = [(this.version[0]|| {}).value]);
|
|
|
|
|
|
+ if (!v.length)
|
|
|
|
+ return (this.form.version = [(this.version[0] || {}).value]);
|
|
let ver = [];
|
|
let ver = [];
|
|
for (let i = 0; i < v.length; i++) {
|
|
for (let i = 0; i < v.length; i++) {
|
|
const element = v[i];
|
|
const element = v[i];
|
|
@@ -643,7 +655,7 @@ export default {
|
|
v.newUser,
|
|
v.newUser,
|
|
v.activeUser,
|
|
v.activeUser,
|
|
v.startTimes,
|
|
v.startTimes,
|
|
- v.distribution + '%',
|
|
|
|
|
|
+ v.distribution + "%",
|
|
this.timeFormat(v.duration),
|
|
this.timeFormat(v.duration),
|
|
"\r\n",
|
|
"\r\n",
|
|
].join(",");
|
|
].join(",");
|