瀏覽代碼

调整编辑项目的项目经理情况

Lijy 2 年之前
父節點
當前提交
088d01e171
共有 1 個文件被更改,包括 11 次插入13 次删除
  1. 11 13
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/edit.vue

+ 11 - 13
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/edit.vue

@@ -228,8 +228,6 @@ export default {
         }else{
         }else{
             this.getCategoryList()
             this.getCategoryList()
         }
         }
-
-        
     },
     },
     methods: {
     methods: {
         back() {
         back() {
@@ -427,13 +425,23 @@ export default {
         
         
 
 
         getProjectDetail(){
         getProjectDetail(){
-            this.editProjectMan = false
+            console.log('发起了请求')
             this.$axios.post("/project/detail", {id: this.projectId})
             this.$axios.post("/project/detail", {id: this.projectId})
             .then(res => {
             .then(res => {
                 if(res.code == "ok") {
                 if(res.code == "ok") {
+                    console.log('成功')
                     this.projectDetail = res.data
                     this.projectDetail = res.data
                     let userNames = ''
                     let userNames = ''
                     let userId = []
                     let userId = []
+                    for(let i in this.user.functionList){
+                        if(this.user.functionList[i].name == '编辑负责项目编码和名称' || this.user.functionList[i].name == '管理全部项目'){
+                            this.editCodeAndName = true
+                        }
+                        if(this.user.functionList[i].name == '管理全部项目' || this.user.id == res.data.creatorId){
+                            this.editProjectMan = true
+                        }
+                    }
+
                     for(let i in res.data.participationList){
                     for(let i in res.data.participationList){
                         if(res.data.participationList[i].id && res.data.participationList[i].id != 'null'){
                         if(res.data.participationList[i].id && res.data.participationList[i].id != 'null'){
                             userNames += res.data.participationList[i].name + ','
                             userNames += res.data.participationList[i].name + ','
@@ -462,16 +470,6 @@ export default {
                         this.projectDetail.levelLabel = this.levelList[this.projectDetail.level - 1].label
                         this.projectDetail.levelLabel = this.levelList[this.projectDetail.level - 1].label
                     }
                     }
 
 
-                    
-                    for(let i in this.user.functionList){
-                        if(this.user.functionList[i].name == '编辑负责项目编码和名称' || this.user.functionList[i].name == '管理全部项目'){
-                            this.editCodeAndName = true
-                        }
-                        if(this.user.functionList[i].name == '管理全部项目' || this.user.id == res.data.creatorId){
-                            this.editProjectMan = true
-                        }
-                    }
-
                     if(this.user.id == res.data.creatorId){
                     if(this.user.id == res.data.creatorId){
                         this.editCodeAndName = true
                         this.editCodeAndName = true
                         return
                         return