|
@@ -19,8 +19,9 @@
|
|
|
class="task-set"
|
|
|
v-if="matchingTime(keyValues(inx), item).isActive"
|
|
|
>
|
|
|
- <span @click="resultTime(keyValues(inx), item) ? null : addItem(keyValues(inx), item,'1')">
|
|
|
+ <span @click="resultTime(keyValues(inx), item) ? null : addItem(keyValues(inx), item,'1',matchingTime(keyValues(inx), item).currentUsers)">
|
|
|
{{ matchingTime(keyValues(inx), item).partolName }}</span>
|
|
|
+ <!-- <span>{{ matchingTime(keyValues(inx), item).currentUsers }}</span> -->
|
|
|
</div>
|
|
|
<div
|
|
|
class="task-set"
|
|
@@ -73,7 +74,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- addItem (itemTime, item, distinguish) {
|
|
|
+ addItem (itemTime, item, distinguish, currentUsers) {
|
|
|
new Promise((resolve) => {
|
|
|
this.$store.dispatch('addPopup', {
|
|
|
url: '/patrolManagement/popups/weekEditAdd.vue',
|
|
@@ -86,7 +87,7 @@ export default {
|
|
|
item: item,
|
|
|
distinguish: distinguish,
|
|
|
recordId: this.recordId,
|
|
|
- currentUsers: this.currentUsers
|
|
|
+ currentUsers: currentUsers
|
|
|
},
|
|
|
title: '排班'
|
|
|
});
|
|
@@ -134,17 +135,18 @@ export default {
|
|
|
},
|
|
|
// 对比已设置内容
|
|
|
matchingTime (tis, item) {
|
|
|
- debugger
|
|
|
let objs = {
|
|
|
isActive: false
|
|
|
};
|
|
|
this.calendarData.map((items) => {
|
|
|
+ if (tis == items.partrolDate) {
|
|
|
+ items.rosterUserDtos.map((isv, index) => {
|
|
|
|
|
|
+ if (items.rosterUserDtos.length == (index + 1)) {
|
|
|
|
|
|
- if (tis == items.partrolDate) {
|
|
|
- items.rosterUserDtos.map((isv) => {
|
|
|
- this.recordId = isv.recordId;
|
|
|
- this.currentUsers = isv.currentUsers;
|
|
|
+ this.recordId = isv.recordId;
|
|
|
+ this.currentUsers = isv.currentUsers;
|
|
|
+ }
|
|
|
if (isv.id == item.id && isv.partrolTime == item.times) {
|
|
|
objs.isActive = true;
|
|
|
Object.assign(objs, isv);
|
|
@@ -155,7 +157,6 @@ export default {
|
|
|
return objs;
|
|
|
},
|
|
|
keyValues (index) {
|
|
|
-
|
|
|
if (index == 0) {
|
|
|
return this.timeObj.monday;
|
|
|
} else if (index == 1) {
|