|
|
@ -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> |
|
|
|