diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index a5adad4c4..928dc157b 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -323,11 +323,16 @@ class SkinCode extends defaultStyle { }, turnBack: { // 按图折返 lamp: 1, // 灯数量 - lampSpace: 60 // 灯间距 + lampSpace: 60, // 灯间距 + textName: '按计划执行', + showLampBorder: true, + topText: true, + toptextDistance: 14, + lineDash: [0] }, StationControl:{ text: { - distance: 2, // 灯和文字之间的距离 + distance: 3, // 灯和文字之间的距离 fontSize: 11, // 字体大小 fontFormat: 'consolas', // 字体格式 fontColor: '#ffffff', // 字体颜色 diff --git a/src/jmapNew/shape/Station/index.js b/src/jmapNew/shape/Station/index.js index f7999da88..ca5433e33 100644 --- a/src/jmapNew/shape/Station/index.js +++ b/src/jmapNew/shape/Station/index.js @@ -112,6 +112,25 @@ export default class Station extends Group { const style = this.style; if (model.visible && model.createTurnBack) { this.turnBacks = []; + if (style.Station.turnBack.topText) { + this.turnBackTopText = new Text({ + zlevel: this.zlevel, + z: this.z, + position: [0, 0], + style: { + x: model.turnBackPoint.x, + y: model.turnBackPoint.y - style.Station.lamp.radiusR - style.Station.turnBack.toptextDistance, + fontWeight: style.Station.text.fontWeight, + fontSize: style.Station.text.fontSize, + fontFamily: style.fontFamily, + text: model.name + '站后折返', + textFill: '#fff', + textAlign: 'middle', + textVerticalAlign: 'top' + } + }); + this.add(this.turnBackTopText); + } for (let index = 0; index < style.Station.turnBack.lamp; index++) { const turnBack = new EControl({ zlevel: this.zlevel, @@ -123,6 +142,7 @@ export default class Station extends Group { r: style.Station.lamp.radiusR }, lineWidth: 0, + lineDash: style.Station.turnBack.lineDash, fill: style.Station.lamp.controlColor }, text: { @@ -132,7 +152,7 @@ export default class Station extends Group { fontWeight: style.Station.text.fontWeight, fontSize: style.Station.text.fontSize, fontFamily: style.fontFamily, - text: '按图折返', + text: style.Station.turnBack.textName || '按图折返', textFill: '#fff', textAlign: 'middle', textVerticalAlign: 'top' @@ -141,7 +161,10 @@ export default class Station extends Group { }); this.turnBacks.push(turnBack); } - this.turnBacks.forEach(lamp => { this.add(lamp); }); + this.turnBacks.forEach(lamp => { + lamp.setArcBorder(style.Station.turnBack.showLampBorder); + this.add(lamp); + }); } } // 创建控制模式 diff --git a/src/jmapNew/shape/element/EControl.js b/src/jmapNew/shape/element/EControl.js index 423588802..60fbe7483 100644 --- a/src/jmapNew/shape/element/EControl.js +++ b/src/jmapNew/shape/element/EControl.js @@ -56,9 +56,14 @@ export default class EControl extends Group { zlevel: this.zlevel, z: this.z, silent: true, - shape: arcRect, + shape: { + x: arcRect.x - 2, + y: arcRect.y - 2, + width: arcRect.width + 4, + height: arcRect.height + 4 + }, style: { - lineDash: this.style.arcBorderStyle.lineDash, + lineDash: this.arcStyle.lineDash || this.style.arcBorderStyle.lineDash, stroke: this.style.arcBorderStyle.stroke, fill: this.style.arcBorderStyle.fill } diff --git a/src/store/modules/socket.js b/src/store/modules/socket.js index 3673c1088..0b1665009 100644 --- a/src/store/modules/socket.js +++ b/src/store/modules/socket.js @@ -232,6 +232,7 @@ const socket = { permissionOver: {}, // 权限结束 roomIsSubscribe:false, // 房间是否订阅 + assistantIsSubscribe:false, // 综合演练仿真聊天是否订阅 isInRoom:false, // 是否己经进入房间 tipOperateCount: 0, // 任务结束提示消息 @@ -294,6 +295,9 @@ const socket = { setRoomSubscribe:(state, roomIsSubscribe)=>{ state.roomIsSubscribe = roomIsSubscribe; }, + setAssistantSubscribe:(state, assistantIsSubscribe)=>{ + state.assistantIsSubscribe = assistantIsSubscribe; + }, setInRoom:(state, isInRoom)=>{ state.isInRoom = isInRoom; } @@ -361,6 +365,9 @@ const socket = { setRoomSubscribe:({ commit }, msg) => { commit('setRoomSubscribe', msg); }, + setAssistantSubscribe:({ commit }, msg) => { + commit('setAssistantSubscribe', msg); + }, setInRoom:({ commit }, msg) => { commit('setInRoom', msg); } diff --git a/src/utils/stomp.js b/src/utils/stomp.js index 2febbf668..b9bd37728 100644 --- a/src/utils/stomp.js +++ b/src/utils/stomp.js @@ -5,6 +5,7 @@ import store from '@/store/index_APP_TARGET'; export const displayTopic = '/user/queue/simulation'; // 其他仿真topic export const perpetualTopic = '/user/topic/message'; // 公用topic export const roomTopic = '/user/queue/room'; // 房间topic +export const assistant = '/user/topic/simulation/assistant';// 房间里仿真聊天topic // 建立连接并订阅地址 export function creatSubscribe(topic, header) { diff --git a/src/views/newMap/jointTrainingNew/chatBox.vue b/src/views/newMap/jointTrainingNew/chatBox.vue index ea530e5fa..5da69efa3 100644 --- a/src/views/newMap/jointTrainingNew/chatBox.vue +++ b/src/views/newMap/jointTrainingNew/chatBox.vue @@ -45,9 +45,11 @@