|
|
@ -30,10 +30,10 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<template #footer> |
|
|
|
<Button v-if="isDisBtn" style="padding:0 24px; pointer-events: none; background-color: #C9C9C9;" |
|
|
|
@click.native="handleRestore" :loading="submitting">强制恢复</Button> |
|
|
|
<Button v-else style="padding:0 24px;" @click.native="handleRestore" :loading="submitting">强制恢复</Button> |
|
|
|
<Button style="padding:0 24px;" @click.native="handleSubmit" :loading="submitting">确认</Button> |
|
|
|
<!-- <Button v-if="isDisBtn" style="padding:0 24px; pointer-events: none; background-color: #C9C9C9;" |
|
|
|
@click.native="handleRestore" :loading="submitting">强制恢复</Button> --> |
|
|
|
<Button style="padding:0 24px;" @click.native="handleSubmit(2)" :loading="submitting">强制恢复</Button> |
|
|
|
<Button style="padding:0 24px;" @click.native="handleSubmit(1)" :loading="submitting">确认</Button> |
|
|
|
<Button style="background: #C9C9C9;padding:0 24px;" |
|
|
|
@click.native="modelVisible = false, submitting = false">取消</Button> |
|
|
|
</template> |
|
|
@ -373,37 +373,27 @@ export default { |
|
|
|
} |
|
|
|
return data; |
|
|
|
}, |
|
|
|
handleSubmit() { |
|
|
|
handleSubmit(value = 1) { |
|
|
|
// this.submitting = false; |
|
|
|
|
|
|
|
// let secondFormTable = this.$refs['secondFormTable'].tableData || []; |
|
|
|
// let thirdFormTable = this.$refs['thirdFormTable'].tableData || []; |
|
|
|
// console.log('12', thirdFormTable); |
|
|
|
// let dcArr = []; |
|
|
|
// let id = ''; |
|
|
|
// if (this.dialogType == 2) id = this.planId; |
|
|
|
// secondFormTable.forEach(it => { |
|
|
|
// dcArr.push(this.formatData(it, 1, id)); |
|
|
|
// }) |
|
|
|
// thirdFormTable.forEach(it => { |
|
|
|
// dcArr.push(this.formatData(it, 2, id)); |
|
|
|
// }) |
|
|
|
let plan = { ...this.planInfo }; |
|
|
|
let actions = plan.dcExecuteAction.filter(it => it.actionType == value); |
|
|
|
plan.dcExecuteAction = actions; |
|
|
|
|
|
|
|
let reqData = { |
|
|
|
operationType: 1,//1-执行操作 2-恢复操作 |
|
|
|
dcEmergencyPlans: this.planInfo, |
|
|
|
operationType: value,//1-执行操作 2-恢复操作 |
|
|
|
dcEmergencyPlans: plan, |
|
|
|
dcEvent: this.eventFormData |
|
|
|
}; |
|
|
|
|
|
|
|
// let url = ''; |
|
|
|
// if (this.activeName == '-1') {//感知 |
|
|
|
// url = '/business/plans/event/confirm'; |
|
|
|
// reqData = { ...reqData, dcWarning: { ...reqData.dcEvent } } |
|
|
|
// } else {//交通 |
|
|
|
// url = '/business/plans/event/confirm'; |
|
|
|
// } |
|
|
|
let url = ''; |
|
|
|
if (this.activeName == '-1') {//感知 |
|
|
|
url = '/business/plans/warning/confirm'; |
|
|
|
reqData = { ...reqData, dcWarning: { ...reqData.dcEvent } } |
|
|
|
} else {//交通 |
|
|
|
url = '/business/plans/event/confirm'; |
|
|
|
} |
|
|
|
console.log('reqData', reqData) |
|
|
|
return; |
|
|
|
// return; |
|
|
|
request({ |
|
|
|
url: url, |
|
|
|
method: "post", |
|
|
@ -411,12 +401,14 @@ export default { |
|
|
|
}).then((result) => { |
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
Message.success("提交成功"); |
|
|
|
this.modelVisible = false; |
|
|
|
this.$emit('close', false); |
|
|
|
setTimeout(() => { |
|
|
|
this.$emit('reInitData', true); |
|
|
|
}, 100) |
|
|
|
}).catch(() => { |
|
|
|
Message.error("提交失败"); |
|
|
|
}).finally(() => { |
|
|
|
this.submitting = false; |
|
|
|
// this.$emit('reInitData', true); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|