|
|
@ -27,7 +27,7 @@ |
|
|
|
<p |
|
|
|
v-for="(item, index) in dayShift" |
|
|
|
:key="`${item.id}_${index}`" |
|
|
|
@click="removeDutyPerson(item)" |
|
|
|
@click="removeDutyPerson(item,'dayShift')" |
|
|
|
> |
|
|
|
{{ item.name }} |
|
|
|
</p> |
|
|
@ -41,7 +41,7 @@ |
|
|
|
<p |
|
|
|
v-for="(item, index) in graveyardShift" |
|
|
|
:key="`${index}_${item.id}`" |
|
|
|
@click="removeDutyPerson(item)" |
|
|
|
@click="removeDutyPerson(item,'graveyardShift')" |
|
|
|
> |
|
|
|
{{ item.name }} |
|
|
|
</p> |
|
|
@ -178,7 +178,9 @@ export default { |
|
|
|
|
|
|
|
this[this.active].push(item); |
|
|
|
}, |
|
|
|
removeDutyPerson(item) { |
|
|
|
removeDutyPerson(item, activeCheck) { |
|
|
|
if(activeCheck != this.active) return; |
|
|
|
|
|
|
|
const index = this[this.active].findIndex( |
|
|
|
(_item) => _item.id === item.id |
|
|
|
); |
|
|
|