|
|
@ -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> |
|
|
|
|
|
|
|