diff --git a/init/data.json b/init/data.json new file mode 100644 index 0000000..b9bc54f --- /dev/null +++ b/init/data.json @@ -0,0 +1,47 @@ +{ + "appcodes": [ + { + "id": "llm_status", + "name": "模型上架状态", + "hierarchy_flg": "0" + }, + { + "id": "llmusage_status", + "name": "调用状态", + "hierarchy_flg": "0" + }, + { + "id": "accounting_status", + "name": "记账状态", + "hierarchy_flg": "0" + }, + { + "id": "handled_flg", + "name": "是否已处理", + "hierarchy_flg": "0" + }, + { + "id": "isdefaultcatelog_flg", + "name": "是否缺省分类", + "hierarchy_flg": "0" + } + ], + "appcodes_kv": [ + {"id": "llm_status_published", "parentid": "llm_status", "k": "published", "v": "已上架"}, + {"id": "llm_status_unpublished", "parentid": "llm_status", "k": "unpublished", "v": "已下架"}, + + {"id": "llmusage_status_succeeded", "parentid": "llmusage_status", "k": "SUCCEEDED", "v": "成功"}, + {"id": "llmusage_status_failed", "parentid": "llmusage_status", "k": "FAILED", "v": "失败"}, + {"id": "llmusage_status_unknown", "parentid": "llmusage_status", "k": "UNKNOWN", "v": "未知"}, + + {"id": "accounting_status_created", "parentid": "accounting_status", "k": "created", "v": "待记账"}, + {"id": "accounting_status_accounted", "parentid": "accounting_status", "k": "accounted", "v": "已记账"}, + {"id": "accounting_status_failed", "parentid": "accounting_status", "k": "failed", "v": "记账失败"}, + + {"id": "handled_flg_0", "parentid": "handled_flg", "k": "0", "v": "未处理"}, + {"id": "handled_flg_1", "parentid": "handled_flg", "k": "1", "v": "已处理"}, + + {"id": "isdefaultcatelog_flg_0", "parentid": "isdefaultcatelog_flg", "k": "0", "v": "否"}, + {"id": "isdefaultcatelog_flg_1", "parentid": "isdefaultcatelog_flg", "k": "1", "v": "是"} + ] +} diff --git a/json/llm.json b/json/llm.json index e8e1e67..7ec904f 100644 --- a/json/llm.json +++ b/json/llm.json @@ -25,11 +25,9 @@ "alters": { "status": { "uitype": "code", - "data": [ - {"value": "", "text": "全部"}, - {"value": "published", "text": "已上架"}, - {"value": "unpublished", "text": "已下架"} - ] + "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=llm_status", + "valueField": "k", + "textField": "v" }, "ppid":{ "dataurl":"{{entire_url('/pricing/get_all_pricing_programs.dspy')}}", diff --git a/json/llm_api_map.json b/json/llm_api_map.json index c221c85..38fd709 100644 --- a/json/llm_api_map.json +++ b/json/llm_api_map.json @@ -16,6 +16,12 @@ "dataurl": "{{entire_url('../api/get_search_apiname.dspy?allow_empty=1')}}?llmid={{params_kw.llmid}}", "valueField": "apiname", "textField": "apiname_text" + }, + "isdefaultcatelog": { + "uitype": "code", + "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=isdefaultcatelog_flg", + "valueField": "k", + "textField": "v" } } }, diff --git a/json/llmusage.json b/json/llmusage.json index b263aa8..833bdcb 100644 --- a/json/llmusage.json +++ b/json/llmusage.json @@ -5,7 +5,20 @@ "sortby": "use_time desc", "browserfields": { "exclouded": ["id"], - "alters": {} + "alters": { + "status": { + "uitype": "code", + "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=llmusage_status", + "valueField": "k", + "textField": "v" + }, + "accounting_status": { + "uitype": "code", + "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=accounting_status", + "valueField": "k", + "textField": "v" + } + } }, "editexclouded": ["id"], "editable": { diff --git a/json/llmusage_accounting_failed.json b/json/llmusage_accounting_failed.json index be68369..156a0cd 100644 --- a/json/llmusage_accounting_failed.json +++ b/json/llmusage_accounting_failed.json @@ -8,10 +8,9 @@ "alters": { "handled": { "uitype": "code", - "data": [ - {"value": "0", "text": "未处理"}, - {"value": "1", "text": "已处理"} - ] + "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=handled_flg", + "valueField": "k", + "textField": "v" } } }, diff --git a/json/llmusage_history.json b/json/llmusage_history.json index 2224e81..b267024 100644 --- a/json/llmusage_history.json +++ b/json/llmusage_history.json @@ -5,7 +5,20 @@ "sortby": "use_time desc", "browserfields": { "exclouded": ["id"], - "alters": {} + "alters": { + "status": { + "uitype": "code", + "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=llmusage_status", + "valueField": "k", + "textField": "v" + }, + "accounting_status": { + "uitype": "code", + "dataurl": "{{entire_url('/appbase/get_appcodes_kv.dspy')}}?parentid=accounting_status", + "valueField": "k", + "textField": "v" + } + } }, "editexclouded": ["id"], "editable": {