This commit is contained in:
shaohaojiecoder 2020-02-08 22:27:56 +08:00
parent ba142266fb
commit f6c3edfac1
33 changed files with 147 additions and 85 deletions

View File

@ -63,14 +63,14 @@ const cmdbRouter = [
name: 'ci_type',
hideChildrenInMenu: true,
component: () => import('@/views/cmdb/modeling/ci_type/list'),
meta: { title: '模型管理', keepAlive: true }
meta: { title: 'menu.ciModelManager', keepAlive: true }
},
{
path: '/config/ci_types/:CITypeName/detail/:CITypeId',
name: 'ci_type_detail',
hideChildrenInMenu: true,
component: () => import('@/views/cmdb/modeling/ci_type/detail'),
meta: { title: '模型管理', keepAlive: true, hidden: true },
meta: { title: 'menu.ciModelManager', keepAlive: true, hidden: true },
hidden: true
},
{
@ -78,21 +78,21 @@ const cmdbRouter = [
name: 'attributes',
hideChildrenInMenu: true,
component: () => import('@/views/cmdb/modeling/attributes/index'),
meta: { title: '属性库', keepAlive: true }
meta: { title: 'menu.ciPropertyRep', keepAlive: true }
},
{
path: '/config/relation_type',
name: 'relation_type',
hideChildrenInMenu: true,
component: () => import('@/views/cmdb/modeling/relation_type/index'),
meta: { title: '关系类型', keepAlive: true }
meta: { title: 'menu.ciRelationType', keepAlive: true }
},
{
path: '/config/preference_relation',
name: 'preference_relation',
hideChildrenInMenu: true,
component: () => import('@/views/cmdb/modeling/preference_relation/index'),
meta: { title: '关系视图定义', keepAlive: true }
meta: { title: 'menu.ciRelationViewDefine', keepAlive: true }
}
]
},
@ -108,28 +108,28 @@ const cmdbRouter = [
name: 'cmdb_acl_users',
hideChildrenInMenu: true,
component: () => import('@/views/acl/users'),
meta: { title: '用户管理', keepAlive: true }
meta: { title: 'menu.aclUsersManager', keepAlive: true }
},
{
path: '/acl/roles',
name: 'cmdb_acl_roles',
hideChildrenInMenu: true,
component: () => import('@/views/acl/roles'),
meta: { title: '角色管理', keepAlive: true }
meta: { title: 'menu.aclRolesManager', keepAlive: true }
},
{
path: '/acl/resources',
name: 'cmdb_acl_resources',
hideChildrenInMenu: true,
component: () => import('@/views/acl/resources'),
meta: { title: '资源管理', keepAlive: true }
meta: { title: 'menu.aclResourceManager', keepAlive: true }
},
{
path: '/acl/resource_types',
name: 'cmdb_acl_resource_types',
hideChildrenInMenu: true,
component: () => import('@/views/acl/resource_types'),
meta: { title: '资源类型', keepAlive: true }
meta: { title: 'menu.aclResourceType', keepAlive: true }
}
]
}

View File

@ -8,6 +8,37 @@ export default {
treeViews: 'Treeviews',
batch: 'Batch',
ciType: 'CiType',
acl: 'ACL'
acl: 'ACL',
ciModelManager: 'Model',
ciPropertyRep: 'Propertys',
ciRelationType: 'RelationType',
ciRelationViewDefine: 'RelationViewDefine',
aclUsersManager: 'Users',
aclRolesManager: 'Roles',
aclResourceManager: 'Resources',
aclResourceType: 'ResourceType'
},
button: {
cancel: 'Cancel',
submit: 'Submit',
query: 'Query',
add: 'Add',
delete: 'Delete',
yes: 'Yes',
no: 'No',
reset: 'Reset',
subscribe: 'Subscribe',
download: 'Download',
upload: 'Upload'
},
tip: {
subscribed: 'Subscribedu',
unsubscribed: 'Unsubscribed',
unfold: 'Unfold',
fold: 'Fold',
detail: 'Detail',
delete: 'Delete',
edit: 'Edit',
operate: 'Operate'
}
}

View File

@ -7,6 +7,37 @@ export default {
treeViews: '树状视图',
batch: '批量导入',
ciType: '模型配置',
acl: '权限管理'
acl: '权限管理',
ciModelManager: '模型管理',
ciPropertyRep: '属性库',
ciRelationType: '关系类型',
ciRelationViewDefine: '关系视图定义',
aclUsersManager: '用户管理',
aclRolesManager: '角色管理',
aclResourceManager: '资源管理',
aclResourceType: '资源类型'
},
button: {
cancel: '取消',
submit: '提交',
query: '查询',
add: '新增',
delete: '删除',
yes: '',
no: '',
reset: '重置',
subscribe: '订阅',
download: '下载模板',
upload: '上传'
},
tip: {
subscribed: '已订阅',
unsubscribed: '未订阅',
unfold: '展开',
fold: '收起',
detail: '详情',
delete: '删除',
edit: '编辑',
operate: '操作'
}
}

View File

@ -28,7 +28,7 @@
</a-row>
<template slot="footer">
<a-button key="back" @click="cancelHandel">取消</a-button>
<a-button key="back" @click="cancelHandel">{{ $t('button.cancel') }}</a-button>
<a-button key="submit" type="primary" :loading="confirmLoading" @click="okHandel">保存</a-button>
</template>
</a-modal>

View File

@ -44,7 +44,7 @@
>
<a-button @click="handleAddParent" type="primary" style="margin-right: 1rem">关联父角色</a-button>
<a-button @click="handleAddChild" type="primary" style="margin-right: 1rem">关联子角色</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>

View File

@ -65,8 +65,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>

View File

@ -52,8 +52,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>

View File

@ -30,7 +30,7 @@
</a-form-item>
<div class="btn-group">
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">添加</a-button>
<a-button @click="closeForm">取消</a-button>
<a-button @click="closeForm">{{ $t('button.cancel') }}</a-button>
</div>
</a-form>

View File

@ -60,8 +60,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>

View File

@ -66,8 +66,8 @@
background: '#fff',
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>
</a-form>

View File

@ -133,8 +133,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>

View File

@ -39,7 +39,7 @@
@click="() => handleReset(clearFilters, column)"
size="small"
style="width: 90px"
>重置</a-button>
>{{ $t('button.reset') }}</a-button>
</div>
<a-icon slot="filterIcon" slot-scope="filtered" type="search" :style="{ color: filtered ? '#108ee9' : undefined }" />
@ -61,7 +61,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)">{{ $t('tip.edit') }}</a>
<a-divider type="vertical"/>
<a-popconfirm
@ -71,7 +71,7 @@
okText=""
cancelText=""
>
<a>删除</a>
<a>{{ $t('tip.delete') }}</a>
</a-popconfirm>
</template>
</span>

View File

@ -39,7 +39,7 @@
@click="() => handleReset(clearFilters, column)"
size="small"
style="width: 90px"
>重置</a-button>
>{{ $t('button.reset') }}</a-button>
</div>
<a-icon slot="filterIcon" slot-scope="filtered" type="search" :style="{ color: filtered ? '#108ee9' : undefined }" />
@ -61,7 +61,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)">{{ $t('tip.edit') }}</a>
<a-divider type="vertical"/>
<a-popconfirm
@ -71,7 +71,7 @@
okText=""
cancelText=""
>
<a>删除</a>
<a>{{ $t('tip.delete') }}</a>
</a-popconfirm>
</template>
</span>

View File

@ -55,7 +55,7 @@
@click="() => handleReset(clearFilters, column)"
size="small"
style="width: 90px"
>重置</a-button>
>{{ $t('button.reset') }}</a-button>
</div>
<a-icon slot="filterIcon" slot-scope="filtered" type="search" :style="{ color: filtered ? '#108ee9' : undefined }" />
@ -81,7 +81,7 @@
okText=""
cancelText=""
>
<a>删除</a>
<a>{{ $t('tip.delete') }}</a>
</a-popconfirm>
</template>
</span>

View File

@ -37,7 +37,7 @@
@click="() => handleReset(clearFilters, column)"
size="small"
style="width: 90px"
>重置</a-button>
>{{ $t('button.reset') }}</a-button>
</div>
<a-icon slot="filterIcon" slot-scope="filtered" type="search" :style="{ color: filtered ? '#108ee9' : undefined }" />
@ -70,7 +70,7 @@
okText=""
cancelText=""
>
<a>删除</a>
<a>{{ $t('tip.delete') }}</a>
</a-popconfirm>
</template>
</span>

View File

@ -38,7 +38,7 @@
@click="() => handleReset(clearFilters, column)"
size="small"
style="width: 90px"
>重置</a-button>
>{{ $t('button.reset') }}</a-button>
</div>
<a-icon slot="filterIcon" slot-scope="filtered" type="search" :style="{ color: filtered ? '#108ee9' : undefined }" />
@ -71,7 +71,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)">{{ $t('tip.edit') }}</a>
<a-divider type="vertical"/>
<a-popconfirm
@ -81,7 +81,7 @@
okText=""
cancelText=""
>
<a>删除</a>
<a>{{ $t('tip.delete') }}</a>
</a-popconfirm>
</template>
</span>

View File

@ -7,7 +7,7 @@
<a-row>
<a-col :span="18">
<a-card style="height: 605px">
<a-button class="ant-btn-primary" style="margin-left: 10px;" :disabled="uploadFlag" id="upload-button" @click="uploadData">上传</a-button>
<a-button class="ant-btn-primary" style="margin-left: 10px;" :disabled="uploadFlag" id="upload-button" @click="uploadData">{{ $t('button.upload') }}</a-button>
<upload-file-form v-if="displayUpload" ref="fileEditor"></upload-file-form>
<ci-table v-if="editorOnline" :ciTypeAttrs="ciTypeAttrs" ref="onlineEditor"></ci-table>
</a-card>

View File

@ -19,7 +19,7 @@
style="margin-left: 20px"
:disabled="downLoadButtonDis"
@click="downLoadExcel"
>下载模板</a-button>
>{{ $t('button.download') }}</a-button>
</a-form-item>
</a-col>
</a-row>

View File

@ -10,7 +10,7 @@
type="primary"
icon="plus"
@click="$refs.create.visible = true; $refs.create.action='create'"
>新建</a-button>
>{{ $t('button.add') }}</a-button>
<a-dropdown v-action:edit v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item
@ -23,11 +23,11 @@
</a-menu-item>
<a-menu-item key="batchDownload" @click="batchDownload">
<json-excel :fetch="batchDownload" name="cmdb.xls">
<a-icon type="download" />&nbsp;下载
<a-icon type="download" />&nbsp;{{ $t('tip.download') }}
</json-excel>
</a-menu-item>
<a-menu-item key="batchDelete" @click="batchDelete">
<a-icon type="delete" />删除
<a-icon type="delete" />{{ $t('tip.delete') }}
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
@ -62,10 +62,10 @@
<template>
<a
@click="$refs.detail.visible = true; $refs.detail.ciId = record.key; $refs.detail.create()"
>详情</a>
>{{ $t('tip.detail') }}</a>
<a-divider type="vertical" />
<a @click="deleteCI(record)">删除</a>
<a @click="deleteCI(record)">{{ $t('tip.delete') }}</a>
</template>
</span>
</s-table>

View File

@ -73,14 +73,14 @@
class="table-page-search-submitButtons"
:style="advanced && { float: 'right', overflow: 'hidden' } || {} "
>
<a-button type="primary" @click="$emit('refresh', true)" v-if="preferenceAttrList.length">查询</a-button>
<a-button style="margin-left: 8px" @click="() => queryParam = {}" v-if="preferenceAttrList.length">重置</a-button>
<a-button type="primary" @click="$emit('refresh', true)" v-if="preferenceAttrList.length">{{ $t('button.query') }}</a-button>
<a-button style="margin-left: 8px" @click="() => queryParam = {}" v-if="preferenceAttrList.length">{{ $t('button.reset') }}</a-button>
<a
@click="toggleAdvanced"
style="margin-left: 8px"
v-if="preferenceAttrList.length > 4"
>
{{ advanced ? '收起' : '展开' }}
{{ advanced ? $t('tip.fold') : $t('tip.unfold') }}
<a-icon :type="advanced ? 'up' : 'down'" />
</a>
</span>

View File

@ -39,7 +39,7 @@
@click="() => handleReset(clearFilters, column)"
size="small"
style="width: 90px"
>重置</a-button>
>{{ $t('button.reset') }}</a-button>
</div>
<a-icon slot="filterIcon" slot-scope="filtered" type="search" :style="{ color: filtered ? '#108ee9' : undefined }" />
@ -69,7 +69,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)">{{ $t('tip.edit') }}</a>
<a-divider type="vertical"/>
<a-popconfirm
@ -78,7 +78,7 @@
okText=""
cancelText=""
>
<a>删除</a>
<a>{{ $t('tip.delete') }}</a>
</a-popconfirm>
</template>
</span>

View File

@ -148,8 +148,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>

View File

@ -68,7 +68,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)">{{ $t('tip.edit') }}</a>
<a-divider type="vertical"/>
<a-popconfirm
@ -77,7 +77,7 @@
okText=""
cancelText=""
>
<a>删除</a>
<a>{{ $t('tip.delete') }}</a>
</a-popconfirm>
</template>
</span>
@ -124,8 +124,8 @@
}"
>
<a-button @click="handleBatchUpdateSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onBatchBindAttrActionClose">取消</a-button>
<a-button @click="handleBatchUpdateSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onBatchBindAttrActionClose">{{ $t('button.cancel') }}</a-button>
</div>
</a-form>

View File

@ -21,7 +21,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleDelete(record)">删除</a>
<a @click="handleDelete(record)">{{ $t('tip.delete') }}</a>
</template>
</span>
@ -65,8 +65,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>
</a-form>

View File

@ -20,7 +20,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleDelete(record)">删除</a>
<a @click="handleDelete(record)">{{ $t('tip.delete') }}</a>
</template>
</span>
@ -64,8 +64,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>
</a-form>

View File

@ -12,7 +12,7 @@
ref="addGroupInput"
v-model.trim="newGroupName" />
<a @click="handleCreateGroup" style="margin-right: 0.5rem">保存</a>
<a @click="handleCancelCreateGroup">取消</a>
<a @click="handleCancelCreateGroup">{{ $t('button.cancel') }}</a>
</span>
</template>
@ -37,7 +37,7 @@
ref="editGroupInput"
v-model.trim="CITypeGroup.name" />
<a @click="handleSaveGroupName(index, CITypeGroup)" style="margin-right: 0.5rem">保存</a>
<a @click="handleCancelGroupName(index, CITypeGroup)">取消</a>
<a @click="handleCancelGroupName(index, CITypeGroup)">{{ $t('button.cancel') }}</a>
</span>
</template>

View File

@ -125,8 +125,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>
</a-form>

View File

@ -20,7 +20,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleDelete(record)">删除</a>
<a @click="handleDelete(record)">{{ $t('tip.delete') }}</a>
</template>
</span>
@ -91,8 +91,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>
</a-form>

View File

@ -42,8 +42,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>

View File

@ -39,7 +39,7 @@
@click="() => handleReset(clearFilters, column)"
size="small"
style="width: 90px"
>重置</a-button>
>{{ $t('button.reset') }}</a-button>
</div>
<a-icon slot="filterIcon" slot-scope="filtered" type="search" :style="{ color: filtered ? '#108ee9' : undefined }" />
@ -57,7 +57,7 @@
<span slot="action" slot-scope="text, record">
<template>
<a @click="handleEdit(record)">编辑</a>
<a @click="handleEdit(record)">{{ $t('tip.edit') }}</a>
<a-divider type="vertical"/>
<a-popconfirm
@ -67,7 +67,7 @@
okText=""
cancelText=""
>
<a>删除</a>
<a>{{ $t('tip.delete') }}</a>
</a-popconfirm>
</template>
</span>

View File

@ -42,8 +42,8 @@
}"
>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">确定</a-button>
<a-button @click="onClose">取消</a-button>
<a-button @click="handleSubmit" type="primary" style="margin-right: 1rem">{{ $t('button.submit') }}</a-button>
<a-button @click="onClose">{{ $t('button.cancel') }}</a-button>
</div>

View File

@ -17,11 +17,11 @@
<span
:class="item.is_subscribed?'subscribe-success':'unsubscribe'"
slot="title"
>{{ item.is_subscribed ? "已订阅" : "未订阅" }}</span>
>{{ item.is_subscribed ? $t('tip.subscribed') : $t('tip.unsubscribed') }}</span>
</a-card-meta>
<template class="ant-card-actions" slot="actions">
<a :disabled="!item.is_subscribed" @click="unsubscribe(item.id)">取消</a>
<a @click="showDrawer(item.id, item.alias || item.name)">订阅</a>
<a :disabled="!item.is_subscribed" @click="unsubscribe(item.id)">{{ $t('button.cancel') }}</a>
<a @click="showDrawer(item.id, item.alias || item.name)">{{ $t('button.subscribe') }}</a>
</template>
</a-card>
</template>
@ -43,8 +43,8 @@
<span
v-if="treeSubscribed"
style="font-weight: 500; font-size: 12px; color: green"
>已订阅</span>
<span style="font-weight: 500; font-size: 12px; color: red" v-else>未订阅</span>
>{{ $t('tip.subscribed') }}</span>
<span style="font-weight: 500; font-size: 12px; color: red" v-else>{{ $t('tip.unsubscribed') }}</span>
</a-divider>
<a-select
ref="tree"
@ -60,7 +60,7 @@
@click="subTreeSubmit"
type="primary"
:style="{float: 'right', marginTop: '10px'}"
>订阅</a-button>
>{{ $t('button.subscribe') }}</a-button>
<br />
<br />
@ -101,8 +101,8 @@
textAlign: 'right',
}"
>
<a-button :style="{marginRight: '8px'}" @click="onClose">取消</a-button>
<a-button @click="subInstanceSubmit" type="primary">订阅</a-button>
<a-button :style="{marginRight: '8px'}" @click="onClose">{{ $t('button.cancel') }}</a-button>
<a-button @click="subInstanceSubmit" type="primary">{{ $t('button.subscribe') }}</a-button>
</div>
</a-drawer>
</div>

View File

@ -56,7 +56,7 @@
class="login-button"
:loading="state.loginBtn"
:disabled="state.loginBtn"
>确定</a-button>
>{{ $t('button.submit') }}</a-button>
</a-form-item>
</a-form>