-
添加分组
+
{{ $t('ciType.addGroup') }}
@@ -11,7 +11,7 @@
style="width: 10rem;margin-right: 0.5rem"
ref="addGroupInput"
v-model.trim="newGroupName" />
- 保存
+ {{ $t('button.save') }}
{{ $t('button.cancel') }}
@@ -36,7 +36,7 @@
style="width: 15%;margin-right: 0.5rem"
ref="editGroupInput"
v-model.trim="CITypeGroup.name" />
-
保存
+
{{ $t('button.save') }}
{{ $t('button.cancel') }}
@@ -46,27 +46,27 @@
- 上移
+ {{ $t('ciType.up') }}
- 下移
+ {{ $t('ciType.down') }}
- 添加属性
+ {{ $t('ciType.addAttribute1') }}
- 删除分组
+ {{ $t('ciType.deleteGroup') }}
@@ -108,7 +108,7 @@
添加属性
+ style="">{{ $t('ciType.addAttribute1') }}
@@ -121,34 +121,34 @@
- 更多属性
+ {{ $t('ciType.moreAttribute') }}
({{ otherGroupAttributes.length }})
- 上移
+ {{ $t('ciType.up') }}
- 下移
+ {{ $t('ciType.down') }}
- 添加属性
+ {{ $t('ciType.addAttribute1') }}
- 删除分组
+ {{ $t('ciType.deleteGroup') }}
@@ -182,14 +182,14 @@
添加属性
+ style="">{{ $t('ciType.addAttribute1') }}
x.originName).includes(CITypeGroup.name)) {
- this.$message.error('分组名称已存在')
+ this.$message.error(this.$t('ciType.groupNameExisted'))
} else {
updateCITypeGroupById(CITypeGroup.id, { name: CITypeGroup.name, attributes: CITypeGroup.attributes.map(x => x.id), order: CITypeGroup.order })
.then(res => {
CITypeGroup.editable = false
this.$set(this.CITypeGroups, index, CITypeGroup)
- this.$message.success('修改成功')
+ this.$message.success(this.$t('tip.updateSuccess'))
})
.catch(err => this.requestFailed(err))
}
@@ -389,14 +389,14 @@ export default {
const fromGroupId = this.CITypeGroups[beforeIndex].id
const toGroupId = this.CITypeGroups[afterIndex].id
transferCITypeGroupIndex(this.CITypeId, { from: fromGroupId, to: toGroupId }).then(res => {
- this.$message.success('操作成功')
+ this.$message.success(this.$t('ciType.moveSuccess'))
const beforeGroup = this.CITypeGroups[beforeIndex]
this.CITypeGroups[beforeIndex] = this.CITypeGroups[afterIndex]
this.$set(this.CITypeGroups, beforeIndex, this.CITypeGroups[afterIndex])
this.$set(this.CITypeGroups, afterIndex, beforeGroup)
}).catch(err => {
- this.$httpError(err, '移动出错')
+ this.$httpError(err, this.$t('ciType.moveFailed'))
})
},
handleAddExistGroupAttr (index) {
@@ -463,13 +463,13 @@ export default {
handleChange (e, group) {
if (e.hasOwnProperty('moved') && e.moved.oldIndex !== e.moved.newIndex) {
if (group === -1) {
- this.$message.error('更多属性不能进行排序, 如需排序需添加入其他分组中!')
+ this.$message.error(this.$t('ciType.moreAttributeCannotSort'))
} else {
transferCITypeAttrIndex(this.CITypeId,
{
from: { attr_id: e.moved.element.id, group_id: group > -1 ? group : null },
to: { order: e.moved.newIndex, group_id: group > -1 ? group : null }
- }).then(res => this.$message.success('保存成功')).catch(err => {
+ }).then(res => this.$message.success(this.$t('tip.saveSuccess'))).catch(err => {
this.$httpError(err)
this.abortDraggable()
})
@@ -486,7 +486,7 @@ export default {
{
from: { attr_id: e.removed.element.id, group_id: group > -1 ? group : null },
to: { group_id: this.addRemoveGroupFlag.to.group_id, order: this.addRemoveGroupFlag.to.order }
- }).then(res => this.$message.success('保存成功')).catch(err => {
+ }).then(res => this.$message.success(this.$t('tip.saveSuccess'))).catch(err => {
this.$httpError(err)
this.abortDraggable()
}).finally(() => {
@@ -501,9 +501,9 @@ export default {
})
},
updatePropertyIndex () {
- const attributes = [] // 全部属性
- let attributeOrder = 0 // 属性组
- let groupOrder = 0 // 组排序
+ const attributes = [] // all attributes
+ let attributeOrder = 0 // attribute group
+ let groupOrder = 0 // sort by group
const promises = [
]
@@ -548,14 +548,14 @@ export default {
const that = this
Promise.all(promises)
.then(values => {
- that.$message.success(`修改成功`)
+ that.$message.success(this.$t('tip.updateSuccess'))
that.getCITypeGroupData()
that.modalVisible = false
})
.catch(err => that.requestFailed(err))
},
requestFailed (err) {
- const msg = ((err.response || {}).data || {}).message || '请求出现错误,请稍后再试'
+ const msg = ((err.response || {}).data || {}).message || this.$t('tip.requestFailed')
this.$message.error(`${msg}`)
}
},
diff --git a/cmdb-ui/src/views/cmdb/modeling/ci_type/list.vue b/cmdb-ui/src/views/cmdb/modeling/ci_type/list.vue
index da7fe22..f9ae9f3 100644
--- a/cmdb-ui/src/views/cmdb/modeling/ci_type/list.vue
+++ b/cmdb-ui/src/views/cmdb/modeling/ci_type/list.vue
@@ -13,7 +13,7 @@
- 新增
+ {{ $t('ciType.add') }}
@@ -28,7 +28,7 @@
-
+
@@ -66,18 +66,17 @@
{
@@ -228,7 +227,7 @@ export default {
handleDelete (record) {
deleteCIType(record.id)
.then(res => {
- this.$message.success(`删除成功`)
+ this.$message.success(this.$t('tip.deleteSuccess'))
this.getCITypes()
})
.catch(err => this.requestFailed(err))
@@ -252,7 +251,7 @@ export default {
createCIType (data) {
createCIType(data)
.then(res => {
- this.$message.success(`添加成功`)
+ this.$message.success(this.$t('tip.addSuccess'))
this.drawerVisible = false
this.getCITypes()
})
@@ -262,14 +261,14 @@ export default {
updateCIType (CITypeId, data) {
updateCIType(CITypeId, data)
.then(res => {
- this.$message.success(`修改成功`)
+ this.$message.success(this.$t('tip.updateSuccess'))
this.drawerVisible = false
this.getCITypes()
})
.catch(err => this.requestFailed(err))
},
requestFailed (err) {
- const msg = ((err.response || {}).data || {}).message || '请求出现错误,请稍后再试'
+ const msg = ((err.response || {}).data || {}).message || this.$t('tip.requestFailed')
this.$message.error(`${msg}`)
}
diff --git a/cmdb-ui/src/views/cmdb/modeling/ci_type/relationTable.vue b/cmdb-ui/src/views/cmdb/modeling/ci_type/relationTable.vue
index 5c076f5..e64dc00 100644
--- a/cmdb-ui/src/views/cmdb/modeling/ci_type/relationTable.vue
+++ b/cmdb-ui/src/views/cmdb/modeling/ci_type/relationTable.vue
@@ -1,6 +1,6 @@
-
新增关系
+
{{ $t('ciType.newRelation') }}
- {{ CIType.alias }}
+
+ {{ CIType.alias }}
+
{
- this.$message.success(`删除成功`)
+ this.$message.success(this.$t('tip.deleteSuccess'))
this.handleOk()
}).catch(err => this.requestFailed(err))
@@ -264,7 +264,7 @@ export default {
},
handleCreate () {
- this.drawerTitle = '新增关系'
+ this.drawerTitle = this.$t('ciType.newRelation')
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue({
@@ -292,7 +292,7 @@ export default {
createRelation(values.source_ci_type_id, values.ci_type_id, values.relation_type_id)
.then(res => {
- this.$message.success(`添加成功`)
+ this.$message.success(this.$t('tip.addSuccess'))
this.onClose()
this.handleOk()
}).catch(err => this.requestFailed(err))
@@ -301,7 +301,7 @@ export default {
},
requestFailed (err) {
- const msg = ((err.response || {}).data || {}).message || '请求出现错误,请稍后再试'
+ const msg = ((err.response || {}).data || {}).message || this.$t('tip.requestFailed')
this.$message.error(`${msg}`)
}
diff --git a/cmdb-ui/src/views/cmdb/modeling/preference_relation/index.vue b/cmdb-ui/src/views/cmdb/modeling/preference_relation/index.vue
index fcc333f..fe12b77 100644
--- a/cmdb-ui/src/views/cmdb/modeling/preference_relation/index.vue
+++ b/cmdb-ui/src/views/cmdb/modeling/preference_relation/index.vue
@@ -1,8 +1,8 @@
-
-
-
+
+
+
{
that.create()
diff --git a/cmdb-ui/src/views/cmdb/modeling/preference_relation/modules/RelationViewForm.vue b/cmdb-ui/src/views/cmdb/modeling/preference_relation/modules/RelationViewForm.vue
index 7607b97..a17bf40 100644
--- a/cmdb-ui/src/views/cmdb/modeling/preference_relation/modules/RelationViewForm.vue
+++ b/cmdb-ui/src/views/cmdb/modeling/preference_relation/modules/RelationViewForm.vue
@@ -13,12 +13,12 @@
@@ -59,7 +59,7 @@ export default {
name: 'RelationViewForm',
data () {
return {
- drawerTitle: '新增关系视图',
+ drawerTitle: this.$t('ciType.newRealtionView'),
drawerVisible: false,
formLayout: 'vertical',
crIds: []
@@ -117,7 +117,7 @@ export default {
data.cr_ids = this.crIds
subscribeRelationView(data)
.then(res => {
- this.$message.success(`添加成功`)
+ this.$message.success(this.$t('tip.addSuccess'))
this.onClose()
this.$emit('refresh')
})
@@ -126,7 +126,7 @@ export default {
requestFailed (err) {
console.log(err, 'error')
- const msg = ((err.response || {}).data || {}).message || '请求出现错误,请稍后再试'
+ const msg = ((err.response || {}).data || {}).message || this.$t('tip.requestFailed')
this.$message.error(`${msg}`)
}
diff --git a/cmdb-ui/src/views/cmdb/modeling/relation_type/index.vue b/cmdb-ui/src/views/cmdb/modeling/relation_type/index.vue
index 570ed1d..1affd40 100644
--- a/cmdb-ui/src/views/cmdb/modeling/relation_type/index.vue
+++ b/cmdb-ui/src/views/cmdb/modeling/relation_type/index.vue
@@ -2,14 +2,14 @@
-
{{ btnName }}
+
{{ $t('ciType.newRelationType') }}
搜索
+ >{{ $t('button.query') }}
handleReset(clearFilters, column)"
size="small"
@@ -61,11 +61,11 @@
{{ $t('tip.delete') }}
@@ -92,7 +92,6 @@ export default {
data () {
return {
scroll: { x: 1000, y: 500 },
- btnName: '新增关系类型',
formLayout: 'vertical',
@@ -104,7 +103,7 @@ export default {
columns: [
{
width: 150,
- title: '类型名',
+ title: this.$t('ciType.name'),
dataIndex: 'name',
sorter: false,
scopedSlots: {
@@ -123,7 +122,7 @@ export default {
},
{
width: 150,
- title: '操作',
+ title: this.$t('tip.operate'),
key: 'operation',
scopedSlots: { customRender: 'action' }
}
@@ -139,11 +138,8 @@ export default {
},
mdl: {},
- // 高级搜索 展开/关闭
advanced: false,
- // 查询参数
queryParam: {},
- // 表头
selectedRowKeys: [],
selectedRows: [],
@@ -226,13 +222,13 @@ export default {
deleteRelationType (id) {
deleteRelationType(id)
.then(res => {
- this.$message.success(`删除成功`)
+ this.$message.success(this.$t('tip.deleteSuccess'))
this.handleOk()
})
.catch(err => this.requestFailed(err))
},
requestFailed (err) {
- const msg = ((err.response || {}).data || {}).message || '请求出现错误,请稍后再试'
+ const msg = ((err.response || {}).data || {}).message || this.$t('tip.requestFailed')
this.$message.error(`${msg}`)
},
cancel () {
diff --git a/cmdb-ui/src/views/cmdb/modeling/relation_type/modules/relationTypeForm.vue b/cmdb-ui/src/views/cmdb/modeling/relation_type/modules/relationTypeForm.vue
index 03021c5..4ea219b 100644
--- a/cmdb-ui/src/views/cmdb/modeling/relation_type/modules/relationTypeForm.vue
+++ b/cmdb-ui/src/views/cmdb/modeling/relation_type/modules/relationTypeForm.vue
@@ -13,12 +13,12 @@
@@ -59,7 +59,7 @@ export default {
name: 'RelationTypeForm',
data () {
return {
- drawerTitle: '新增关系类型',
+ drawerTitle: this.$t('ciType.newRelationType'),
drawerVisible: false,
formLayout: 'vertical'
}
@@ -134,7 +134,7 @@ export default {
updateRelationType (id, data) {
updateRelationType(id, data)
.then(res => {
- this.$message.success(`更新成功`)
+ this.$message.success(this.$t('tip.updateSuccess'))
this.handleOk()
this.onClose()
}).catch(err => this.requestFailed(err))
@@ -143,7 +143,7 @@ export default {
createRelationType (data) {
addRelationType(data)
.then(res => {
- this.$message.success(`添加成功`)
+ this.$message.success(this.$t('tip.addSuccess'))
this.handleOk()
this.onClose()
})
@@ -151,7 +151,7 @@ export default {
},
requestFailed (err) {
- const msg = ((err.response || {}).data || {}).message || '请求出现错误,请稍后再试'
+ const msg = ((err.response || {}).data || {}).message || this.$t('tip.requsetFailed')
this.$message.error(`${msg}`)
}