国际化调整

This commit is contained in:
fan 2019-09-12 09:25:33 +08:00
parent b06f4d1ad4
commit 7a284fea4a
17 changed files with 95 additions and 66 deletions

View File

@ -143,6 +143,7 @@ export default {
temporarilyNoData: 'Temporarily no data',
second: 'Second',
amount: 'Amount',
yes: 'yes',
no: 'no'
yes: 'Yes',
no: 'No',
details: 'Details'
};

View File

@ -20,6 +20,7 @@ import exam from './exam';
import dashboard from './dashboard';
import jlmap3d from './jlmap3d';
import display from './display';
import joinTraining from './joinTraining';
export default {
...enLocale,
@ -43,5 +44,6 @@ export default {
exam,
dashboard,
jlmap3d,
display
display,
joinTraining
};

View File

@ -87,6 +87,14 @@ export default {
chooseGoods: 'Choose goods',
permissionName: 'Permission Name',
receivingPermission: 'Receiving permission',
isPackage: 'Whether package permissions',
modifyPermissionContent: 'Modify permission content'
isPackage: 'Whether the permission package',
modifyPermissionContent: 'Modify permission content',
addPermissions: 'Add permissions',
modifyPermissions: 'Modify permissions',
createPermission: 'Create permission',
oneClickGenerationPermission: 'One-click generation permission',
packingDetails: 'Packing details',
belongsToMap: 'Belongs to map',
oneClickGeneration: 'One-click generation',
selectPermission: 'Select Permission'
};

View File

@ -250,5 +250,7 @@ export default {
enterKeyword: 'Please enter a keyword',
successfullyModified: 'Successfully modified',
modifyTheFailure: 'Modify the failure',
selectTheCourseNameFirst: 'Please select the course name first'
selectTheCourseNameFirst: 'Please select the course name first',
selectMultiplePermissions: 'Please select multiple permissions',
enterPermissionName: 'Please enter a permission name'
};

View File

@ -135,5 +135,7 @@ export default {
deleteListHint: 'This will delete the list, will it continue?',
setUpASubscriptionMapSuccessfully: 'Setting up a subscription map successfully!',
setUpASubscriptionMapFailed: 'Setting up a subscription map failed!',
getMapStateDataException: 'Get map state data exception, please refresh the page to reload. If you encounter such problems many times, please contact the development team in an emergency!'
getMapStateDataException: 'Get map state data exception, please refresh the page to reload. If you encounter such problems many times, please contact the development team in an emergency!',
packagedSuccessfully: 'Packaged successfully',
oneKeyGeneratedSuccessfully: 'One key generated successfully!'
};

View File

@ -150,5 +150,6 @@ export default {
second: '秒',
amount: '总数量',
yes: '是',
no: '否'
no: '否',
details: '详情'
};

View File

@ -20,6 +20,7 @@ import exam from './exam';
import dashboard from './dashboard';
import jlmap3d from './jlmap3d';
import display from './display';
import joinTraining from './joinTraining';
export default {
...cnLocale,

View File

@ -87,6 +87,14 @@ export default {
chooseGoods: '选择商品',
permissionName: '权限名称',
receivingPermission: '领取权限',
isPackage: '是否包权限',
modifyPermissionContent: '修改权限内容'
isPackage: '是否权限包',
modifyPermissionContent: '修改权限内容',
addPermissions: '添加权限',
modifyPermissions: '修改权限',
createPermission: '新建权限',
oneClickGenerationPermission: '一键生成权限',
packingDetails: '打包详情',
belongsToMap: '所属地图',
oneClickGeneration: '一键生成',
selectPermission: '选择权限'
};

View File

@ -260,5 +260,7 @@ export default {
enterKeyword: '请输入关键词',
successfullyModified: '修改成功',
modifyTheFailure: '修改失败',
selectTheCourseNameFirst: '请先选择课程名称'
selectTheCourseNameFirst: '请先选择课程名称',
selectMultiplePermissions: '请选择多个权限',
enterPermissionName: '请输入权限名称'
};

View File

@ -139,5 +139,7 @@ export default {
deleteListHint: '此操作将删除该列表, 是否继续?',
setUpASubscriptionMapSuccessfully: '设置订阅地图成功!',
setUpASubscriptionMapFailed: '设置订阅地图失败!',
getMapStateDataException: '获取地图状态数据异常,请刷新页面重新加载。若多次遇到此类问题,请急时联系开发团队处理!'
getMapStateDataException: '获取地图状态数据异常,请刷新页面重新加载。若多次遇到此类问题,请急时联系开发团队处理!',
packagedSuccessfully: '打包成功',
oneKeyGeneratedSuccessfully: '一键生成成功!'
};

View File

@ -84,11 +84,11 @@ export default {
duration: this.formModel.duration
};
putSimulationStats(parma).then(response => {
self.$message.success(this.$t('rules.successfullyModified'));
self.$message.success(this.$t('tip.successfullyModified'));
self.handleClose();
self.$emit('reloadTable');
}).catch(error => {
self.$message.error(this.$t('rules.modifyTheFailure') + error.message);
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
});
},
handleClose(done) {

View File

@ -1,5 +1,5 @@
<template>
<el-dialog title="一键生成权限" :visible.sync="dialogShow" width="420px" :before-close="handleClose">
<el-dialog :title="this.$t('orderAuthor.oneClickGenerationPermission')" :visible.sync="dialogShow" width="420px" :before-close="handleClose">
<div>
<el-form
ref="form"
@ -10,7 +10,7 @@
size="mini"
@submit.native.prevent
>
<el-form-item label="地图名称" prop="mapId">
<el-form-item :label="this.$t('orderAuthor.mapName')" prop="mapId">
<el-select v-model="editModel.mapId" :placeholder="$t('map.pleaseSelect')">
<el-option
v-for="item in mapList"
@ -89,7 +89,7 @@ export default {
this.loading = true;
postPermissonList(this.editModel.mapId).then(response => {
this.loading = false;
this.$message.success('一键生成成功!');
this.$message.success(this.$t('tip.oneKeyGeneratedSuccessfully'));
this.$emit('refresh');
this.close();
}).catch(() => {

View File

@ -1,5 +1,5 @@
<template>
<el-dialog title="打包详情" :visible.sync="dialogShow" width="700px" :before-close="close">
<el-dialog :title="this.$t('orderAuthor.packingDetails')" :visible.sync="dialogShow" width="700px" :before-close="close">
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</div>
@ -38,7 +38,7 @@ export default {
indexShow: true,
columns: [
{
title: '权限名称',
title: this.$t('orderAuthor.permissionName'),
prop: 'name'
},
{

View File

@ -11,7 +11,7 @@
size="mini"
@submit.native.prevent
>
<el-form-item :label="$t('map.mapName')" prop="name">
<el-form-item :label="this.$t('map.mapName')" prop="name">
<el-input v-model="editModel.name" />
</el-form-item>
<el-form-item :label="this.$t('orderAuthor.describtion')" prop="remarks">
@ -19,14 +19,14 @@
v-model="editModel.remarks"
type="textarea"
:rows="2"
placeholder="请输入内容"
:placeholder="this.$t('orderAuthor.pleaseEnterContent')"
maxlength="60"
show-word-limit
/>
</el-form-item>
</el-form>
<div v-show="isPackage">
<div class="form_title">地图名称:</div>
<div class="form_title">{{$t('orderAuthor.mapName')}}:</div>
<el-select v-model="editModel.mapId" size="mini" :disabled="ruleList.length ? true : false">
<el-option
v-for="item in mapList"
@ -35,14 +35,14 @@
:value="item.value"
/>
</el-select>
<el-button class="addList" size="small" @click="dialogSelect">添加权限</el-button>
<el-button class="addList" size="small" @click="dialogSelect">{{$t('orderAuthor.addPermissions')}}</el-button>
<el-table
:data="ruleList"
border
style="width: 100%"
:height="200"
>
<el-table-column prop="name" label="权限名称" />
<el-table-column prop="name" :label="this.$t('orderAuthor.permissionName')" />
<el-table-column prop="type" :label="this.$t('orderAuthor.permissionType')">
<template slot-scope="scope">
{{ computedName(PermissionTypeList, scope.row.type) }}
@ -149,7 +149,7 @@ export default {
if (this.editModel.mapId) {
this.$refs.choosePermission.doShow(this.editModel.mapId);
} else {
this.$messageBox('请选择地图');
this.$messageBox(this.$t('rules.mapInput'));
}
},
async doShow(data) {
@ -187,7 +187,7 @@ export default {
this.loading = true;
putPermissonDetail(this.editModel).then(response => {
this.loading = false;
this.$message.success('修改成功!');
this.$message.success(this.$t('tip.successfullyModified'));
this.$emit('refresh');
this.close();
}).catch(() => {
@ -203,7 +203,7 @@ export default {
this.loading = true;
putPermissonDetail(this.editModel).then(response => {
this.loading = false;
this.$message.success('修改成功!');
this.$message.success(this.$t('tip.successfullyModified'));
this.$emit('refresh');
this.close();
}).catch(() => {
@ -211,7 +211,7 @@ export default {
this.$messageBox(this.$t('map.saveFailed'));
});
} else {
this.$messageBox('请选择多个权限');
this.$messageBox(this.$t('rules.selectMultiplePermissions'));
}
}
});

View File

@ -8,20 +8,20 @@
</el-steps>
<el-card class="forms pack-rule">
<el-form ref="formData" label-width="130px" :model="addModel" size="mini" :rules="rules" class="rule_box">
<el-form-item label="权限名称:" prop="name">
<el-form-item :label="this.$t('orderAuthor.permissionName') + ':'" prop="name">
<el-input v-model="addModel.name" size="small" />
</el-form-item>
<el-form-item label="描述" prop="remarks">
<el-form-item :label="this.$t('orderAuthor.describtion') + ':'" prop="remarks">
<el-input
v-model="addModel.remarks"
type="textarea"
:rows="2"
placeholder="请输入内容"
:placeholder="this.$t('orderAuthor.pleaseEnterContent')"
maxlength="60"
show-word-limit
/>
</el-form-item>
<el-form-item v-show="isPackage" label="地图名称:">
<el-form-item v-show="isPackage" :label=" this.$t('orderAuthor.mapName') + ':'">
<el-select v-model="addModel.mapId" :disabled="ruleList.length ? true : false">
<el-option
v-for="item in mapList"
@ -33,14 +33,14 @@
</el-form-item>
</el-form>
<div v-show="isPackage">
<el-button class="addList" size="small" @click="dialogSelect">添加权限</el-button>
<el-button class="addList" size="small" @click="dialogSelect">{{$t('orderAuthor.addPermissions')}}</el-button>
<el-table
:data="ruleList"
border
style="width: 100%"
:height="height-450"
>
<el-table-column prop="name" label="权限名称" />
<el-table-column prop="name" :label="this.$t('orderAuthor.permissionName')" />
<el-table-column prop="type" :label="this.$t('orderAuthor.permissionType')">
<template slot-scope="scope">
{{ computedName(PermissionTypeList, scope.row.type) }}
@ -58,7 +58,7 @@
<div class="draft">
<el-button-group>
<el-button v-if="!$route.query.id" type="primary" @click="packForm">{{ $t('orderAuthor.packaging') }}</el-button>
<el-button v-if="$route.query.id" type="primary" @click="update">更新</el-button>
<el-button v-if="$route.query.id" type="primary" @click="update">{{$t('global.update')}}</el-button>
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
</el-button-group>
</div>
@ -98,7 +98,7 @@ export default {
},
rules: {
name: [
{ required: true, message: '请输入权限名称', trigger: 'blur' }
{ required: true, message: this.$t('rules.enterPermissionName'), trigger: 'blur' }
]
},
urlInfo: {},
@ -114,7 +114,7 @@ export default {
return this.$store.state.app.height - 65;
},
title() {
return this.$route.query.id ? '修改权限' : '新建权限';
return this.$route.query.id ? this.$t('orderAuthor.modifyPermissions') : this.$t('orderAuthor.createPermission');
}
},
mounted() {
@ -169,7 +169,7 @@ export default {
if (this.addModel.mapId) {
this.$refs.choosePermission.doShow(this.addModel.mapId);
} else {
this.$messageBox('请选择地图');
this.$messageBox(this.$t('rules.mapInput'));
}
},
deleteForm(index, row) {
@ -196,7 +196,7 @@ export default {
relPermissions: arr
};
createLessonPermisson(data).then(resp => {
this.$message.success('打包成功');
this.$message.success(this.$t('tip.packagedSuccessfully'));
setTimeout(() => {
this.$router.push({ path: `${UrlConfig.orderauthor.authorMange}` });
}, 500);
@ -204,7 +204,7 @@ export default {
this.$messageBox(this.$t('tip.packagingFailed'));
});
} else {
this.$messageBox('请选择多个权限');
this.$messageBox(this.$t('rules.selectMultiplePermissions'));
}
},
update() {
@ -220,7 +220,7 @@ export default {
relPermissions: arr
};
putPermissonDetail(data).then(response => {
this.$message.success('修改成功!');
this.$message.success(this.$t('tip.successfullyModified'));
setTimeout(() => {
this.$router.push({ path: `${UrlConfig.orderauthor.authorMange}` });
}, 500);
@ -228,7 +228,7 @@ export default {
this.$messageBox(this.$t('map.saveFailed'));
});
} else {
this.$messageBox('请选择多个权限');
this.$messageBox(this.$t('rules.selectMultiplePermissions'));
}
});
}

View File

@ -27,8 +27,8 @@ export default {
PermissionTypeList: [],
mapList: [],
ruleList: [
{ value: true, label: '是' },
{ value: false, label: '否' }
{ value: true, label: this.$t('global.yes') },
{ value: false, label: this.$t('global.no') }
],
pagerConfig: {
pageSize: 'pageSize',
@ -40,7 +40,7 @@ export default {
queryObject: {
'name': {
type: 'text',
label: '权限名称'
label: this.$t('orderAuthor.permissionName')
},
'type': {
type: 'select',
@ -51,11 +51,11 @@ export default {
},
'isPackage': {
type: 'select',
label: '是否权限包',
label: this.$t('orderAuthor.isPackage'),
config: {
data: [
{ value: true, label: '是' },
{ value: false, label: '否' }
{ value: true, label: this.$t('global.yes') },
{ value: false, label: this.$t('global.no') }
]
}
},
@ -74,19 +74,19 @@ export default {
indexShow: true,
columns: [
{
title: '权限名称',
title: this.$t('orderAuthor.permissionName'),
width: '240',
prop: 'name'
},
{
title: '是否权限包',
title: this.$t('orderAuthor.isPackage'),
prop: 'isPackage',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.isPackage, this.ruleList, ['value', 'label']); },
tagType: (row) => { return ''; }
},
{
title: '所属地图',
title: this.$t('orderAuthor.belongsToMap'),
prop: 'mapId',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
@ -100,15 +100,15 @@ export default {
tagType: (row) => { return ''; }
},
{
title: '创建时间',
title: this.$t('orderAuthor.creationTime'),
prop: 'createTime'
},
{
title: '创建者',
title: this.$t('orderAuthor.founder'),
prop: 'creatorUserName'
},
{
title: '描述',
title: this.$t('orderAuthor.describtion'),
width: '420',
prop: 'remarks'
},
@ -118,12 +118,12 @@ export default {
width: '250',
buttons: [
{
name: '编辑',
name: this.$t('global.edit'),
handleClick: this.handleEdit,
type: ''
},
{
name: '详情',
name: this.$t('global.details'),
handleClick: this.handleRulesDetail,
type: '',
showControl: (row) => { return row.isPackage; }
@ -132,8 +132,8 @@ export default {
}
],
actions: [
{ text: '打包', handler: this.handleAdd },
{ text: '一键生成', handler: this.create }
{ text: this.$t('orderAuthor.packaging'), handler: this.handleAdd },
{ text: this.$t('orderAuthor.oneClickGeneration'), handler: this.create }
]
}
};

View File

@ -1,6 +1,6 @@
<template>
<el-dialog
title="选择权限"
:title="this.$t('orderAuthor.selectPermission')"
:visible.sync="show"
top="20px"
width="90%"
@ -35,8 +35,8 @@ export default {
show: false,
PermissionTypeList: [],
ruleLists: [
{ value: true, label: '是' },
{ value: false, label: '否' }
{ value: true, label: this.$t('global.yes') },
{ value: false, label: this.$t('global.no') }
],
pagerConfig: {
pageSize: 'pageSize',
@ -48,7 +48,7 @@ export default {
queryObject: {
name: {
type: 'text',
label: '权限名称'
label: this.$t('orderAuthor.permissionName')
},
type: {
type: 'select',
@ -65,11 +65,11 @@ export default {
indexShow: true,
columns: [
{
title: '权限名称',
title: this.$t('orderAuthor.permissionName'),
prop: 'name'
},
{
title: '是否包权限',
title: this.$t('orderAuthor.isPackage'),
prop: 'isPackage',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.isPackage, this.ruleLists, ['value', 'label']); },
@ -83,11 +83,11 @@ export default {
tagType: (row) => { return ''; }
},
{
title: '创建者',
title: this.$t('orderAuthor.founder'),
prop: 'creatorUserName'
},
{
title: '创建时间',
title: this.$t('orderAuthor.creationTime'),
prop: 'createTime'
},
{