Skip to content

Commit

Permalink
Merge pull request #1305 from ocpeng/master
Browse files Browse the repository at this point in the history
修复缩略SQL乱码问题
  • Loading branch information
hhyo authored Dec 28, 2021
2 parents 02c8d8d + c164451 commit c8006ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
7 changes: 4 additions & 3 deletions sql/templates/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -609,10 +609,11 @@ <h4 class="modal-title text-danger">修改可执行时间</h4>
title: 'SQL内容',
field: 'sql',
formatter: function (value, row, index) {
if (value.length > 80) {
return value.substr(0, 80) + '...';
var sql=row.sql;
if (sql.length > 80) {
return sql.substr(0, 80) + '...';
} else {
return value
return sql
}
},
sortable: false
Expand Down
7 changes: 4 additions & 3 deletions sql/templates/rollback.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,11 @@
title: '回滚语句',
field: 1,
formatter: function (value, row, index) {
if (value.length > 80) {
return value.substr(0, 80) + '...';
var sql=row[1];
if (sql.length > 80) {
return sql.substr(0, 80) + '...';
} else {
return value
return sql
}
}
}, {
Expand Down
5 changes: 3 additions & 2 deletions sql/templates/sqlquery.html
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,9 @@ <h4 class="modal-title text-danger">收藏语句</h4>
title: '语句',
field: 'sqllog',
formatter: function (value, row, index) {
if (value.length > 50) {
var sql = value.substr(0, 50) + '...';
var _sql=row.sqllog
if (_sql.length > 50) {
var sql = _sql.substr(0, 50) + '...';
return sql;
} else {
return value
Expand Down

0 comments on commit c8006ff

Please sign in to comment.