Browse Source

事件确认

wangqin
zhoule 8 months ago
parent
commit
9c583d92ed
  1. 52
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  2. 7
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue

52
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue

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

7
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue

@ -19,7 +19,7 @@
<!-- 确认弹窗 --> <!-- 确认弹窗 -->
<EventPlanDialog :visible="isShowDialog" :info="info" :eventFormData="formData" :activeName="activeName" <EventPlanDialog :visible="isShowDialog" :info="info" :eventFormData="formData" :activeName="activeName"
@close="onCloseAddNew" /> @reInitData="() => { this.$emit('update:value', false); this.$emit('queryData', true); }" @close="onCloseAddNew" />
<template #footer> <template #footer>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;" <Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;"
@ -217,6 +217,11 @@ export default {
this.isShowDialog = true; this.isShowDialog = true;
}) })
},
reInitData() {
console.log('reInitData')
this.$emit('update:value', false)
this.$emit('queryData', true);
} }
} }
} }

Loading…
Cancel
Save