From a510f77d15c6eafcd59d08371bfbcb8ba815fcba Mon Sep 17 00:00:00 2001 From: zhangzhang <1747194829@qq.com> Date: Sun, 28 Apr 2024 17:22:49 +0800 Subject: [PATCH] =?UTF-8?q?bug=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/assets/styles/sidebar-dark.scss | 4 +- .../components/postTrendsMonth/index.vue | 18 ++++-- .../components/eventQuery/index.vue | 63 +++++++++++-------- .../pages/perception/topology/index.vue | 19 +++++- .../components/trafficIndicators/index.vue | 22 +++++-- .../views/JiHeExpressway/scss/el-reset.scss | 9 +++ 6 files changed, 94 insertions(+), 41 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/sidebar-dark.scss b/ruoyi-ui/src/assets/styles/sidebar-dark.scss index d3cf0322..bef43f87 100644 --- a/ruoyi-ui/src/assets/styles/sidebar-dark.scss +++ b/ruoyi-ui/src/assets/styles/sidebar-dark.scss @@ -2829,6 +2829,7 @@ color: #999; border: solid 1px #666; background: transparent; + } @@ -2854,7 +2855,8 @@ .el-year-table td.disabled .cell { color: #999; border: solid 1px #666; - background: transparent; + // background: transparent; + background: #1B586D; } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/index.vue index a2cbbfcb..01eef9d7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/postTrendsMonth/index.vue @@ -51,6 +51,7 @@ class="selectRoad" v-model="dateTime" style="width: 140px" + :picker-options="pickerOptions" :type=" type == 1 ? 'date' : type == 2 ? 'month' : type == 4 ? 'year' : '' " @@ -148,6 +149,11 @@ export default { }, ], dateTime: moment().format("YYYY-MM-DD HH:mm:ss"), + pickerOptions: { + disabledDate(time) { + return time.getTime() > Date.now(); + }, + }, }; }, @@ -217,10 +223,10 @@ export default { }, async searchQuery() { let startTime = ""; - console.log("searchQuery", this.type); - if (this.type == 3) { + if (this.type == 2) { + startTime = moment(this.dateTime).format("YYYY-MM-01 00:00:00"); + } else if (this.type == 3) { let year = moment().year(); - // console.log(year, this.quarter); if (this.quarter == 1) { startTime = `${year}-01-01 00:00:00`; } else if (this.quarter == 2) { @@ -230,6 +236,8 @@ export default { } else { startTime = `${year}-10-01 00:00:00`; } + } else if (this.type == 4) { + startTime = moment(this.dateTime).format("YYYY-01-01 00:00:00"); } else { startTime = moment(this.dateTime).format("YYYY-MM-DD HH:mm:ss"); } @@ -238,7 +246,6 @@ export default { // type: this.type, // startTime: startTime, // } - console.log("++++++++++++", startTime); var formData = new FormData(); formData.append("direction", this.direction); formData.append("type", this.type); @@ -252,7 +259,8 @@ export default { this.direction = "1"; this.type = "1"; this.quarter = "1"; - this.dateTime = "2024-01-01 00:00:00"; + this.dateTime = moment().format("YYYY-MM-DD HH:mm:ss"); + this.searchQuery(); }, renderCharts() { this.$nextTick(() => { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue index 680259b4..d316dcfc 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue @@ -53,9 +53,10 @@ v-if="type != 'quarter'" class="selectRoad" v-model="dateTime" + :picker-options="pickerOptions" style="width: 140px" :type=" - type == 'date' + type == 'day' ? 'date' : type == 'month' ? 'month' @@ -106,10 +107,7 @@ text="暂无数据..." class="empty" > -
+ @@ -195,7 +193,7 @@ export default { label: "月", }, { - value: "date", + value: "day", label: "日", }, { @@ -222,16 +220,22 @@ export default { value: "4", }, ], - dateTime: "2024", + dateTime: moment().format("YYYY-MM-DD HH:mm:ss"), + pickerOptions: { + disabledDate(time) { + return time.getTime() > Date.now(); + }, + }, direction: "1", dataList: [], selectIndex: 1, selectId: 1, reset: false, - type: "year", + type: "day", chart1List: [], chart2List: [], chart3List: [], + list: [ { name: "大学城-长清", @@ -288,8 +292,8 @@ export default { }, onReset() { this.direction = "1"; - this.type = "year"; - this.dateTime = "2024"; + this.type = "day"; + this.dateTime = moment(this.dateTime).format("YYYY-MM-DD HH:mm:ss"); this.selectId = 1; this.selectIndex = 1; this.reset = true; @@ -297,25 +301,30 @@ export default { }, searchQuery() { let startTime = ""; - let qType = this.type == "date" ? "day" : this.type; - if (this.type == "quarter") { - // let year = moment().year(); - // if (this.quarter == 1) { - // startTime = `${year}-01-01 00:00:00` - // } else if (this.quarter == 2) { - // startTime = `${year}-04-01 00:00:00` - // } else if (this.quarter == 3) { - // startTime = `${year}-07-01 00:00:00` - // } else { - // startTime = `${year}-10-01 00:00:00` - // } + // let qType = this.type == "date" ? "day" : this.type; + if (this.type == "month") { + startTime = moment(this.dateTime).format("YYYY-MM-01 HH:mm:ss"); + } else if (this.type == "quarter") { + let year = moment().year(); + if (this.quarter == 1) { + startTime = `${year}-01-01 00:00:00`; + } else if (this.quarter == 2) { + startTime = `${year}-04-01 00:00:00`; + } else if (this.quarter == 3) { + 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 { startTime = moment(this.dateTime).format("YYYY-MM-DD HH:mm:ss"); } + console.log("startTime", startTime); //感知事件趋势 getWarningTrend({ - type: qType, + type: this.type, sectionId: this.selectId, createTime: startTime, direction: this.direction, @@ -431,7 +440,7 @@ export default { //感知事件类型分析 getWarningSectionType({ - type: qType, + type: this.type, sectionId: this.selectId, createTime: startTime, direction: this.direction, @@ -697,21 +706,21 @@ export default { position: relative; display: flex; align-items: center; - &.unit_con_01{ + &.unit_con_01 { margin: 100px 20px 0; .chart_div { width: 100%; height: 240px; } } - &.unit_con_02{ + &.unit_con_02 { margin: 70px 20px 0; .chart_div { width: 100%; height: 290px; } } - &.unit_con_03{ + &.unit_con_03 { margin: 70px 20px 0; .chart_div { width: 100%; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/topology/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/topology/index.vue index e14eee93..cc3443f6 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/topology/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/topology/index.vue @@ -40,7 +40,10 @@