diff --git a/sql/engines/mysql.py b/sql/engines/mysql.py index e65298a..266b609 100644 --- a/sql/engines/mysql.py +++ b/sql/engines/mysql.py @@ -882,10 +882,10 @@ def get_review_status_summary(self, checksum): rows = [] row = { "checksum": checksum, - "reviewed_by": review_summary[0], - "reviewed_on": review_summary[1], - "comments": review_summary[2], - "reviewed_status": review_summary[3], + "reviewed_by": review_summary[0][0], + "reviewed_on": review_summary[0][1], + "comments": review_summary[0][2], + "reviewed_status": review_summary[0][3], } rows.append(row) query_result.rows = rows diff --git a/sql/templates/sqlreview.html b/sql/templates/sqlreview.html index dfb6092..b7795b3 100644 --- a/sql/templates/sqlreview.html +++ b/sql/templates/sqlreview.html @@ -147,10 +147,8 @@ $("#edit-review").modal('show'); //编辑详情 $("#editRevBtn").unbind("click").click(function () { - var dt = new Date(); - var date = dt.getDate(); - var time = dt.getHours() + ":" + dt.getMinutes() + ":" + dt.getSeconds(); - currenttime = date + time; + var dt = new Date(+new Date()+8*3600*1000); + currenttime = dt.toISOString().slice(0, 19).replace('T', ' '); $.ajax({ type: "post", url: "/sqlreview/edit/", @@ -160,7 +158,7 @@ reviewed_by: 'admin', reviewed_on: currenttime, comments: $("#comments").val(), - reviewed_status: $("reviewed-status").val(), + reviewed_status: $("#reviewed-status").val(), }, complete: function () { },