This commit is contained in:
zyy 2020-05-14 16:44:11 +08:00
commit 42402f6223
12 changed files with 99 additions and 42 deletions

View File

@ -142,7 +142,7 @@ export function loadDraftScript(scriptId, memberId, group) {
/** 剧本预览选择角色 */
export function loadDraftScriptNew(memberId, group) {
return request({
url: `/simulation/${group}/${memberId}`,
url: `/simulation/${group}/choosePlay?memberId=${memberId}`,
method: 'put'
});
}

View File

@ -285,6 +285,14 @@ export function selectScriptMembers(group, data) {
});
}
/** 剧本开始执行(新版) */
export function scriptExecuteNew(group) {
return request({
url: `/api/scriptExecute/${group}`,
method: 'put'
});
}
/** 选择剧本演出成员角色 (新版地图)*/
export function selectScriptMembersNew(group, data) {
return request({

View File

@ -165,6 +165,7 @@ class SkinCode extends defaultStyle {
},
lamp: {
bgShow: false, // 是否被选中
logicColor: true, // cbtc通信是否影响灯颜色
guidName: 'singleRY', // 默认引导类型
borderVariable: true, // 信号灯边框可变
stopWidth: 2, // 禁止线宽度
@ -599,7 +600,7 @@ class SkinCode extends defaultStyle {
rectWidth: 20, // 折返模块宽度
lineWidth: 3, // 折返模块线宽
fillColor: 'rgba(0,0,0,0)', // 填充色
strokeColor: '#FFFFFF' // 线颜色
strokeColor: '#9F9C9C' // 线颜色
};
this[deviceType.ModeStatusGroup] = { // 车站状态模式
displayCondition: '01', // 显示条件 01所有模式下显示 02 行调显示 03现地显示

View File

@ -124,7 +124,6 @@ deviceState[deviceType.StationStand] = {
assignSkip: 0, // 是否指定跳停
runLevelTime: 0, // 区间运行时间 自动为 0
parkingTime: 0, // 站台停车时间 自动为0
doorOpen:0, // 车门开启 自动为0 (西安二号线样式 暂时后端没加该字段)
// /** 折返策略*/
// reentryStrategy: {

View File

@ -24,8 +24,7 @@ class Status {
assignSkip: device.assignSkip, // 是否指定跳停
runLevelTime: device.runLevelTime, // 区间运行时间 自动为 0
parkingTime: device.parkingTime, // 站台停车时间 自动为0
fault: device.fault, /** 非故障*/
doorOpen:device.doorOpen /** 车门开启 自动为0 (西安二号线样式 暂时后端没加该字段)*/
fault: device.fault /** 非故障*/
};
}
handleSection(device) {

View File

@ -314,39 +314,67 @@ class Signal extends Group {
}
// 关闭
close() {
if (this.count == 2) { // 双灯
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
} else if (this.count == 1) { // 单灯
if (this.model.useType == '05' && this.lamps[0]) { // 调车信号机
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
} else {
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
close(logicLight) {
if (this.style.Signal.lamp.logicColor && logicLight) {
// 逻辑点灯影响灯颜色仅西安二且暂无双灯
if (this.count == 1) {
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.redColor});
}
} else {
if (this.count == 2) { // 双灯
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.redColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
} else if (this.count == 1) { // 单灯
if (this.model.useType == '05' && this.lamps[0]) { // 调车信号机
this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
} else {
this.lamps[0].setColor(this.style.Signal.lamp.redColor);
}
}
}
}
/* 正向开放*/
openPositive() {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); // 设置黑色
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.greenColor);
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
this.sigPost.setColor('#00FF00');
if (this.model.logicLight) {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
openPositive(logicLight) {
if (this.style.Signal.lamp.logicColor && logicLight) {
// 逻辑点灯影响灯颜色仅西安二且暂无双灯
if (this.count == 1) {
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.greenColor});
}
} else {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor); // 设置黑色
this.virtualSignal && this.virtualSignal.setColor(this.style.Signal.lamp.greenColor);
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
this.sigPost.setColor('#00FF00');
if (this.model.logicLight) {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
}
}
}
}
/* 侧向开放 */
openLateral() {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
this.sigPost.setColor('#00FF00');
if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
openLateral(logicLight) {
if (this.style.Signal.lamp.logicColor && logicLight) {
if (this.count == 1) {
this.lamps[0].setColor(this.style.Signal.lamp.grayColor);
this.insideTriangle.show();
this.insideTriangle.setStyle({fill: this.style.Signal.lamp.yellowColor});
}
} else {
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.yellowColor);
this.lamps[1] && this.lamps[1].setColor(this.style.backgroundColor);
if (this.style.Signal.lamp.guidName === 'doubleAndBase') { // 设置底座颜色
this.sigPost.setColor('#00FF00');
if (this.model.logicLight) { // 设置哈尔滨逻辑点灯 颜色
this.lamps[0] && this.lamps[0].setColor(this.style.Signal.lamp.blueColor);
}
}
}
}
@ -528,13 +556,10 @@ class Signal extends Group {
/** 信号机封锁 */ // 缺一个功能封锁
model.blockade && this.block();
/** 设置灯的颜色 */
// model.redOpen = 1;
// model.yellowOpen = 1;
// model.greenOpen = 0;
model.redOpen && model.yellowOpen && !model.greenOpen && this.guid(); // 引导信号显示
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(); // 信号关闭
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(); // 信号正向开放
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(); // 信号侧向开放
model.redOpen && !model.yellowOpen && !model.greenOpen && this.close(model.logicLight); // 信号关闭
model.greenOpen && !model.redOpen && !model.yellowOpen && this.openPositive(model.logicLight); // 信号正向开放
model.yellowOpen && !model.redOpen && !model.greenOpen && this.openLateral(model.logicLight); // 信号侧向开放
/** 进路交人工控或自动控 */
!model.atsControl && this.setArtificialRouteClose();
// 联锁自动进路通过

View File

@ -382,6 +382,7 @@ class StationStand extends Group {
this.trainDepart && this.trainDepart.hideMode();
this.reentry && this.reentry.hideMode();
this.jump && this.jump.hideMode();
this.detainCircle && this.detainCircle.setColor(this.style.StationStand.detainCar.defaultColor);
}
/** 空闲*/
@ -492,7 +493,7 @@ class StationStand extends Group {
model.trainParking && this.stop(); /** 列车停站*/
model.emergencyClosed && this.emergentClose(); /** 站台紧急关闭*/
model.doorOpen && this.doorOpen(); /** 车门开启 (西安二号线样式)*/
model.trainParking && this.doorOpen(); /** 车门开启 (西安二号线样式)*/
if (Number(model.parkingTime) > 0) {
this.setManuallyArmisticeTime(model.parkingTime); // 设置站台停车时间

View File

@ -162,7 +162,7 @@ export default class Switch extends Group {
_subType: 'enabled', // 标识
style: {
x: arrowTextX,
y: arrowTextY,
y: arrowTextY + 10,
fontSize: 12,
text: 'E',
textAlign: 'center',

View File

@ -8,7 +8,7 @@
</div>
<div class="userBubble" @click="playAudio('audio'+index)">
<div class="userMessage">
<span v-if="chatContent.group||!chatContent.member.robot">@{{ covertName(chatContent.targetName) }}</span>
<span v-if="chatContent.group||!(chatContent.member && chatContent.member.robot)">@{{ covertName(chatContent.targetName) }}</span>
<span class="el-icon-video-play playicon" />
<span class="messageText">{{ chatContent.message }}</span>
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />

View File

@ -6,12 +6,13 @@
v-for="member in memberList"
:key="member.id"
:class="member.online?'each-chat-member':'each-chat-member each-chat-member-outline'"
@click="createConversition(member)"
>{{ member.memberName }}</div>
</div>
</div>
</template>
<script>
import {getSimulationMembersNew} from '@/api/chat';
import {getSimulationMembersNew, getSimulationConversationIdNew} from '@/api/chat';
import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie';
export default {
@ -32,6 +33,17 @@ export default {
this.getSimulationMembers();
},
methods:{
createConversition(member) {
if (member.userId != this.$store.state.user.id && member.online) {
getSimulationConversationIdNew({ memberId: member.id }, this.group).then(resp => {
if (resp.data) {
const data = resp.data;
this.$emit('addCoversition', {data:data, headerTitle:member.memberName});
this.showMembers = false;
}
});
}
},
setMemberStatus(memberInfo) {
this.getSimulationMembers();
// memberInfo.forEach(member=>{

View File

@ -52,7 +52,7 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import AddQuest from './demon/addQuest';
import { mapGetters } from 'vuex';
import { setGoodsTryUse } from '@/api/management/goods';
import { clearSimulation, getSimulationInfoNew } from '@/api/simulation';
import { clearSimulation, getSimulationInfoNew, scriptExecuteNew } from '@/api/simulation';
import { OperateMode, TrainingMode } from '@/scripts/ConstDic';
import { checkLoginLine } from '@/api/login';
import { loadNewMapDataByGroup } from '@/utils/loaddata';
@ -145,6 +145,10 @@ export default {
},
isDemon() {
return this.mode === 'demon';
},
drawWay() {
const drawWay = this.$route.query.drawWay;
return drawWay && JSON.parse(drawWay);
}
// isDrive() {
// return this.prdType == '04';
@ -343,13 +347,19 @@ export default {
}
}
this.switchMode(prdType);
const res = this.$route.query.drawWay ? await loadDraftScriptNew(id, this.group) : await loadDraftScript(row.id, id, this.group);
const res = this.drawWay ? await loadDraftScriptNew(id, this.group) : await loadDraftScript(row.id, id, this.group);
if (res && res.code == 200) {
this.questId = parseInt(row.id);
if (mapLocation) {
const newMapLocation = {'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
Vue.prototype.$jlmap.setOptions(newMapLocation);
}
if (this.drawWay) {
scriptExecuteNew(this.group).then(data=>{
}).catch(error=>{
console.log(error);
});
}
// if (res.data && res.data.mapLocation) {
// const mapLocation={'offsetX': res.data.mapLocation.x, 'offsetY': res.data.mapLocation.y, 'scaleRate': res.data.mapLocation.scale};
// Vue.prototype.$jlmap.setOptions(mapLocation);

View File

@ -147,7 +147,9 @@ export default {
this.mapViewLoaded(true);
},
'$store.state.training.prdType': function (val) {
this.changePrdType(val);
if (val) {
this.changePrdType(val);
}
},
'$store.state.map.showCentralizedStationNum': function (val) {
this.setShowStation(this.$store.state.map.showCentralizedStationCode);