|
|
@ -56,7 +56,7 @@ export default { |
|
|
|
return { |
|
|
|
formData: { |
|
|
|
type: "day", |
|
|
|
warningTime: "", |
|
|
|
warningTime: moment().format("YYYY-MM-DD") + " 00:00:01", |
|
|
|
}, |
|
|
|
trafficIncidents: null, |
|
|
|
trafficIncidentsPie: null, |
|
|
@ -89,6 +89,7 @@ export default { |
|
|
|
key: "warningTime", |
|
|
|
required: true, |
|
|
|
type: "datePicker", |
|
|
|
default: moment().format("YYYY-MM-DD") + " 00:00:01", |
|
|
|
options: { |
|
|
|
valueFormat: "yyyy-MM-dd", |
|
|
|
}, |
|
|
@ -107,6 +108,7 @@ export default { |
|
|
|
type: "month", |
|
|
|
valueFormat: "yyyy-MM-dd", |
|
|
|
}, |
|
|
|
default: moment().format("YYYY-MM-DD") + " 00:00:01", |
|
|
|
visible: (data) => { |
|
|
|
if (data.type == "month") { |
|
|
|
return true; |
|
|
@ -122,6 +124,7 @@ export default { |
|
|
|
type: "year", |
|
|
|
valueFormat: "yyyy-MM-dd", |
|
|
|
}, |
|
|
|
default: moment().format("YYYY-MM-DD") + " 00:00:01", |
|
|
|
visible: (data) => { |
|
|
|
if (data.type == "year") { |
|
|
|
return true; |
|
|
@ -134,9 +137,9 @@ export default { |
|
|
|
async mounted() { |
|
|
|
setTimeout(() => { |
|
|
|
this.$nextTick(async () => { |
|
|
|
(this.formData.warningTime = |
|
|
|
moment(new Date()).format("YYYY-MM-DD") + " 00:00:01"), |
|
|
|
(this.trafficIncidents = echarts.init(this.$refs.trafficIncidents)); |
|
|
|
// (this.formData.warningTime = |
|
|
|
// moment().format("YYYY-MM-DD") + " 00:00:01"), |
|
|
|
this.trafficIncidents = echarts.init(this.$refs.trafficIncidents); |
|
|
|
this.trafficIncidents.setOption(trafficIncidentsCharts); |
|
|
|
this.trafficIncidentsPie = echarts.init(this.$refs.trafficIncidentsPie); |
|
|
|
this.trafficIncidentsPie.setOption(trafficIncidentsChartsPie); |
|
|
@ -166,6 +169,7 @@ export default { |
|
|
|
drawRoundRect(context, 410, 406, 320, 24, 10, gr); |
|
|
|
drawRoundRect(context, 410, 440, 320, 24, 10, gr); |
|
|
|
drawRoundRect(context, 410, 474, 320, 24, 10, gr); |
|
|
|
console.log("this.formData", this.formData); |
|
|
|
await this.getNonAutomaticWarningType(this.formData); |
|
|
|
// drawRoundRect(context, 410, 508, 320, 24, 10, gr); |
|
|
|
}); |
|
|
@ -174,6 +178,7 @@ export default { |
|
|
|
methods: { |
|
|
|
getNonAutomaticWarningType(data) { |
|
|
|
let that = this; |
|
|
|
console.log("data", data); |
|
|
|
return nonAutomaticWarningType(data).then((res) => { |
|
|
|
let newData = res.data; |
|
|
|
let seriesData = []; |
|
|
|