正在查看旧版本。 查看 当前版本.

与当前比较 查看页面历史记录

« 前一个 版本 3 当前 »

此处以人员任职子集关联出岗位岗位类别,岗位类别关联出岗位类别父类为例

1.找到此子集需要关联的模型以及关联关系-配置relation

   任职子集默认会有此关联

   

 2.到相关模型对应的功能查看模型字段显示

3.配置到任职列表

4.如果还想关联岗位对应的其他信息,比如岗位父类id - 先找到对应的模型与岗位关联关系,做关联配置

5.查看岗位父id名称如何关联出,再配置字段,同上


注:


{
"width": 200,
"align": "left",
"sequence": 3,
"label": "岗位类别",
"field": [
"position",
"position_type",
"name"
],
"state": [
"manager",
"inside",
"outside",
"owner"
],
"key": "position_type_id"
},
{
"width": 200,
"align": "left",
"sequence": 3,
"label": "岗位父类别",
"field": [
"jobtype",
"parent",
"name"
],
"state": [
"manager",
"inside",
"outside",
"owner"
],
"key": "jobtypename"
}



"relations": [{
"filter": {
"jobtype.id": ":position.position_type_id"
},
"key": "jobtype",
"model": "JobType"
}


此外:再举一个小的例子:


将人员子集教育经历中的全日制教育经历中的学历关联到人员信息主集:

我们需要做的步骤 1:  看此子集的参数返回值(即教育经历是全日制教育这条)

2.配置relations和field显示字段:

{"relations":[ {
"filter": {
"education_new.employee_id": ":id",
"education_new.education_form": "全日制教育"
},
"model": "EmployeeEducation",
"type": "outer",
"key": "education_new"
}],
"fields":[{

"label": "学历",
"sequence": 240,
"width": "col-6",
"field": ["education_new","education"],
"key": "education_name",
"hide": false

}]
}




  • 无标签