add something

This commit is contained in:
shaohaojiecoder 2020-02-09 17:22:17 +08:00
parent f6c3edfac1
commit e336b31902
7 changed files with 73 additions and 18 deletions

View File

@ -1,11 +1,11 @@
/* eslint-disable */
import enUS from 'ant-design-vue/es/locale-provider/en_US' import enUS from 'ant-design-vue/es/locale-provider/en_US'
export default { export default {
antLocale: enUS, antLocale: enUS,
menu: { menu: {
preference: 'Preference', preference: 'Preference',
relationViews: 'RelationViews', relationViews: 'RelationViews',
treeViews: 'Treeviews', treeViews: 'TreeViews',
batch: 'Batch', batch: 'Batch',
ciType: 'CiType', ciType: 'CiType',
acl: 'ACL', acl: 'ACL',
@ -32,13 +32,40 @@ export default {
upload: 'Upload' upload: 'Upload'
}, },
tip: { tip: {
subscribed: 'Subscribedu', subscribed: 'Subscribed',
unsubscribed: 'Unsubscribed', unsubscribed: 'Unsubscribed',
unfold: 'Unfold', unfold: 'Unfold',
fold: 'Fold', fold: 'Fold',
detail: 'Detail', detail: 'Detail',
delete: 'Delete', delete: 'Delete',
edit: 'Edit', edit: 'Edit',
operate: 'Operate' operate: 'Operate',
clear: 'Clear',
modify: 'Modify',
pleaseSelect: 'please select'
},
ci: {
selected: 'Selected',
batchOperate: 'Batch operate'
},
preference: {
subscribeModel: 'Subscribe Model',
resourceView: 'Resource View',
subFormTip: 'You can either define a tree view or subscribe to a resource view, which will be presented separately in sidebar'
},
batch: {
modelType: 'Model Type',
pleaseSelectModelType: 'please select model type',
uploadResult: 'upload result',
dragFileHere: 'click or drag file to here!',
suportFileType: 'suport file type'
},
ciType: {
add: 'Add',
editModel: 'edit model',
modelName: 'model name',
alias: 'alias',
uniqueFlag: 'unique flag'
} }
} }

View File

@ -1,3 +1,4 @@
/* eslint-disable */
import zhCN from 'ant-design-vue/es/locale-provider/zh_CN' import zhCN from 'ant-design-vue/es/locale-provider/zh_CN'
export default { export default {
antLocale: zhCN, antLocale: zhCN,
@ -38,6 +39,33 @@ export default {
detail: '详情', detail: '详情',
delete: '删除', delete: '删除',
edit: '编辑', edit: '编辑',
operate: '操作' operate: '操作',
clear: '清空',
modify: '修改',
pleaseSelect: '请选择'
},
ci: {
selected: '已选择',
batchOperate: '批量操作'
},
preference: {
subscribeModel: '订阅模型',
resourceView: '资源视图',
subFormTip: '既可以定义树形视图, 也可以订阅资源视图, 资源视图会在SideBar单独呈现'
},
batch: {
modelType: '模板类型',
pleaseSelectModelType: '请选择模板类型',
uploadResult: '上传结果',
dragFileHere: '点击或拖拽文件至此上传!',
suportFileType: '支持文件类型'
},
ciType: {
add: '新增',
editModel: '编辑模型',
modelName: '模型名(英文)',
alias: '别名',
uniqueFlag: '唯一标识'
} }
} }

View File

@ -14,7 +14,7 @@
</a-col> </a-col>
<a-col :span="6"> <a-col :span="6">
<div style="min-height: 604px; background: white"> <div style="min-height: 604px; background: white">
<a-card title="上传结果"> <a-card :title="$t('batch.uploadResult')">
<upload-result v-if="beginLoad" :upLoadData="needDataList" :ciType="ciType" :unique-field="uniqueField"></upload-result> <upload-result v-if="beginLoad" :upLoadData="needDataList" :ciType="ciType" :unique-field="uniqueField"></upload-result>
</a-card> </a-card>
</div> </div>

View File

@ -3,9 +3,9 @@
<a-form :form="form" style="max-width: 500px; margin: 30px auto 0;"> <a-form :form="form" style="max-width: 500px; margin: 30px auto 0;">
<a-row> <a-row>
<a-col :span="18"> <a-col :span="18">
<a-form-item label="模板类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item :label="$t('batch.modelType')" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-select <a-select
placeholder="--请选择模板类型--" :placeholder="$t('batch.pleaseSelectModelType')"
v-decorator="['ciTypes', { rules: [{required: true, message: '模板类型必须选择'}] }]" v-decorator="['ciTypes', { rules: [{required: true, message: '模板类型必须选择'}] }]"
@change="selectCiType" @change="selectCiType"
> >

View File

@ -5,8 +5,8 @@
<p class="ant-upload-drag-icon"> <p class="ant-upload-drag-icon">
<a-icon type="inbox" /> <a-icon type="inbox" />
</p> </p>
<p class="ant-upload-text">点击或拖拽文件至此上传</p> <p class="ant-upload-text">{{ $t('batch.dragFileHere') }}</p>
<p class="ant-upload-hint">支持文件类型xls</p> <p class="ant-upload-hint">{{ $t('batch.suportFileType') }} : xls</p>
</a-upload-dragger> </a-upload-dragger>
</a-form> </a-form>
<a-divider>or</a-divider> <a-divider>or</a-divider>

View File

@ -23,7 +23,7 @@
</a-menu-item> </a-menu-item>
<a-menu-item key="batchDownload" @click="batchDownload"> <a-menu-item key="batchDownload" @click="batchDownload">
<json-excel :fetch="batchDownload" name="cmdb.xls"> <json-excel :fetch="batchDownload" name="cmdb.xls">
<a-icon type="download" />&nbsp;{{ $t('tip.download') }} <a-icon type="download" />&nbsp;下载
</json-excel> </json-excel>
</a-menu-item> </a-menu-item>
<a-menu-item key="batchDelete" @click="batchDelete"> <a-menu-item key="batchDelete" @click="batchDelete">
@ -31,7 +31,7 @@
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> <a-button style="margin-left: 8px">
批量操作 {{ $t('ci.batchOperate') }}
<a-icon type="down" /> <a-icon type="down" />
</a-button> </a-button>
</a-dropdown> </a-dropdown>

View File

@ -31,15 +31,15 @@
<template> <template>
<div> <div>
<a-drawer <a-drawer
:title="'订阅模型: ' + typeName" :title="$t('preference.subscribeModel') +':'+ typeName"
:width="600" :width="600"
@close="onClose" @close="onClose"
:visible="visible" :visible="visible"
:wrapStyle="{height: 'calc(100% - 108px)', overflow: 'auto', paddingBottom: '108px'}" :wrapStyle="{height: 'calc(100% - 108px)', overflow: 'auto', paddingBottom: '108px'}"
> >
<a-alert message="既可以定义树形视图, 也可以订阅资源视图, 资源视图会在SideBar单独呈现" type="info" showIcon /> <a-alert :message="$t('preference.subFormTip')" type="info" showIcon />
<a-divider> <a-divider>
树形视图 {{ $t('menu.treeViews') }}
<span <span
v-if="treeSubscribed" v-if="treeSubscribed"
style="font-weight: 500; font-size: 12px; color: green" style="font-weight: 500; font-size: 12px; color: green"
@ -65,12 +65,12 @@
<br /> <br />
<a-divider> <a-divider>
资源视图 {{ $t('preference.resourceView') }}
<span <span
v-if="instanceSubscribed" v-if="instanceSubscribed"
style="font-weight: 500; font-size: 12px; color: green" style="font-weight: 500; font-size: 12px; color: green"
>已订阅</span> >{{ $t('tip.subscribed') }}</span>
<span style="font-weight: 500; font-size: 12px; color: red" v-else>未订阅</span> <span style="font-weight: 500; font-size: 12px; color: red" v-else>{{ $t('tip.unsubscribed') }}</span>
</a-divider> </a-divider>
<template> <template>
<a-transfer <a-transfer