NEZ-793 fix: Agent页面,查询问题

This commit is contained in:
@changcode
2021-06-30 17:11:46 +08:00
parent bd3eda24da
commit ca20f76c1b
6 changed files with 24 additions and 17 deletions

View File

@@ -68,11 +68,15 @@ export default {
}, },
tableDataSort (item) { tableDataSort (item) {
let orderBy = '' let orderBy = ''
let str = item.prop
if (str === 'dc') {
str = 'datacenter'
}
if (item.order === 'ascending') { if (item.order === 'ascending') {
orderBy = item.prop orderBy = str
} }
if (item.order === 'descending') { if (item.order === 'descending') {
orderBy = '-' + item.prop orderBy = '-' + str
} }
this.$emit('orderBy', orderBy) this.$emit('orderBy', orderBy)
} }

View File

@@ -165,7 +165,9 @@ export default {
this.$refs.roleForm.validate((valid) => { this.$refs.roleForm.validate((valid) => {
if (valid) { if (valid) {
if (this.editRole.id) { if (this.editRole.id) {
this.editRole.i18n = this.editRole.name
this.$put(this.url, this.editRole).then(res => { this.$put(this.url, this.editRole).then(res => {
console.log(this.editRole)
this.prevent_opt.save = false this.prevent_opt.save = false
if (res.code === 200) { if (res.code === 200) {
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') }) this.$message({ duration: 2000, type: 'success', message: this.$t('tip.saveSuccess') })

View File

@@ -109,7 +109,7 @@ export default {
} else { } else {
callback() callback()
} }
}; }
return { return {
editUser: {}, editUser: {},
url: 'sys/user', url: 'sys/user',

View File

@@ -55,9 +55,6 @@ export default {
] ]
} }
} }
},
created() {
}, },
methods: { methods: {
clickOutside () { clickOutside () {

View File

@@ -1652,14 +1652,17 @@ export default {
top: 0px; top: 0px;
} }
.localStorage_list_box .list_box_content{ .localStorage_list_box .list_box_content{
text-align: left; text-align: left;
padding: 5px 0; padding: 5px 0;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1px solid #dfdfdf; border-bottom: 1px solid #dfdfdf;
} }
.localStorage_list_box ul li{ .localStorage_list_box ul li{
padding: 5px 10px; padding: 5px 10px;
line-height: 20px; line-height: 20px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
} }
.localStorage_list_box ul li:hover{ .localStorage_list_box ul li:hover{
background: #f0f0f0; background: #f0f0f0;
@@ -1670,7 +1673,8 @@ export default {
color: #2e2e2e; color: #2e2e2e;
} }
.localStorage_list_box ul li .value{ .localStorage_list_box ul li .value{
font-weight: 600; font-weight: 600;
width: 350px;
} }
.localStorage_list_box .list_box_clear{ .localStorage_list_box .list_box_clear{
padding-left: 10px; padding-left: 10px;

View File

@@ -86,12 +86,12 @@ export default {
prop: 'id', prop: 'id',
show: true, show: true,
width: 80, width: 80,
sortable:'custom' sortable: 'custom'
}, { }, {
label: this.$t('config.agent.dataCenter'), label: this.$t('config.agent.dataCenter'),
prop: 'dc', prop: 'dc',
show: true, show: true,
sortable:'custom' sortable: 'custom'
}, { }, {
label: this.$t('config.agent.host'), label: this.$t('config.agent.host'),
prop: 'host', prop: 'host',
@@ -104,12 +104,12 @@ export default {
label: this.$t('config.agent.type'), label: this.$t('config.agent.type'),
prop: 'type', prop: 'type',
show: true, show: true,
sortable:'custom' sortable: 'custom'
}, { }, {
label: this.$t('asset.state'), label: this.$t('asset.state'),
prop: 'status', prop: 'status',
show: true, show: true,
sortable:'custom' sortable: 'custom'
}, { }, {
label: this.$t('config.agent.checkTime'), label: this.$t('config.agent.checkTime'),
prop: 'checkTime', prop: 'checkTime',