Browse Source

解决bug:白天值班与晚上值班人员相同时,选中晚上值班时,点击白天值班的人员,人员从晚上值班中移除

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

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

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

Loading…
Cancel
Save