From 2bd3f198bf1ba245d64e7fc5dfa4a4b9518cec52 Mon Sep 17 00:00:00 2001
From: zhangzhang <1747194829@qq.com>
Date: Fri, 12 Apr 2024 16:35:24 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E5=BA=A6=E8=AE=B0=E5=BD=95?=
=?UTF-8?q?=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../StatsDialogVisible/index.vue | 37 +++++++++++++++++--
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
index c6f8a280..1288e859 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
@@ -22,21 +22,43 @@
-
+
+
+
+
+
+
+
{{ item.shiftsName }}
-
+
+
+
+
+
+
+
@@ -46,12 +68,14 @@ import InputSearch from "@screen/components/InputSearch/index.vue";
import Table from "@screen/components/Table.vue";
import { selectTollStation } from "@/api/event/governanceAnalysis";
import request from "@/utils/request";
+import Button from "@screen/components/Buttons/Button.vue";
export default {
name: "StatsDetail",
components: {
Dialog,
InputSearch,
Table,
+ Button,
},
model: {
prop: "visible",
@@ -63,6 +87,7 @@ export default {
},
data() {
return {
+ form: { personnel: [], vehicle: [] },
num: 0,
tableData: [],
weatherNum: [],
@@ -391,4 +416,8 @@ export default {
.el-table--border::after {
background: none;
}
+.footer {
+ margin-top: 20px;
+ display: flex;
+}
From acd9702e206b416775af8786f4fba1f1a4412a0e Mon Sep 17 00:00:00 2001
From: zhangzhang <1747194829@qq.com>
Date: Fri, 12 Apr 2024 17:45:00 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=B0=83=E5=BA=A6?=
=?UTF-8?q?=E8=81=94=E7=BB=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../StatsDialogVisible/index.vue | 250 +-----------------
.../Cards/DispatchLiaison/index.vue | 34 ++-
2 files changed, 40 insertions(+), 244 deletions(-)
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
index 1288e859..a040701e 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
@@ -37,13 +37,13 @@
-
- {{ item.shiftsName }}
+
@@ -88,102 +88,6 @@ export default {
data() {
return {
form: { personnel: [], vehicle: [] },
- num: 0,
- tableData: [],
- weatherNum: [],
- startTime: "",
- endTime: "",
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now();
- },
- },
- searchType: 1,
- controlType: 1,
- facilityIds: [],
- facilityTableData: [],
- searchFormList: [
- {
- label: "查询条件:",
- key: "searchType",
- required: true,
- isAlone: true,
- type: "RadioGroup",
- default: 1,
- options: {
- type: "circle",
- options: [
- {
- key: 1,
- label: "站点",
- },
- {
- key: 2,
- label: "原因",
- },
- ],
- },
- },
- {
- label: "事件类型:",
- key: "controlType",
- required: true,
- isAlone: true,
- type: "RadioGroup",
- visible: (data) => {
- if (data.searchType == 2) {
- return true;
- }
- },
- default: 1,
- options: {
- type: "circle",
- options: [
- {
- key: 1,
- label: "收费站封闭",
- },
- {
- key: 2,
- label: "收费站限行",
- },
- ],
- },
- },
- {
- label: "选择站点:",
- key: "facilityId",
- required: true,
- type: "Select",
- options: {
- multiple: true,
- options: [],
- },
- default: [],
- visible: (data) => {
- if (data.searchType == 1) {
- return true;
- }
- },
- },
- {
- label: "日期:",
- key: "date",
- required: true,
- type: "datePicker",
- default: "",
- options: {
- pickerOptions: {
- disabledDate(time) {
- return time.getTime() > Date.now();
- },
- },
- valueFormat: "yyyy-MM-dd",
- type: "daterange",
- },
- },
- ],
- queryParams: {},
};
},
computed: {
@@ -198,149 +102,9 @@ export default {
},
methods: {
- getFacilityList() {
- Promise.allSettled([
- // 查询收费站
- request({
- url: `/business/facility/query`,
- method: "get",
- }),
- ]).then((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,
- // })
- // );
- let dataList = [];
- res[0].value.data.forEach((item) => {
- if (item.facilityType == 1) {
- dataList.push({
- key: item.id,
- label: item.facilityName,
- });
- }
- });
- this.searchFormList[2].options.options = dataList;
- this.facilityIds = res[0].value.data.map((item) => item.id);
- this.searchFormList[2].default = dataList.map((item) => item.key);
- console.log(56, this.searchFormList[2].default);
- let currentMonth = moment().format("YYYY-MM");
- let currentDate = moment().format("YYYY-MM-DD");
- this.queryParams = {
- searchType: 1,
- facilityId: this.facilityIds,
- date: [currentMonth + "-01", currentDate],
- };
- this.searchFormList[3].default = [currentMonth + "-01", currentDate];
- this.getSelectTollStation(this.queryParams);
- }
- });
- },
- // handleResetForm(data) {
- // this.getSelectTollStation(data);
- // },
- handleSearch(data, value) {
- console.log(888, data, value);
- if (value == "reset") {
- data = this.queryParams;
- }
- this.getSelectTollStation(data);
- },
- arraySpanMethod({ row, column, rowIndex, columnIndex }) {
- if (this.searchType == 2) {
- if (!row.causeTypeName) {
- if (columnIndex === 0) {
- return [1, 2];
- } else if (columnIndex === 1) {
- return [0, 0];
- }
- }
- if (row.controlCauseName === "恶劣天气") {
- if (columnIndex === 0) {
- console.log(this.weatherNum.length);
- if (rowIndex === 0) {
- return [this.weatherNum.length, 1];
- } else if (rowIndex <= this.weatherNum.length) {
- return [0, 0];
- }
- // if (rowIndex === 2) {
- // return [7, 1];
- // }
- // else if (rowIndex === 3) {
- // return [0, 0];
- // } else if (rowIndex === 4) {
- // return [0, 0];
- // }
- // else if (rowIndex === 5) {
- // return [0, 0];
- // }
- // else if (rowIndex === 6) {
- // return [0, 0];
- // }
- // else if (rowIndex === 7) {
- // return [0, 0];
- // }
- // else if (rowIndex === 8) {
- // return [0, 0];
- // }
- }
- // this.weatherNum = 0
- }
- }
- },
- getSelectTollStation(data) {
- let startTime = "";
- let endTime = "";
- if (data) {
- startTime = data.date[0] + " 00:00:00";
- endTime = data.date[1] + " 23:59:59";
- } else {
- startTime = new Date("2024-01-01 11:12:21");
- startTime = new Date("2024-01-26 11:12:36");
- }
-
- var formData = new FormData();
- this.searchType = data.searchType;
- this.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("startTime", startTime);
- formData.append("endTime", endTime);
- let weatherData = [];
- let otherData = [];
- selectTollStation(formData).then((res) => {
- if (data.searchType == 2) {
- this.weatherNum = [];
- res.data.forEach((item) => {
- if (item.causeTypeName) {
- this.weatherNum.push(item.causeTypeName);
- weatherData.push(item);
- } else {
- otherData.push(item);
- }
- });
- this.tableData = weatherData.concat(otherData);
- } else {
- res.data.forEach((item) => {
- item.total =
- item.facilityClose +
- item.facilityRestriction +
- item.facilityInterval;
- });
- this.facilityTableData = res.data;
- }
- });
- },
- },
- mounted() {
- this.getFacilityList();
+ handleSubmit() {},
},
+ mounted() {},
};
diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
index 644868cf..812a44b9 100644
--- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
+++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
@@ -49,7 +49,9 @@
救援车辆:
{{
- dispatchData.vehiclesMap.length > 0 ? "a" : "-"
+ dispatchData.vehiclesMap.length > 0
+ ? item.vehiclePlate + item.vehicleText
+ : "-"
}}
@@ -68,6 +70,7 @@ import Descriptions from "@screen/components/Descriptions.vue";
import { provideMixin } from "./../../mixin";
import { commandDispatch } from "@/api/commandDispatch";
import StatsDialogVisible from "./StatsDialogVisible/index.vue";
+import request from "@/utils/request";
export default {
name: "DispatchLiaison",
@@ -82,6 +85,7 @@ export default {
return {
dispatchData: [],
dispatchList: [],
+ vehicleTypeList: [],
statsDialogVisible: false,
};
},
@@ -98,13 +102,41 @@ export default {
stakeMark: "K099+750",
};
commandDispatch(data).then((res) => {
+ res.data.forEach((element) => {
+ if (element.vehiclesMap.length > 0) {
+ element.vehiclesMap.forEach((item) => {
+ console.log(789, item);
+ this.vehicleTypeList.forEach((i) => {
+ console.log(456, i);
+ if (item.vehicleType == i.dictValue) {
+ item.vehicleText = "(" + i.dictLabel + ")";
+ }
+ });
+ });
+ }
+ });
this.dispatchList = res.data;
this.dispatchData = res.data[0];
});
},
+ getVehicleTypeList() {
+ if (this.vehicleTypeList.length) return;
+
+ request({
+ url: `/system/dict/data/type/sys_vehicle_type`,
+ method: "GET",
+ params: {},
+ })
+ .then(({ data, code }) => {
+ if (code != 200) return; //Message.error("详情获取失败");
+ this.vehicleTypeList = data;
+ })
+ .catch((err) => {});
+ },
},
mounted() {
this.getCommandDispatch();
+ this.getVehicleTypeList();
},
};