diff --git a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue index 433f68604..46a4f3e34 100644 --- a/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue +++ b/nezha-fronted/src/components/common/rightBox/administration/modelBox.vue @@ -90,9 +90,9 @@ export default { chartlList: [], // chart 列表数据 ChartSearchShowFields: [ // ChartSearch 下拉搜索表头 { title: 'ID', data: 'id' }, - { title: this.$t('config.model.titleName'), data: 'name' }, - { title: this.$t('config.model.titleType'), data: 'type' }, - { title: this.$t('overall.remark'), data: 'remark' } + { title: this.$t('config.model.titleName'), data: 'name', key: 'name' }, + { title: this.$t('config.model.titleType'), data: 'type', key: 'type' }, + { title: this.$t('overall.remark'), data: 'remark', key: 'remark' } ], url: 'asset/model', brandUrl: 'asset/brand', diff --git a/nezha-fronted/src/components/common/rightBox/batchAddEndpoint.vue b/nezha-fronted/src/components/common/rightBox/batchAddEndpoint.vue index e5019caac..4780be2de 100644 --- a/nezha-fronted/src/components/common/rightBox/batchAddEndpoint.vue +++ b/nezha-fronted/src/components/common/rightBox/batchAddEndpoint.vue @@ -191,7 +191,8 @@ export default { return row.name.substring(0, 12) + '...' } return row.name - } + }, + key: 'name' }, { title: this.$t('project.project.projectName'), @@ -201,7 +202,9 @@ export default { } else { return row.project.name } - } + }, + deep: true, + orjinNME: 'project' }, { title: this.$t('overall.remark'), @@ -209,39 +212,47 @@ export default { if (row.remark && row.remark.length > 15) { return row.remark.substring(0, 12) + '...' } - return row.remark - } + return row.remark = row.remark ? row.remark : '' + }, + key: 'remark' } ], columns: [ { title: 'id', data: 'id' }, { - title: 'name', + title: this.$t('config.model.titleName'), data: function (row) { if (row.name.length > 15) { return row.name.substring(0, 12) + '...' } return row.name - } + }, + key: 'name' }, - { title: 'Manage Ip', data: 'manageIp' }, + { title: 'Manage Ip', data: 'manageIp', key: 'manageIp' }, { - title: 'Type', + title: this.$t('overall.type'), data: (row) => { return row.type ? row.type.name : '' - } + }, + deep: true, + orjinNME: 'type' }, { - title: 'Model', + title: this.$t('overall.model'), data: (row) => { return row.model ? row.model.name : '' - } + }, + deep: true, + orjinNME: 'model' }, { - title: 'Datacenter', + title: this.$t('overall.dc'), data: (row) => { return row.dc ? row.dc.name : '' - } + }, + deep: true, + orjinNME: 'dc' } ], object: {}, diff --git a/nezha-fronted/src/components/common/rightBox/moduleBox.vue b/nezha-fronted/src/components/common/rightBox/moduleBox.vue index 96586e04b..647677080 100644 --- a/nezha-fronted/src/components/common/rightBox/moduleBox.vue +++ b/nezha-fronted/src/components/common/rightBox/moduleBox.vue @@ -605,9 +605,10 @@ export default { return row.name.substring(0, 12) + '...' } return row.name - } + }, + key: 'name' }, - { title: this.$t('config.model.titleType'), data: 'type' }, + { title: this.$t('config.model.titleType'), data: 'type', key: 'type' }, { title: this.$t('overall.remark'), data: function (row) { @@ -615,7 +616,8 @@ export default { return row.remark.substring(0, 12) + '...' } return row.remark - } + }, + key: 'remark' } ], showAllBasicOption: false, diff --git a/nezha-fronted/src/components/common/v-selectpagenew/Table.js b/nezha-fronted/src/components/common/v-selectpagenew/Table.js index 8fdb63c68..5f2d25af3 100644 --- a/nezha-fronted/src/components/common/v-selectpagenew/Table.js +++ b/nezha-fronted/src/components/common/v-selectpagenew/Table.js @@ -33,7 +33,7 @@ export default { key: idx, domProps: { innerHTML: this.renderColumn(val, col), - title: val[col.title] + title: col.deep ? val[col.orjinNME].name : val[col.key] } }) }))