fix: add editable config to Tabular — toolbar add/edit/delete URLs
This commit is contained in:
parent
7a5876a295
commit
499d91bb3f
@ -1,40 +1,23 @@
|
||||
{
|
||||
"widgettype": "VBox",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"padding": "16px",
|
||||
"gap": "12px"
|
||||
},
|
||||
"options": {"width": "100%", "height": "100%", "padding": "16px", "gap": "12px"},
|
||||
"subwidgets": [
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "租户域名管理",
|
||||
"fontSize": "22px",
|
||||
"fontWeight": "700",
|
||||
"color": "#F1F5F9"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype": "Text",
|
||||
"options": {
|
||||
"text": "管理各分销商的独立域名,客户通过域名注册后自动归属到对应分销商",
|
||||
"fontSize": "13px",
|
||||
"color": "#94A3B8"
|
||||
}
|
||||
},
|
||||
{"widgettype": "Text", "options": {"text": "租户域名管理", "fontSize": "22px", "fontWeight": "700", "color": "#F1F5F9"}},
|
||||
{"widgettype": "Text", "options": {"text": "管理各分销商的独立域名,客户通过域名注册后自动归属到对应分销商", "fontSize": "13px", "color": "#94A3B8"}},
|
||||
{
|
||||
"widgettype": "Tabular",
|
||||
"id": "domain_table",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"height": "100%",
|
||||
"css": "card",
|
||||
"width": "100%", "height": "100%", "css": "card",
|
||||
"title": "域名列表",
|
||||
"data_url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}",
|
||||
"data_method": "GET",
|
||||
"page_rows": 20,
|
||||
"editable": {
|
||||
"new_data_url": "{{entire_url('/tenant/api/tenant_domain_create.dspy')}}",
|
||||
"delete_data_url": "{{entire_url('/tenant/api/tenant_domain_delete.dspy')}}",
|
||||
"update_data_url": "{{entire_url('/tenant/api/tenant_domain_update.dspy')}}"
|
||||
},
|
||||
"toolbar": {
|
||||
"tools": [
|
||||
{"name": "add", "label": "新增域名"},
|
||||
@ -46,25 +29,10 @@
|
||||
"browserfields": {
|
||||
"exclouded": ["id"],
|
||||
"alters": {
|
||||
"status": {
|
||||
"uitype": "code",
|
||||
"data": [
|
||||
{"value": "active", "text": "启用"},
|
||||
{"value": "inactive", "text": "停用"}
|
||||
]
|
||||
},
|
||||
"resellerid": {
|
||||
"uitype": "code",
|
||||
"valueField": "resellerid",
|
||||
"textField": "resellerid_text"
|
||||
}
|
||||
"status": {"uitype": "code", "data": [{"value": "active", "text": "启用"}, {"value": "inactive", "text": "停用"}]},
|
||||
"resellerid": {"uitype": "code", "valueField": "resellerid", "textField": "resellerid_text"}
|
||||
},
|
||||
"cwidths": {
|
||||
"domain": 20,
|
||||
"resellerid": 15,
|
||||
"status": 6,
|
||||
"created_at": 12
|
||||
}
|
||||
"cwidths": {"domain": 20, "resellerid": 15, "status": 6, "created_at": 12}
|
||||
},
|
||||
"fields": [
|
||||
{"name": "domain", "type": "str", "length": 200, "cwidth": 20, "uitype": "str", "label": "域名"},
|
||||
@ -73,45 +41,7 @@
|
||||
{"name": "created_at", "type": "timestamp", "cwidth": 12, "uitype": "timestamp", "label": "创建时间"}
|
||||
]
|
||||
}
|
||||
},
|
||||
"binds": [
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "add",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "PopupWindow",
|
||||
"popup_options": {
|
||||
"title": "新增域名",
|
||||
"dismiss_events": ["cancel", "submited"]
|
||||
},
|
||||
"options": {
|
||||
"url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "edit",
|
||||
"actiontype": "urlwidget",
|
||||
"target": "PopupWindow",
|
||||
"popup_options": {
|
||||
"title": "编辑域名",
|
||||
"dismiss_events": ["cancel", "submited"]
|
||||
},
|
||||
"options": {
|
||||
"url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"wid": "self",
|
||||
"event": "delete",
|
||||
"actiontype": "method",
|
||||
"target": "self",
|
||||
"method": "delete_rows",
|
||||
"options": {
|
||||
"url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user