修改配置管理的展示方式

This commit is contained in:
liaozetao
2023-10-19 17:44:38 +08:00
parent 6502e1443b
commit 8c9016246f

View File

@@ -93,7 +93,15 @@ import { getSysConfList } from '@/api/system/sysconf';
export default {
name: "SysconfAdminView",
setup() {
return {};
function showText(obj) {
let text = unescape($(obj).prop('title'));
$("#tipMsg").text(text);
$("#tipModal").modal('show');
}
window.showText = showText;
return {
showText
};
},
created() {
this.$nextTick(function () {
@@ -112,12 +120,37 @@ export default {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{ field: 'tmp', title: 'ID', align: 'center', checkbox: true },
{ field: 'configId', title: 'id', align: 'center', width: '20%' },
{ field: 'configName', title: '名称', align: 'center', width: '25%' },
{ field: 'configValue', title: '值', align: 'center', width: '20%' },
{field: 'tmp', title: 'ID', align: 'center', width: '5%', checkbox: true},
{
field: 'configId',
title: 'id',
align: 'center',
width: '5%',
},
{
field: 'configName',
title: '名称',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
return '<div style="text-align: center; width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" title="' + escape(val) + '" onmouseover="showText(this);">' + val + '</div>';
}
},
{
field: 'configValue',
title: '值',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
return '<div style="text-align: center; width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;" title="' + escape(val) + '" onmouseover="showText(this);">' + val + '</div>';
}
},
{
field: 'configStatus', title: '状态', align: 'center', width: '5%', formatter: function (val, row, index) {
field: 'configStatus',
title: '状态',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
if (val == 1) {
return '有效';
}
@@ -126,9 +159,13 @@ export default {
}
}
},
{ field: 'nameSpace', title: '命名空间', align: 'center', width: '5%' },
{ field: 'nameSpace', title: '命名空间', align: 'center', width: '5%', },
{
field: 'configId', title: '操作', align: 'center', width: '25%', formatter: function (val, row, index) {
field: 'configId',
title: '操作',
align: 'center',
width: '5%',
formatter: function (val, row, index) {
return '<button class="btn btn-sm btn-success opt-edit" data-id=' + val + '>' +
'<i class="glyphicon glyphicon-edit"></i>编辑</button>' +
'&nbsp;&nbsp;<button class="btn btn-sm btn-danger opt-remove" data-id=' + val +