js用model传值到前端 ----vs---------vue用axios以及data传值

 
this.$axios({
                    method:'post',
                    url:'api/dproject/info/editdata',
                    data:data
                })
                .then(function(response) {
                    for(var i=0;i<response.data.length;i++)
                    {
                        self.editform.proId=response.data[i].proId;
                        self.editform.proName=response.data[i].proId;
                        self.editform.proType=response.data[i].proType; 
                        self.editform.proState=response.data[i].proState;
                        self.editform.resUnit=response.data[i].resUnit;
                        self.editform.cooUnit=response.data[i].cooUnit;
                        self.editform.resDepart=response.data[i].resDepart;
                        self.editform.cooDepart=response.data[i].cooDepart;
                        self.editform.resPerson=response.data[i].resPerson;
                        self.editform.budget=response.data[i].budget;
                        self.editform.difficulty=response.data[i].difficulty;
                        self.editform.workload=response.data[i].workload;
                        self.editform.year=response.data[i].year;
                        self.editform.conIndicator=response.data[i].conIndicator;
                        self.editform.startTime=response.data[i].startTime;
                        self.editform.endTime=response.data[i].endTime;
                        // this.editform.proPhase
                        
                    } 
                    self.editform.name="";
                    self.editform.percent="0";   
                    self.editdlg=true;            
                });
 
posted @ 2020-07-06 16:43  sfdaydayup  阅读(27)  评论(0编辑  收藏  举报