Browse Source

更改

wangqin
zhangzhang 7 months ago
parent
commit
8de522e9da
  1. 51
      ruoyi-ui/src/api/commandDispatch/index.js
  2. 65
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue
  3. 10
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue
  4. 122
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/data.js
  5. 48
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue
  6. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue

51
ruoyi-ui/src/api/commandDispatch/index.js

@ -73,11 +73,46 @@ export function postNoSkipClear(data) {
}); });
} }
// 新增事件侧重要素 // 修改事件侧重要素
// export function postNoSkipClear(data) { export function editEventImportant(data) {
// return request({ return request({
// url: "/dc/system/event/skipClear", url: "/business/eventImportant",
// method: "post", method: "put",
// data, data,
// }); });
// } }
// 根据事件id查询侧重要素信息
export function getEventImportant(eventId) {
return request({
url: "/business/eventImportant/" + eventId,
method: "get",
});
}
// 新增重要事件文件内容
export function addEventImportantFile(data) {
return request({
url: "/business/eventImportantFile",
method: "post",
data,
});
}
// 新增重要事件文件内容
export function editEventImportantFile(data) {
return request({
url: "/business/eventImportantFile",
method: "put",
data,
});
}
// 下载重要事件
export function downloadEventImportantFile(data) {
return request({
url: "/business/eventImportantFile/download",
method: "post",
data,
});
}

65
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/StatsDialogVisible/index.vue

@ -25,8 +25,8 @@
<el-checkbox-group v-model="form.employees"> <el-checkbox-group v-model="form.employees">
<el-checkbox <el-checkbox
v-for="item in scope.row.employeesMap" v-for="item in scope.row.employeesMap"
:key="item" :key="item.id"
:label="item" :label="item.id"
>{{ item.name }}</el-checkbox >{{ item.name }}</el-checkbox
> >
</el-checkbox-group> </el-checkbox-group>
@ -40,8 +40,8 @@
<el-checkbox-group v-model="form.vehicle"> <el-checkbox-group v-model="form.vehicle">
<el-checkbox <el-checkbox
v-for="item in scope.row.vehiclesMap" v-for="item in scope.row.vehiclesMap"
:key="item" :key="item.id"
:label="item" :label="item.id"
>{{ item.vehiclePlate + item.vehicleText }}</el-checkbox >{{ item.vehiclePlate + item.vehicleText }}</el-checkbox
> >
</el-checkbox-group> </el-checkbox-group>
@ -128,27 +128,44 @@ export default {
handleSubmit() { handleSubmit() {
this.form.dispatchId = this.id; this.form.dispatchId = this.id;
console.log("data", this.data); console.log("data", this.data);
let employeesData = this.form.employees;
console.log("this.form,this.form", this.form); console.log("this.form,this.form", this.form);
// employeesData.forEach((item) => { let newEmployees = [];
// for (let i = 0; i < this.data.length; i++) { let newVehiclesMap = [];
// if (this.data[i].employeesMap.length > 0) { this.form.employees.forEach((item) => {
// for (let j = 0; j < this.data[i].employeesMap.length; j++) { for (let i = 0; i < this.data.length; i++) {
// if (this.data[i].employeesMap[j].id == item) { if (this.data[i].employeesMap.length > 0) {
// this.form.employees(...) for (let j = 0; j < this.data[i].employeesMap.length; j++) {
if (this.data[i].employeesMap[j].id == item) {
// item.id = item; newEmployees.push({
// item.name = this.data[i].employeesMap[j].name; id: item,
// } name: this.data[i].employeesMap[j].name,
// } });
// } }
// } }
// }); }
this.form.vehicle; }
});
// postUpdateSource(this.form).then((res) => { this.form.vehicle.forEach((item) => {
// this.$emit("handleRefresh"); for (let i = 0; i < this.data.length; i++) {
// }); if (this.data[i].vehiclesMap.length > 0) {
for (let j = 0; j < this.data[i].vehiclesMap.length; j++) {
if (this.data[i].vehiclesMap[j].id == item) {
newVehiclesMap.push({
id: item,
vehiclePlate: this.data[i].vehiclesMap[j].vehiclePlate,
});
}
}
}
}
});
this.form.employees = newEmployees;
this.form.vehicle = newVehiclesMap;
console.log("88888888", this.form);
postUpdateSource(this.form).then((res) => {
this.$emit("handleRefresh");
});
}, },
}, },
}; };

10
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DispatchLiaison/index.vue

@ -130,13 +130,15 @@ export default {
this.employeesChoice = []; this.employeesChoice = [];
this.vehiclesChoice = []; this.vehiclesChoice = [];
this.staff.forEach((element) => { this.staff.forEach((element) => {
this.employeesChoice.push(element); // this.employeesChoice.push(element);
// this.employeesChoice.push(element.resourceId); this.employeesChoice.push(element.resourceId);
}); });
this.vehicle.forEach((element) => { this.vehicle.forEach((element) => {
this.vehiclesChoice.push(element); // this.vehiclesChoice.push(element);
// this.vehiclesChoice.push(element.resourceId); this.vehiclesChoice.push(element.resourceId);
}); });
// console.log("this.employeesChoice", this.employeesChoice);
// console.log("this.vehiclesChoice", this.vehiclesChoice);
}); });
}, },
getVehicleTypeList() { getVehicleTypeList() {

122
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/data.js

@ -311,96 +311,146 @@ export const formList = [
export const reportList = [ export const reportList = [
{ {
label: "车型及车牌号:", label: "车型及车牌号:",
key: "eventCause", key: "plateNumber",
type: "input", type: "input",
options: { options: {
disabled: true,
placeholder: "", placeholder: "",
}, },
}, },
{ {
label: "分流点名称及桩号:", label: "分流点名称及桩号:",
key: "eventCause", key: "diversionPoint",
type: "input", type: "input",
options: { options: {
disabled: true,
placeholder: "", placeholder: "",
}, },
}, },
{ {
label: "目前处置进度:", label: "目前处置进度:",
key: "eventCause", key: "currentProgress",
type: "input", type: "input",
options: { options: {
disabled: true,
placeholder: "", placeholder: "",
}, },
}, },
{ {
label: "已采取的措施:", label: "已采取的措施:",
key: "eventCause", key: "takeSteps",
type: "input", type: "input",
options: { options: {
disabled: true,
placeholder: "", placeholder: "",
}, },
}, },
{ {
label: "是否启动应急预案:", label: "是否启动应急预案:",
key: "eventCause", key: "planStatus",
type: "radio", type: "RadioGroup",
options: { default: 0,
disabled: true, options: {
placeholder: "", options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
}, },
}, },
{ {
label: "交警是否到达:", label: "交警是否到达:",
key: "eventCause", key: "trafficPoliceStatus",
type: "radio", type: "RadioGroup",
default: 0,
options: { options: {
disabled: true, options: [
placeholder: "", {
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
}, },
}, },
{ {
label: "医疗是否到达:", label: "医疗是否到达:",
key: "eventCause", key: "medicalStatus",
type: "input", type: "RadioGroup",
options: { default: 0,
disabled: true, options: {
placeholder: "", options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
}, },
}, },
{ {
label: "是否做好情报板提示工作:", label: "是否做好情报板提示工作:",
key: "eventCause", key: "boardStatus",
type: "input", type: "RadioGroup",
default: 0,
options: { options: {
disabled: true, options: [
placeholder: "", {
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
}, },
}, },
{ {
label: "是否有危化品泄露:", label: "是否有危化品泄露:",
key: "eventCause", key: "chemicalsStatus",
type: "input", type: "RadioGroup",
options: { default: 0,
disabled: true, options: {
placeholder: "", options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
}, },
}, },
{ {
label: "消防是否到达:", label: "消防是否到达:",
key: "eventCause", key: "fireStatus",
type: "input", type: "RadioGroup",
options: { default: 0,
disabled: true, options: {
placeholder: "", options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
}, },
}, },
]; ];

48
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue

@ -19,12 +19,15 @@
/> --> /> -->
<span class="title">上报侧重要素</span> <span class="title">上报侧重要素</span>
<Form <Form
ref="FormReportRef"
:formList="reportList" :formList="reportList"
:dFormData="formData" v-model="reportData"
label-width="100px" label-width="100px"
/> />
<!-- :dFormData="formData" -->
<div class="footer"> <div class="footer">
<Button @click.native="onSubmit" :loading="submitting">保存</Button> <Button @click.native="onSubmit">保存</Button>
<!-- :loading="submitting" -->
<Button <Button
style="background: #c9c9c9" style="background: #c9c9c9"
@click.native="modelVisible = false" @click.native="modelVisible = false"
@ -46,6 +49,7 @@ import { formList, reportList } from "./data";
import { tabConfigList } from "../../EventInformation/components/EditEventInformationDialog/data.js"; import { tabConfigList } from "../../EventInformation/components/EditEventInformationDialog/data.js";
import Button from "@screen/components/Buttons/Button.vue"; import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request"; import request from "@/utils/request";
import { getEventImportant, editEventImportant } from "@/api/commandDispatch";
var moment = require("moment"); var moment = require("moment");
export default { export default {
name: "EventDetail", name: "EventDetail",
@ -64,6 +68,7 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
eventId: String,
}, },
data() { data() {
return { return {
@ -72,6 +77,19 @@ export default {
formConfigList: [], formConfigList: [],
reportList, reportList,
activeName: "first", activeName: "first",
reportData: {
plateNumber: "",
diversionPoint: "",
currentProgress: "",
takeSteps: "",
planStatus: "",
trafficPoliceStatus: "",
medicalStatus: "",
boardStatus: "",
chemicalsStatus: "",
fireStatus: "",
},
// submitting: false,
}; };
}, },
computed: { computed: {
@ -95,8 +113,8 @@ export default {
}); });
if (infoData.code != 200) return Message.error(infoData?.msg); if (infoData.code != 200) return Message.error(infoData?.msg);
this.resultEventData = { ...infoData.data }; // this.resultEventData = { ...infoData.data };
console.log("事件详情666", this.resultEventData); // console.log("666", this.resultEventData);
let info = infoData.data; let info = infoData.data;
if (typeof info.stakeMark == "string") { if (typeof info.stakeMark == "string") {
let numbers = info.stakeMark.match(/\d+/g).map(Number); let numbers = info.stakeMark.match(/\d+/g).map(Number);
@ -175,6 +193,13 @@ export default {
} }
}); });
}, },
getReportData() {
console.log("事件id", this.eventId);
getEventImportant(this.eventId).then((res) => {
console.log("详情", res);
this.reportData = { ...res.data };
});
},
handleClick(tab, event) { handleClick(tab, event) {
console.log(tab, event); console.log(tab, event);
}, },
@ -221,9 +246,24 @@ export default {
}); });
}); });
}, },
onSubmit() {
this.$refs.FormConfigRef.validate().then((formData) => {
console.log("事件修改", formData);
});
this.$refs.FormReportRef.validate().then((formData) => {
console.log("事件侧重要素修改", formData);
formData.eventId = this.eventId;
editEventImportant(formData).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
// this.$message.success("");
this.modelVisible = false;
});
});
},
}, },
mounted() { mounted() {
this.initData(); this.initData();
this.getReportData();
}, },
}; };
</script> </script>

8
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/index.vue

@ -87,7 +87,11 @@
</ButtonGradient> --> </ButtonGradient> -->
</div> </div>
</Card> </Card>
<DialogVisible :visible="dialogVisible" @update:value="handleClose" /> <DialogVisible
:visible="dialogVisible"
@update:value="handleClose"
:eventId="eventId"
/>
<!-- :data="dispatchList" --> <!-- :data="dispatchList" -->
</div> </div>
</template> </template>
@ -127,7 +131,7 @@ export default {
emit: ["fullHeight"], emit: ["fullHeight"],
data() { data() {
return { return {
dialogVisible: true, dialogVisible: false,
eventId: "1a91d65cc31f4a9d90122888edb31043", eventId: "1a91d65cc31f4a9d90122888edb31043",
test: null, test: null,
testRadio: "input", testRadio: "input",

Loading…
Cancel
Save