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

Loading…
Cancel
Save