|
@ -53,9 +53,10 @@ |
|
|
v-if="type != 'quarter'" |
|
|
v-if="type != 'quarter'" |
|
|
class="selectRoad" |
|
|
class="selectRoad" |
|
|
v-model="dateTime" |
|
|
v-model="dateTime" |
|
|
|
|
|
:picker-options="pickerOptions" |
|
|
style="width: 140px" |
|
|
style="width: 140px" |
|
|
:type=" |
|
|
:type=" |
|
|
type == 'date' |
|
|
type == 'day' |
|
|
? 'date' |
|
|
? 'date' |
|
|
: type == 'month' |
|
|
: type == 'month' |
|
|
? 'month' |
|
|
? 'month' |
|
@ -106,10 +107,7 @@ |
|
|
text="暂无数据..." |
|
|
text="暂无数据..." |
|
|
class="empty" |
|
|
class="empty" |
|
|
></Empty> |
|
|
></Empty> |
|
|
<div |
|
|
<div ref="chart2" class="chart_div keep-ratio"></div> |
|
|
ref="chart2" |
|
|
|
|
|
class="chart_div keep-ratio" |
|
|
|
|
|
></div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
@ -195,7 +193,7 @@ export default { |
|
|
label: "月", |
|
|
label: "月", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
value: "date", |
|
|
value: "day", |
|
|
label: "日", |
|
|
label: "日", |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
@ -222,16 +220,22 @@ export default { |
|
|
value: "4", |
|
|
value: "4", |
|
|
}, |
|
|
}, |
|
|
], |
|
|
], |
|
|
dateTime: "2024", |
|
|
dateTime: moment().format("YYYY-MM-DD HH:mm:ss"), |
|
|
|
|
|
pickerOptions: { |
|
|
|
|
|
disabledDate(time) { |
|
|
|
|
|
return time.getTime() > Date.now(); |
|
|
|
|
|
}, |
|
|
|
|
|
}, |
|
|
direction: "1", |
|
|
direction: "1", |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
selectIndex: 1, |
|
|
selectIndex: 1, |
|
|
selectId: 1, |
|
|
selectId: 1, |
|
|
reset: false, |
|
|
reset: false, |
|
|
type: "year", |
|
|
type: "day", |
|
|
chart1List: [], |
|
|
chart1List: [], |
|
|
chart2List: [], |
|
|
chart2List: [], |
|
|
chart3List: [], |
|
|
chart3List: [], |
|
|
|
|
|
|
|
|
list: [ |
|
|
list: [ |
|
|
{ |
|
|
{ |
|
|
name: "大学城-长清", |
|
|
name: "大学城-长清", |
|
@ -288,8 +292,8 @@ export default { |
|
|
}, |
|
|
}, |
|
|
onReset() { |
|
|
onReset() { |
|
|
this.direction = "1"; |
|
|
this.direction = "1"; |
|
|
this.type = "year"; |
|
|
this.type = "day"; |
|
|
this.dateTime = "2024"; |
|
|
this.dateTime = moment(this.dateTime).format("YYYY-MM-DD HH:mm:ss"); |
|
|
this.selectId = 1; |
|
|
this.selectId = 1; |
|
|
this.selectIndex = 1; |
|
|
this.selectIndex = 1; |
|
|
this.reset = true; |
|
|
this.reset = true; |
|
@ -297,25 +301,30 @@ export default { |
|
|
}, |
|
|
}, |
|
|
searchQuery() { |
|
|
searchQuery() { |
|
|
let startTime = ""; |
|
|
let startTime = ""; |
|
|
let qType = this.type == "date" ? "day" : this.type; |
|
|
// let qType = this.type == "date" ? "day" : this.type; |
|
|
if (this.type == "quarter") { |
|
|
if (this.type == "month") { |
|
|
// let year = moment().year(); |
|
|
startTime = moment(this.dateTime).format("YYYY-MM-01 HH:mm:ss"); |
|
|
// if (this.quarter == 1) { |
|
|
} else if (this.type == "quarter") { |
|
|
// startTime = `${year}-01-01 00:00:00` |
|
|
let year = moment().year(); |
|
|
// } else if (this.quarter == 2) { |
|
|
if (this.quarter == 1) { |
|
|
// startTime = `${year}-04-01 00:00:00` |
|
|
startTime = `${year}-01-01 00:00:00`; |
|
|
// } else if (this.quarter == 3) { |
|
|
} else if (this.quarter == 2) { |
|
|
// startTime = `${year}-07-01 00:00:00` |
|
|
startTime = `${year}-04-01 00:00:00`; |
|
|
// } else { |
|
|
} else if (this.quarter == 3) { |
|
|
// startTime = `${year}-10-01 00:00:00` |
|
|
startTime = `${year}-07-01 00:00:00`; |
|
|
// } |
|
|
} else { |
|
|
|
|
|
startTime = `${year}-10-01 00:00:00`; |
|
|
|
|
|
} |
|
|
|
|
|
} else if (this.type == "year") { |
|
|
|
|
|
startTime = moment(this.dateTime).format("YYYY-01-01 HH:mm:ss"); |
|
|
} else { |
|
|
} else { |
|
|
startTime = moment(this.dateTime).format("YYYY-MM-DD HH:mm:ss"); |
|
|
startTime = moment(this.dateTime).format("YYYY-MM-DD HH:mm:ss"); |
|
|
} |
|
|
} |
|
|
|
|
|
console.log("startTime", startTime); |
|
|
|
|
|
|
|
|
//感知事件趋势 |
|
|
//感知事件趋势 |
|
|
getWarningTrend({ |
|
|
getWarningTrend({ |
|
|
type: qType, |
|
|
type: this.type, |
|
|
sectionId: this.selectId, |
|
|
sectionId: this.selectId, |
|
|
createTime: startTime, |
|
|
createTime: startTime, |
|
|
direction: this.direction, |
|
|
direction: this.direction, |
|
@ -431,7 +440,7 @@ export default { |
|
|
|
|
|
|
|
|
//感知事件类型分析 |
|
|
//感知事件类型分析 |
|
|
getWarningSectionType({ |
|
|
getWarningSectionType({ |
|
|
type: qType, |
|
|
type: this.type, |
|
|
sectionId: this.selectId, |
|
|
sectionId: this.selectId, |
|
|
createTime: startTime, |
|
|
createTime: startTime, |
|
|
direction: this.direction, |
|
|
direction: this.direction, |
|
@ -697,21 +706,21 @@ export default { |
|
|
position: relative; |
|
|
position: relative; |
|
|
display: flex; |
|
|
display: flex; |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
&.unit_con_01{ |
|
|
&.unit_con_01 { |
|
|
margin: 100px 20px 0; |
|
|
margin: 100px 20px 0; |
|
|
.chart_div { |
|
|
.chart_div { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 240px; |
|
|
height: 240px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
&.unit_con_02{ |
|
|
&.unit_con_02 { |
|
|
margin: 70px 20px 0; |
|
|
margin: 70px 20px 0; |
|
|
.chart_div { |
|
|
.chart_div { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 290px; |
|
|
height: 290px; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
&.unit_con_03{ |
|
|
&.unit_con_03 { |
|
|
margin: 70px 20px 0; |
|
|
margin: 70px 20px 0; |
|
|
.chart_div { |
|
|
.chart_div { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|