Browse Source

值班人员新增弹窗,未清除上次打开弹窗时的人员信息

wangqin
刘朋 8 months ago
parent
commit
c17ac70da2
  1. 23
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue

23
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/businessDataManagement/views/dutyOfficer/components/ModifyDutyInformationTable.vue

@ -61,7 +61,7 @@
<template #footer>
<Button
:style="{ backgroundColor: '#0E708B' }"
@click.native="$emit('close')"
@click.native="closeWindow()"
>
取消</Button
>
@ -138,14 +138,7 @@ export default {
return this.visible;
},
set(bool) {
//,
if(!bool) {
this.dayShift = [];
this.graveyardShift = [];
this.peopleList = [];
}
this.$emit("close", bool);
this.closeWindow();
},
},
getActive() {
@ -157,6 +150,7 @@ export default {
visible: {
immediate: true,
async handler(bool) {
this.clearData();
if (!bool) return;
this.dayShift = [...(this.data?.dayShift || [])];
@ -235,11 +229,9 @@ export default {
},
})
.then((result) => {
console.log("result.data:", result.data);
this.dayShift = result.data.filter(
(item) => item.scheduling === "1"
);
console.log("this.dayShift11:", this.dayShift);
this.graveyardShift = result.data.filter(
(item) => item.scheduling === "2"
);
@ -386,7 +378,16 @@ export default {
}
}
},
closeWindow(bool){
this.$emit("close", false);
},
clearData(){
//,
this.dayShift = [];
this.graveyardShift = [];
this.peopleList = [];
}
}
};
</script>

Loading…
Cancel
Save