소스 검색

问题修改

SunZehao 1 년 전
부모
커밋
a18d663592
2개의 변경된 파일11개의 추가작업 그리고 9개의 파일을 삭제
  1. 6 5
      src/components/assessment/assessmentApplicationFrom.vue
  2. 5 4
      src/components/taskCenter/taskApplicationFrom.vue

+ 6 - 5
src/components/assessment/assessmentApplicationFrom.vue

@@ -264,7 +264,7 @@ export default {
             this.dialogVisible = true
             this.activeName = 'first'
             this.getDetails(row.id)
-            // this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
+            this.userMes = JSON.parse(window.sessionStorage.getItem('user'))
             this.getUserPostList()
             this.rowMsg = row
             this.$nextTick(() =>{
@@ -383,10 +383,11 @@ export default {
             }
             apiGetUserPostList(params).then(datas =>{
                 if (datas.data && datas.data.records.length>0) {
-                    let posName = datas.data.records[0].posName
-                    if (posName !== '主任' || posName !== '副主任') {
-                        that.showMessage = true
-                    }
+                    datas.data.records.forEach(it =>{
+                        if (it.posName === '主任' || it.posName === '副主任') {
+                            that.showMessage = true
+                        }
+                    })
                 }
             })
         },

+ 5 - 4
src/components/taskCenter/taskApplicationFrom.vue

@@ -286,10 +286,11 @@ export default {
             }
             apiGetUserPostList(params).then(datas =>{
                 if (datas.data && datas.data.records.length>0) {
-                    let posName = datas.data.records[0].posName
-                    if (posName !== '主任' || posName !== '副主任') {
-                        that.showMessage = true
-                    }
+                    datas.data.records.forEach(it =>{
+                        if (it.posName === '主任' || it.posName === '副主任') {
+                            that.showMessage = true
+                        }
+                    })
                 }
             })
         },