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