|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<Dialog v-model="modelVisible" title="事件上报" width="1485px" top="55px"> |
|
|
|
<Dialog v-model="modelVisible" title="事件上报" top="55px"> |
|
|
|
<el-tabs v-model="activeName" @tab-click="handleClick"> |
|
|
|
<el-tab-pane label="事件" name="first"> |
|
|
|
<div class="EventDetail"> |
|
|
@ -62,7 +62,7 @@ |
|
|
|
<Button v-if="type == 0" style="background: #39d5bf" @click.native="handleInitData(1)">重新生成</Button> |
|
|
|
<Button style="background: #3de8ff" @click.native="handlePreview">预览</Button> |
|
|
|
<Button v-if="type == 0" style="background: #ffdb82" @click.native="onFileSubmit">保存</Button> |
|
|
|
<Button v-if="type == 0" @click.native="onSubmitUpload">保存并上报</Button> |
|
|
|
<Button v-if="type == 0" :loading="submitting" @click.native="onSubmitUpload">保存并上报</Button> |
|
|
|
<Button style="background: #c9c9c9" @click.native="modelVisible = false">关闭</Button> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
@ -125,7 +125,7 @@ |
|
|
|
" style="background: #ffdb82" @click.native="onFileSubmit">保存</Button> |
|
|
|
<Button v-if="(type == 1 && formFileData.status == 0) || |
|
|
|
(newType == 1 && formFileData.status == 0) |
|
|
|
" @click.native="onSubmitUpload">保存并上报</Button> |
|
|
|
" @click.native="onSubmitUpload" :loading="submitting">保存并上报</Button> |
|
|
|
<Button style="background: #c9c9c9" @click.native="modelVisible = false">关闭</Button> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
@ -175,7 +175,7 @@ |
|
|
|
<Button v-if="type != 3" style="background: #39d5bf" @click.native="handleInitData(3)">重新生成</Button> |
|
|
|
<Button style="background: #3de8ff" @click.native="handlePreview">预览</Button> |
|
|
|
<Button v-if="type != 3" style="background: #ffdb82" @click.native="onFileSubmit">保存</Button> |
|
|
|
<Button v-if="type != 3" @click.native="onSubmitUpload">保存并上报</Button> |
|
|
|
<Button v-if="type != 3" @click.native="onSubmitUpload" :loading="submitting">保存并上报</Button> |
|
|
|
<Button style="background: #c9c9c9" @click.native="modelVisible = false">关闭</Button> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
@ -358,6 +358,7 @@ import { |
|
|
|
editEventImportantFile, |
|
|
|
importantFileStatus, |
|
|
|
} from "@/api/commandDispatch"; |
|
|
|
import { Message } from "element-ui"; |
|
|
|
import { delay, exportFile, confirm } from "@screen/utils/common"; |
|
|
|
var moment = require("moment"); |
|
|
|
export default { |
|
|
@ -380,13 +381,14 @@ export default { |
|
|
|
}, |
|
|
|
eventId: String, |
|
|
|
}, |
|
|
|
inject: ["provideData"], |
|
|
|
inject: ["provideData", "reload"], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
provideDetail: {}, |
|
|
|
type: 0, |
|
|
|
newType: 0, |
|
|
|
showDocx: false, |
|
|
|
submitting: false, |
|
|
|
fData: {}, |
|
|
|
formConfigList: [], |
|
|
|
reportList, |
|
|
@ -422,8 +424,8 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
async modelVisible(newValue, oldValue){ |
|
|
|
if(newValue){ |
|
|
|
async modelVisible(newValue, oldValue) { |
|
|
|
if (newValue) { |
|
|
|
this.provideDetail = this.provideData.detail; |
|
|
|
this.eventId = this.provideDetail.id; |
|
|
|
await this.initData(); |
|
|
@ -571,15 +573,39 @@ export default { |
|
|
|
}, |
|
|
|
// 事件提交 |
|
|
|
onSubmit() { |
|
|
|
this.$refs.FormConfigRef.validate().then((formData) => { }); |
|
|
|
this.$refs.FormConfigRef.validate().then((form) => { |
|
|
|
// 保存事件 |
|
|
|
let eventType = this.provideDetail.eventType; |
|
|
|
form.eventType = eventType; |
|
|
|
let f = formatEvent(form, eventType); |
|
|
|
// 保存事件信息 |
|
|
|
request({ |
|
|
|
url: `/dc/system/event`, |
|
|
|
method: "put", |
|
|
|
data: { |
|
|
|
...f, |
|
|
|
id: this.provideDetail.id, |
|
|
|
eventState: this.provideDetail.eventState, |
|
|
|
stakeMark: f.stakeMark || '', |
|
|
|
}, |
|
|
|
}).then((resconfig) => { |
|
|
|
|
|
|
|
if (resconfig.code != 200) return Message.error(resconfig?.msg); |
|
|
|
//保存上报信息 |
|
|
|
this.$refs.FormReportRef.validate().then((formData) => { |
|
|
|
formData.eventId = this.eventId; |
|
|
|
editEventImportant(formData).then((result) => { |
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
// this.$message.success("修改成功"); |
|
|
|
Message.success("提交成功"); |
|
|
|
this.modelVisible = false; |
|
|
|
this.reload(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
// 获取事件状态 |
|
|
|
getImportantFileStatus() { |
|
|
@ -594,7 +620,6 @@ export default { |
|
|
|
deventImportantFileList(this.eventId, type).then((res) => { |
|
|
|
if (res.length > 0) { |
|
|
|
this.formFileData = res[0]; |
|
|
|
console.log(789, res); |
|
|
|
if (type == "1" || type == "2") { |
|
|
|
this.renewedList = res; |
|
|
|
} |
|
|
@ -666,15 +691,27 @@ export default { |
|
|
|
|
|
|
|
// 保存并上报 |
|
|
|
onSubmitUpload() { |
|
|
|
this.submitting = true; |
|
|
|
let data = { |
|
|
|
...this.formFileData, |
|
|
|
status: 1, |
|
|
|
}; |
|
|
|
if (this.formFileData && this.formFileData.id) { |
|
|
|
editEventImportantFile(data).then((res) => { }); |
|
|
|
editEventImportantFile(data).then((res) => { |
|
|
|
if (res.code != 200) return Message.error(res?.msg); |
|
|
|
this.$message.success('报送成功') |
|
|
|
this.submitting = false; |
|
|
|
this.modelVisible = false; |
|
|
|
}); |
|
|
|
} else { |
|
|
|
addEventImportantFile(data).then((res) => { }); |
|
|
|
addEventImportantFile(data).then((res) => { |
|
|
|
if (res.code != 200) return Message.error(res?.msg); |
|
|
|
this.$message.success('报送成功') |
|
|
|
this.submitting = false; |
|
|
|
this.modelVisible = false; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
this.getImportantFileStatus(); |
|
|
|
if (this.activeName == "second") { |
|
|
|
this.getEventImportantFileList(1); |
|
|
@ -697,11 +734,16 @@ export default { |
|
|
|
width: 100%; |
|
|
|
height: 665px; |
|
|
|
overflow-y: auto; |
|
|
|
overflow-x: hidden; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
.title { |
|
|
|
margin: 10px 0; |
|
|
|
} |
|
|
|
.form{ |
|
|
|
overflow-y: auto; |
|
|
|
overflow-x: hidden; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.file { |
|
|
@ -857,9 +899,11 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.linespace{ |
|
|
|
|
|
|
|
.linespace { |
|
|
|
height: 46px; |
|
|
|
} |
|
|
|
|
|
|
|
.footer { |
|
|
|
// display: flex; |
|
|
|
// max-width: 40%; |
|
|
|