vue+element级联查询

vue+element级联查询

前端代码


    
      
       
       
       
       
    
    
     
    
      
      
    
    

data数据

data() {
      return {
        type1:'',
          radio:'1',
        labelPosition: 'right',
        formLabelAlign: {
          name: '',
          date1:'',
          sex: '1',
          doctor:'',
          type: '',
          date2:'',
          money:'',
          doctors:[]         
        }
      };
    }

方法

getdoctor()
      {
        console.log(this.formLabelAlign);
        if(this.formLabelAlign.type=='1')
        {
            this.type1='外科';
        }else if(this.formLabelAlign.type=='2')
        {
            this.type1='内科';
        }else if(this.formLabelAlign.type=='3')
        {
            this.type1='儿科';
        }else if(this.formLabelAlign.type=='4')
        {
            this.type1='耳鼻喉科';
        }else if(this.formLabelAlign.type=='5')
        {
            this.type1='皮肤科';
        }
        this.$axios.post('/findDoctor',{ 
              type: this.type1,
        })
        .then(response=>{
            if(response.status==200)
            {
              this.formLabelAlign.doctors=[];
              this.formLabelAlign.doctor='';
              console.log(response);
              for(let i=0; i

你可能感兴趣的:(vue)