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>
<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);
})

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"
@close="onCloseAddNew" />
@reInitData="() => { this.$emit('update:value', false); this.$emit('queryData', true); }" @close="onCloseAddNew" />
<template #footer>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;"
@ -217,6 +217,11 @@ export default {
this.isShowDialog = true;
})
},
reInitData() {
console.log('reInitData')
this.$emit('update:value', false)
this.$emit('queryData', true);
}
}
}

Loading…
Cancel
Save