fix(crud): json 定义改为 xls2ui 真实格式

browserfields 必须是对象 {exclouded:[], cwidth:{}},写成数组会让 xls2ui 崩:
AttributeError: 'list' object has no attribute 'alters'
崩溃点之后的表全部不生成 → 页面 500 invalid path。
格式对照 pipeline_core/json/llm.json。
This commit is contained in:
ymq 2026-08-26 15:00:43 +08:00
parent 71576381bd
commit 9aacf7f526
3 changed files with 55 additions and 276 deletions

View File

@ -1,70 +1,24 @@
{ {
"tblname": "acctres_pricing_map", "tblname": "acctres_pricing_map",
"title": "账号规格定价映射",
"params": { "params": {
"title": "账号定价映射", "sortby": "created_at",
"browserfields": [ "browserfields": {
{ "exclouded": [
"field": "spec_id", "id"
"title": "规格ID" ],
}, "cwidth": {}
{ },
"field": "charge_mode", "editexclouded": [
"title": "计费方式" "id",
}, "created_at",
{ "updated_at",
"field": "charge_unit", "created_by"
"title": "计费单位"
},
{
"field": "valid_days",
"title": "有效天数"
},
{
"field": "ppid",
"title": "定价项目ID"
},
{
"field": "is_default",
"title": "缺省方式"
},
{
"field": "status",
"title": "状态"
}
], ],
"editfields": [ "editable": {
{ "new_data_url": "{{entire_url('./add_acctres_pricing_map.dspy')}}",
"field": "spec_id", "update_data_url": "{{entire_url('./update_acctres_pricing_map.dspy')}}",
"uitype": "Text" "delete_data_url": "{{entire_url('./delete_acctres_pricing_map.dspy')}}"
}, }
{
"field": "charge_mode",
"uitype": "Text"
},
{
"field": "charge_unit",
"uitype": "Text"
},
{
"field": "valid_days",
"uitype": "Text"
},
{
"field": "ppid",
"uitype": "Text"
},
{
"field": "is_default",
"uitype": "Text"
},
{
"field": "status",
"uitype": "Text"
}
],
"searchfields": [
"spec_id",
"charge_mode"
]
} }
} }

View File

@ -1,94 +1,24 @@
{ {
"tblname": "acctres_spec", "tblname": "acctres_spec",
"title": "账号规格",
"params": { "params": {
"title": "账号规格", "sortby": "created_at",
"browserfields": [ "browserfields": {
{ "exclouded": [
"field": "spec_code", "id"
"title": "规格编码" ],
}, "cwidth": {}
{ },
"field": "spec_name", "editexclouded": [
"title": "规格名称" "id",
}, "created_at",
{ "updated_at",
"field": "spec_type", "created_by"
"title": "规格类型"
},
{
"field": "workspace_max",
"title": "可建工作空间数"
},
{
"field": "workspace_gb",
"title": "赠送容量GB"
},
{
"field": "concurrent_task",
"title": "并发任务数"
},
{
"field": "gpu_allowed",
"title": "允许GPU"
},
{
"field": "status",
"title": "状态"
}
], ],
"editfields": [ "editable": {
{ "new_data_url": "{{entire_url('./add_acctres_spec.dspy')}}",
"field": "spec_code", "update_data_url": "{{entire_url('./update_acctres_spec.dspy')}}",
"uitype": "Text" "delete_data_url": "{{entire_url('./delete_acctres_spec.dspy')}}"
}, }
{
"field": "spec_name",
"uitype": "Text"
},
{
"field": "spec_type",
"uitype": "Text"
},
{
"field": "description",
"uitype": "Text"
},
{
"field": "workspace_max",
"uitype": "Text"
},
{
"field": "workspace_gb",
"uitype": "Text"
},
{
"field": "concurrent_task",
"uitype": "Text"
},
{
"field": "gpu_allowed",
"uitype": "Text"
},
{
"field": "member_max",
"uitype": "Text"
},
{
"field": "privilege_json",
"uitype": "Text"
},
{
"field": "sort_order",
"uitype": "Text"
},
{
"field": "status",
"uitype": "Text"
}
],
"searchfields": [
"spec_code",
"spec_name"
]
} }
} }

View File

@ -1,130 +1,25 @@
{ {
"tblname": "acctres_usage", "tblname": "acctres_usage",
"title": "账号资源用量",
"params": { "params": {
"title": "账号用量", "sortby": "created_at",
"browserfields": [ "browserfields": {
{ "exclouded": [
"field": "spec_id", "id",
"title": "规格ID" "usages"
}, ],
{ "cwidth": {}
"field": "charge_mode", },
"title": "计费方式" "editexclouded": [
}, "id",
{ "created_at",
"field": "userorgid", "updated_at",
"title": "用户机构" "created_by"
},
{
"field": "use_date",
"title": "使用日期"
},
{
"field": "quantity",
"title": "数量"
},
{
"field": "amount",
"title": "交易金额"
},
{
"field": "discount_rate",
"title": "折扣率"
},
{
"field": "accounting_status",
"title": "记账状态"
}
], ],
"editfields": [ "editable": {
{ "new_data_url": "{{entire_url('./add_acctres_usage.dspy')}}",
"field": "spec_id", "update_data_url": "{{entire_url('./update_acctres_usage.dspy')}}",
"uitype": "Text" "delete_data_url": "{{entire_url('./delete_acctres_usage.dspy')}}"
}, }
{
"field": "charge_mode",
"uitype": "Text"
},
{
"field": "subscription_id",
"uitype": "Text"
},
{
"field": "userid",
"uitype": "Text"
},
{
"field": "userorgid",
"uitype": "Text"
},
{
"field": "use_date",
"uitype": "Text"
},
{
"field": "use_time",
"uitype": "Text"
},
{
"field": "period_start",
"uitype": "Text"
},
{
"field": "period_end",
"uitype": "Text"
},
{
"field": "quantity",
"uitype": "Text"
},
{
"field": "usages",
"uitype": "Text"
},
{
"field": "transno",
"uitype": "Text"
},
{
"field": "amount",
"uitype": "Text"
},
{
"field": "amount_currency",
"uitype": "Text"
},
{
"field": "amount_base",
"uitype": "Text"
},
{
"field": "cost",
"uitype": "Text"
},
{
"field": "cost_currency",
"uitype": "Text"
},
{
"field": "cost_base",
"uitype": "Text"
},
{
"field": "discount_rate",
"uitype": "Text"
},
{
"field": "accounting_status",
"uitype": "Text"
},
{
"field": "status",
"uitype": "Text"
}
],
"searchfields": [
"spec_id",
"charge_mode"
]
} }
} }