fix: 角色列表格浏览显示中文 role_text(CASE WHEN),role 值列隐藏
This commit is contained in:
parent
178ac2451a
commit
1e2710957c
@ -20,7 +20,17 @@ if not ns.get('page'):
|
|||||||
if not ns.get('sort'):
|
if not ns.get('sort'):
|
||||||
ns['sort'] = ["role asc"]
|
ns['sort'] = ["role asc"]
|
||||||
|
|
||||||
sql = '''select a.*, b.name as project_name
|
sql = '''select a.*, b.name as project_name,
|
||||||
|
case a.role
|
||||||
|
when 'agent.pm' then 'PM 项目经理'
|
||||||
|
when 'agent.requirement' then '需求分析师'
|
||||||
|
when 'agent.design' then '系统设计师'
|
||||||
|
when 'agent.develop' then '开发工程师'
|
||||||
|
when 'agent.deploy_test' then '测试部署工程师'
|
||||||
|
when 'agent.test' then '测试工程师'
|
||||||
|
when 'agent.deploy_prod' then '生产部署工程师'
|
||||||
|
when 'agent.qc' then 'QC 质量控制'
|
||||||
|
else a.role end as role_text
|
||||||
from (select * from sd_project_role_models where 1=1 [[filterstr]]) a
|
from (select * from sd_project_role_models where 1=1 [[filterstr]]) a
|
||||||
left join sd_projects b on a.project_id = b.id'''
|
left join sd_projects b on a.project_id = b.id'''
|
||||||
|
|
||||||
|
|||||||
@ -41,12 +41,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"editexclouded":["id","created_at","updated_at","project_name"],
|
"editexclouded":["id","created_at","updated_at","project_name","role_text"],
|
||||||
"fields":[
|
"fields":[
|
||||||
{"name":"id","title":"主键ID","type":"str","length":32,"cwidth":18,"uitype":"str","datatype":"str","label":"主键ID"},
|
{"name":"id","title":"主键ID","type":"str","length":32,"cwidth":18,"uitype":"str","datatype":"str","label":"主键ID"},
|
||||||
{"name":"project_name","title":"项目","type":"str","length":200,"cwidth":22,"uitype":"str","datatype":"str","label":"项目"},
|
{"name":"project_name","title":"项目","type":"str","length":200,"cwidth":22,"uitype":"str","datatype":"str","label":"项目"},
|
||||||
{"name":"project_id","title":"项目ID","type":"str","length":32,"cwidth":0,"uitype":"code","valueField":"value","textField":"text","dataurl":"{{entire_url('../api/get_project_select_options.dspy')}}","label":"项目ID"},
|
{"name":"project_id","title":"项目ID","type":"str","length":32,"cwidth":0,"uitype":"code","valueField":"value","textField":"text","dataurl":"{{entire_url('../api/get_project_select_options.dspy')}}","label":"项目ID"},
|
||||||
{"name":"role","title":"角色","type":"str","length":64,"cwidth":20,"uitype":"code","valueField":"value","textField":"text","dataurl":"{{entire_url('../api/get_role_options.dspy')}}","label":"角色"},
|
{"name":"role_text","title":"角色","type":"str","length":64,"cwidth":20,"uitype":"str","datatype":"str","label":"角色"},
|
||||||
|
{"name":"role","title":"角色名","type":"str","length":64,"cwidth":0,"uitype":"code","valueField":"value","textField":"text","dataurl":"{{entire_url('../api/get_role_options.dspy')}}","label":"角色名"},
|
||||||
{"name":"model_name","title":"模型","type":"str","length":128,"cwidth":20,"uitype":"code","valueField":"value","textField":"text","dataurl":"{{entire_url('../api/get_model_options.dspy')}}","label":"模型(空=缺省)"},
|
{"name":"model_name","title":"模型","type":"str","length":128,"cwidth":20,"uitype":"code","valueField":"value","textField":"text","dataurl":"{{entire_url('../api/get_model_options.dspy')}}","label":"模型(空=缺省)"},
|
||||||
{"name":"created_at","title":"创建时间","type":"timestamp","uitype":"str","datatype":"timestamp","label":"创建时间"},
|
{"name":"created_at","title":"创建时间","type":"timestamp","uitype":"str","datatype":"timestamp","label":"创建时间"},
|
||||||
{"name":"updated_at","title":"更新时间","type":"timestamp","uitype":"str","datatype":"timestamp","label":"更新时间"}
|
{"name":"updated_at","title":"更新时间","type":"timestamp","uitype":"str","datatype":"timestamp","label":"更新时间"}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user