diff --git a/json/svgicon.json b/json/svgicon.json new file mode 100644 index 0000000..02ce5dd --- /dev/null +++ b/json/svgicon.json @@ -0,0 +1,13 @@ +{ + "tblname":"svgicon", + "params":{ + "title":"图标", + "description":"系统中使用的图标", + "sortby":"id", + "browserfields":{ + "exclouded":[], + "alters":{} + }, + "editexclouded":[] + } +} diff --git a/models/svgicon.xlsx b/models/svgicon.xlsx new file mode 100644 index 0000000..8953bd9 Binary files /dev/null and b/models/svgicon.xlsx differ diff --git a/wwwroot/get_icons.dspy b/wwwroot/get_icons.dspy new file mode 100644 index 0000000..8c38c4f --- /dev/null +++ b/wwwroot/get_icons.dspy @@ -0,0 +1,8 @@ +db = DBPools() +dbname = get_serverenv('get_module_dbname')('appbase') +async with db.sqlorContext(dbname) as sor: + recs = await sor.R('svgicon', {}) + for r in recs: + r.icon = f'{r.icon}' + return recs +return [] diff --git a/wwwroot/show_icon.dspy b/wwwroot/show_icon.dspy new file mode 100644 index 0000000..089c161 --- /dev/null +++ b/wwwroot/show_icon.dspy @@ -0,0 +1,7 @@ +db = DBPools() +dbname = get_severenv('get_module_dbname')('appbase') +async with db.sqlorContext(dbname) as sor: + recs = await sor.R('svgicon', {'id':params_kw.id}) + if len(recs) > 0: + return recs[0].icon +return None