yuansh 2 년 전
부모
커밋
1a43dd3684
2개의 변경된 파일21개의 추가작업 그리고 14개의 파일을 삭제
  1. 1 0
      src/views/oa/modules/IncidentTicketModalDetail.vue
  2. 20 14
      src/views/oa/modules/JSelectUserByDepModal.vue

+ 1 - 0
src/views/oa/modules/IncidentTicketModalDetail.vue

@@ -814,6 +814,7 @@
             this.formState.createTime = (res.result[0].createTime!==''&&res.result[0].createTime)? moment(res.result[0].createTime).format('YYYY-MM-DD HH:mm:ss'):''
             this.$forceUpdate()
           }else{
+            this.beginUsers = []
             this.formState.Noticer = ''
             this.formState.createTime=''
           }

+ 20 - 14
src/views/oa/modules/JSelectUserByDepModal.vue

@@ -150,21 +150,26 @@
     },
     methods: {
         initUserNames() {
-            if(this.beginUsers != null && this.beginUsers != []){
-              getAction('/sys/user/listBy', {beginUsers:this.beginUsers.toString()}).then((res) => {
-                if (res.success) {
-                  let selectedRowKeys = []
-                  let realNames = []
-                  res.result.records.forEach(user => {
-                    realNames.push(user['realname'])
-                    selectedRowKeys.push(user['id'])
-                  })
-                  this.selectedRowKeys = selectedRowKeys
-                  console.log("回显用户",selectedRowKeys)
-                  this.$emit('initComp', realNames.join(','))
-                }
-              })
+          
+            if(this.beginUsers.length == 0){ 
+              // console.log('sssssssssssssssssssssssss',this.beginUsers);
+              this.beginUsers = ['wushuju72']
             }
+             // console.log('dddddddddddddddddddddddddd',this.beginUsers);
+            getAction('/sys/user/listBy', {beginUsers:this.beginUsers.toString()}).then((res) => {
+              if (res.success) {
+                let selectedRowKeys = []
+                let realNames = []
+                res.result.records.forEach(user => {
+                  realNames.push(user['realname'])
+                  selectedRowKeys.push(user['id'])
+                })
+                this.selectedRowKeys = selectedRowKeys
+                console.log("回显用户",selectedRowKeys)
+                this.$emit('initComp', realNames.join(','))
+              }
+            })
+          
           
           
         // if (this.userIds) {
@@ -230,6 +235,7 @@
       },
       showModal(user) {
         this.beginUsers = user;
+        
         this.visible = true;
         this.queryDepartTree();
         this.initUserNames()