From 9aacf7f5269884b12d6fba5d727f0c3875bee23c 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/acctres_pricing_map.json | 82 +++++-------------- json/acctres_spec.json | 106 +++++-------------------- json/acctres_usage.json | 143 +++++----------------------------- 3 files changed, 55 insertions(+), 276 deletions(-) diff --git a/json/acctres_pricing_map.json b/json/acctres_pricing_map.json index e051126..42d49b5 100644 --- a/json/acctres_pricing_map.json +++ b/json/acctres_pricing_map.json @@ -1,70 +1,24 @@ { "tblname": "acctres_pricing_map", + "title": "账号规格定价映射", "params": { - "title": "账号定价映射", - "browserfields": [ - { - "field": "spec_id", - "title": "规格ID" - }, - { - "field": "charge_mode", - "title": "计费方式" - }, - { - "field": "charge_unit", - "title": "计费单位" - }, - { - "field": "valid_days", - "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": "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" - ] + "editable": { + "new_data_url": "{{entire_url('./add_acctres_pricing_map.dspy')}}", + "update_data_url": "{{entire_url('./update_acctres_pricing_map.dspy')}}", + "delete_data_url": "{{entire_url('./delete_acctres_pricing_map.dspy')}}" + } } } diff --git a/json/acctres_spec.json b/json/acctres_spec.json index db6cd4d..1bbf03a 100644 --- a/json/acctres_spec.json +++ b/json/acctres_spec.json @@ -1,94 +1,24 @@ { "tblname": "acctres_spec", + "title": "账号规格", "params": { - "title": "账号规格", - "browserfields": [ - { - "field": "spec_code", - "title": "规格编码" - }, - { - "field": "spec_name", - "title": "规格名称" - }, - { - "field": "spec_type", - "title": "规格类型" - }, - { - "field": "workspace_max", - "title": "可建工作空间数" - }, - { - "field": "workspace_gb", - "title": "赠送容量GB" - }, - { - "field": "concurrent_task", - "title": "并发任务数" - }, - { - "field": "gpu_allowed", - "title": "允许GPU" - }, - { - "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": "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" - ] + "editable": { + "new_data_url": "{{entire_url('./add_acctres_spec.dspy')}}", + "update_data_url": "{{entire_url('./update_acctres_spec.dspy')}}", + "delete_data_url": "{{entire_url('./delete_acctres_spec.dspy')}}" + } } } diff --git a/json/acctres_usage.json b/json/acctres_usage.json index 97f5e9b..a64555e 100644 --- a/json/acctres_usage.json +++ b/json/acctres_usage.json @@ -1,130 +1,25 @@ { "tblname": "acctres_usage", + "title": "账号资源用量", "params": { - "title": "账号用量", - "browserfields": [ - { - "field": "spec_id", - "title": "规格ID" - }, - { - "field": "charge_mode", - "title": "计费方式" - }, - { - "field": "userorgid", - "title": "用户机构" - }, - { - "field": "use_date", - "title": "使用日期" - }, - { - "field": "quantity", - "title": "数量" - }, - { - "field": "amount", - "title": "交易金额" - }, - { - "field": "discount_rate", - "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": "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" - ] + "editable": { + "new_data_url": "{{entire_url('./add_acctres_usage.dspy')}}", + "update_data_url": "{{entire_url('./update_acctres_usage.dspy')}}", + "delete_data_url": "{{entire_url('./delete_acctres_usage.dspy')}}" + } } }