{ "widgettype": "VBox", "options": {"width": "100%", "height": "100%", "padding": "8px", "gap": "8px"}, "subwidgets": [ { "widgettype": "InlineForm", "id": "my_ticket_filter", "options": { "css": "card", "padding": "8px", "submit_label": "查询", "fields": [ {"name": "status", "label": "状态", "uitype": "code", "cwidth": 10, "data": [ {"value": "", "text": "全部"}, {"value": "new", "text": "已提交"}, {"value": "agent_processing", "text": "助手处理中"}, {"value": "agent_replied", "text": "助手已回复"}, {"value": "human_pending", "text": "待人工认领"}, {"value": "human_processing", "text": "人工处理中"}, {"value": "staff_replied", "text": "人工已回复"}, {"value": "closed", "text": "已关闭"}, {"value": "cancelled", "text": "已取消"} ]} ] }, "binds": [{ "wid": "self", "event": "submit", "actiontype": "script", "target": "my_ticket_table", "script": "var tbl = bricks.getWidgetById('my_ticket_table', bricks.app.root); if(tbl) await tbl.render(params);" }] }, { "widgettype": "Tabular", "id": "my_ticket_table", "options": { "title": "我的工单", "width": "100%", "css": "card", "data_url": "{{entire_url('/ticket/api/my_tickets.dspy')}}", "data_method": "GET", "page_rows": 20, "toolbar": { "tools": [ {"name": "new_ticket", "label": "提交新工单"}, {"name": "view_detail", "label": "查看详情", "selected_row": true} ] }, "row_options": { "browserfields": { "exclouded": ["id", "customer_org_id", "followup_count"], "alters": { "category": {"uitype": "code", "data": [ {"value": "consult", "text": "使用咨询"}, {"value": "fault", "text": "故障报修"}, {"value": "billing", "text": "计费账务"}, {"value": "other", "text": "其他"}]}, "priority": {"uitype": "code", "data": [ {"value": "low", "text": "低"}, {"value": "normal", "text": "普通"}, {"value": "high", "text": "高"}, {"value": "urgent", "text": "紧急"}]}, "status": {"uitype": "code", "data": [ {"value": "new", "text": "已提交"}, {"value": "agent_processing", "text": "助手处理中"}, {"value": "agent_replied", "text": "助手已回复"}, {"value": "human_pending", "text": "待人工认领"}, {"value": "human_processing", "text": "人工处理中"}, {"value": "staff_replied", "text": "人工已回复"}, {"value": "closed", "text": "已关闭"}, {"value": "cancelled", "text": "已取消"}]}, "close_reason": {"uitype": "code", "data": [ {"value": "resolved", "text": "已解决"}, {"value": "cancelled", "text": "客户取消"}]} } }, "fields": [ {"name": "ticket_no", "title": "工单号", "type": "str", "length": 32, "cwidth": 12}, {"name": "title", "title": "标题", "type": "str", "length": 200, "cwidth": 24}, {"name": "category", "title": "分类", "type": "str", "length": 32, "cwidth": 8}, {"name": "priority", "title": "优先级", "type": "str", "length": 16, "cwidth": 6}, {"name": "status", "title": "状态", "type": "str", "length": 32, "cwidth": 10}, {"name": "created_at", "title": "提交时间", "type": "timestamp", "cwidth": 14}, {"name": "updated_at", "title": "最后更新", "type": "timestamp", "cwidth": 14} ] } }, "binds": [ { "wid": "self", "event": "new_ticket", "actiontype": "urlwidget", "target": "PopupWindow", "popup_options": {"title": "提交新工单", "width": "46%", "height": "72%", "archor": "cc", "movable": true, "dismiss_events": ["cancel", "submited"]}, "options": {"url": "{{entire_url('/ticket/my/new_ticket_form.ui')}}"} }, { "wid": "self", "event": "view_detail", "actiontype": "urlwidget", "target": "PopupWindow", "popup_options": {"title": "工单详情", "width": "72%", "height": "82%", "archor": "cc", "resizable": true}, "options": {"url": "{{entire_url('/ticket/api/ticket_detail_popup.dspy')}}?id=${id}$"} } ] } ] }