diff --git a/src/App.vue b/src/App.vue
index 3f4e9e915..1df44d27d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -27,7 +27,7 @@ export default {
this.subscribeMessage(val);
}
},
- '$store.state.socket.beLogout': async function(val) {
+ '$store.state.socket.beLogoutCount': async function(val) {
this.$alert(this.$t('tip.logoutTips'), this.$t('tip.hint'), {
confirmButtonText: this.$t('tip.confirm'),
callback: action => {
diff --git a/src/scripts/GlobalPlugin.js b/src/scripts/GlobalPlugin.js
index 8c78dc5fb..aa39bf649 100644
--- a/src/scripts/GlobalPlugin.js
+++ b/src/scripts/GlobalPlugin.js
@@ -12,90 +12,90 @@ Vue.component('QueryListPage', QueryListPage);
Vue.component('TurnbackBar', TurnbackBar);
Vue.prototype.$ConstSelect = (function() {
- ConstConfig.ConstSelect.translate = function(value, codeName) {
- if (codeName) {
- const obj = this[codeName].filter(function(item) {
- return item.value === value;
- })[0];
- return obj && obj.label;
- }
- };
- return ConstConfig.ConstSelect;
+ ConstConfig.ConstSelect.translate = function(value, codeName) {
+ if (codeName) {
+ const obj = this[codeName].filter(function(item) {
+ return item.value === value;
+ })[0];
+ return obj && obj.label;
+ }
+ };
+ return ConstConfig.ConstSelect;
})();
Vue.prototype.$Dictionary = Dictionary;
Vue.prototype.__windowResizeFlag = false;
Vue.prototype.$addWindowResizeListener = function(cb) {
- window.addEventListener('resize', function() {
- if (!Vue.__windowResizeFlag) {
- Vue.__windowResizeFlag = true;
- setTimeout(function() {
- Vue.__windowResizeFlag = false;
- cb();
- }, 100);
- }
- });
+ window.addEventListener('resize', function() {
+ if (!Vue.__windowResizeFlag) {
+ Vue.__windowResizeFlag = true;
+ setTimeout(function() {
+ Vue.__windowResizeFlag = false;
+ cb();
+ }, 100);
+ }
+ });
};
Vue.prototype.$theme = new Theme();
Vue.prototype.$messageBox = function(msge) {
- if (this.$confirm) {
- this.$confirm(`${msge || this.$t('global.processFailure')}!`, this.$t('global.tips'), {
- confirmButtonText: this.$t('global.confirm'),
- type: 'warning',
- showCancelButton: false,
- center: true
- }).then(() => {
- }).catch(() => {
- });
- }
+ if (this.$confirm) {
+ this.$confirm(`${msge || this.$t('global.processFailure')}`, this.$t('global.tips'), {
+ confirmButtonText: this.$t('global.confirm'),
+ type: 'warning',
+ showCancelButton: false,
+ center: true
+ }).then(() => {
+ }).catch(() => {
+ });
+ }
};
Vue.prototype.$convertField = function(fieldValue, enumList, converFormat, isList = false) {
- const arr = [];
- if (enumList && converFormat && converFormat.length >= 2) {
- const value = converFormat[0];
- const label = converFormat[1];
- if (isList) {
- enumList.forEach((element, i) => {
- fieldValue.forEach((v, j) => {
- if ('' + fieldValue[j] === '' + enumList[i][value]) {
- arr.push(enumList[i][label]);
- }
- });
- });
- } else {
- for (let i = 0; i < enumList.length; i++) {
- if ('' + fieldValue === '' + enumList[i][value]) {
- return enumList[i][label];
- }
- }
- }
- }
+ const arr = [];
+ if (enumList && converFormat && converFormat.length >= 2) {
+ const value = converFormat[0];
+ const label = converFormat[1];
+ if (isList) {
+ enumList.forEach((element, i) => {
+ fieldValue.forEach((v, j) => {
+ if ('' + fieldValue[j] === '' + enumList[i][value]) {
+ arr.push(enumList[i][label]);
+ }
+ });
+ });
+ } else {
+ for (let i = 0; i < enumList.length; i++) {
+ if ('' + fieldValue === '' + enumList[i][value]) {
+ return enumList[i][label];
+ }
+ }
+ }
+ }
- return isList ? arr: '';
+ return isList ? arr : '';
};
Vue.prototype.$convertSpecifiedField = function(dataDict, enumList, key, value, fieldList) {
- if (dataDict && enumList && fieldList && enumList.length && fieldList.length) {
- fieldList.forEach(field => {
- enumList.forEach(elem => {
- if (elem[key] === dataDict[field]) {
- dataDict[field] = elem[value];
- }
- });
- });
- }
+ if (dataDict && enumList && fieldList && enumList.length && fieldList.length) {
+ fieldList.forEach(field => {
+ enumList.forEach(elem => {
+ if (elem[key] === dataDict[field]) {
+ dataDict[field] = elem[value];
+ }
+ });
+ });
+ }
};
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
- if (FromList) {
- ToList.length = 0;
- FromList.forEach(elem => {
- if (checktypeFunction(elem)) {
- ToList.push({ value: elem.code, label: elem.name });
- }
- });
- }
+ if (FromList) {
+ ToList.length = 0;
+ FromList.forEach(elem => {
+ if (checktypeFunction(elem)) {
+ ToList.push({ value: elem.code, label: elem.name });
+ }
+ });
+ }
};
diff --git a/src/store/modules/map.js b/src/store/modules/map.js
index 0ec520d3e..bcdd27725 100644
--- a/src/store/modules/map.js
+++ b/src/store/modules/map.js
@@ -530,7 +530,7 @@ const map = {
if (map && map.skinVO) {
state.map = map;
state.mapDevice = parser(map, map.skinVO.code);
- Vue.prototype.$jlmap.setMapDevice(state.mapDevice);
+ Vue.prototype.$jlmap && Vue.prototype.$jlmap.setMapDevice(state.mapDevice);
} else {
state.map = null;
state.mapDevice = {};
diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js
index 5cf7a1512..7dbfbb80b 100644
--- a/src/store/modules/socket.js
+++ b/src/store/modules/socket.js
@@ -9,9 +9,6 @@ function handle(state, data) {
case 'Order_Pay_Result': // 订单支付结果消息
state.payOrder = msg;
break;
- case 'Be_Logged_Out': // 重复登录被登出
- state.beLogout = msg;
- break;
case 'JointTraining_Room': // 综合演练室-房间消息
if (!path.includes('/plan') || !path.includes('/dp/')) {
state.jointRoomInfo = msg; // 房间信息
@@ -74,6 +71,9 @@ function handle(state, data) {
case 'JointTraining_Device':
state.realDeviceInfo++;
break;
+ case 'Be_Logged_Out': // 重复登录被登出
+ state.beLogoutCount++;
+ break;
case 'Simulation_Control_Pause': // 暂停中
store.dispatch('scriptRecord/updateSimulationPause', msg);
break;
@@ -196,7 +196,6 @@ const socket = {
state: {
payOrder: {}, // 支付消息
- beLogout: {}, // 被登出
jointRoomInfo: {}, // 受邀请房间信息
chatContent: {}, // 聊天室聊天内容
roleList: [], // 设置角色信息
@@ -223,7 +222,8 @@ const socket = {
permissionOver: {}, // 权限结束
tipOperateCount: 0, // 任务结束提示消息
- realDeviceInfo: 0 // 真实设备信息
+ realDeviceInfo: 0, // 真实设备信息
+ beLogoutCount: 0 // 被登出
},
getters: {
diff --git a/src/views/designUser/mapmanage/create.vue b/src/views/designUser/mapmanage/create.vue
index f65309de0..4a36b9ca4 100644
--- a/src/views/designUser/mapmanage/create.vue
+++ b/src/views/designUser/mapmanage/create.vue
@@ -15,7 +15,7 @@
-
+
@@ -32,7 +32,7 @@
-
+
@@ -96,7 +96,7 @@ export default {
{ required: true, message: this.$t('rules.pleaseSelectMapSource'), trigger: 'change' }
],
name: [
- { required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
+ { required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
]
},
cityList: []
diff --git a/src/views/designUser/mapmanage/edit.vue b/src/views/designUser/mapmanage/edit.vue
index 95b479ac5..cbbd3a8bb 100644
--- a/src/views/designUser/mapmanage/edit.vue
+++ b/src/views/designUser/mapmanage/edit.vue
@@ -14,7 +14,7 @@
-
+
diff --git a/src/views/display/demon/addQuest.vue b/src/views/display/demon/addQuest.vue
index f8eccfeea..84ae3bfdb 100644
--- a/src/views/display/demon/addQuest.vue
+++ b/src/views/display/demon/addQuest.vue
@@ -176,11 +176,11 @@ export default {
}
},
- async confirm() {
+ confirm() {
const roleName = this.memberList.find(elem=>{ return elem.id == this.form.role; });
- this.$emit('selectQuest', this.row, this.form.role, this.mapLocation, roleName.role);
this.doClose();
this.roleDoClose();
+ this.$emit('selectQuest', this.row, this.form.role, this.mapLocation, roleName.role);
},
roleDoClose() {
diff --git a/src/views/display/designIndex.vue b/src/views/display/designIndex.vue
index d1f1f5726..db5ae1d11 100644
--- a/src/views/display/designIndex.vue
+++ b/src/views/display/designIndex.vue
@@ -35,6 +35,7 @@
:offset="offset"
:group="group"
@switchMode="switchMode"
+ @selectQuest="selectQuest"
/>