From d87a4fff228d619ed6b3fde0b10f8e079e6b28bd Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Mon, 19 Aug 2019 14:02:20 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=9B=BD=E9=99=85=E5=8C=96=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/i18n/langs/en/error.js | 8 +- src/i18n/langs/en/global.js | 18 +- src/i18n/langs/en/router.js | 2 +- src/i18n/langs/en/rules.js | 7 +- src/i18n/langs/en/system.js | 8 +- src/i18n/langs/zh/error.js | 8 +- src/i18n/langs/zh/global.js | 15 +- src/i18n/langs/zh/rules.js | 7 +- src/i18n/langs/zh/system.js | 8 +- src/layout/components/Entry.vue | 6 +- src/layout/components/Language.vue | 10 +- src/layout/components/Logout.vue | 5 +- src/layout/components/Qcode.vue | 12 +- src/views/demonstration/deomonList/index.vue | 20 ++- src/views/demonstration/deomonTopic/index.vue | 8 +- src/views/demonstration/detail/index.vue | 1 - src/views/management/dictionary/edit.vue | 38 ++-- .../management/dictionaryDetail/edit.vue | 4 +- .../management/existingSimulation/index.vue | 11 +- src/views/trainRoom/addPerson.vue | 169 ++++++++++-------- 20 files changed, 220 insertions(+), 145 deletions(-) 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 + From 43dfc042813cb3640ad66073238c504878f08ca9 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 19 Aug 2019 14:09:08 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=20=E5=89=A7=E6=9C=AC=E7=BC=96=E5=88=B6?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/scriptRecord.js | 65 ---- src/views/display/scriptRecord/addAction.vue | 11 +- .../display/scriptRecord/addBehavior.vue | 316 ------------------ .../display/scriptRecord/deviceCondition.vue | 173 ---------- src/views/display/scriptRecord/getAction.vue | 23 +- .../display/scriptRecord/getBehavior.vue | 147 -------- .../scriptRecord/roleConditionScript.vue | 82 ----- .../display/scriptRecord/roleSection.vue | 160 --------- .../display/scriptRecord/targetCondition.vue | 97 ------ src/views/display/scriptRecord/taskScript.vue | 197 ----------- src/views/display/tipScriptRecord.vue | 268 ++++++++------- src/views/scriptManage/category/tree.vue | 31 +- 12 files changed, 187 insertions(+), 1383 deletions(-) delete mode 100644 src/views/display/scriptRecord/addBehavior.vue delete mode 100644 src/views/display/scriptRecord/deviceCondition.vue delete mode 100644 src/views/display/scriptRecord/getBehavior.vue delete mode 100644 src/views/display/scriptRecord/roleConditionScript.vue delete mode 100644 src/views/display/scriptRecord/roleSection.vue delete mode 100644 src/views/display/scriptRecord/targetCondition.vue delete mode 100644 src/views/display/scriptRecord/taskScript.vue diff --git a/src/store/modules/scriptRecord.js b/src/store/modules/scriptRecord.js index c42264c2c..14bd652de 100644 --- a/src/store/modules/scriptRecord.js +++ b/src/store/modules/scriptRecord.js @@ -4,84 +4,19 @@ const scriptRecord = { namespaced: true, state: { - deviceConditionList: [], //任务目标列表 - memberList:[], //角色列表, - script:[], //剧本列表, - memberName:"", //角色名称, - behaviorName:"", //动作名称 mapLocation: {}, //地图定位 }, getters: { - deviceConditionList: (state) => { - return state.deviceConditionList; - }, - memberList:(state)=>{ - return state.memberList; - }, - script:(state)=>{ - return state.script; - }, - memberName:(state)=>{ - return state.memberName; - }, - behaviorName:(state)=>{ - return state.behaviorName; - }, mapLocation:(state)=>{ return state.mapLocation; } }, mutations: { - setDeviceCondition: (state, deviceConditionList) => { - state.deviceConditionList = deviceConditionList; - }, - setMemberList: (state, memberList) => { - state.memberList = memberList; - }, - setScript:(state, script) => { - state.script = script; - }, - setMemberName:(state, memberName) => { - state.memberName = memberName; - }, - setBehaviorName:(state, behaviorName) => { - state.behaviorName = behaviorName; - }, setMapLocation:(state, mapLocation) => { state.mapLocation = mapLocation; }, }, actions: { - /** - * 设置任务目标列表 - */ - updateDeviceCondition: ({ commit }, deviceConditionList) => { - commit('setDeviceCondition', deviceConditionList); - }, - /** - * 设置角色列表 - */ - updateMemberList: ({ commit }, memberList) => { - commit('setMemberList', memberList); - }, - /** - * 设置剧本列表 - */ - updateScript: ({ commit }, script) => { - commit('setScript', script); - }, - /** - * 设置角色名称 - */ - updateMemberName:({ commit }, memberName) => { - commit('setMemberName', memberName); - }, - /** - * 设置动作名称 - */ - updateBehaviorName:({ commit }, behaviorName) => { - commit('setBehaviorName', behaviorName); - }, /** * 设置地图定位 */ diff --git a/src/views/display/scriptRecord/addAction.vue b/src/views/display/scriptRecord/addAction.vue index e680938f3..776480db3 100644 --- a/src/views/display/scriptRecord/addAction.vue +++ b/src/views/display/scriptRecord/addAction.vue @@ -6,9 +6,9 @@ - + @@ -82,7 +82,7 @@ actionVO:{ memberId:"", targetId:"", - time:0, + // time:0, reply:"", type:"Conversation", deviceCommand:"", @@ -208,10 +208,11 @@ } }, initActionData(){ + // debugger; this.modalData.actionVO.memberId=""; this.modalData.actionVO.targetId=""; this.modalData.actionVO.type="Conversation"; - this.modalData.actionVO.time=0; + // this.modalData.actionVO.time=0; this.modalData.actionVO.reply=""; this.modalData.param.startStation=""; this.isConversitionAdd=true; @@ -277,7 +278,7 @@ this.modalData.actionVO.id=data.id; this.modalData.actionVO.memberId=data.memberId; this.modalData.actionVO.type=data.type; - this.modalData.actionVO.time=data.time; + // this.modalData.actionVO.time=data.time; if(data.type=="Conversation") { this.modalData.actionVO.targetId=data.targetId; diff --git a/src/views/display/scriptRecord/addBehavior.vue b/src/views/display/scriptRecord/addBehavior.vue deleted file mode 100644 index 32a6811f4..000000000 --- a/src/views/display/scriptRecord/addBehavior.vue +++ /dev/null @@ -1,316 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/display/scriptRecord/deviceCondition.vue b/src/views/display/scriptRecord/deviceCondition.vue deleted file mode 100644 index 8c4764167..000000000 --- a/src/views/display/scriptRecord/deviceCondition.vue +++ /dev/null @@ -1,173 +0,0 @@ - - diff --git a/src/views/display/scriptRecord/getAction.vue b/src/views/display/scriptRecord/getAction.vue index b2cf0f2e9..9401ed438 100644 --- a/src/views/display/scriptRecord/getAction.vue +++ b/src/views/display/scriptRecord/getAction.vue @@ -5,6 +5,7 @@
+
@@ -23,7 +24,7 @@
- + + +
+ - - + \ No newline at end of file diff --git a/src/views/scriptManage/category/tree.vue b/src/views/scriptManage/category/tree.vue index 195c933e9..c61109954 100644 --- a/src/views/scriptManage/category/tree.vue +++ b/src/views/scriptManage/category/tree.vue @@ -1,15 +1,16 @@