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'
export default {
antLocale: enUS,
menu: {
preference: 'Preference',
relationViews: 'RelationViews',
treeViews: 'Treeviews',
treeViews: 'TreeViews',
batch: 'Batch',
ciType: 'CiType',
acl: 'ACL',
@ -32,13 +32,40 @@ export default {
upload: 'Upload'
},
tip: {
subscribed: 'Subscribedu',
subscribed: 'Subscribed',
unsubscribed: 'Unsubscribed',
unfold: 'Unfold',
fold: 'Fold',
detail: 'Detail',
delete: 'Delete',
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'
export default {
antLocale: zhCN,
@ -38,6 +39,33 @@ export default {
detail: '详情',
delete: '删除',
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 :span="6">
<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>
</a-card>
</div>

View File

@ -3,9 +3,9 @@
<a-form :form="form" style="max-width: 500px; margin: 30px auto 0;">
<a-row>
<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
placeholder="--请选择模板类型--"
:placeholder="$t('batch.pleaseSelectModelType')"
v-decorator="['ciTypes', { rules: [{required: true, message: '模板类型必须选择'}] }]"
@change="selectCiType"
>

View File

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

View File

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

View File

@ -31,15 +31,15 @@
<template>
<div>
<a-drawer
:title="'订阅模型: ' + typeName"
:title="$t('preference.subscribeModel') +':'+ typeName"
:width="600"
@close="onClose"
:visible="visible"
: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>
树形视图
{{ $t('menu.treeViews') }}
<span
v-if="treeSubscribed"
style="font-weight: 500; font-size: 12px; color: green"
@ -65,12 +65,12 @@
<br />
<a-divider>
资源视图
{{ $t('preference.resourceView') }}
<span
v-if="instanceSubscribed"
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>
<template>
<a-transfer