From 2fc13a0c9267333862bf36e1bf043237c36a8d70 Mon Sep 17 00:00:00 2001
From: zhangzhang <1747194829@qq.com>
Date: Mon, 19 Feb 2024 10:39:18 +0800
Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=B4=B9=E7=AB=99table=E6=9B=B4?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/FormConfig/index.vue | 3 +-
.../StatsDialogVisible/index.vue | 35 ++++++++-----------
2 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue
index 273cb7b3..4784a8e1 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/components/FormConfig/index.vue
@@ -212,8 +212,7 @@ export default {
{
validator: (_, __, callback) => {
const value = pathGet(this.modelFormData, item.key)
-
- if (!value && typeof value != 'number' || typeof value === 'string' && !value.trim()) return callback(new Error(`${item.options?.placeholder || `${item.label}不能为空`}`))
+ if (!value && typeof value != 'number' || typeof value === 'string' && !value.trim() || typeof value === 'object' && value.length == 0) return callback(new Error(`${item.options?.placeholder || `${item.label}不能为空`}`))
const err = ruleMatch(value);
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/auditAnalytics/StatsDialogVisible/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/auditAnalytics/StatsDialogVisible/index.vue
index 1539aff0..001d3809 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/auditAnalytics/StatsDialogVisible/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/governanceAnalysis/components/auditAnalytics/StatsDialogVisible/index.vue
@@ -5,7 +5,6 @@
-
@@ -52,7 +51,7 @@
-
+
@@ -95,6 +94,7 @@ export default {
},
searchType: 1,
facilityIds: [],
+ facilityTableData: [],
searchFormList: [
{
label: "查询条件:",
@@ -145,12 +145,10 @@ export default {
label: "选择站点:",
key: "facilityId",
required: true,
- isAlone: true,
- type: "select",
- default: this.facilityIds,
+ type: "Select",
options: {
multiple: true,
- placeholder: "请选择"
+ options: []
},
visible: data => {
if (data.searchType == 1) {
@@ -198,14 +196,14 @@ export default {
}),
])
.then((res) => {
- console.log(789789, res)
if (res[0].status === 'fulfilled' && res[0].value.code == 200) {
this.searchFormList[2].options.options = res[0].value.data.map(item => ({
key: item.id,
label: item.facilityName,
}))
this.facilityIds = res[0].value.data.map(item => item.id)
- console.log(777, this.facilityIds)
+ // this.searchFormList[2].default = res[0].value.data.map(item => item.id)
+
let date = moment().format('YYYY-MM-DD')
let data = {
searchType: 1,
@@ -218,16 +216,13 @@ export default {
},
handleSearch(data) {
- console.log("data555", data)
this.getSelectTollStation(data)
},
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
- console.log("+++++++", row, column, rowIndex, columnIndex)
if (this.searchType == 2) {
if (!row.causeTypeName) {
- // console.log("11111111111")
if (columnIndex === 0) {
return [1, 2];
}
@@ -236,7 +231,6 @@ export default {
}
};
if (row.controlCauseName === '恶劣天气') {
- // console.log("222222222222")
if (columnIndex === 0) {
console.log(this.weatherNum.length)
if (rowIndex === 0) {
@@ -273,8 +267,6 @@ export default {
},
getSelectTollStation(data) {
- this.facilityTableData = []
- console.log(45, data)
let startTime = ""
let endTime = ""
if (data) {
@@ -287,10 +279,12 @@ export default {
var formData = new FormData();
this.searchType = data.searchType
-
- formData.append("controlType", data.controlType);
+ if (data.searchType == 1) {
+ formData.append("facilityId", data.facilityId);
+ } else {
+ formData.append("controlType", data.controlType);
+ }
formData.append("searchType", data.searchType);
- formData.append("facilityId", data.facilityId);
formData.append("startTime", startTime);
formData.append("endTime", endTime);
let weatherData = []
@@ -308,12 +302,11 @@ export default {
});
this.tableData = weatherData.concat(otherData)
} else {
+ res.data.forEach((item) => {
+ item.total = item.facilityClose + item.facilityRestriction + item.facilityInterval
+ })
this.facilityTableData = res.data
- // this.$nextTick(() => {
-
- // })
- console.log("this.facilityTableData", this.facilityTableData)
}
})