diff --git a/src/i18n/langs/en/error.js b/src/i18n/langs/en/error.js index 7d695a075..37c3bf268 100644 --- a/src/i18n/langs/en/error.js +++ b/src/i18n/langs/en/error.js @@ -33,5 +33,11 @@ export default { createSpeedLevelFailed: 'Failed to create speed level', createOperationGraphFailed: 'Failed to create operation diagram', loadingCityListFailed: 'Failed to load city list', - cannotNarrowDown: 'You cannot narrow down the training list you created last time' + cannotNarrowDown: 'You cannot narrow down the training list you created last time', + scanningError: 'Scanning error', + serviceException: 'Service exception', + codeHasExist: 'Coding already exists', + formartError: 'The format is incorrect, only characters/numbers/_', + createDictionaryFailed: 'Failed to create dictionary', + updateDictionaryFailed: 'Failed to update dictionary' }; diff --git a/src/i18n/langs/en/global.js b/src/i18n/langs/en/global.js index 9a36456b3..3e76f9476 100644 --- a/src/i18n/langs/en/global.js +++ b/src/i18n/langs/en/global.js @@ -13,7 +13,8 @@ export default { add: 'Add', query: 'Query', detail: 'Details', - quickEntry: 'Quick Entry', + quickEntry: 'Quick entry', + scan: 'Scan', chooseDate: 'Please choose the date', chooseTime: 'Please choose the time', chooseDateTime: 'Please choose the date and time', @@ -65,5 +66,18 @@ export default { filteringKeywords: 'Enter keywords for filtering', previousStep: 'PreviousStep', skip: 'Skip', - modify: 'Modify' + modify: 'Modify', + language: 'Language', + exit: 'Exit', + chooseLanguage: 'Please choose the language', + switchLanguage: 'Switch language', + joinRoom: 'Join Room', + synthesisTrainingTitle: 'Synthesis Training Fast Entrance', + pleaseChooseRoom: 'You did not choose a room', + inviteJoinRoom: 'Invite you to join the synthesis training!', + trainingHasStart: "(name)'s room has begun", + trainingNotStart: "(name)'s room hasn't started yet", + inputRoomNumber: 'Please enter the room number.', + chooseRoom: 'Choose Room' + }; diff --git a/src/i18n/langs/en/router.js b/src/i18n/langs/en/router.js index b176a3513..bf68857ba 100644 --- a/src/i18n/langs/en/router.js +++ b/src/i18n/langs/en/router.js @@ -23,7 +23,7 @@ export default { dpSystem: 'Large screen', - planSystem: 'Lian Plan', + planSystem: 'Lian plan', replayManage: 'Playback', diff --git a/src/i18n/langs/en/rules.js b/src/i18n/langs/en/rules.js index db4295d26..1ff4a6d94 100644 --- a/src/i18n/langs/en/rules.js +++ b/src/i18n/langs/en/rules.js @@ -142,6 +142,11 @@ export default { endSectionCode: '请选择终到区段', selectTurnoutID: '请选择道岔ID', - switchesCannot: '道岔不能为同一个' + switchesCannot: '道岔不能为同一个', + pleaseInputName: '请输入名称', + pleaseSelectStatus: '请选择状态', + pleaseInputCode: '请输入编码', + strLength1To25: '长度在 1 到 25 个字符', + strLengthNotExceed50: '不能超过 50 个字符' }; diff --git a/src/i18n/langs/en/system.js b/src/i18n/langs/en/system.js index 98785d23b..21190899d 100644 --- a/src/i18n/langs/en/system.js +++ b/src/i18n/langs/en/system.js @@ -6,5 +6,11 @@ export default { createDirectory: 'Create dictionary', editDictionary: 'Edit dictionary', deleteSuccess: 'Successful deletion', - dleeteTipContext: 'This operation will delete the type. Do you want to continue?' + dleeteTipContext: 'This operation will delete the type. Do you want to continue?', + createSuccess: 'Create successful', + updateSuccess: 'Update successful', + destory: 'Destory', + simulationGroup: 'Simulation group', + username: 'User name', + phoneNumber: 'Cell-phone number' }; diff --git a/src/i18n/langs/zh/error.js b/src/i18n/langs/zh/error.js index be4647759..1b35b669c 100644 --- a/src/i18n/langs/zh/error.js +++ b/src/i18n/langs/zh/error.js @@ -33,6 +33,12 @@ export default { createSpeedLevelFailed: '创建速度等级失败', createOperationGraphFailed: '创建运行图失败', loadingCityListFailed: '加载城市列表失败', - cannotNarrowDown: '不能缩小上次创建的实训列表的范围' + cannotNarrowDown: '不能缩小上次创建的实训列表的范围', + scanningError: '扫码错误', + serviceException: '服务异常', + codeHasExist: '编码已存在', + formartError: '格式不正确,只能是字符/数字/_', + createDictionaryFailed: '创建字典失败', + updateDictionaryFailed: '更新字典失败' }; diff --git a/src/i18n/langs/zh/global.js b/src/i18n/langs/zh/global.js index a0386f862..7ac7adcb7 100644 --- a/src/i18n/langs/zh/global.js +++ b/src/i18n/langs/zh/global.js @@ -14,6 +14,7 @@ export default { query: '查 询', detail: '明 细', quickEntry: '快速入口', + scan: '扫码', chooseDate: '请选择日期', chooseTime: '请选择时间', chooseDateTime: '请选择日期时间', @@ -66,5 +67,17 @@ export default { filteringKeywords: '输入关键字进行过滤', previousStep: '上一步', skip: '跳过', - modify: '修改' + modify: '修改', + language: '语言', + exit: '退出', + chooseLanguage: '请选择语言', + switchLanguage: '切换语言', + joinRoom: '加入房间', + synthesisTrainingTitle: '综合演练快速入口', + pleaseChooseRoom: '您没有选择房间', + inviteJoinRoom: '邀请你加入综合演练!', + trainingHasStart: '{{name}}的房间已开始', + trainingNotStart: '{{name}}的房间未开始', + inputRoomNumber: '请输入房间号', + chooseRoom: '选择房间' }; diff --git a/src/i18n/langs/zh/rules.js b/src/i18n/langs/zh/rules.js index db4295d26..1ff4a6d94 100644 --- a/src/i18n/langs/zh/rules.js +++ b/src/i18n/langs/zh/rules.js @@ -142,6 +142,11 @@ export default { endSectionCode: '请选择终到区段', selectTurnoutID: '请选择道岔ID', - switchesCannot: '道岔不能为同一个' + switchesCannot: '道岔不能为同一个', + pleaseInputName: '请输入名称', + pleaseSelectStatus: '请选择状态', + pleaseInputCode: '请输入编码', + strLength1To25: '长度在 1 到 25 个字符', + strLengthNotExceed50: '不能超过 50 个字符' }; diff --git a/src/i18n/langs/zh/system.js b/src/i18n/langs/zh/system.js index d9f07ff9f..9e46c7b99 100644 --- a/src/i18n/langs/zh/system.js +++ b/src/i18n/langs/zh/system.js @@ -6,5 +6,11 @@ export default { createDirectory: '创建目录', editDictionary: '编辑目录', deleteSuccess: '删除成功', - dleeteTipContext: '此操作将删除该类型, 是否继续?' + dleeteTipContext: '此操作将删除该类型, 是否继续?', + createSuccess: '创建成功', + updateSuccess: '更新成功', + destory: '销 毁', + simulationGroup: '仿真Group', + username: '用户名', + phoneNumber: '手机号' }; diff --git a/src/layout/components/Entry.vue b/src/layout/components/Entry.vue index f562022f1..dd64925a3 100644 --- a/src/layout/components/Entry.vue +++ b/src/layout/components/Entry.vue @@ -1,7 +1,7 @@ @@ -38,7 +38,7 @@ export default { return this.dialogShow; }, title() { - return '综合演练快速入口'; + return this.$t('global.synthesisTrainingTitle'); } }, mounted() { diff --git a/src/views/demonstration/detail/index.vue b/src/views/demonstration/detail/index.vue index 12b2f8f4e..43aad2f60 100644 --- a/src/views/demonstration/detail/index.vue +++ b/src/views/demonstration/detail/index.vue @@ -286,7 +286,6 @@ export default { const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode }; this.buttonLoading = true; simulationNotify(data).then(resp => { - // try 0 有权限不走试用 const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser }; this.$router.push({ path: `${UrlConfig.display}/demon`, query: query }); launchFullscreen(); diff --git a/src/views/management/dictionary/edit.vue b/src/views/management/dictionary/edit.vue index 56535845f..170aa7bf5 100644 --- a/src/views/management/dictionary/edit.vue +++ b/src/views/management/dictionary/edit.vue @@ -36,12 +36,12 @@ export default { const form = { labelWidth: '60px', items: [ - { prop: 'code', label: '编码', type: 'text', required: true, disabled: !isAdd }, - { prop: 'name', label: '名称', type: 'text', required: true }, + { prop: 'code', label: this.$t('system.code'), type: 'text', required: true, disabled: !isAdd }, + { prop: 'name', label: this.$t('system.name'), type: 'text', required: true }, { - prop: 'status', label: '状态', type: 'select', required: true, options: this.$ConstSelect.Status + prop: 'status', label: this.$t('system.status'), type: 'select', required: true, options: this.$ConstSelect.Status }, - { prop: 'remarks', label: '备注', type: 'textarea', required: false } + { prop: 'remarks', label: this.$t('system.remarks'), type: 'textarea', required: false } ] }; return form; @@ -49,21 +49,21 @@ export default { rules() { const crules = { name: [ - { required: true, message: '请输入名称', trigger: 'blur' }, - { min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' } + { required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' }, + { min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' } ], status: [ - { required: true, message: '请选择状态', trigger: 'change' } + { required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'change' } ], remarks: [ - { max: 50, message: '不能超过 50 个字符', trigger: 'blur' } + { max: 50, message: this.$t('rules.strLengthNotExceed50'), trigger: 'blur' } ] }; if (this.type === 'ADD') { return Object.assign(crules, { code: [ - { required: true, message: '请输入编码', trigger: 'blur' }, - { min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }, + { required: true, message: this.$t('rules.pleaseInputCode'), trigger: 'blur' }, + { min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }, { validator: this.validateCode, trigger: 'blur' } ] }); @@ -73,25 +73,25 @@ export default { }, title() { if (this.type === 'ADD') { - return '创建目录'; + return this.$t('system.createDirectory'); } else { - return '编辑目录'; + return this.$t('system.editDictionary'); } } }, methods: { validateCode(rule, value, callback) { if (!validateCharCode(value)) { - return callback(new Error('格式不正确,只能是字符/数字/_')); + return callback(new Error(this.$t('error.formartError'))); } else { checkDicCodeExist(value).then(response => { if (response.data) { - return callback(new Error('编码已存在')); + return callback(new Error(this.$t('error.codeHasExist'))); } else { return callback(); } }).catch(() => { - return callback(new Error('服务异常')); + return callback(new Error(this.$t('error.serviceException'))); }); } }, @@ -117,21 +117,21 @@ export default { create() { const self = this; create(this.formModel).then(response => { - self.$message.success('创建字典目录成功'); + self.$message.success(this.$t('system.createSuccess')); self.handleClose(); self.$emit('reloadTable'); }).catch(error => { - self.$message.error('创建字典目录失败:' + error.message); + self.$message.error(`${this.$t('error.createDictionaryFailed')}:${error.message}`); }); }, update() { const self = this; update(this.formModel).then(response => { - self.$message.success('更新字典目录成功'); + self.$message.success(this.$t('system.updateSuccess')); self.handleClose(); self.$emit('reloadTable'); }).catch(error => { - self.$message.error('更新字典目录失败:' + error.message); + self.$message.error(`${this.$t('error.updateDictionaryFailed')}:${error.message}`); }); }, handleClose(done) { diff --git a/src/views/management/dictionaryDetail/edit.vue b/src/views/management/dictionaryDetail/edit.vue index a0a97fc40..19d88b51d 100644 --- a/src/views/management/dictionaryDetail/edit.vue +++ b/src/views/management/dictionaryDetail/edit.vue @@ -2,8 +2,8 @@ - 确 定 - 取 消 + {{ $t('global.confirm') }} + {{ $t('global.cancel') }} diff --git a/src/views/management/existingSimulation/index.vue b/src/views/management/existingSimulation/index.vue index 1d750cf6a..d38dd9510 100644 --- a/src/views/management/existingSimulation/index.vue +++ b/src/views/management/existingSimulation/index.vue @@ -24,15 +24,15 @@ export default { queryObject: { group: { type: 'text', - label: '仿真Group' + label: this.$t('system.simulationGroup') }, userName: { type: 'text', - label: '用户名' + label: this.$t('system.username') }, mobile: { type: 'text', - label: '手机号' + label: this.$t('system.phoneNumber') }, skinCode: { type: 'select', @@ -137,11 +137,10 @@ export default { }, { type: 'button', - title: '操作', - // width: '250', + title: this.$t('global.operate'), buttons: [ { - name: '销毁', + name: this.$t('system.destory'), handleClick: this.handleDelete, type: 'danger' } diff --git a/src/views/trainRoom/addPerson.vue b/src/views/trainRoom/addPerson.vue index f11ca14a8..bf71262ac 100644 --- a/src/views/trainRoom/addPerson.vue +++ b/src/views/trainRoom/addPerson.vue @@ -1,83 +1,98 @@ \ No newline at end of file +