ticket/wwwroot/manage/index.ui

81 lines
4.6 KiB
XML

{
"widgettype": "VBox",
"options": {"width": "100%", "height": "100%", "padding": "8px", "gap": "8px"},
"subwidgets": [
{
"widgettype": "InlineForm",
"id": "staff_ticket_filter",
"options": {
"css": "card", "padding": "8px", "submit_label": "查询",
"fields": [
{"name": "queue", "label": "队列", "uitype": "code", "value": "pending", "cwidth": 10,
"data": [
{"value": "pending", "text": "待认领(我的角色池)"},
{"value": "mine", "text": "我受理的"},
{"value": "all", "text": "全部工单"}
]}
]
},
"binds": [{
"wid": "self", "event": "submit",
"actiontype": "script", "target": "staff_ticket_table",
"script": "var tbl = bricks.getWidgetById('staff_ticket_table', bricks.app.root); if(tbl) await tbl.render(params);"
}]
},
{
"widgettype": "Tabular",
"id": "staff_ticket_table",
"options": {
"title": "工单管理",
"width": "100%", "css": "card",
"data_url": "{{entire_url('/ticket/api/staff_tickets.dspy')}}",
"data_method": "GET", "page_rows": 20,
"data_params": {"queue": "pending"},
"toolbar": {
"tools": [
{"name": "view_detail", "label": "查看详情/处理", "selected_row": true}
]
},
"row_options": {
"browserfields": {
"exclouded": ["id", "customer_org_id", "assignee_id"],
"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": "已取消"}]}
}
},
"fields": [
{"name": "ticket_no", "title": "工单号", "type": "str", "length": 32, "cwidth": 12},
{"name": "title", "title": "标题", "type": "str", "length": 200, "cwidth": 20},
{"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": "customer_org_name", "title": "客户机构", "type": "str", "length": 100, "cwidth": 14},
{"name": "assignee_role", "title": "受理角色", "type": "str", "length": 64, "cwidth": 12},
{"name": "assignee_name", "title": "受理人", "type": "str", "length": 32, "cwidth": 8},
{"name": "updated_at", "title": "最后更新", "type": "timestamp", "cwidth": 14}
]
}
},
"binds": [
{
"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}$"}
}
]
}
]
}