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. 114
      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) {
// return request({
// url: "/dc/system/event/skipClear",
// method: "post",
// data,
// });
// }
// 修改事件侧重要素
export function editEventImportant(data) {
return request({
url: "/business/eventImportant",
method: "put",
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
v-for="item in scope.row.employeesMap"
:key="item"
:label="item"
:key="item.id"
:label="item.id"
>{{ item.name }}</el-checkbox
>
</el-checkbox-group>
@ -40,8 +40,8 @@
<el-checkbox-group v-model="form.vehicle">
<el-checkbox
v-for="item in scope.row.vehiclesMap"
:key="item"
:label="item"
:key="item.id"
:label="item.id"
>{{ item.vehiclePlate + item.vehicleText }}</el-checkbox
>
</el-checkbox-group>
@ -128,27 +128,44 @@ export default {
handleSubmit() {
this.form.dispatchId = this.id;
console.log("data", this.data);
let employeesData = this.form.employees;
console.log("this.form,this.form", this.form);
// employeesData.forEach((item) => {
// for (let i = 0; i < this.data.length; i++) {
// if (this.data[i].employeesMap.length > 0) {
// for (let j = 0; j < this.data[i].employeesMap.length; j++) {
// if (this.data[i].employeesMap[j].id == item) {
// this.form.employees(...)
// item.id = item;
// item.name = this.data[i].employeesMap[j].name;
// }
// }
// }
// }
// });
this.form.vehicle;
// postUpdateSource(this.form).then((res) => {
// this.$emit("handleRefresh");
// });
let newEmployees = [];
let newVehiclesMap = [];
this.form.employees.forEach((item) => {
for (let i = 0; i < this.data.length; i++) {
if (this.data[i].employeesMap.length > 0) {
for (let j = 0; j < this.data[i].employeesMap.length; j++) {
if (this.data[i].employeesMap[j].id == item) {
newEmployees.push({
id: item,
name: this.data[i].employeesMap[j].name,
});
}
}
}
}
});
this.form.vehicle.forEach((item) => {
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.vehiclesChoice = [];
this.staff.forEach((element) => {
this.employeesChoice.push(element);
// this.employeesChoice.push(element.resourceId);
// this.employeesChoice.push(element);
this.employeesChoice.push(element.resourceId);
});
this.vehicle.forEach((element) => {
this.vehiclesChoice.push(element);
// this.vehiclesChoice.push(element.resourceId);
// this.vehiclesChoice.push(element);
this.vehiclesChoice.push(element.resourceId);
});
// console.log("this.employeesChoice", this.employeesChoice);
// console.log("this.vehiclesChoice", this.vehiclesChoice);
});
},
getVehicleTypeList() {

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

@ -311,96 +311,146 @@ export const formList = [
export const reportList = [
{
label: "车型及车牌号:",
key: "eventCause",
key: "plateNumber",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "分流点名称及桩号:",
key: "eventCause",
key: "diversionPoint",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "目前处置进度:",
key: "eventCause",
key: "currentProgress",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "已采取的措施:",
key: "eventCause",
key: "takeSteps",
type: "input",
options: {
disabled: true,
placeholder: "",
},
},
{
label: "是否启动应急预案:",
key: "eventCause",
type: "radio",
key: "planStatus",
type: "RadioGroup",
default: 0,
options: {
disabled: true,
placeholder: "",
options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
},
},
{
label: "交警是否到达:",
key: "eventCause",
type: "radio",
key: "trafficPoliceStatus",
type: "RadioGroup",
default: 0,
options: {
disabled: true,
placeholder: "",
options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
},
},
{
label: "医疗是否到达:",
key: "eventCause",
type: "input",
key: "medicalStatus",
type: "RadioGroup",
default: 0,
options: {
disabled: true,
placeholder: "",
options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
},
},
{
label: "是否做好情报板提示工作:",
key: "eventCause",
type: "input",
key: "boardStatus",
type: "RadioGroup",
default: 0,
options: {
disabled: true,
placeholder: "",
options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
},
},
{
label: "是否有危化品泄露:",
key: "eventCause",
type: "input",
key: "chemicalsStatus",
type: "RadioGroup",
default: 0,
options: {
disabled: true,
placeholder: "",
options: [
{
label: "是",
key: 1,
},
{
label: "否",
key: 0,
},
],
},
},
{
label: "消防是否到达:",
key: "eventCause",
type: "input",
key: "fireStatus",
type: "RadioGroup",
default: 0,
options: {
disabled: true,
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>
<Form
ref="FormReportRef"
:formList="reportList"
:dFormData="formData"
v-model="reportData"
label-width="100px"
/>
<!-- :dFormData="formData" -->
<div class="footer">
<Button @click.native="onSubmit" :loading="submitting">保存</Button>
<Button @click.native="onSubmit">保存</Button>
<!-- :loading="submitting" -->
<Button
style="background: #c9c9c9"
@click.native="modelVisible = false"
@ -46,6 +49,7 @@ import { formList, reportList } from "./data";
import { tabConfigList } from "../../EventInformation/components/EditEventInformationDialog/data.js";
import Button from "@screen/components/Buttons/Button.vue";
import request from "@/utils/request";
import { getEventImportant, editEventImportant } from "@/api/commandDispatch";
var moment = require("moment");
export default {
name: "EventDetail",
@ -64,6 +68,7 @@ export default {
type: Object,
default: () => {},
},
eventId: String,
},
data() {
return {
@ -72,6 +77,19 @@ export default {
formConfigList: [],
reportList,
activeName: "first",
reportData: {
plateNumber: "",
diversionPoint: "",
currentProgress: "",
takeSteps: "",
planStatus: "",
trafficPoliceStatus: "",
medicalStatus: "",
boardStatus: "",
chemicalsStatus: "",
fireStatus: "",
},
// submitting: false,
};
},
computed: {
@ -95,8 +113,8 @@ export default {
});
if (infoData.code != 200) return Message.error(infoData?.msg);
this.resultEventData = { ...infoData.data };
console.log("事件详情666", this.resultEventData);
// this.resultEventData = { ...infoData.data };
// console.log("666", this.resultEventData);
let info = infoData.data;
if (typeof info.stakeMark == "string") {
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) {
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() {
this.initData();
this.getReportData();
},
};
</script>

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

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

Loading…
Cancel
Save