feat: appcodes/svgicon CRUD alias+api
This commit is contained in:
parent
2acf06e5e5
commit
cec6e43397
@ -1,22 +1,28 @@
|
||||
{
|
||||
"tblname":"appcodes",
|
||||
"title":"代码管理",
|
||||
"params":{
|
||||
"sortby":"id",
|
||||
"browserfields":{
|
||||
"exclouded":[],
|
||||
"alters":{}
|
||||
"tblname": "appcodes",
|
||||
"title": "代码管理",
|
||||
"params": {
|
||||
"sortby": "id",
|
||||
"browserfields": {
|
||||
"exclouded": [],
|
||||
"alters": {}
|
||||
},
|
||||
"editexclouded":[],
|
||||
"subtables":[
|
||||
"editexclouded": [],
|
||||
"subtables": [
|
||||
{
|
||||
"title":"代码键值管理",
|
||||
"subtable":"appcodes_kv",
|
||||
"params":{
|
||||
"hierarchy_flg":"${hierarchy_flg}"
|
||||
"title": "代码键值管理",
|
||||
"subtable": "appcodes_kv",
|
||||
"params": {
|
||||
"hierarchy_flg": "${hierarchy_flg}"
|
||||
},
|
||||
"field":"parentid"
|
||||
"field": "parentid"
|
||||
}
|
||||
]
|
||||
],
|
||||
"editable": {
|
||||
"new_data_url": "{{entire_url('../api/appcodes_create.dspy')}}",
|
||||
"update_data_url": "{{entire_url('../api/appcodes_update.dspy')}}",
|
||||
"delete_data_url": "{{entire_url('../api/appcodes_delete.dspy')}}"
|
||||
}
|
||||
},
|
||||
"alias": "appcodes_list"
|
||||
}
|
||||
@ -1,24 +1,39 @@
|
||||
{
|
||||
"tblname":"appcodes_kv",
|
||||
"title":"代码键值管理",
|
||||
"params":{
|
||||
"sortby":["k", "v"],
|
||||
"browserfields":{
|
||||
"exclouded":["id", "parentid" ],
|
||||
"alters":{}
|
||||
"tblname": "appcodes_kv",
|
||||
"title": "代码键值管理",
|
||||
"params": {
|
||||
"sortby": [
|
||||
"k",
|
||||
"v"
|
||||
],
|
||||
"browserfields": {
|
||||
"exclouded": [
|
||||
"id",
|
||||
"parentid"
|
||||
],
|
||||
"alters": {}
|
||||
},
|
||||
"editexclouded":["id", "parentid" ],
|
||||
"subtables_condition":" params_kw.hierarchy_flg == '1' ",
|
||||
"subtables":[
|
||||
"editexclouded": [
|
||||
"id",
|
||||
"parentid"
|
||||
],
|
||||
"subtables_condition": " params_kw.hierarchy_flg == '1' ",
|
||||
"subtables": [
|
||||
{
|
||||
"title":"代码键值管理",
|
||||
"params":{
|
||||
"hierarchy_flg":"{{params_kw.hierarchy_flg}}",
|
||||
"parentid":"${id}"
|
||||
"title": "代码键值管理",
|
||||
"params": {
|
||||
"hierarchy_flg": "{{params_kw.hierarchy_flg}}",
|
||||
"parentid": "${id}"
|
||||
},
|
||||
"subtable":"appcodes_kv",
|
||||
"field":"parentid"
|
||||
"subtable": "appcodes_kv",
|
||||
"field": "parentid"
|
||||
}
|
||||
]
|
||||
],
|
||||
"editable": {
|
||||
"new_data_url": "{{entire_url('../api/appcodes_kv_create.dspy')}}",
|
||||
"update_data_url": "{{entire_url('../api/appcodes_kv_update.dspy')}}",
|
||||
"delete_data_url": "{{entire_url('../api/appcodes_kv_delete.dspy')}}"
|
||||
}
|
||||
},
|
||||
"alias": "appcodes_kv_list"
|
||||
}
|
||||
@ -1,13 +1,19 @@
|
||||
{
|
||||
"tblname":"svgicon",
|
||||
"params":{
|
||||
"title":"图标",
|
||||
"description":"系统中使用的图标",
|
||||
"sortby":"id",
|
||||
"browserfields":{
|
||||
"exclouded":[],
|
||||
"alters":{}
|
||||
"tblname": "svgicon",
|
||||
"params": {
|
||||
"title": "图标",
|
||||
"description": "系统中使用的图标",
|
||||
"sortby": "id",
|
||||
"browserfields": {
|
||||
"exclouded": [],
|
||||
"alters": {}
|
||||
},
|
||||
"editexclouded":[]
|
||||
"editexclouded": [],
|
||||
"editable": {
|
||||
"new_data_url": "{{entire_url('../api/svgicon_create.dspy')}}",
|
||||
"update_data_url": "{{entire_url('../api/svgicon_update.dspy')}}",
|
||||
"delete_data_url": "{{entire_url('../api/svgicon_delete.dspy')}}"
|
||||
}
|
||||
},
|
||||
"alias": "svgicon_list"
|
||||
}
|
||||
5
wwwroot/api/appcodes_create.dspy
Normal file
5
wwwroot/api/appcodes_create.dspy
Normal file
@ -0,0 +1,5 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
ns['id'] = getID()
|
||||
await sor.C('appcodes', ns)
|
||||
return json.dumps({'status': 'ok', 'id': ns['id']}, ensure_ascii=False)
|
||||
4
wwwroot/api/appcodes_delete.dspy
Normal file
4
wwwroot/api/appcodes_delete.dspy
Normal file
@ -0,0 +1,4 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
await sor.D('appcodes', ns)
|
||||
return json.dumps({'status': 'ok'}, ensure_ascii=False)
|
||||
5
wwwroot/api/appcodes_kv_create.dspy
Normal file
5
wwwroot/api/appcodes_kv_create.dspy
Normal file
@ -0,0 +1,5 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
ns['id'] = getID()
|
||||
await sor.C('appcodes_kv', ns)
|
||||
return json.dumps({'status': 'ok', 'id': ns['id']}, ensure_ascii=False)
|
||||
4
wwwroot/api/appcodes_kv_delete.dspy
Normal file
4
wwwroot/api/appcodes_kv_delete.dspy
Normal file
@ -0,0 +1,4 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
await sor.D('appcodes_kv', ns)
|
||||
return json.dumps({'status': 'ok'}, ensure_ascii=False)
|
||||
4
wwwroot/api/appcodes_kv_update.dspy
Normal file
4
wwwroot/api/appcodes_kv_update.dspy
Normal file
@ -0,0 +1,4 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
await sor.U('appcodes_kv', ns)
|
||||
return json.dumps({'status': 'ok'}, ensure_ascii=False)
|
||||
4
wwwroot/api/appcodes_update.dspy
Normal file
4
wwwroot/api/appcodes_update.dspy
Normal file
@ -0,0 +1,4 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
await sor.U('appcodes', ns)
|
||||
return json.dumps({'status': 'ok'}, ensure_ascii=False)
|
||||
5
wwwroot/api/svgicon_create.dspy
Normal file
5
wwwroot/api/svgicon_create.dspy
Normal file
@ -0,0 +1,5 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
ns['id'] = getID()
|
||||
await sor.C('svgicon', ns)
|
||||
return json.dumps({'status': 'ok', 'id': ns['id']}, ensure_ascii=False)
|
||||
4
wwwroot/api/svgicon_delete.dspy
Normal file
4
wwwroot/api/svgicon_delete.dspy
Normal file
@ -0,0 +1,4 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
await sor.D('svgicon', ns)
|
||||
return json.dumps({'status': 'ok'}, ensure_ascii=False)
|
||||
4
wwwroot/api/svgicon_update.dspy
Normal file
4
wwwroot/api/svgicon_update.dspy
Normal file
@ -0,0 +1,4 @@
|
||||
async with get_sor_context(env, 'appbase') as sor:
|
||||
ns = dict(params_kw)
|
||||
await sor.U('svgicon', ns)
|
||||
return json.dumps({'status': 'ok'}, ensure_ascii=False)
|
||||
Loading…
x
Reference in New Issue
Block a user