- {{ item.name }}
+ {{ $t(item.name) }}
@@ -22,11 +22,11 @@ export default {
return {
entryList: [
{
- name: this.$t('global.quickEntry'),
+ name: 'global.quickEntry',
handle: this.quickEntry
},
{
- name: '扫码',
+ name: 'global.scan',
handle: this.qcodeEntry
}
],
diff --git a/src/layout/components/Language.vue b/src/layout/components/Language.vue
index 05a1ce122..074e651ba 100644
--- a/src/layout/components/Language.vue
+++ b/src/layout/components/Language.vue
@@ -1,13 +1,13 @@
- 语言:
-
+ {{ $t('global.language') }}:
+
diff --git a/src/layout/components/Logout.vue b/src/layout/components/Logout.vue
index 0a0aa21d6..6638fef8d 100644
--- a/src/layout/components/Logout.vue
+++ b/src/layout/components/Logout.vue
@@ -1,7 +1,6 @@
-
{{ username }}
@@ -9,10 +8,10 @@
- 语言
+ {{ $t('global.language') }}
- 退出
+ {{ $t('global.exit') }}
diff --git a/src/layout/components/Qcode.vue b/src/layout/components/Qcode.vue
index 82b95383e..205a284c6 100644
--- a/src/layout/components/Qcode.vue
+++ b/src/layout/components/Qcode.vue
@@ -1,9 +1,9 @@
-
-
+
+
@@ -37,10 +37,10 @@ export default {
await getPermissionJoint(`${this.input}`);
this.centerDialogVisible = false;
} catch (error) {
- this.$messageBox('扫码错误:' + error.message);
+ this.$messageBox(`${this.$t('error.scanningError')}:${error.message}`);
}
} else {
- this.$messageBox('请输入房间号');
+ this.$messageBox(this.$t('global.inputRoomNumber'));
}
}
}
diff --git a/src/views/demonstration/deomonList/index.vue b/src/views/demonstration/deomonList/index.vue
index 9da81c9be..c1ce266f0 100644
--- a/src/views/demonstration/deomonList/index.vue
+++ b/src/views/demonstration/deomonList/index.vue
@@ -9,7 +9,6 @@
:modal="false"
:close-on-click-modal="false"
>
-
- {{ data.creator.nickName }}的房间({{ data.state == '01' ? '未开始' : '已开始' }})
+ {{ $t('global.trainingHasStart').replace('(name)', data.creator.nickName) }}
+ {{ $t('global.trainingHasStart').replace('(name)', data.creator.nickName) }}
-
@@ -46,7 +49,6 @@ export default {
dialogShow: false,
loading: false,
height: 120,
- // filterText: '',
trainingList: [],
defaultProps: {
label: 'roomName'
@@ -61,7 +63,7 @@ export default {
return this.dialogShow;
},
title() {
- return '综合演练快速入口';
+ return this.$t('global.synthesisTrainingTitle');
},
isWatch() {
return true;
@@ -116,7 +118,7 @@ export default {
this.$router.push({ path: `/trainroom`, query: query });
}
} else {
- this.$message.info('您没有选择房间');
+ this.$message.info(this.$t('global.pleaseChooseRoom'));
}
}
}
diff --git a/src/views/demonstration/deomonTopic/index.vue b/src/views/demonstration/deomonTopic/index.vue
index 340169e7a..8cfc77656 100644
--- a/src/views/demonstration/deomonTopic/index.vue
+++ b/src/views/demonstration/deomonTopic/index.vue
@@ -9,10 +9,10 @@
:modal="false"
:close-on-click-modal="false"
>
-
{{ roomName }}邀请你加入综合演练!
+
{{ roomName }}{{ $t('global.inviteJoinRoom') }}
@@ -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 @@
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 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{tag}}
-
-
- 添加
-
-
-
-
-
-
- {{buttonName}}
-
-
-
-
-
\ 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 @@
-
-
-
-
- 添加
-
-
-
-
-
- {{scope.row.deviceType}}
-
-
-
-
-
-
-
- {{scope.row.code}}
-
-
-
-
-
-
-
- {{scope.row.condition}}
-
-
-
-
-
-
-
- {{scope.row.paramDeviceType}}
-
-
-
-
-
-
-
- {{scope.row.paramCode}}
-
-
-
-
-
-
-
-
- 删除
-
-
- 确定
- 取消
-
-
-
-
-
-
-
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 @@