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) { export function loadDraftScriptNew(memberId, group) {
return request({ return request({
url: `/simulation/${group}/${memberId}`, url: `/simulation/${group}/choosePlay?memberId=${memberId}`,
method: 'put' 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) { export function selectScriptMembersNew(group, data) {
return request({ return request({

View File

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

View File

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

View File

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

View File

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

View File

@ -382,6 +382,7 @@ class StationStand extends Group {
this.trainDepart && this.trainDepart.hideMode(); this.trainDepart && this.trainDepart.hideMode();
this.reentry && this.reentry.hideMode(); this.reentry && this.reentry.hideMode();
this.jump && this.jump.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.trainParking && this.stop(); /** 列车停站*/
model.emergencyClosed && this.emergentClose(); /** 站台紧急关闭*/ model.emergencyClosed && this.emergentClose(); /** 站台紧急关闭*/
model.doorOpen && this.doorOpen(); /** 车门开启 (西安二号线样式)*/ model.trainParking && this.doorOpen(); /** 车门开启 (西安二号线样式)*/
if (Number(model.parkingTime) > 0) { if (Number(model.parkingTime) > 0) {
this.setManuallyArmisticeTime(model.parkingTime); // 设置站台停车时间 this.setManuallyArmisticeTime(model.parkingTime); // 设置站台停车时间

View File

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

View File

@ -8,7 +8,7 @@
</div> </div>
<div class="userBubble" @click="playAudio('audio'+index)"> <div class="userBubble" @click="playAudio('audio'+index)">
<div class="userMessage"> <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="el-icon-video-play playicon" />
<span class="messageText">{{ chatContent.message }}</span> <span class="messageText">{{ chatContent.message }}</span>
<audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" /> <audio :id="'audio'+index" :src="baseUrl+chatContent.src" style="display:none" />

View File

@ -6,12 +6,13 @@
v-for="member in memberList" v-for="member in memberList"
:key="member.id" :key="member.id"
:class="member.online?'each-chat-member':'each-chat-member each-chat-member-outline'" :class="member.online?'each-chat-member':'each-chat-member each-chat-member-outline'"
@click="createConversition(member)"
>{{ member.memberName }}</div> >{{ member.memberName }}</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import {getSimulationMembersNew} from '@/api/chat'; import {getSimulationMembersNew, getSimulationConversationIdNew} from '@/api/chat';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
import Cookies from 'js-cookie'; import Cookies from 'js-cookie';
export default { export default {
@ -32,6 +33,17 @@ export default {
this.getSimulationMembers(); this.getSimulationMembers();
}, },
methods:{ 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) { setMemberStatus(memberInfo) {
this.getSimulationMembers(); this.getSimulationMembers();
// memberInfo.forEach(member=>{ // memberInfo.forEach(member=>{

View File

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

View File

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