From 846e2dec0dd25d37276984f7789acf7bd4420867 Mon Sep 17 00:00:00 2001 From: ymq Date: Wed, 26 Aug 2026 15:00:43 +0800 Subject: [PATCH] =?UTF-8?q?fix(crud):=20json=20=E5=AE=9A=E4=B9=89=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=20xls2ui=20=E7=9C=9F=E5=AE=9E=E6=A0=BC=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit browserfields 必须是对象 {exclouded:[], cwidth:{}},写成数组会让 xls2ui 崩: AttributeError: 'list' object has no attribute 'alters' 崩溃点之后的表全部不生成 → 页面 500 invalid path。 格式对照 pipeline_core/json/llm.json。 --- json/storres_pricing_map.json | 82 ++++-------------- json/storres_sample.json | 110 ++++-------------------- json/storres_spec.json | 106 ++++------------------- json/storres_usage.json | 155 +++++----------------------------- 4 files changed, 73 insertions(+), 380 deletions(-) diff --git a/json/storres_pricing_map.json b/json/storres_pricing_map.json index 60aacfd..7cc7f19 100644 --- a/json/storres_pricing_map.json +++ b/json/storres_pricing_map.json @@ -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')}}" + } } } diff --git a/json/storres_sample.json b/json/storres_sample.json index 1373d4d..845c76f 100644 --- a/json/storres_sample.json +++ b/json/storres_sample.json @@ -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')}}" + } } } diff --git a/json/storres_spec.json b/json/storres_spec.json index a52d1bd..8f04c4f 100644 --- a/json/storres_spec.json +++ b/json/storres_spec.json @@ -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')}}" + } } } diff --git a/json/storres_usage.json b/json/storres_usage.json index 2b60bca..c4fe812 100644 --- a/json/storres_usage.json +++ b/json/storres_usage.json @@ -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')}}" + } } }