jeecg-boot 页面搜索条件使用部门,树状结构

1:实现效果

jeecg-boot 页面搜索条件使用部门,树状结构_第1张图片

2 :页面使用步骤

  1. 引入组件
import JTreeDepartSelect from '@/components/jeecg/JTreeDepartSelect'
    components: {
      JTreeDepartSelect,
	}
  1. 页面添加

              
                
              
            
  1. 友情提示:queryParam.sysOrgCode(获取的是部门id)

3:切换部门名称

@Autowired
private ISysDepartService sysDepartService;

  1. 查询数据
SysDepart sysDepart = sysDepartService.getById(id);
  1. 数据组装
String orgCode = "";
		if(oConvertUtils.isNotEmpty(cspDocLog.getSysOrgCode())){
			SysDepart sysDepart = sysDepartService.getById(cspDocLog.getSysOrgCode());
			orgCode = sysDepart.getOrgCode();
			cspDocLog.setSysOrgCode(null);
		}
 if(oConvertUtils.isNotEmpty(orgCode)){
			queryWrapper.like("sys_org_code",orgCode);
		}
  1. 重置部门数据
 // 重置
      searchReset(){
        var that = this;
        var logType = that.queryParam.logType;
        that.queryParam = {}; //清空查询区域参数
        that.queryParam.logType = logType;
        //重置部门
        console.log("重置部门")
        this.$refs['reset'].resetDepart()
        that.loadData(this.ipagination.current);
      },

你可能感兴趣的:(jeecgboot)