NEZ-1378 fix: Module内容过长时鼠标悬浮提示,补充国际化

This commit is contained in:
@changcode
2021-12-02 16:42:37 +08:00
committed by chenjinsong
parent e55dbb116d
commit c1d94feea1
4 changed files with 33 additions and 20 deletions

View File

@@ -90,9 +90,9 @@ export default {
chartlList: [], // chart 列表数据 chartlList: [], // chart 列表数据
ChartSearchShowFields: [ // ChartSearch 下拉搜索表头 ChartSearchShowFields: [ // ChartSearch 下拉搜索表头
{ title: 'ID', data: 'id' }, { title: 'ID', data: 'id' },
{ title: this.$t('config.model.titleName'), data: 'name' }, { title: this.$t('config.model.titleName'), data: '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: 'remark' } { title: this.$t('overall.remark'), data: 'remark', key: 'remark' }
], ],
url: 'asset/model', url: 'asset/model',
brandUrl: 'asset/brand', brandUrl: 'asset/brand',

View File

@@ -191,7 +191,8 @@ export default {
return row.name.substring(0, 12) + '...' return row.name.substring(0, 12) + '...'
} }
return row.name return row.name
} },
key: 'name'
}, },
{ {
title: this.$t('project.project.projectName'), title: this.$t('project.project.projectName'),
@@ -201,7 +202,9 @@ export default {
} else { } else {
return row.project.name return row.project.name
} }
} },
deep: true,
orjinNME: 'project'
}, },
{ {
title: this.$t('overall.remark'), title: this.$t('overall.remark'),
@@ -209,39 +212,47 @@ export default {
if (row.remark && row.remark.length > 15) { if (row.remark && row.remark.length > 15) {
return row.remark.substring(0, 12) + '...' return row.remark.substring(0, 12) + '...'
} }
return row.remark return row.remark = row.remark ? row.remark : ''
} },
key: 'remark'
} }
], ],
columns: [ columns: [
{ title: 'id', data: 'id' }, { title: 'id', data: 'id' },
{ {
title: 'name', title: this.$t('config.model.titleName'),
data: function (row) { data: function (row) {
if (row.name.length > 15) { if (row.name.length > 15) {
return row.name.substring(0, 12) + '...' return row.name.substring(0, 12) + '...'
} }
return row.name return row.name
}
}, },
{ title: 'Manage Ip', data: 'manageIp' }, key: 'name'
},
{ title: 'Manage Ip', data: 'manageIp', key: 'manageIp' },
{ {
title: 'Type', title: this.$t('overall.type'),
data: (row) => { data: (row) => {
return row.type ? row.type.name : '' return row.type ? row.type.name : ''
} },
deep: true,
orjinNME: 'type'
}, },
{ {
title: 'Model', title: this.$t('overall.model'),
data: (row) => { data: (row) => {
return row.model ? row.model.name : '' return row.model ? row.model.name : ''
} },
deep: true,
orjinNME: 'model'
}, },
{ {
title: 'Datacenter', title: this.$t('overall.dc'),
data: (row) => { data: (row) => {
return row.dc ? row.dc.name : '' return row.dc ? row.dc.name : ''
} },
deep: true,
orjinNME: 'dc'
} }
], ],
object: {}, object: {},

View File

@@ -605,9 +605,10 @@ export default {
return row.name.substring(0, 12) + '...' return row.name.substring(0, 12) + '...'
} }
return row.name return row.name
}
}, },
{ title: this.$t('config.model.titleType'), data: 'type' }, key: 'name'
},
{ title: this.$t('config.model.titleType'), data: 'type', key: 'type' },
{ {
title: this.$t('overall.remark'), title: this.$t('overall.remark'),
data: function (row) { data: function (row) {
@@ -615,7 +616,8 @@ export default {
return row.remark.substring(0, 12) + '...' return row.remark.substring(0, 12) + '...'
} }
return row.remark return row.remark
} },
key: 'remark'
} }
], ],
showAllBasicOption: false, showAllBasicOption: false,

View File

@@ -33,7 +33,7 @@ export default {
key: idx, key: idx,
domProps: { domProps: {
innerHTML: this.renderColumn(val, col), innerHTML: this.renderColumn(val, col),
title: val[col.title] title: col.deep ? val[col.orjinNME].name : val[col.key]
} }
}) })
})) }))