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",
|
"widgettype": "VBox",
|
||||||
"options": {
|
"options": {"width": "100%", "height": "100%", "padding": "16px", "gap": "12px"},
|
||||||
"width": "100%",
|
|
||||||
"height": "100%",
|
|
||||||
"padding": "16px",
|
|
||||||
"gap": "12px"
|
|
||||||
},
|
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{"widgettype": "Text", "options": {"text": "租户域名管理", "fontSize": "22px", "fontWeight": "700", "color": "#F1F5F9"}},
|
||||||
"widgettype": "Text",
|
{"widgettype": "Text", "options": {"text": "管理各分销商的独立域名,客户通过域名注册后自动归属到对应分销商", "fontSize": "13px", "color": "#94A3B8"}},
|
||||||
"options": {
|
|
||||||
"text": "租户域名管理",
|
|
||||||
"fontSize": "22px",
|
|
||||||
"fontWeight": "700",
|
|
||||||
"color": "#F1F5F9"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"widgettype": "Text",
|
|
||||||
"options": {
|
|
||||||
"text": "管理各分销商的独立域名,客户通过域名注册后自动归属到对应分销商",
|
|
||||||
"fontSize": "13px",
|
|
||||||
"color": "#94A3B8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"widgettype": "Tabular",
|
"widgettype": "Tabular",
|
||||||
"id": "domain_table",
|
"id": "domain_table",
|
||||||
"options": {
|
"options": {
|
||||||
"width": "100%",
|
"width": "100%", "height": "100%", "css": "card",
|
||||||
"height": "100%",
|
|
||||||
"css": "card",
|
|
||||||
"title": "域名列表",
|
"title": "域名列表",
|
||||||
"data_url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}",
|
"data_url": "{{entire_url('/tenant/api/tenant_domain_get.dspy')}}",
|
||||||
"data_method": "GET",
|
"data_method": "GET",
|
||||||
"page_rows": 20,
|
"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": {
|
"toolbar": {
|
||||||
"tools": [
|
"tools": [
|
||||||
{"name": "add", "label": "新增域名"},
|
{"name": "add", "label": "新增域名"},
|
||||||
@ -46,25 +29,10 @@
|
|||||||
"browserfields": {
|
"browserfields": {
|
||||||
"exclouded": ["id"],
|
"exclouded": ["id"],
|
||||||
"alters": {
|
"alters": {
|
||||||
"status": {
|
"status": {"uitype": "code", "data": [{"value": "active", "text": "启用"}, {"value": "inactive", "text": "停用"}]},
|
||||||
"uitype": "code",
|
"resellerid": {"uitype": "code", "valueField": "resellerid", "textField": "resellerid_text"}
|
||||||
"data": [
|
|
||||||
{"value": "active", "text": "启用"},
|
|
||||||
{"value": "inactive", "text": "停用"}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"resellerid": {
|
|
||||||
"uitype": "code",
|
|
||||||
"valueField": "resellerid",
|
|
||||||
"textField": "resellerid_text"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"cwidths": {
|
"cwidths": {"domain": 20, "resellerid": 15, "status": 6, "created_at": 12}
|
||||||
"domain": 20,
|
|
||||||
"resellerid": 15,
|
|
||||||
"status": 6,
|
|
||||||
"created_at": 12
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"fields": [
|
"fields": [
|
||||||
{"name": "domain", "type": "str", "length": 200, "cwidth": 20, "uitype": "str", "label": "域名"},
|
{"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": "创建时间"}
|
{"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