diff --git a/cmdb-ui/src/modules/cmdb/assets/dashboard_empty.png b/cmdb-ui/src/modules/cmdb/assets/dashboard_empty.png index 59cf19c..8c0f04e 100644 Binary files a/cmdb-ui/src/modules/cmdb/assets/dashboard_empty.png and b/cmdb-ui/src/modules/cmdb/assets/dashboard_empty.png differ diff --git a/cmdb-ui/src/modules/cmdb/assets/preference_card.png b/cmdb-ui/src/modules/cmdb/assets/preference_card.png index 100af6c..6ff82e0 100644 Binary files a/cmdb-ui/src/modules/cmdb/assets/preference_card.png and b/cmdb-ui/src/modules/cmdb/assets/preference_card.png differ diff --git a/cmdb-ui/src/modules/cmdb/components/JsonEditor/jsonEditor.vue b/cmdb-ui/src/modules/cmdb/components/JsonEditor/jsonEditor.vue index 2cb4151..eb98a6d 100644 --- a/cmdb-ui/src/modules/cmdb/components/JsonEditor/jsonEditor.vue +++ b/cmdb-ui/src/modules/cmdb/components/JsonEditor/jsonEditor.vue @@ -63,7 +63,7 @@ export default { updateCI(this.row.ci_id || this.row._id, { [`${this.column.property}`]: this.default_value_json_right ? this.jsonData : {}, }).then(() => { - this.$message.success('保存成功!') + this.$message.success(this.$t('saveSuccess')) this.handleCancel() this.$emit('jsonEditorOk', this.row, this.column, this.default_value_json_right ? this.jsonData : {}) }) diff --git a/cmdb-ui/src/modules/cmdb/components/attributesTransfer/index.vue b/cmdb-ui/src/modules/cmdb/components/attributesTransfer/index.vue index a6722f5..fb24579 100644 --- a/cmdb-ui/src/modules/cmdb/components/attributesTransfer/index.vue +++ b/cmdb-ui/src/modules/cmdb/components/attributesTransfer/index.vue @@ -7,7 +7,7 @@ width: '200px', height: `${height}px`, }" - :titles="['未选属性', '已选属性']" + :titles="[$t('cmdb.components.unselectAttributes'), $t('cmdb.components.selectAttributes')]" :render="(item) => item.title" :targetKeys="targetKeys" @change="handleChange" @@ -16,7 +16,7 @@ :filterOption="filterOption" class="cmdb-transfer" > - 暂无数据 + {{ $t('noData') }}
- 确定 + {{ $t('confirm') }}
@@ -110,12 +113,12 @@ export default { default: true, }, isSortable: { - // 右侧是否可排序 + // Is the right side sortable? type: Boolean, default: true, }, isFixable: { - // 右侧是否可固定 + // Can the right side be fixed? type: Boolean, default: true, }, diff --git a/cmdb-ui/src/modules/cmdb/components/batchDownload/batchDownload.vue b/cmdb-ui/src/modules/cmdb/components/batchDownload/batchDownload.vue index 6cfecf6..7314db0 100644 --- a/cmdb-ui/src/modules/cmdb/components/batchDownload/batchDownload.vue +++ b/cmdb-ui/src/modules/cmdb/components/batchDownload/batchDownload.vue @@ -1,21 +1,30 @@ - 授权用户/部门 - 授权角色 + {{ $t('cmdb.components.grantUser') }} + {{ $t('cmdb.components.grantRole') }} @@ -95,10 +95,8 @@ export default { } return (this.windowHeight - 104) / 2 - 116 }, - }, - data() { - return { - permMap, + permMap() { + return permMap() } }, methods: { @@ -131,8 +129,8 @@ export default { } else { const that = this this.$confirm({ - title: '警告', - content: `确认删除 【${row.name}】 的 【授权】 权限?`, + title: that.$t('warning'), + content: that.$t('cmdb.components.confirmRevoke', { name: `${row.name}` }), onOk() { that.handleChange({ target: { checked: false } }, col, row) const _idx = that.tableData.findIndex((item) => item.rid === row.rid) diff --git a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/constants.js b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/constants.js index 709501c..631e5da 100644 --- a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/constants.js +++ b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/constants.js @@ -1,11 +1,15 @@ -export const permMap = { - read: '查看', - add: '新增', - create: '新增', - update: '修改', - delete: '删除', - config: '配置', - grant: '授权', - 'read_attr': '查看字段', - 'read_ci': '查看实例' +import i18n from '@/lang' + +export const permMap = () => { + return { + read: i18n.t('view'), + add: i18n.t('new'), + create: i18n.t('new'), + update: i18n.t('update'), + delete: i18n.t('delete'), + config: i18n.t('cmdb.components.config'), + grant: i18n.t('grant'), + 'read_attr': i18n.t('cmdb.components.readAttribute'), + 'read_ci': i18n.t('cmdb.components.readCI') + } } diff --git a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/grantComp.vue b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/grantComp.vue index 3634695..e9f2756 100644 --- a/cmdb-ui/src/modules/cmdb/components/cmdbGrant/grantComp.vue +++ b/cmdb-ui/src/modules/cmdb/components/cmdbGrant/grantComp.vue @@ -1,7 +1,7 @@ @@ -51,7 +51,6 @@ export default { }, data() { return { - permMap, columns: ['create', 'grant', 'delete'], } }, @@ -65,6 +64,9 @@ export default { } return (this.windowHeight - 104) / 2 - 116 }, + permMap() { + return permMap() + } }, methods: { getCurrentRowStyle, diff --git a/cmdb-ui/src/modules/cmdb/components/colorPicker/index.vue b/cmdb-ui/src/modules/cmdb/components/colorPicker/index.vue index 4ac895a..18d1afc 100644 --- a/cmdb-ui/src/modules/cmdb/components/colorPicker/index.vue +++ b/cmdb-ui/src/modules/cmdb/components/colorPicker/index.vue @@ -132,7 +132,7 @@ export default { } else if (color.indexOf('rgb') !== -1) { hsvObj = this.rgbToHSV(color) } else { - throw new Error('初始化颜色格式错误,使用#fff或rgb格式') + throw new Error(this.$t('cmdb.components.colorPickerError')) // this.$message.error('颜色格式错误,使用16进制格式') } if (hsvObj) { diff --git a/cmdb-ui/src/modules/cmdb/components/httpSnmpAD/index.vue b/cmdb-ui/src/modules/cmdb/components/httpSnmpAD/index.vue index b10ea7c..a369162 100644 --- a/cmdb-ui/src/modules/cmdb/components/httpSnmpAD/index.vue +++ b/cmdb-ui/src/modules/cmdb/components/httpSnmpAD/index.vue @@ -15,19 +15,19 @@ :edit-config="isEdit ? { trigger: 'click', mode: 'cell' } : {}" > @@ -61,12 +61,6 @@ - - - - + + + + + + + diff --git a/cmdb-ui/src/modules/cmdb/components/preferenceSearch/preferenceSearch.vue b/cmdb-ui/src/modules/cmdb/components/preferenceSearch/preferenceSearch.vue index 18d525e..b1f439e 100644 --- a/cmdb-ui/src/modules/cmdb/components/preferenceSearch/preferenceSearch.vue +++ b/cmdb-ui/src/modules/cmdb/components/preferenceSearch/preferenceSearch.vue @@ -11,7 +11,7 @@ @blur="handleInputConfirm" @keyup.enter="handleInputConfirm" /> - 保存筛选条件 + {{ $t('cmdb.components.saveQuery') }}