未验证 提交 f96dd15f 编写于 作者: B BaiJiangJie 提交者: GitHub

Merge pull request #3454 from jumpserver/1.5.5_bai

[Update] 修改工单管理列表可以按照类型排序 以及 日期显示格式
......@@ -14,7 +14,7 @@ class TicketSerializer(serializers.ModelSerializer):
'id', 'user', 'user_display', 'title', 'body',
'assignees', 'assignees_display',
'status', 'action', 'date_created', 'date_updated',
'type_display', 'action_display',
'type', 'type_display', 'action_display',
]
read_only_fields = [
'user_display', 'assignees_display',
......
......@@ -67,24 +67,27 @@ function initTable() {
var detailBtn = '<a href="{% url "tickets:ticket-detail" pk=DEFAULT_PK %}">' + cellData + '</a>';
$(td).html(detailBtn.replace("{{ DEFAULT_PK }}", rowData.id));
}},
{targets: 3, createdCell: function (td, cellData, rowData) {
$(td).html(rowData.type_display)
}},
{targets: 4, createdCell: function (td, cellData) {
if (cellData === "open") {
$(td).html('<i class="fa fa-check-circle-o text-navy"></i>');
} else {
$(td).html('<i class="fa fa-times-circle-o text-danger"></i>')
}
}},
{targets: 4, createdCell: function (td, cellData) {
}},
{targets: 5, createdCell: function (td, cellData) {
var d = toSafeLocalDateStr(cellData);
$(td).html(d)
}},
}}
],
ajax_url: listUrl,
columns: [
{data: "id"}, {data: "title"},
{data: "user_display"}, {data: "type_display"},
{data: "user_display"}, {data: "type"},
{data: "status", width: "40px"},
{data: "date_created"},
{data: "date_created"}
],
op_html: $('#actions').html()
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册