Hwt 2 years ago
parent
commit
3203ca36eb

+ 10 - 9
operationSupport/src/views/patrolManagement/components/weekContent.vue

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

+ 4 - 1
operationSupport/src/views/patrolManagement/popups/weekEditAdd.vue

@@ -165,7 +165,7 @@ export default {
         if (status == 0) {
           data.map((itme, index) => {
             this.standardPatrol.push({
-              label: itme.patrolType == '1' ? '市容市貌' : itme.patrolType == '2' ? '环境卫生' : itme.patrolType == '3' ? '公共秩序' : itme.patrolType == '4' ? '设备施' : '消防安全',
+              label: itme.patrolType == '1' ? '市容市貌' : itme.patrolType == '2' ? '环境卫生' : itme.patrolType == '3' ? '公共秩序' : itme.patrolType == '4' ? '设备施' : '消防安全',
               value: itme.id
             })
           })
@@ -180,9 +180,11 @@ export default {
     // /czc-community/patrol/record/standard/list/type
     standardRecord () {
       this.$http.get('/czc-community/patrol/record/standard/list/type', { recordId: this.params.recordId }).then(({ data, status, msg }) => {
+
         if (status == 0) {
           this.timePeriod.standardId = [];
           data.map((item, index) => {
+
             this.timePeriod.standardId.push(item.standardId + '');
           })
         }
@@ -190,6 +192,7 @@ export default {
     }
   },
   created () {
+
     this.findUser = this.params.findUser;
     this.thisDay.day = this.params.dateDe;
     this.timePeriod = {