|  | @@ -356,7 +356,6 @@
 | 
	
		
			
				|  |  |            <el-col :span="10">
 | 
	
		
			
				|  |  |              <el-form-item label="用户角色" prop="roleIds">
 | 
	
		
			
				|  |  |                <el-select
 | 
	
		
			
				|  |  | -                ref="mySelect"
 | 
	
		
			
				|  |  |                  @visible-change="selectRoles"
 | 
	
		
			
				|  |  |                  style="width: 100%"
 | 
	
		
			
				|  |  |                  v-model="form.roleIds"
 | 
	
	
		
			
				|  | @@ -374,7 +373,7 @@
 | 
	
		
			
				|  |  |              </el-form-item>
 | 
	
		
			
				|  |  |            </el-col>
 | 
	
		
			
				|  |  |            <el-col :span="10">
 | 
	
		
			
				|  |  | -            <el-form-item label="用户性别">
 | 
	
		
			
				|  |  | +            <el-form-item label="用户性别" prop="gender">
 | 
	
		
			
				|  |  |                <el-select
 | 
	
		
			
				|  |  |                  style="width: 100%"
 | 
	
		
			
				|  |  |                  v-model="form.gender"
 | 
	
	
		
			
				|  | @@ -531,6 +530,7 @@ export default {
 | 
	
		
			
				|  |  |        open: false,
 | 
	
		
			
				|  |  |        // 机构名称
 | 
	
		
			
				|  |  |        deptName: null,
 | 
	
		
			
				|  |  | +      isRoleIdsChanged: true,
 | 
	
		
			
				|  |  |        // 默认密码
 | 
	
		
			
				|  |  |        initPassword: null,
 | 
	
		
			
				|  |  |        // 日期范围
 | 
	
	
		
			
				|  | @@ -646,20 +646,31 @@ export default {
 | 
	
		
			
				|  |  |      this.getAllRoles();
 | 
	
		
			
				|  |  |    },
 | 
	
		
			
				|  |  |    watch: {
 | 
	
		
			
				|  |  | -    'form.orgId': {
 | 
	
		
			
				|  |  | -      handler(newValue, oldValue) {
 | 
	
		
			
				|  |  | -        if(oldValue!=undefined){
 | 
	
		
			
				|  |  | -        // console.log('myValue changed:', newValue, oldValue)
 | 
	
		
			
				|  |  | -        // 在这里可以对值的改变做出响应
 | 
	
		
			
				|  |  | -        // this.deptOptions=[];
 | 
	
		
			
				|  |  | -        this.form.roleIds=null;
 | 
	
		
			
				|  |  | -      //   const dropdown = this.$refs.mySelect.$el.querySelector('.el-select-dropdown');
 | 
	
		
			
				|  |  | -      // dropdown.style.display = 'none';
 | 
	
		
			
				|  |  | +    'form.orgId'(newValue) {
 | 
	
		
			
				|  |  | +      if (this.isRoleIdsChanged) {
 | 
	
		
			
				|  |  | +        this.form.roleIds = null;
 | 
	
		
			
				|  |  | +      } else {
 | 
	
		
			
				|  |  | +        this.isRoleIdsChanged = true;
 | 
	
		
			
				|  |  |        }
 | 
	
		
			
				|  |  | -      },
 | 
	
		
			
				|  |  | -      deep: true
 | 
	
		
			
				|  |  | -    }},
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    // 'form.orgId': {
 | 
	
		
			
				|  |  | +    //   handler(newValue, oldValue) {
 | 
	
		
			
				|  |  | +    //     if(oldValue!=undefined){
 | 
	
		
			
				|  |  | +    //     // console.log('myValue changed:', newValue, oldValue)
 | 
	
		
			
				|  |  | +    //     // 在这里可以对值的改变做出响应
 | 
	
		
			
				|  |  | +    //     // this.deptOptions=[];
 | 
	
		
			
				|  |  | +    //     this.form.roleIds=null;
 | 
	
		
			
				|  |  | +    //   //   const dropdown = this.$refs.mySelect.$el.querySelector('.el-select-dropdown');
 | 
	
		
			
				|  |  | +    //   // dropdown.style.display = 'none';
 | 
	
		
			
				|  |  | +    //   }
 | 
	
		
			
				|  |  | +    //   },
 | 
	
		
			
				|  |  | +    //   deep: true
 | 
	
		
			
				|  |  | +    // }
 | 
	
		
			
				|  |  | +  },
 | 
	
		
			
				|  |  |    methods: {
 | 
	
		
			
				|  |  | +    changeRoleIds(){
 | 
	
		
			
				|  |  | +      this.form.roleIds=null;
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  |      formatter(content){
 | 
	
		
			
				|  |  |          if(content){
 | 
	
		
			
				|  |  |            const strArr = content.toString().split(',');
 |