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 04b1b19b94
commit 846e2dec0d
4 changed files with 73 additions and 380 deletions

View File

@ -1,70 +1,24 @@
{
"tblname": "storres_pricing_map",
"title": "存储规格定价映射",
"params": {
"title": "存储定价映射",
"browserfields": [
{
"field": "spec_id",
"title": "规格ID"
},
{
"field": "meter_mode",
"title": "计量方式"
},
{
"field": "meter_unit",
"title": "计量单位"
},
{
"field": "settle_period",
"title": "结算周期"
},
{
"field": "ppid",
"title": "定价项目ID"
},
{
"field": "is_default",
"title": "缺省方式"
},
{
"field": "status",
"title": "状态"
}
"sortby": "created_at",
"browserfields": {
"exclouded": [
"id"
],
"cwidth": {}
},
"editexclouded": [
"id",
"created_at",
"updated_at",
"created_by"
],
"editfields": [
{
"field": "spec_id",
"uitype": "Text"
},
{
"field": "meter_mode",
"uitype": "Text"
},
{
"field": "meter_unit",
"uitype": "Text"
},
{
"field": "settle_period",
"uitype": "Text"
},
{
"field": "ppid",
"uitype": "Text"
},
{
"field": "is_default",
"uitype": "Text"
},
{
"field": "status",
"uitype": "Text"
}
],
"searchfields": [
"spec_id",
"meter_mode"
]
"editable": {
"new_data_url": "{{entire_url('./add_storres_pricing_map.dspy')}}",
"update_data_url": "{{entire_url('./update_storres_pricing_map.dspy')}}",
"delete_data_url": "{{entire_url('./delete_storres_pricing_map.dspy')}}"
}
}
}

View File

@ -1,98 +1,24 @@
{
"tblname": "storres_sample",
"title": "容量采样",
"params": {
"title": "容量采样",
"browserfields": [
{
"field": "spec_id",
"title": "规格ID"
},
{
"field": "target_type",
"title": "计量对象类型"
},
{
"field": "target_id",
"title": "计量对象ID"
},
{
"field": "sample_date",
"title": "采样日期"
},
{
"field": "used_gb",
"title": "实测容量GB"
},
{
"field": "quota_gb",
"title": "配额容量GB"
},
{
"field": "over_gb",
"title": "超额GB"
},
{
"field": "source",
"title": "采样来源"
}
"sortby": "created_at",
"browserfields": {
"exclouded": [
"id"
],
"cwidth": {}
},
"editexclouded": [
"id",
"created_at",
"updated_at",
"created_by"
],
"editfields": [
{
"field": "spec_id",
"uitype": "Text"
},
{
"field": "subscription_id",
"uitype": "Text"
},
{
"field": "target_type",
"uitype": "Text"
},
{
"field": "target_id",
"uitype": "Text"
},
{
"field": "userid",
"uitype": "Text"
},
{
"field": "userorgid",
"uitype": "Text"
},
{
"field": "sample_date",
"uitype": "Text"
},
{
"field": "sample_time",
"uitype": "Text"
},
{
"field": "used_gb",
"uitype": "Text"
},
{
"field": "quota_gb",
"uitype": "Text"
},
{
"field": "over_gb",
"uitype": "Text"
},
{
"field": "source",
"uitype": "Text"
},
{
"field": "status",
"uitype": "Text"
}
],
"searchfields": [
"spec_id",
"target_type"
]
"editable": {
"new_data_url": "{{entire_url('./add_storres_sample.dspy')}}",
"update_data_url": "{{entire_url('./update_storres_sample.dspy')}}",
"delete_data_url": "{{entire_url('./delete_storres_sample.dspy')}}"
}
}
}

View File

@ -1,94 +1,24 @@
{
"tblname": "storres_spec",
"title": "存储规格",
"params": {
"title": "存储规格",
"browserfields": [
{
"field": "spec_code",
"title": "规格编码"
},
{
"field": "spec_name",
"title": "规格名称"
},
{
"field": "storage_class",
"title": "存储类型"
},
{
"field": "min_gb",
"title": "起售容量GB"
},
{
"field": "capacity_total",
"title": "可售总量GB"
},
{
"field": "capacity_used",
"title": "已分配GB"
},
{
"field": "status",
"title": "状态"
}
"sortby": "created_at",
"browserfields": {
"exclouded": [
"id"
],
"cwidth": {}
},
"editexclouded": [
"id",
"created_at",
"updated_at",
"created_by"
],
"editfields": [
{
"field": "spec_code",
"uitype": "Text"
},
{
"field": "spec_name",
"uitype": "Text"
},
{
"field": "storage_class",
"uitype": "Text"
},
{
"field": "description",
"uitype": "Text"
},
{
"field": "min_gb",
"uitype": "Text"
},
{
"field": "max_gb",
"uitype": "Text"
},
{
"field": "step_gb",
"uitype": "Text"
},
{
"field": "capacity_total",
"uitype": "Text"
},
{
"field": "capacity_used",
"uitype": "Text"
},
{
"field": "backup_enabled",
"uitype": "Text"
},
{
"field": "attr_json",
"uitype": "Text"
},
{
"field": "sort_order",
"uitype": "Text"
},
{
"field": "status",
"uitype": "Text"
}
],
"searchfields": [
"spec_code",
"spec_name"
]
"editable": {
"new_data_url": "{{entire_url('./add_storres_spec.dspy')}}",
"update_data_url": "{{entire_url('./update_storres_spec.dspy')}}",
"delete_data_url": "{{entire_url('./delete_storres_spec.dspy')}}"
}
}
}

View File

@ -1,142 +1,25 @@
{
"tblname": "storres_usage",
"title": "存储资源用量",
"params": {
"title": "存储用量",
"browserfields": [
{
"field": "spec_id",
"title": "规格ID"
},
{
"field": "meter_mode",
"title": "计量方式"
},
{
"field": "userorgid",
"title": "用户机构"
},
{
"field": "period_start",
"title": "计费周期起"
},
{
"field": "period_end",
"title": "计费周期止"
},
{
"field": "billable_gb",
"title": "计费容量GB"
},
{
"field": "amount",
"title": "交易金额"
},
{
"field": "accounting_status",
"title": "记账状态"
}
"sortby": "created_at",
"browserfields": {
"exclouded": [
"id",
"usages"
],
"cwidth": {}
},
"editexclouded": [
"id",
"created_at",
"updated_at",
"created_by"
],
"editfields": [
{
"field": "spec_id",
"uitype": "Text"
},
{
"field": "meter_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": "sample_count",
"uitype": "Text"
},
{
"field": "avg_gb",
"uitype": "Text"
},
{
"field": "max_gb",
"uitype": "Text"
},
{
"field": "billable_gb",
"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",
"meter_mode"
]
"editable": {
"new_data_url": "{{entire_url('./add_storres_usage.dspy')}}",
"update_data_url": "{{entire_url('./update_storres_usage.dspy')}}",
"delete_data_url": "{{entire_url('./delete_storres_usage.dspy')}}"
}
}
}