Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
d2eee7fca8
@ -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', // 字体颜色
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 创建控制模式
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -45,9 +45,11 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { creatSubscribe, clearSubscribe, assistant} from '@/utils/stomp';
|
||||
import ChatSetting from './chatSetting';
|
||||
import RecordRTC from 'recordrtc';
|
||||
import {getSimulationMembersNew, getSimulationConversationListNew, getSimulationConversationIdNew} from '@/api/chat';
|
||||
import {getSimulationMembersNew, getSimulationConversationListNew} from '@/api/chat';
|
||||
import ConstConfig from '@/scripts/ConstConfig';
|
||||
import Cookies from 'js-cookie';
|
||||
export default {
|
||||
@ -55,6 +57,12 @@ export default {
|
||||
components:{
|
||||
ChatSetting
|
||||
},
|
||||
props: {
|
||||
group: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
minimize:false,
|
||||
@ -70,11 +78,12 @@ export default {
|
||||
mounted() {
|
||||
this.initPage();
|
||||
},
|
||||
async beforeDestroy() {
|
||||
this.clearSubscribe();
|
||||
},
|
||||
methods:{
|
||||
initPage() {
|
||||
// getSimulationConversationIdNew({ memberId:'' }, this.$route.query.group).then(response=>{
|
||||
// debugger;
|
||||
// });
|
||||
async initPage() {
|
||||
await this.subscribe();
|
||||
getSimulationConversationListNew(this.$route.query.group).then(resp=>{
|
||||
debugger;
|
||||
});
|
||||
@ -82,6 +91,7 @@ export default {
|
||||
handleMinimality(data) {
|
||||
if (data == 'min') {
|
||||
this.minimize = true;
|
||||
this.$refs.chatSetting.doClose();
|
||||
} else {
|
||||
this.minimize = false;
|
||||
}
|
||||
@ -90,6 +100,7 @@ export default {
|
||||
startRecording() {
|
||||
const that = this;
|
||||
if (!this.recordSending && !this.recorders && !this.microphone) {
|
||||
this.$refs.chatSetting.doClose();
|
||||
navigator.getUserMedia(
|
||||
{ audio: true } // 只启用音频
|
||||
, function (stream) {
|
||||
@ -179,6 +190,7 @@ export default {
|
||||
this.$refs.chatSetting.doShow();
|
||||
},
|
||||
handleMembers() {
|
||||
this.$refs.chatSetting.doClose();
|
||||
if (this.showMembers) {
|
||||
this.showMembers = false;
|
||||
} else {
|
||||
@ -200,6 +212,18 @@ export default {
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
async subscribe() {
|
||||
if (!this.$store.state.socket.assistantIsSubscribe) {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(`${assistant}\/${this.group}`, header);
|
||||
await this.$store.dispatch('socket/setAssistantSubscribe', true);
|
||||
}
|
||||
},
|
||||
async clearSubscribe() {
|
||||
clearSubscribe(`${assistant}\/${this.group}`);
|
||||
await this.$store.dispatch('socket/setAssistantSubscribe', false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -55,6 +55,9 @@ export default {
|
||||
doShow() {
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
changeLanguage() {
|
||||
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user