This commit is contained in:
sunzhenyu 2020-11-06 18:28:39 +08:00
commit 3a76731646
71 changed files with 1095 additions and 278 deletions

View File

@ -53,3 +53,11 @@ export function overConversationMessage(group, conversationMessageId) {
method: 'put' method: 'put'
}); });
} }
/** 发送会话文字 */
export function sendConversationText (group, id, data) {
return request({
url: `/api/simulation/${group}/conversation/${id}/chat/text?`,
method: 'post',
data
});
}

View File

@ -139,9 +139,9 @@ export function previewRunPlan(planId) {
} }
/** 剧本预览选择角色 */ /** 剧本预览选择角色 */
export function loadDraftScriptNew(memberId, group) { export function loadDraftScriptNew(memberId, group, mode) {
return request({ return request({
url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}`, url: `/api/scriptSimulation/${group}/chooseMemberAndStart?memberId=${memberId}&mode=${mode}`,
method: 'put' method: 'put'
}); });
} }

View File

@ -126,3 +126,11 @@ export function deleteScriptAction(group, actionId) {
method: 'delete' method: 'delete'
}); });
} }
/** 修改剧本活动条件 */
export function updateActionCondition(group, actionId, data) {
return request({
url: `/api/scriptSimulation/${group}/${actionId}/updateCondition`,
method: 'put',
data
});
}

View File

@ -147,6 +147,30 @@ export function modifyScriptActionNew(group, data) {
}); });
} }
/** 开始替换 */
export function startReplaceBg(group) {
return request({
url: `/api/scriptSimulation/${group}/replace/start`,
method: 'put'
});
}
/** 确认替换 */
export function confirmReplaceBg(group) {
return request({
url: `/api/scriptSimulation/${group}/replace/confirm`,
method: 'put'
});
}
/** 放弃替换 */
export function cancelReplaceBg(group) {
return request({
url: `/api/scriptSimulation/${group}/replace/cancel`,
method: 'put'
});
}
/** 分页查询存在的仿真 */ /** 分页查询存在的仿真 */
export function getExistingSimulation(params) { export function getExistingSimulation(params) {
return request({ return request({

View File

@ -15,7 +15,7 @@
@disableQuery="disableQuery" @disableQuery="disableQuery"
@enableQuery="enableQuery" @enableQuery="enableQuery"
/> />
<el-card v-loading="loading"> <el-card v-loading="loading" :style="{padding: cardPadding+'px'}">
<el-table <el-table
ref="table2" ref="table2"
highlight-current-row highlight-current-row
@ -211,7 +211,11 @@ export default {
queryList: { queryList: {
type: Object, type: Object,
required: true required: true
} },
cardPadding: {
type: Number,
default: 0
}
}, },
data() { data() {
return { return {

View File

@ -28,8 +28,6 @@ export default {
const l = e.clientX - disX; const l = e.clientX - disX;
const t = e.clientY - disY; const t = e.clientY - disY;
console.log(l, l + styL, dragDom.style.left);
/** 移动当前元素*/ /** 移动当前元素*/
if (l + styL < 0) { if (l + styL < 0) {
dragDom.style.left = `0px`; dragDom.style.left = `0px`;

View File

@ -109,5 +109,10 @@ export default {
revokeScriptTip: 'This action will undo release script, whether to continue?', revokeScriptTip: 'This action will undo release script, whether to continue?',
inputScriptName: 'Please input script name', inputScriptName: 'Please input script name',
selectMap: 'Please select map', selectMap: 'Please select map',
inputScriptDescription: 'Please input script description' inputScriptDescription: 'Please input script description',
startReplaceBg: '替换背景',
confirmReplaceBg: '确认替换',
cancelReplaceBg: '放弃替换'
}; };

View File

@ -110,5 +110,9 @@ export default {
revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?', revokeScriptTip: '此操作将撤销发布剧本申请, 是否继续?',
inputScriptName: '请输入剧本名称', inputScriptName: '请输入剧本名称',
selectMap: '请选择地图', selectMap: '请选择地图',
inputScriptDescription: '请输入剧本描述' inputScriptDescription: '请输入剧本描述',
startReplaceBg: '替换背景',
confirmReplaceBg: '确认替换',
cancelReplaceBg: '放弃替换'
}; };

View File

@ -21,7 +21,7 @@ export default class rect extends Group {
create() { create() {
let rect = null; let rect = null;
for (const key in this.model.elemMap) { for (const key in this.model.elemMap) {
if (Vue.prototype.$iscs.iscsDevice[key].instance) { if (Vue.prototype.$iscs.iscsDevice[key] && Vue.prototype.$iscs.iscsDevice[key].instance) {
if (!rect) { if (!rect) {
rect = Vue.prototype.$iscs.iscsDevice[key].instance.getBoundingRect(); rect = Vue.prototype.$iscs.iscsDevice[key].instance.getBoundingRect();
} else { } else {

View File

@ -66,7 +66,7 @@ export default class text extends Group {
this.model.point.y += dy; this.model.point.y += dy;
} }
setState(model) { setState(model) {
this.textName.setStyle('text', model.context); model.context && this.textName.setStyle('text', model.context);
model.gbColor && this.textName.setStyle('textBackgroundColor', model.gbColor); model.gbColor && this.textName.setStyle('textBackgroundColor', model.gbColor);
} }
setSize(width, height) { setSize(width, height) {

View File

@ -659,7 +659,7 @@ class SkinCode extends defaultStyle {
], // 特殊列车类型需设置显示格式 ], // 特殊列车类型需设置显示格式
lrPadding: 4, // 两边间隔 lrPadding: 4, // 两边间隔
upPadding: 4, // 上边距离 upPadding: 4, // 上边距离
trainBodyFillColor: 'rgba(0,0,0,0)', // 列车车身填充颜色 trainBodyFillColor: '#000', // 列车车身填充颜色
trainNameFormat: 'serviceNumber:tripNumber', // 列车显示格式 trainNameFormat: 'serviceNumber:tripNumber', // 列车显示格式
trainSidelineColor:'#A5A5A5' // 列车边框颜色 trainSidelineColor:'#A5A5A5' // 列车边框颜色
}, },

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -113,7 +113,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
// pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -211,8 +215,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,5 +1,5 @@
import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -113,7 +113,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
// pointdata.directionCode = train.directionCode;
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -211,8 +215,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPointReverse({ serie.markPoint.data.push(createMartPointReverse({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -91,7 +91,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; // pointdata.directionCode = train.directionCode;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -186,8 +190,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,5 +1,5 @@
import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; import { createMartPointReverse, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -110,7 +110,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; // pointdata.directionCode = train.directionCode;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -203,8 +207,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPointReverse({ serie.markPoint.data.push(createMartPointReverse({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 3, EdgeHeight: 3,
@ -297,7 +297,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; // pointdata.directionCode = train.directionCode;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -388,8 +392,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -126,7 +126,8 @@ export default {
this.canCommand = true; this.canCommand = true;
const step = { const step = {
operation: 'click', operation: 'click',
code: this.selectedObj.code code: this.selectedObj.code,
subType:this.$store.state.menuOperation.subType
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { if (valid) {

View File

@ -877,7 +877,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
// { deviceType: '04', orderNum: 1, tip: '鼠标左键点击选择该站台' }, // { deviceType: '04', orderNum: 1, tip: '鼠标左键点击选择该站台' },
{ deviceType: 'trainSetButton', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', codeType:'STAND'}, { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', subType:'trainSetButton'},
{ deviceType: '04', orderNum: 2, operateCode: '5041', tip: '鼠标左键点击【扣车】按钮' }, { deviceType: '04', orderNum: 2, operateCode: '5041', tip: '鼠标左键点击【扣车】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' } { deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' }
] ]
@ -893,7 +893,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
// { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, // { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' },
{ deviceType: 'trainSetButton', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', codeType:'STAND'}, { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', subType:'trainSetButton'},
{ deviceType: '04', orderNum: 2, operateCode: '5052', tip: '鼠标左键点击【取消扣车】按钮' }, { deviceType: '04', orderNum: 2, operateCode: '5052', tip: '鼠标左键点击【取消扣车】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' } { deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' }
] ]
@ -909,7 +909,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
// { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, // { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' },
{ deviceType: 'trainSetButton', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', codeType:'STAND'}, { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', subType:'trainSetButton'},
{ deviceType: '04', orderNum: 2, operateCode: '5025', tip: '鼠标左键点击【越站】按钮' }, { deviceType: '04', orderNum: 2, operateCode: '5025', tip: '鼠标左键点击【越站】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' } { deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' }
] ]
@ -925,7 +925,7 @@ export default {
productTypes: ['02'], productTypes: ['02'],
stepVOList: [ stepVOList: [
// { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' }, // { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台' },
{ deviceType: 'trainSetButton', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', codeType:'STAND'}, { deviceType: '04', orderNum: 1, operateCode: 'click', tip: '鼠标左键点击选择该站台', subType:'trainSetButton'},
{ deviceType: '04', orderNum: 2, operateCode: '5035', tip: '鼠标左键点击【取消越站】按钮' }, { deviceType: '04', orderNum: 2, operateCode: '5035', tip: '鼠标左键点击【取消越站】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' } { deviceType: '04', orderNum: 3, operateCode: '008', tip: '鼠标左键点击【执行】按钮' }
] ]

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, prefixTime, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 3, EdgeHeight: 3,
@ -178,7 +178,10 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[0].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[0], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -271,8 +274,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -137,7 +137,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`; // pointdata.name = `${service.serviceNumber}${train.tripNumber}${train.destinationCode || ''}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; // pointdata.directionCode = train.directionCode;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -230,8 +234,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -118,6 +118,11 @@ export default {
}); });
}, },
doClose() { doClose() {
this.addModel = {
groupNumber: '',
destinationCode: '',
tripNumber: ''
};
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');

View File

@ -129,6 +129,11 @@ export default {
}); });
}, },
doClose() { doClose() {
this.addModel = {
groupNumber: '',
tripNumber: '',
serviceNumber: ''
};
this.loading = false; this.loading = false;
this.dialogShow = false; this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh'); this.$store.dispatch('training/emitTipFresh');

View File

@ -67,9 +67,9 @@ export default {
stationName:'', stationName:'',
message:'', message:'',
controlProps: { controlProps: {
'03': '紧急站控', '03': '请求紧急站控',
'02': '站控', '02': '请求站控',
'01': '控' '01': '请求中控'
} }
}; };
}, },
@ -262,7 +262,7 @@ export default {
} }
}; };
</script> </script>
<style scoped rel="stylesheet/scss" lang="scss" scoped> <style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
/deep/ .el-radio { /deep/ .el-radio {

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -114,6 +114,9 @@ export default {
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.right ? '2' : '1'; pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.right, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.right, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -211,8 +214,13 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
// console.log(elem.right, 'elem.right');
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.right ? '2' : '1', directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,5 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList, prefixTime } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600,
@ -123,7 +123,11 @@ export default {
// pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`; // pointdata.name = `${service.serviceNumber}${train.directionCode}${train.tripNumber}`;
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; // pointdata.directionCode = train.directionCode;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -221,8 +225,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -1,4 +1,5 @@
import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan'; import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, convertSheetToList } from '@/utils/runPlan';
import store from '@/store/index_APP_TARGET';
const StationMap = { const StationMap = {
YARD1: '潏河停车场', YARD1: '潏河停车场',
YARD2: '潏河停车场', YARD2: '潏河停车场',
@ -176,7 +177,11 @@ export default {
/** 创建标记点名称和坐标*/ /** 创建标记点名称和坐标*/
pointdata.name = `${service.serviceNumber}${train.tripNumber}`; pointdata.name = `${service.serviceNumber}${train.tripNumber}`;
pointdata.color = '#000' || lineStyle.color; pointdata.color = '#000' || lineStyle.color;
pointdata.directionCode = train.directionCode; // pointdata.directionCode = train.directionCode;
pointdata.directionCode = train.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
pointdata.directionCode = train.right ? '1' : '2';
}
pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)]; pointdata.coord = [train.stationTimeList[1].secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, train.stationTimeList[1], train.directionCode, false)];
/** 给服务对象添加服务名称和标记点*/ /** 给服务对象添加服务名称和标记点*/
@ -275,8 +280,12 @@ export default {
if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) { if (runPlanData[elem.serviceNumber][elem.tripNumber].length <= 1) {
const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`); const result = serie.markPoint.data.some(ele => ele.name == `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`);
if (!result) { if (!result) {
let directionCode = elem.right ? '2' : '1';
if (!store.state.map.mapConfig.upRight) {
directionCode = elem.right ? '1' : '2';
}
serie.markPoint.data.push(createMartPoint({ serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode, directionCode: directionCode,
coord: [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)], coord: [parseInt(time), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`, name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000' color: lineStyle.color || '#000'

View File

@ -38,7 +38,8 @@ export const deviceFaultType = {
Switch: [ Switch: [
{label: '失表', value: 'SPLIT'}, {label: '失表', value: 'SPLIT'},
{label: '定位失表', value: 'NORMAL_SPLIT'}, {label: '定位失表', value: 'NORMAL_SPLIT'},
{label: '反位失表', value: 'REVERSE_SPLIT'} {label: '反位失表', value: 'REVERSE_SPLIT'},
{label: '道岔区段计轴故障', value: 'AXLE_FAULT'}
], ],
StationStand: [ StationStand: [
{label: '屏蔽门无法关闭', value: 'PSD_CANNOT_BE_CLOSED'}, {label: '屏蔽门无法关闭', value: 'PSD_CANNOT_BE_CLOSED'},

View File

@ -57,7 +57,8 @@ class ValidateHandler {
if (operate && standard && if (operate && standard &&
operate.code == standard.code && operate.code == standard.code &&
operate.operation == standard.operation && operate.operation == standard.operation &&
operate.val == standard.val) { operate.val == standard.val &&
(!standard.subType || standard.subType && operate.subType == standard.subType) ) {
valid = true; valid = true;
} }
} }

View File

@ -141,6 +141,13 @@ function handle(state, data) {
case 'Simulation_Alarm': case 'Simulation_Alarm':
state.simulationAlarmInfo = msg; state.simulationAlarmInfo = msg;
break; break;
case 'Simulation_Scenes_Reload':
if (msg) {
store.dispatch('training/start');
} else {
store.dispatch('training/over');
}
break;
} }
} }

View File

@ -44,7 +44,8 @@ const training = {
scriptOperationType: '', // 剧本操作类型 scriptOperationType: '', // 剧本操作类型
triggerFaultCount: 0, // 触发故障计数器 triggerFaultCount: 0, // 触发故障计数器
triggerFaultDevice: '', // 触发故障目标设备 triggerFaultDevice: '', // 触发故障目标设备
trainingStart: false // 实训开始状态 trainingStart: false, // 实训开始状态
notifySelected: null // 场景弹窗内容
}, },
getters: { getters: {
@ -283,6 +284,9 @@ const training = {
}, },
setTrainingStart: (state, flag) => { setTrainingStart: (state, flag) => {
state.trainingStart = flag; state.trainingStart = flag;
},
setNotifySelected: (state, data) => {
state.notifySelected = data;
} }
}, },

View File

@ -5,7 +5,7 @@ export function getBaseUrl() {
BASE_API = 'https://test.joylink.club/jlcloud'; BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 // BASE_API = 'http://192.168.8.114:9000'; // 旭强
// BASE_API = 'http://192.168.3.175:9000'; // 张赛 // BASE_API = 'http://192.168.8.109:9000'; // 张赛
// BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://192.168.8.110:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -152,7 +152,7 @@ export default {
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
const el = document.createElement('a'); const el = document.createElement('a');
el.href = url; el.href = url;
el.download = `${resultData.name}.json`; el.download = `场景-${resultData.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); urlObject.revokeObjectURL(url);
}); });

View File

@ -2,7 +2,7 @@
<el-dialog :title="title" :visible.sync="dialogVisible" :before-close="doClose" top="50px" center custom-class="sceneModifyOut" fullscreen> <el-dialog :title="title" :visible.sync="dialogVisible" :before-close="doClose" top="50px" center custom-class="sceneModifyOut" fullscreen>
<el-form ref="form" :model="formModel" label-width="120px" class="sceneModify" @submit.native.prevent> <el-form ref="form" :model="formModel" label-width="120px" class="sceneModify" @submit.native.prevent>
<!-- :rules="rules" --> <!-- :rules="rules" -->
<el-table :data="actionList" border style="width:1250px;margin: 0 auto;" height="500" :span-method="objectSpanMethod"> <el-table :data="actionList" border style="width:1320px;margin: 0 auto;" height="500" :span-method="objectSpanMethod">
<el-table-column label="步骤名称" width="100"> <el-table-column label="步骤名称" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="stepVOs[scope.row.id]"> <div v-if="stepVOs[scope.row.id]">
@ -10,6 +10,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="动作id" width="70" prop="id" />
<el-table-column label="动作内容" width="350"> <el-table-column label="动作内容" width="350">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- v-model="scope.row.id" --> <!-- v-model="scope.row.id" -->
@ -19,7 +20,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="语音识别关键词列表" width="350"> <el-table-column label="语音识别关键词列表" width="350">
<template slot-scope="scope"> <template v-if="scope.row.type=='Conversation'&&scope.row.memberId=='1'" slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].keyWords"> <div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].keyWords">
<el-tag v-for="(tag,index) in commandEvaluationRuleVOs[scope.row.id].keyWords" :key="index" closable :disable-transitions="false" @close="handleClose(scope.row.id,index)">{{ tag }}</el-tag> <el-tag v-for="(tag,index) in commandEvaluationRuleVOs[scope.row.id].keyWords" :key="index" closable :disable-transitions="false" @close="handleClose(scope.row.id,index)">{{ tag }}</el-tag>
<el-input <el-input
@ -39,7 +40,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="总分值" width="149"> <el-table-column label="总分值" width="149">
<template slot-scope="scope"> <template v-if="scope.row.memberId=='1'&&(scope.row.type=='Conversation'||scope.row.type=='Operation')" slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].score!=undefined"> <div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].score!=undefined">
<el-input-number <el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].scoreVisible" v-if="commandEvaluationRuleVOs[scope.row.id].scoreVisible"
@ -62,7 +63,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="超时时间" width="150"> <el-table-column label="超时时间" width="150">
<template slot-scope="scope"> <template v-if="scope.row.type=='Conversation'&&scope.row.memberId=='1'" slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].timeOut!=undefined"> <div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].timeOut!=undefined">
<el-input-number <el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].timeOutVisible" v-if="commandEvaluationRuleVOs[scope.row.id].timeOutVisible"
@ -85,7 +86,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="扣除分值" width="150"> <el-table-column label="扣除分值" width="150">
<template slot-scope="scope"> <template v-if="scope.row.type=='Conversation'&&scope.row.memberId=='1'" slot-scope="scope">
<div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].deductScore!=undefined"> <div v-if="commandEvaluationRuleVOs[scope.row.id]&&commandEvaluationRuleVOs[scope.row.id].deductScore!=undefined">
<el-input-number <el-input-number
v-if="commandEvaluationRuleVOs[scope.row.id].deductScoreVisible" v-if="commandEvaluationRuleVOs[scope.row.id].deductScoreVisible"
@ -501,6 +502,20 @@ export default {
commandEvaluationRuleVOs = commandEvaluationRuleVOs.filter(eachData=>{ commandEvaluationRuleVOs = commandEvaluationRuleVOs.filter(eachData=>{
return (eachData.keyWords && eachData.keyWords.length > 0) || eachData.timeOut || eachData.score || eachData.deductScore; return (eachData.keyWords && eachData.keyWords.length > 0) || eachData.timeOut || eachData.score || eachData.deductScore;
}); });
let count = 0;
let errorMessage = '';
commandEvaluationRuleVOs.forEach((RuleVO, index)=>{
if (RuleVO.keyWords) {
if (!(RuleVO.keyWords.length > 0 && RuleVO.timeOut && RuleVO.score && RuleVO.deductScore)) {
errorMessage += '动作id为' + RuleVO.actionId + '的表单没有填写完整, ';
count++;
}
}
});
if (count > 0) {
this.$messageBox(errorMessage);
return false;
}
if (stepVOs.length > 0) { if (stepVOs.length > 0) {
stepVOs.sort(this.objectSort('startActionId')); stepVOs.sort(this.objectSort('startActionId'));
stepVOs.map((step, index)=>{ stepVOs.map((step, index)=>{
@ -664,7 +679,7 @@ export default {
margin-bottom:10px; margin-bottom:10px;
} }
.operateStatistic{ .operateStatistic{
width: 1250px; width: 1320px;
margin: 15px auto; margin: 15px auto;
border: 1px #EBEEF5 solid; border: 1px #EBEEF5 solid;
} }

View File

@ -5,7 +5,7 @@
<el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button> <el-button size="small" type="primary" class="createScript" style="margin-top: 5px" @click="handleCreate">{{ $t('scriptRecord.scriptCreate') }}</el-button>
<el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button> <el-button size="small" type="primary" class="createScript" @click="createByPublish">发布数据创建</el-button>
</div> </div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :cardPadding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" /> <create-ibp ref="createScript" :title="'创建数据'" @reloadTable="reloadTable" />
<create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" /> <create-ibp ref="modifyScript" :title="'修改数据'" @reloadTable="reloadTable" />
<copy-ibp ref="copyIbp" @reloadTable="reloadTable" /> <copy-ibp ref="copyIbp" @reloadTable="reloadTable" />

View File

@ -1,11 +1,11 @@
<template> <template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;"> <div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 100%;padding: 10px 50px;"> <el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 100%;padding: 10px 50px;">
<!-- <el-form-item label="code:" prop="code"> <el-form-item label="code:" prop="code">
<el-select v-model="form.code"> <el-select v-model="form.code">
<el-option v-for="(item, index) in iscs.iscsTextList" :key="index" :label="item.code" :value="item.code" /> <el-option v-for="(item, index) in iscs.iscsTextList" :key="index" :label="item.code" :value="item.code" disabled />
</el-select> </el-select>
</el-form-item> --> </el-form-item>
<el-form-item label="文字内容:" prop="context"> <el-form-item label="文字内容:" prop="context">
<el-input v-model="form.context" type="textarea" size="small" /> <el-input v-model="form.context" type="textarea" size="small" />
</el-form-item> </el-form-item>

View File

@ -173,6 +173,17 @@ export default {
device.instance.setState(el); device.instance.setState(el);
} }
}); });
if (model.code == 'group_34' || model.code == 'group_22') {
const judge = !(this.$iscs.iscsDevice['group_34'].model['valve'] || this.$iscs.iscsDevice['group_22'].model['valve']);
['IscsText_112', 'IscsText_113', 'IscsText_114', 'IscsText_116', 'IscsText_117', 'IscsText_118', 'IscsText_119', 'IscsText_120'].forEach(code => {
const device = this.$iscs.iscsDevice[code];
if (device && device.instance) {
device.instance.setState({
gbColor: judge ? '#2aff00' : '#ff0000'
});
}
});
}
} }
} }
}; };

View File

@ -144,7 +144,7 @@ export default {
let models = {}; let models = {};
// valve true 绿 false // valve true 绿 false
if (model.code == 'group_2' || model.code == 'group_52') { if (model.code == 'group_2' || model.code == 'group_52') {
models = this.$iscs.iscsDevice['group_23'].model; models = this.$iscs.iscsDevice['group_54'].model;
models['valve'] = false; models['valve'] = false;
} else if (model.code == 'group_3' || model.code == 'group_16') { } else if (model.code == 'group_3' || model.code == 'group_16') {
models = this.$iscs.iscsDevice['group_15'].model; models = this.$iscs.iscsDevice['group_15'].model;
@ -213,6 +213,17 @@ export default {
this.$store.dispatch('iscs/setAddAlarmList', params); this.$store.dispatch('iscs/setAddAlarmList', params);
this.$store.dispatch('iscs/setAddIncidentList', params); this.$store.dispatch('iscs/setAddIncidentList', params);
} }
if (model.code == 'group_34' || model.code == 'group_22') {
const judge = !(this.$iscs.iscsDevice['group_34'].model['valve'] || this.$iscs.iscsDevice['group_22'].model['valve']);
['IscsText_112', 'IscsText_113', 'IscsText_114', 'IscsText_116', 'IscsText_117', 'IscsText_118', 'IscsText_119', 'IscsText_120'].forEach(code => {
const device = this.$iscs.iscsDevice[code];
if (device && device.instance) {
device.instance.setState({
gbColor: judge ? '#2aff00' : '#ff0000'
});
}
});
}
}, },
filterTime() { filterTime() {
const date = new Date(); const date = new Date();

View File

@ -188,7 +188,7 @@ export default {
let model = {}; let model = {};
// valve true 绿 false // valve true 绿 false
if (this.model.code == 'group_2' || this.model.code == 'group_52') { if (this.model.code == 'group_2' || this.model.code == 'group_52') {
model = this.$iscs.iscsDevice['group_23'].model; model = this.$iscs.iscsDevice['group_54'].model;
model['valve'] = !(this.$iscs.iscsDevice['group_2'].model['valve'] || this.$iscs.iscsDevice['group_52'].model['valve']); model['valve'] = !(this.$iscs.iscsDevice['group_2'].model['valve'] || this.$iscs.iscsDevice['group_52'].model['valve']);
} else if (this.model.code == 'group_3' || this.model.code == 'group_16') { } else if (this.model.code == 'group_3' || this.model.code == 'group_16') {
model = this.$iscs.iscsDevice['group_15'].model; model = this.$iscs.iscsDevice['group_15'].model;
@ -281,6 +281,17 @@ export default {
arrList.push(item); arrList.push(item);
}); });
this.$store.commit('iscs/setFaultList', arrList); this.$store.commit('iscs/setFaultList', arrList);
if (model.code == 'group_34' || model.code == 'group_22') {
const judge = !(this.$iscs.iscsDevice['group_34'].model['valve'] || this.$iscs.iscsDevice['group_22'].model['valve']);
['IscsText_112', 'IscsText_113', 'IscsText_114', 'IscsText_116', 'IscsText_117', 'IscsText_118', 'IscsText_119', 'IscsText_120'].forEach(code => {
const device = this.$iscs.iscsDevice[code];
if (device && device.instance) {
device.instance.setState({
gbColor: judge ? '#2aff00' : '#ff0000'
});
}
});
}
}, },
doClose() { doClose() {
this.dialogShow = false; this.dialogShow = false;

View File

@ -9,7 +9,7 @@
<el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button> <el-button size="mini" type="primary" @click="lessonCreate">{{ $t('lesson.newConstruction') }}</el-button>
</div> </div>
</div> </div>
<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :cardPadding="50" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<publish-create ref="publishCreate" @refresh="refresh" /> <publish-create ref="publishCreate" @refresh="refresh" />
<publish-lesson ref="publishLesson" @refresh="refresh" /> <publish-lesson ref="publishLesson" @refresh="refresh" />
<lesson-detail ref="lessonDetail" /> <lesson-detail ref="lessonDetail" />

View File

@ -88,6 +88,8 @@
</el-button> </el-button>
</div> </div>
<div v-else> <div v-else>
<el-input v-if="isRecord" v-model="textContent" size="small" placeholder="请输入会话文字点击T发送" style="width: 340px;margin-top: 10px;margin-left: 6px;" :rows="1" />
<el-button v-if="isRecord" size="mini" class="chat-box-footer-create" style="right: 105px" :disabled="contentSend" @click="sendText">T</el-button>
<el-button v-if="isButtonShow && !commonConversation" size="mini" type="danger" class="chat-box-footer-create chat-box-footer-quit" :disabled="audioPlay" :loading="quitLoading" @click="quitConversition()"> <el-button v-if="isButtonShow && !commonConversation" size="mini" type="danger" class="chat-box-footer-create chat-box-footer-quit" :disabled="audioPlay" :loading="quitLoading" @click="quitConversition()">
<i class="el-icon-phone" /> <i class="el-icon-phone" />
</el-button> </el-button>
@ -138,6 +140,7 @@
<chat-member-list ref="chatMemberList" :conversition-member-list="conversitionMemberList" :simulation-users="simulationUsers" /> <chat-member-list ref="chatMemberList" :conversition-member-list="conversitionMemberList" :simulation-users="simulationUsers" />
</div> </div>
</template> </template>
<div v-if="maskShow&&drawer" class="mask" />
</div> </div>
<audio id="teleRing" :src="teleRing" preload loop /> <audio id="teleRing" :src="teleRing" preload loop />
<chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" /> <chat-setting ref="chatSetting" :form="form" @setSetting="setSetting" />
@ -149,7 +152,7 @@ import ChatSetting from './chatSetting';
import ChatContent from './chatContent'; import ChatContent from './chatContent';
import ChatMemberList from './chatMemberList'; import ChatMemberList from './chatMemberList';
import RecordRTC from 'recordrtc'; import RecordRTC from 'recordrtc';
import {sendSimulationConversition, startConversition, overSimulationConversition, getAllConversition, acceptConversitionInvite} from '@/api/chat'; import {sendSimulationConversition, startConversition, overSimulationConversition, getAllConversition, acceptConversitionInvite, sendConversationText} from '@/api/chat';
import { getSessionStorage } from '@/utils/auth'; import { getSessionStorage } from '@/utils/auth';
export default { export default {
name: 'ChatBox', name: 'ChatBox',
@ -166,6 +169,10 @@ export default {
userRole: { userRole: {
type: String, type: String,
required: true required: true
},
isReplaceBg: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@ -205,24 +212,30 @@ export default {
commonMessageList: [], commonMessageList: [],
conversitionStateMap:{}, conversitionStateMap:{},
myMemberId: '', myMemberId: '',
audioPlay:false audioPlay:false,
textContent: ''
}; };
}, },
computed:{ computed:{
isButtonShow() { isButtonShow() {
return this.userRole != 'AUDIENCE'; return this.userRole != 'AUDIENCE';
}, },
contentSend() {
return !this.textContent;
},
project() { project() {
return getSessionStorage('project'); return getSessionStorage('project');
}, },
IsAnswering() { IsAnswering() {
return !(this.$route.path.includes('refereeJsxtDisplay')); return !(this.$route.path.includes('refereeJsxtDisplay'));
}, },
maskShow() {
return this.isReplaceBg;
},
userId() { userId() {
return this.$store.state.user.id; return this.$store.state.user.id;
}, },
conversitionId() { conversitionId() {
// console.log(this.conversitionStateMap, this.myMemberId, this.conversitionStateMap[this.myMemberId], (this.conversitionStateMap[this.myMemberId] || {conversitionId:''}));
return (this.conversitionStateMap[this.myMemberId] || {conversitionId:''}).conversitionId; return (this.conversitionStateMap[this.myMemberId] || {conversitionId:''}).conversitionId;
}, },
connect() { connect() {
@ -233,6 +246,9 @@ export default {
}, },
privateMessageList() { privateMessageList() {
return (this.conversitionStateMap[this.myMemberId] || {privateMessageList: []}).privateMessageList; return (this.conversitionStateMap[this.myMemberId] || {privateMessageList: []}).privateMessageList;
},
isRecord() {
return !!this.$route.query.record;
} }
}, },
watch:{ watch:{
@ -310,9 +326,6 @@ export default {
if (activeTrainList.length <= 0) { if (activeTrainList.length <= 0) {
this.resetCoversition(); this.resetCoversition();
} }
// if (this.$refs.tree) {
// this.$refs.tree.filter(this.queryMember);
// }
}, },
'$store.state.training.simulationUserList': { '$store.state.training.simulationUserList': {
handler(val, o) { handler(val, o) {
@ -408,8 +421,8 @@ export default {
parentDepartmentList[item.id] = this.memberData[item.id]; parentDepartmentList[item.id] = this.memberData[item.id];
break; break;
case 'PARKING_LOT_SIGNAL_BUILDING': case 'PARKING_LOT_SIGNAL_BUILDING':
this.memberData[item.id].label = '停车场信号' + (item.name || ''); this.memberData[item.id].label = '停车场信号' + (item.name || '');
this.memberData[item.id].labelName = '停车场信号' + (item.name || ''); this.memberData[item.id].labelName = '停车场信号' + (item.name || '');
parkingLotSignalBuilding[item.id] = this.memberData[item.id]; parkingLotSignalBuilding[item.id] = this.memberData[item.id];
break; break;
} }
@ -469,7 +482,10 @@ export default {
}, },
'$store.state.socket.simulationReset': function () { // 仿 '$store.state.socket.simulationReset': function () { // 仿
this.conversitionStateMap = {}; this.conversitionStateMap = {};
document.querySelector('#teleName').classList.remove('flash'); const teleName = document.querySelector('#teleName');
if (teleName) {
teleName.classList.remove('flash');
}
document.querySelector('#teleRing').pause(); document.querySelector('#teleRing').pause();
}, },
'$store.state.socket.acceptConversionInvite':function(val) { '$store.state.socket.acceptConversionInvite':function(val) {
@ -756,9 +772,11 @@ export default {
fd.append('file', blob); fd.append('file', blob);
sendSimulationConversition(that.group, that.conversitionId, fd) sendSimulationConversition(that.group, that.conversitionId, fd)
.then((data) => { .then((data) => {
that.textContent = '';
}) })
.catch(error => { .catch(error => {
console.log(error); console.log(error);
that.$message.error('语音发送失败: ' + error.message);
}); });
if (that.microphone) { if (that.microphone) {
that.microphone.stop(); that.microphone.stop();
@ -768,6 +786,13 @@ export default {
} }
}); });
}, },
sendText() {
sendConversationText(this.group, this.conversitionId, {content: this.textContent}).then(resp => {
this.textContent = '';
}).catch(() => {
this.$message.error('发送会话文字失败');
});
},
handleSetting() { handleSetting() {
this.$refs.chatSetting.doShow(); this.$refs.chatSetting.doShow();
}, },
@ -976,15 +1001,11 @@ export default {
}, },
changeMessageList(data) { changeMessageList(data) {
this.commonMessageList.push(data.message); this.commonMessageList.push(data.message);
// if (this.conversitionStateMap[data.message.memberId]) {
// this.conversitionStateMap[data.message.memberId].privateMessageList.push(data.message);
// }
if (this.conversitionStateMap[data.message.memberId]) { if (this.conversitionStateMap[data.message.memberId]) {
(this.conversitionStateMap[data.message.memberId].privateMemberList || []).forEach(member => { (this.conversitionStateMap[data.message.memberId].privateMemberList || []).forEach(member => {
this.conversitionStateMap[member.memberId] && this.conversitionStateMap[member.memberId].privateMessageList.push(data.message); this.conversitionStateMap[member.memberId] && this.conversitionStateMap[member.memberId].privateMessageList.push(data.message);
}); });
} }
// console.log(this.commonConversation, this.conversitionId, data.id, this.myMemberId, this.conversitionId === data.id, this.conversitionStateMap, '/////////////////////////');
if (this.commonConversation) { if (this.commonConversation) {
this.messageList.push(data.message); this.messageList.push(data.message);
} else if (!this.commonConversation && this.conversitionId === data.id) { } else if (!this.commonConversation && this.conversitionId === data.id) {
@ -1020,8 +1041,9 @@ export default {
resetCoversition() { resetCoversition() {
this.commonMessageList = []; this.commonMessageList = [];
this.conversitionStateMap = {}; this.conversitionStateMap = {};
this.messageList = this.commonMessageList; this.messageList = [];
this.connectSuccess = false; this.connectSuccess = false;
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
this.treeData.forEach(item => { this.treeData.forEach(item => {
if (item.children) { if (item.children) {
const memberList = Object.values(item.children); const memberList = Object.values(item.children);
@ -1309,6 +1331,27 @@ export default {
-webkit-animation: isInviting infinite 1s; /* Safari 和 Chrome */ -webkit-animation: isInviting infinite 1s; /* Safari 和 Chrome */
-o-animation: isInviting infinite 1s; /* Opera */ -o-animation: isInviting infinite 1s; /* Opera */
} }
.mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: 0.7;
z-index: 2000;
&::before{
content: '';
position: absolute;
top:0;
right:0;
bottom:0;
left:0;
background: #aaa;
filter: blur(20px);
}
}
#teleName{ #teleName{
background: #6BBE16; background: #6BBE16;
position: absolute; position: absolute;

View File

@ -96,7 +96,6 @@ export default {
this.isPlay = true; this.isPlay = true;
this.$store.dispatch('scriptRecord/updateAudioPlay', true); this.$store.dispatch('scriptRecord/updateAudioPlay', true);
this.playAllAudio(); this.playAllAudio();
//
} }
} }
this.scrollTop(); this.scrollTop();

View File

@ -149,7 +149,6 @@ export default {
}, },
data() { data() {
return { return {
isDisable: false,
tryTime: 0, // tryTime: 0, //
timeNow: 0, // timeNow: 0, //
time: null, // time: null, //
@ -198,6 +197,9 @@ export default {
}, },
scriptModeList() { scriptModeList() {
return ScriptMode; return ScriptMode;
},
isDisable() {
return this.$store.state.training.started;
} }
}, },
watch: { watch: {
@ -223,6 +225,9 @@ export default {
'$store.state.socket.simulationStart':function(val) { '$store.state.socket.simulationStart':function(val) {
if (val) { if (val) {
this.setRuning(true); this.setRuning(true);
this.$store.dispatch('training/simulationStart').then(() => {
this.$store.dispatch('map/setShowCentralizedStationNum');
});
} }
}, },
'$store.state.socket.simulationReset':function(val) { '$store.state.socket.simulationReset':function(val) {
@ -233,8 +238,12 @@ export default {
const initTime = new Date(this.$store.state.training.initTime || null); const initTime = new Date(this.$store.state.training.initTime || null);
const model = {initTime:this.formatTime(initTime)}; const model = {initTime:this.formatTime(initTime)};
this.start(model); this.start(model);
} else { }
this.isDisable = true; },
isScriptLoad(val) {
if (!val && this.$store.state.training.notifySelected) {
this.$store.state.training.notifySelected.close();
this.$store.commit('training/setNotifySelected', null);
} }
} }
}, },
@ -283,9 +292,6 @@ export default {
const ss = prefixIntrger(initTime.getSeconds(), 2); const ss = prefixIntrger(initTime.getSeconds(), 2);
return `${hh}:${mm}:${ss}`; return `${hh}:${mm}:${ss}`;
}, },
initPlannedDriving(isDisable) {
this.isDisable = isDisable;
},
loadInitData() { loadInitData() {
const data = { const data = {
mapId: this.$route.query.mapId, mapId: this.$route.query.mapId,
@ -331,7 +337,6 @@ export default {
}); });
}, },
start(model) { // 仿 start(model) { // 仿
this.isDisable = true;
const data = { const data = {
time: model.initTime time: model.initTime
}; };
@ -339,12 +344,8 @@ export default {
data.loadNumber = model.loadNum; data.loadNumber = model.loadNum;
} }
ranAsPlan(data, this.group).then(res => { ranAsPlan(data, this.group).then(res => {
this.$store.dispatch('training/simulationStart').then(() => { this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
this.$store.dispatch('map/setShowCentralizedStationNum');
});
}).catch(error => { }).catch(error => {
this.isDisable = false;
if (error.code == '5001') { if (error.code == '5001') {
this.$messageBox(this.$t('error.mapDataError') + '' + this.$t('error.startSimulationFailed')); this.$messageBox(this.$t('error.mapDataError') + '' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5002') { } else if (error.code == '5002') {
@ -375,7 +376,6 @@ export default {
this.$refs.demonMenu.hideScheduling(run); this.$refs.demonMenu.hideScheduling(run);
}, },
end() { end() {
this.isDisable = false;
exitRunPlan(this.group).then(() => { exitRunPlan(this.group).then(() => {
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => { this.$store.dispatch('training/setMapDefaultState').then(() => {
@ -385,7 +385,6 @@ export default {
}); });
}); });
}).catch(() => { }).catch(() => {
this.isDisable = true;
this.$messageBox(this.$t('display.demon.endSimulationFail')); this.$messageBox(this.$t('display.demon.endSimulationFail'));
}); });
}, },
@ -517,16 +516,16 @@ export default {
} }
}); });
if (currentPlayList.length > 0) { if (currentPlayList.length > 0) {
if (currentPlayList.length > 1) { // if (currentPlayList.length > 1) {
this.currentPlayList = currentPlayList; // this.currentPlayList = currentPlayList;
this.$refs.selectRole.doShow(); // this.$refs.selectRole.doShow();
} else { // } else {
const member = currentPlayList[0]; const member = currentPlayList[0];
const memberId = member.id; const memberId = member.id;
(this.$store.state.training.memberData[member.id] || {}).userId = this.$store.state.user.id; (this.$store.state.training.memberData[member.id] || {}).userId = this.$store.state.user.id;
(this.$store.state.training.memberData[member.id] || {}).disabled = true; (this.$store.state.training.memberData[member.id] || {}).disabled = true;
this.runScriptMode(memberId); this.runScriptMode(memberId);
} // }
} }
}, },
runScriptMode(memberId) { runScriptMode(memberId) {

View File

@ -10,7 +10,11 @@
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.result"> <div v-if="scope.row.result">
<el-button v-for="(each,index) in scope.row.result" :key="index" type="primary" size="small" @click="handleLoad(each)">{{ each.name }}</el-button> <template v-for="(each,index) in scope.row.result">
<el-tooltip :key="index" class="item" effect="dark" :content="'场景描述: '+ each.description + '\n' + '处置流程: ' +each.disposalProcesses" popper-class="tooltip-box" placement="top">
<el-button type="primary" size="small" @click="handleLoad(each)">{{ each.name }}</el-button>
</el-tooltip>
</template>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@ -82,17 +86,17 @@ export default {
}); });
list.forEach(each=>{ list.forEach(each=>{
if (each.name == '场景1' || each.name == '场景2' || each.name == '场景3' || each.name == '场景7') { if (each.name == '场景1' || each.name == '场景2' || each.name == '场景3' || each.name == '场景7') {
this.mainSceneData[1].result.push({id:each.id, name:each.name}); this.mainSceneData[1].result.push({id:each.id, name:each.name, description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景4') { } else if (each.name == '场景4') {
this.mainSceneData[0].result.push({id:each.id, name:'场景4'}); this.mainSceneData[0].result.push({id:each.id, name:'场景4', description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景5' || each.name == '场景11') { } else if (each.name == '场景5' || each.name == '场景11') {
this.mainSceneData[4].result.push({id:each.id, name:each.name}); this.mainSceneData[4].result.push({id:each.id, name:each.name, description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景9') { } else if (each.name == '场景9') {
this.mainSceneData[6].result.push({id:each.id, name:'场景9'}); this.mainSceneData[6].result.push({id:each.id, name:'场景9', description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景8') { } else if (each.name == '场景8') {
this.mainSceneData[5].result.push({id:each.id, name:'场景8'}); this.mainSceneData[5].result.push({id:each.id, name:'场景8', description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景10') { } else if (each.name == '场景10') {
this.mainSceneData[7].result.push({id:each.id, name:'场景10'}); this.mainSceneData[7].result.push({id:each.id, name:'场景10', description: each.description, disposalProcesses: each.disposalProcesses});
} }
}); });
} }
@ -127,6 +131,18 @@ export default {
const playerList = []; const playerList = [];
EventBus.$emit('clearRunSeries'); EventBus.$emit('clearRunSeries');
EventBus.$emit('loadScene'); EventBus.$emit('loadScene');
const notifyData = this.$notify({
title: res.data.name,
dangerouslyUseHTMLString: true,
message: `
<p><span style="color: #000;font-weight: bold;">场景描述</span>${row.description}</p>`,
customClass: 'notify_box',
// position: 'top-left',
showClose: false,
offset: 75,
duration: 0
});
this.$store.commit('training/setNotifySelected', notifyData);
if (res.data.memberList && res.data.memberList.length > 0) { if (res.data.memberList && res.data.memberList.length > 0) {
this.form.type = ''; this.form.type = '';
res.data.memberList.sort((a, b) => { res.data.memberList.sort((a, b) => {
@ -178,7 +194,7 @@ export default {
break; break;
} }
case 'PARKING_LOT_SIGNAL_BUILDING': { case 'PARKING_LOT_SIGNAL_BUILDING': {
member.label = '停车场信号' + (member.name ? member.name : ''); member.label = '停车场信号' + (member.name ? member.name : '');
} }
} }
// if (member.type === 'DISPATCHER') { // if (member.type === 'DISPATCHER') {
@ -228,3 +244,17 @@ export default {
} }
}; };
</script> </script>
<style lang="scss">
.tooltip-box {
white-space:pre-wrap;
}
.notify_box{
width: 300px;
white-space: inherit;
&.el-notification.right{
right: 5px;
padding: 6px 0;
}
}
</style>

View File

@ -26,7 +26,7 @@
/> />
<menu-dispather-contest v-if="isContest" ref="menuDispatherContest" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" /> <menu-dispather-contest v-if="isContest" ref="menuDispatherContest" :offset="offset" :offset-bottom="offsetBottom" :data-error="dataError" :text-status-height="textStatusHeight" />
</template> </template>
<menu-train-list v-if="isDemon||isContest" @setCenter="setCenter" /> <menu-train-list v-if="isDemon||isContest||isScript" @setCenter="setCenter" />
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" /> <menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
</div> </div>
</template> </template>
@ -181,7 +181,7 @@ export default {
setCenter(code) { setCenter(code) {
this.$jlmap.setCenter(code); this.$jlmap.setCenter(code);
}, },
// //
setPosition() { setPosition() {
this.$nextTick(() => { this.$nextTick(() => {
this.offset = 10; this.offset = 10;
@ -233,11 +233,8 @@ export default {
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`)); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
this.$store.dispatch('training/countTime'); this.$store.dispatch('training/countTime');
this.planRunning = resp.data.planRunning; this.planRunning = resp.data.planRunning;
if (resp.data.planRunning) {
if (this.isDemon) { this.$store.commit('training/start');
this.$refs.menuDemon.initPlannedDriving(this.planRunning); //
} else if (this.isScript) {
// this.$refs.menuScript.initPlannedDriving(resp.data.planRunning);
} }
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) { } else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
this.dataError = true; this.dataError = true;

View File

@ -99,7 +99,6 @@ export default {
}, },
data() { data() {
return { return {
isDisable: false,
tryTime: 0, // tryTime: 0, //
timeNow: 0, // timeNow: 0, //
time: null, // time: null, //
@ -141,6 +140,9 @@ export default {
}, },
projectDevice() { projectDevice() {
return this.$route.query.projectDevice; return this.$route.query.projectDevice;
},
isDisable() {
return this.$store.state.training.started;
} }
}, },
watch: { watch: {
@ -163,6 +165,9 @@ export default {
'$store.state.socket.simulationStart':function(val) { '$store.state.socket.simulationStart':function(val) {
if (val) { if (val) {
this.setRuning(true); this.setRuning(true);
this.$store.dispatch('training/simulationStart').then(() => {
this.$store.dispatch('map/setShowCentralizedStationNum');
});
} }
}, },
'$store.state.socket.simulationReset':function(val) { '$store.state.socket.simulationReset':function(val) {
@ -208,9 +213,6 @@ export default {
console.log(error); console.log(error);
} }
}, },
initPlannedDriving(isDisable) {
this.isDisable = isDisable;
},
loadInitData() { loadInitData() {
const data = { const data = {
mapId: this.$route.query.mapId, mapId: this.$route.query.mapId,
@ -237,7 +239,6 @@ export default {
this.$refs.setTime.doShow(); this.$refs.setTime.doShow();
}, },
start(model) { // 仿 start(model) { // 仿
this.isDisable = true;
const data = { const data = {
time: model.initTime time: model.initTime
}; };
@ -245,12 +246,8 @@ export default {
data.loadNumber = model.loadNum; data.loadNumber = model.loadNum;
} }
ranAsPlan(data, this.group).then(res => { ranAsPlan(data, this.group).then(res => {
this.$store.dispatch('training/simulationStart').then(() => { this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
this.$store.dispatch('map/setShowCentralizedStationNum');
});
}).catch(error => { }).catch(error => {
this.isDisable = false;
if (error.code == '5001') { if (error.code == '5001') {
this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed')); this.$messageBox(this.$t('error.mapDataError') + ',' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5002') { } else if (error.code == '5002') {
@ -281,7 +278,6 @@ export default {
this.$refs.demonMenu.hideScheduling(run); this.$refs.demonMenu.hideScheduling(run);
}, },
end() { end() {
this.isDisable = false;
exitRunPlan(this.group).then(() => { exitRunPlan(this.group).then(() => {
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => { this.$store.dispatch('training/setMapDefaultState').then(() => {
@ -291,14 +287,12 @@ export default {
}); });
}); });
}).catch(() => { }).catch(() => {
this.isDisable = true;
this.$messageBox(this.$t('display.demon.endSimulationFail')); this.$messageBox(this.$t('display.demon.endSimulationFail'));
}); });
}, },
handleQuitQuest() { handleQuitQuest() {
quitScriptNew(this.group).then(resp => { quitScriptNew(this.group).then(resp => {
getSimulationInfoNew(this.group).then((res)=>{ getSimulationInfoNew(this.group).then((res)=>{
this.isDisable = false;
EventBus.$emit('clearRunSeries'); EventBus.$emit('clearRunSeries');
this.quitQuest(); this.quitQuest();
this.initLoadPage(); this.initLoadPage();

View File

@ -136,8 +136,8 @@ export default {
.menuTrainListOut{ .menuTrainListOut{
position: absolute; position: absolute;
right: 0; right: 0;
top: 15%; top: 20%;
height: 70%; height: 60%;
transform: translateX(400px); transform: translateX(400px);
transition: all 0.4s; transition: all 0.4s;
&.active{ &.active{

View File

@ -51,6 +51,24 @@ export const operateEnum = {
Section_Set_Limit_Speed:{ Section_Set_Limit_Speed:{
code:'speedLimitValue', code:'speedLimitValue',
name:'限速值为' name:'限速值为'
},
Train_Load_Spare_Train:{
isList:true,
params:[
{
code:'groupNumber',
name:'车组号'
},
{
code:'right',
name:'方向',
function:judgeUpDown
// result:[
// {data:true, name:'右行', judge:'='},
// {data:false, name:'左行', judge:'='}
// ]
}
]
} }
// Section_Cancel_Limit_Speed:{ // Section_Cancel_Limit_Speed:{
// code:'speedLimitValue', // code:'speedLimitValue',
@ -58,7 +76,7 @@ export const operateEnum = {
// } // }
}, },
ControlConvertMenu:{ ControlConvertMenu:{
type:'制模式', type:'系统/站遥控',
CM_Apply_For_Station_Control:{ CM_Apply_For_Station_Control:{
code:'stationCodes', code:'stationCodes',
isList:true, isList:true,
@ -209,7 +227,11 @@ export function covertOperate(operationType, operationParamMap) {
const station = store.getters['map/getDeviceByCode'](device.stationCode); const station = store.getters['map/getDeviceByCode'](device.stationCode);
deviceName += '【车站-' + station.name + '】 / ' + deviceType[device._type] + device.name; deviceName += '【车站-' + station.name + '】 / ' + deviceType[device._type] + device.name;
} else { } else {
deviceName = '' + device.name; if (device._type == 'Power') {
deviceName = '供电线(' + device.code + ')';
} else {
deviceName = '' + device.name;
}
} }
let tip = '请找到' + deviceName + ','; let tip = '请找到' + deviceName + ',';
if (operationType == 'Set_Fault') { if (operationType == 'Set_Fault') {
@ -230,6 +252,9 @@ export function covertOperate(operationType, operationParamMap) {
if (device == 'CM') { if (device == 'CM') {
device = 'ControlConvertMenu'; device = 'ControlConvertMenu';
} }
if (operationType == 'Train_Load_Spare_Train') {
device = 'Section';
}
const list = ['Train_Update_Type', const list = ['Train_Update_Type',
'Train_Add_Train_Trace', 'Train_Add_Train_Trace',
'Train_Remove_Train_Trace', 'Train_Remove_Train_Trace',
@ -359,7 +384,11 @@ function covertOperation(deviceType, operationParamMap, operationType) {
} }
}); });
} else { } else {
paramName += ',值为' + data; if (param.function) {
paramName += covertFunction(param.function, data);
} else {
paramName += ',值为' + data;
}
} }
if (index != params.length - 1) { if (index != params.length - 1) {
@ -399,3 +428,11 @@ function getStationResultById(stationResult) {
return station.name + ' ' + param; return station.name + ' ' + param;
} }
function judgeUpDown(right) {
if (store.state.map.mapConfig.upRight) {
return right ? '上行' : '下行';
} else {
return right ? '下行' : '上行';
}
}

View File

@ -99,6 +99,7 @@ export default {
this.$notify({ this.$notify({
title: this.$t('global.tips'), title: this.$t('global.tips'),
duration: 3000, duration: 3000,
offset: 100,
message: h('i', { style: 'color:' + opt.color }, opt.message) message: h('i', { style: 'color:' + opt.color }, opt.message)
}); });
} }
@ -119,7 +120,8 @@ export default {
transform: translateX(-50%); transform: translateX(-50%);
color: #000; color: #000;
line-height: 180%; line-height: 180%;
z-index: 1501; // z-index: 1501;
z-index: 15;
font-size: 14px; font-size: 14px;
} }
</style> </style>

View File

@ -17,6 +17,8 @@
@setMemberList="setMemberList" @setMemberList="setMemberList"
@clearAllData="clearAllData" @clearAllData="clearAllData"
@setTreeData="setTreeData" @setTreeData="setTreeData"
@changeScriptMode="changeScriptMode"
@setMapLocation="setMapLocation"
/> />
<script-preview-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" /> <script-preview-chat ref="chatbox" :group="group" :user-role="userRole" :offset="offset" />
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" /> <menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
@ -45,6 +47,7 @@ import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { loadDraftScriptNew } from '@/api/designPlatform'; import { loadDraftScriptNew } from '@/api/designPlatform';
import Vue from 'vue'; import Vue from 'vue';
import { ScriptMode } from '@/scripts/ConstDic';
import ConstConfig from '@/scripts/ConstConfig'; import ConstConfig from '@/scripts/ConstConfig';
export default { export default {
@ -79,7 +82,8 @@ export default {
userRole:'', userRole:'',
isDrive: this.prdType == '04', isDrive: this.prdType == '04',
treeData:[], treeData:[],
memberList:[] memberList:[],
scriptMode: ScriptMode.TEACH
}; };
}, },
computed: { computed: {
@ -118,6 +122,11 @@ export default {
// this.setMode(); // this.setMode();
} }
}, },
beforeDestroy() {
this.$store.dispatch('training/setRoles', '');
this.$store.dispatch('training/setPrdType', '');
this.clearAllData();
},
created() { created() {
this.group = this.$route.query.group || ''; this.group = this.$route.query.group || '';
}, },
@ -125,15 +134,19 @@ export default {
back() { back() {
this.$refs.scriptButtonGroup.back(); this.$refs.scriptButtonGroup.back();
}, },
changeScriptMode(scriptMode) {
this.scriptMode = scriptMode;
},
async selectRole(role) { async selectRole(role) {
try { try {
const res = await loadDraftScriptNew(role.id, this.group); const res = await loadDraftScriptNew(role.id, this.group, this.scriptMode);
if (res && res.code == 200) { if (res && res.code == 200) {
if (this.querymapLocation) { // if (this.querymapLocation) {
const newMapLocation = {'offsetX': this.mapLocation.x, 'offsetY': this.mapLocation.y, 'scaleRate': this.mapLocation.scale}; const newMapLocation = {'offsetX': this.mapLocation.x, 'offsetY': this.mapLocation.y, 'scaleRate': this.mapLocation.scale};
Vue.prototype.$jlmap.setOptions(newMapLocation); Vue.prototype.$jlmap.setOptions(newMapLocation);
} // }
} }
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
this.$store.dispatch('scriptRecord/updateBgSet', true); this.$store.dispatch('scriptRecord/updateBgSet', true);
this.$refs.scriptButtonGroup.setIsscriptRun(true); this.$refs.scriptButtonGroup.setIsscriptRun(true);
if (role.type) { if (role.type) {
@ -223,6 +236,9 @@ export default {
} }
}); });
}, },
setMapLocation(mapLocation) {
this.mapLocation = mapLocation;
},
switchMode(prdType) { switchMode(prdType) {
this.$store.dispatch('training/setPrdType', prdType); this.$store.dispatch('training/setPrdType', prdType);
}, },

View File

@ -1,10 +1,20 @@
<template> <template>
<div> <div>
<!-- 下角按钮列表 --> <!-- 下角按钮列表 -->
<div class="display-draft"> <div class="display-draft">
<el-button v-if="isscriptRun&&!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button> <el-button v-if="isscriptRun&&!dataError" type="danger" @click="handleQuitQuest">{{ $t('display.demon.exitScript') }}</el-button>
<el-button type="primary" @click="back">{{ $t('display.demon.back') }}</el-button> <el-button type="primary" @click="back">{{ $t('display.demon.back') }}</el-button>
</div> </div>
<!-- 左上角按钮 -->
<div class="trainingButton" :style="{top: (offset+45)+'px'}">
<el-row>
<el-radio-group v-model="scriptMode" class="mode" size="small" @change="changeScriptMode">
<el-radio-button :label="scriptModeList.TEACH" :disabled="isscriptRun">{{ $t('display.lesson.teachingMode') }}</el-radio-button>
<el-radio-button :label="scriptModeList.PRACTICE" :disabled="isscriptRun">{{ $t('display.lesson.practiceMode') }}</el-radio-button>
<el-radio-button :label="scriptModeList.TEST" :disabled="isscriptRun">{{ $t('display.lesson.testMode') }}</el-radio-button>
</el-radio-group>
</el-row>
</div>
<!-- 右上角按钮列表 --> <!-- 右上角按钮列表 -->
<div class="schema" :style="{top: offset+'px'}"> <div class="schema" :style="{top: offset+'px'}">
<template v-if="!dataError"> <template v-if="!dataError">
@ -33,6 +43,7 @@
</div> </div>
</template> </template>
<script> <script>
import { ScriptMode } from '@/scripts/ConstDic';
import DemonMenu from '@/views/newMap/displayNew/demonMenu'; import DemonMenu from '@/views/newMap/displayNew/demonMenu';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import {covertMemberData} from '@/views/newMap/displayNew/utils'; import {covertMemberData} from '@/views/newMap/displayNew/utils';
@ -75,7 +86,9 @@ export default {
viewDisabled: true, viewDisabled: true,
firstLoad:true, firstLoad:true,
activeTrainList:[], activeTrainList:[],
isscriptRun:false // isscriptRun:false, //
scriptMode: ScriptMode.TEACH,
planRunning:false
}; };
}, },
computed:{ computed:{
@ -96,6 +109,9 @@ export default {
}, },
isStation() { isStation() {
return this.$store.state.training.prdType == '01'; return this.$store.state.training.prdType == '01';
},
scriptModeList() {
return ScriptMode;
} }
}, },
watch:{ watch:{
@ -114,10 +130,13 @@ export default {
await this.$store.dispatch('training/reset'); await this.$store.dispatch('training/reset');
await this.$store.dispatch('map/mapClear'); await this.$store.dispatch('map/mapClear');
this.$store.dispatch('scriptRecord/updateSimulationPause', false); this.$store.dispatch('scriptRecord/updateSimulationPause', false);
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
this.$store.dispatch('map/resetActiveTrainList', true);
}, },
methods:{ methods:{
// //
async initLoadData() { async initLoadData() {
this.changeScriptMode(this.scriptMode);
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setPrdType', '');
this.setWindowSize(); this.setWindowSize();
this.$store.dispatch('training/reset'); this.$store.dispatch('training/reset');
@ -139,6 +158,7 @@ export default {
} else { } else {
this.$store.dispatch('training/over');// 仿 this.$store.dispatch('training/over');// 仿
} }
this.planRunning = resp.data.planRunning;
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`)); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
} else if (resp && resp.code == 200 && resp.data && resp.data.dataError) { } else if (resp && resp.code == 200 && resp.data && resp.data.dataError) {
this.dataError = true; this.dataError = true;
@ -240,6 +260,8 @@ export default {
this.$emit('setMemberData', lastMemberList); this.$emit('setMemberData', lastMemberList);
} }
let newMemberList = []; let newMemberList = [];
// planRunning
// debugger;
const activeMemberList = []; const activeMemberList = [];
resp.data.actionList.forEach((activeMember)=>{ resp.data.actionList.forEach((activeMember)=>{
if (!(activeMemberList.length > 0 && activeMemberList.includes(activeMember.memberId))) { if (!(activeMemberList.length > 0 && activeMemberList.includes(activeMember.memberId))) {
@ -262,7 +284,7 @@ export default {
const lastData = JSON.stringify(playerList); const lastData = JSON.stringify(playerList);
newMemberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew); newMemberList = this.covert(lastData, ConstConfig.ConstSelect.roleTypeNew);
if (resp.data.mapLocation) { if (resp.data.mapLocation) {
this.mapLocation = resp.data.mapLocation; this.$emit('setMapLocation', resp.data.mapLocation);
} }
const memberList = newMemberList || []; const memberList = newMemberList || [];
memberList.unshift({ id: '', label: this.$t('display.script.none'), role: 'no', disabled:false }); memberList.unshift({ id: '', label: this.$t('display.script.none'), role: 'no', disabled:false });
@ -320,6 +342,7 @@ export default {
getSimulationInfoNew(this.group).then(()=>{ getSimulationInfoNew(this.group).then(()=>{
this.isscriptRun = false; this.isscriptRun = false;
this.$store.dispatch('scriptRecord/updateBgSet', false); this.$store.dispatch('scriptRecord/updateBgSet', false);
this.$store.dispatch('scriptRecord/updateAudioPlay', false);
// this.userRole = ''; // this.userRole = '';
this.$store.dispatch('training/setRoles', ''); this.$store.dispatch('training/setRoles', '');
this.$store.dispatch('training/setPrdType', ''); this.$store.dispatch('training/setPrdType', '');
@ -372,7 +395,22 @@ export default {
this.$store.dispatch('config/resize', { width, height }); this.$store.dispatch('config/resize', { width, height });
// this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode }); // this.$store.dispatch('training/updateOffsetStationCode', { offsetStationCode: this.offsetStationCode });
}); });
},
changeScriptMode(scriptMode) {
const ScriptModeList = {
TEACHING_MODE:'teach',
PRACTICE_MODE:'practice',
TEST_MODE:'test'
};
this.$store.dispatch('training/setScriptOperationType', ScriptModeList[scriptMode]);
this.$emit('changeScriptMode', scriptMode);
} }
} }
}; };
</script> </script>
<style lang="scss" scoped>
.trainingButton{
position: absolute;
left: 5px;
}
</style>

View File

@ -2,9 +2,9 @@
<div> <div>
<div class="display-draft"> <div class="display-draft">
<el-button-group> <el-button-group>
<el-button v-if="!isScriptCommand" type="success" :disabled="isDisable || dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button> <el-button v-if="!isReplaceBg" type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
<el-button v-if="!isScriptCommand" type="danger" :disabled="dataError" @click="end">初始化</el-button> <el-button v-if="!isScriptCommand||isReplaceBg" type="danger" :disabled="dataError" @click="end">初始化</el-button>
<el-button type="primary" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button> <el-button v-if="!isScriptCommand||isReplaceBg" type="success" :disabled="isDisable||dataError" @click="selectBeginTime">{{ $t('scriptRecord.drivingByPlan') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<demon-menu <demon-menu
@ -34,12 +34,15 @@
:group="group" :group="group"
:offset-bottom="offsetBottom" :offset-bottom="offsetBottom"
:offset="offset" :offset="offset"
:is-replace-bg="isReplaceBg"
@resetChat="resetChat" @resetChat="resetChat"
@setReplace="setReplace"
/> />
<chat-box <chat-box
ref="chatbox" ref="chatbox"
:group="group" :group="group"
:user-role="userRole" :user-role="userRole"
:is-replace-bg="isReplaceBg"
/> />
</div> </div>
</template> </template>
@ -95,8 +98,8 @@ export default {
}, },
data() { data() {
return { return {
isDisable: false,
isScriptCommand:false, isScriptCommand:false,
isReplaceBg: false,
userRole:'' userRole:''
}; };
}, },
@ -119,12 +122,20 @@ export default {
}, },
isStation() { isStation() {
return this.$store.state.training.prdType == '01'; return this.$store.state.training.prdType == '01';
},
isDisable() {
return this.$store.state.training.started;
} }
}, },
watch: { watch: {
'$store.state.scriptRecord.bgSet':function (val) { '$store.state.scriptRecord.bgSet':function (val) {
this.isScriptCommand = val; this.isScriptCommand = val;
}, },
'$store.state.socket.simulationStart': function(val) {
this.$store.dispatch('training/simulationStart').then(() => {
this.$store.dispatch('map/setShowCentralizedStationNum');
});
},
'$store.state.map.mapViewLoadedCount': function (val) { // '$store.state.map.mapViewLoadedCount': function (val) { //
getSimulationMemberList(this.group).then(resp => { getSimulationMemberList(this.group).then(resp => {
this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId:this.$store.state.user.id}); this.$store.dispatch('training/setMemberList', {memberList:resp.data, userId:this.$store.state.user.id});
@ -173,21 +184,13 @@ export default {
selectBeginTime() { selectBeginTime() {
this.$refs.setTime.doShow(); this.$refs.setTime.doShow();
}, },
resetBeginTime() {
this.isDisable = false;
},
start(model) { start(model) {
this.isDisable = true;
const data = { const data = {
time: model.initTime time: model.initTime
}; };
ranAsPlan(data, this.group).then(res => { ranAsPlan(data, this.group).then(res => {
this.$store.dispatch('training/simulationStart').then(() => { this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
this.$store.dispatch('map/setShowCentralizedStationNum');
});
}).catch((error) => { }).catch((error) => {
this.isDisable = false;
if (error.code == '5001') { if (error.code == '5001') {
this.$messageBox(this.$t('error.mapDataError') + '' + this.$t('error.startSimulationFailed')); this.$messageBox(this.$t('error.mapDataError') + '' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5002') { } else if (error.code == '5002') {
@ -212,7 +215,6 @@ export default {
}); });
}, },
end() { end() {
this.isDisable = false;
exitRunPlan(this.group).then(() => { exitRunPlan(this.group).then(() => {
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
this.$store.dispatch('training/setMapDefaultState').then(() => { this.$store.dispatch('training/setMapDefaultState').then(() => {
@ -222,7 +224,6 @@ export default {
}); });
}); });
}).catch(() => { }).catch(() => {
this.isDisable = true;
this.$messageBox(this.$t('display.demon.endSimulationFail')); this.$messageBox(this.$t('display.demon.endSimulationFail'));
}); });
}, },
@ -234,6 +235,9 @@ export default {
}, },
resetChat() { resetChat() {
// this.$refs.chatbox.resetCoversition(); // this.$refs.chatbox.resetCoversition();
},
setReplace(isRp) {
this.isReplaceBg = isRp;
} }
} }
}; };

View File

@ -352,12 +352,12 @@ export default {
} }
}, },
async simulationReset() { async simulationReset() {
await this.$store.dispatch('socket/setSimulationStart');
await this.$store.dispatch('map/clearJlmapTrainView'); await this.$store.dispatch('map/clearJlmapTrainView');
await this.$store.dispatch('map/setTrainWindowShow', false); await this.$store.dispatch('map/setTrainWindowShow', false);
await this.$store.dispatch('training/over'); await this.$store.dispatch('training/over');
await this.$store.dispatch('map/resetActiveTrainList'); await this.$store.dispatch('map/resetActiveTrainList');
await this.$store.dispatch('socket/setSimulationReset'); // await this.$store.dispatch('socket/setSimulationReset'); //
await this.$store.dispatch('socket/setSimulationStart');
await this.$store.dispatch('training/setMapDefaultState'); await this.$store.dispatch('training/setMapDefaultState');
}, },
// //

View File

@ -109,7 +109,6 @@ export default {
}, },
data() { data() {
return { return {
isDisable: false,
backLoading: false, backLoading: false,
chatShow: true, chatShow: true,
jsStart: true, jsStart: true,
@ -161,6 +160,9 @@ export default {
isDeviceLogin() { isDeviceLogin() {
const typeList = ['LW', 'CW']; const typeList = ['LW', 'CW'];
return typeList.includes(this.$route.query.type); return typeList.includes(this.$route.query.type);
},
isDisable() {
return this.$store.state.training.started;
} }
}, },
watch: { watch: {
@ -172,11 +174,6 @@ export default {
}); });
} }
}, },
'$store.state.training.started': function (val) {
if (val) {
this.isDisable = true;
}
},
'$store.state.socket.simulationOver':function(val) { '$store.state.socket.simulationOver':function(val) {
if (val && this.project == 'refereeJsxt') { if (val && this.project == 'refereeJsxt') {
this.$router.go(-1); this.$router.go(-1);
@ -284,19 +281,15 @@ export default {
}, },
// 仿 // 仿
start(model) { start(model) {
this.isDisable = true;
const data = { const data = {
time: model.initTime time: model.initTime
}; };
ranAsPlan(data, this.group).then(res => { ranAsPlan(data, this.group).then(res => {
// this.$store.dispatch('training/simulationStart').then(() => {
if (this.project == 'jsxt') { if (this.project == 'jsxt') {
this.jsStart = false; this.jsStart = false;
} }
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`)); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${model.initTime}`));
// });
}).catch((error) => { }).catch((error) => {
this.isDisable = false;
if (error.code == '5001') { if (error.code == '5001') {
this.$messageBox(this.$t('error.mapDataError') + '' + this.$t('error.startSimulationFailed')); this.$messageBox(this.$t('error.mapDataError') + '' + this.$t('error.startSimulationFailed'));
} else if (error.code == '5002') { } else if (error.code == '5002') {
@ -321,13 +314,11 @@ export default {
}); });
}, },
end() { end() {
this.isDisable = false;
exitRunPlan(this.group).then(()=>{ exitRunPlan(this.group).then(()=>{
this.$store.dispatch('map/setTrainWindowShow', false); this.$store.dispatch('map/setTrainWindowShow', false);
this.$store.dispatch('map/resetActiveTrainList', false); this.$store.dispatch('map/resetActiveTrainList', false);
}).catch(() => { }).catch(() => {
this.$store.dispatch('training/over').then(() => { this.$store.dispatch('training/over').then(() => {
this.isDisable = true;
this.$store.dispatch('map/resetActiveTrainList', false); this.$store.dispatch('map/resetActiveTrainList', false);
this.$messageBox(this.$t('error.endSimulationFailed')); this.$messageBox(this.$t('error.endSimulationFailed'));
}); });

View File

@ -125,8 +125,8 @@ export default {
.menuTrainListOut{ .menuTrainListOut{
position: absolute; position: absolute;
right: 0; right: 0;
top: 15%; top: 20%;
height: 70%; height: 60%;
transform: translateX(400px); transform: translateX(400px);
transition: all 0.4s; transition: all 0.4s;
&.active{ &.active{

View File

@ -1,6 +1,6 @@
<template> <template>
<div v-if="delayShow"> <div v-if="delayShow">
<div v-for="item in stationList"> <div v-for="(item,i) in stationList" :key="i">
<delay-info v-if="item.delayInfo" :delay-info-list="item.delayInfo" position="item.points" /> <delay-info v-if="item.delayInfo" :delay-info-list="item.delayInfo" position="item.points" />
</div> </div>
</div> </div>

View File

@ -1,7 +1,7 @@
<template> <template>
<div v-show="showDelayBox" class="info_box" :style="{left: tPosition.x+'px', top: tPosition.y+'px' }"> <div v-show="showDelayBox" class="info_box" :style="{left: tPosition.x+'px', top: tPosition.y+'px' }">
<el-scrollbal> <el-scrollbal>
<div v-for="item in delayInfoList"><span>人解</span><span>信号机名</span><span>时间</span></div> <div v-for="(item,i) in delayInfoList" :key="i"><span>人解</span><span>信号机名</span><span>时间</span></div>
</el-scrollbal> </el-scrollbal>
</div> </div>
</template> </template>

View File

@ -116,9 +116,11 @@ export default {
}); });
} }
} }
let subDeviceType = '';
if (newStep.subType) { subDeviceType = newStep.subType; } else { subDeviceType = newStep.type; }
position = this.$jlmap.getShapeTipPoint({ position = this.$jlmap.getShapeTipPoint({
code: newStep.code, code: newStep.code,
subDeviceType: newStep.type subDeviceType: subDeviceType
}); });
if (position) { if (position) {

View File

@ -107,7 +107,8 @@ export default {
field: '', field: '',
oldLeftSectionCode: '', oldLeftSectionCode: '',
oldRightSectionCode: '', oldRightSectionCode: '',
tipInfoList: [] tipInfoList: [],
centralizedStationList: []
}; };
}, },
computed: { computed: {
@ -369,9 +370,6 @@ export default {
return this.$store.state.map.map.skinVO.code === '03'; return this.$store.state.map.map.skinVO.code === '03';
} }
return false; return false;
},
centralizedStationList() {
return this.stationList.filter(station => station.centralized);
} }
}, },
watch: { watch: {
@ -402,9 +400,14 @@ export default {
this.editModel.roadType = null; this.editModel.roadType = null;
} }
}, },
handleInit() {
if (this.stationList && this.stationList.length) {
this.centralizedStationList = this.stationList.filter(station => station.centralized);
}
},
deviceSelect(selected) { deviceSelect(selected) {
// //
if (selected && selected._type.toUpperCase() === 'Section'.toUpperCase()) { if (selected && selected._type === 'Section') {
if (this.field === 'leftSection') { if (this.field === 'leftSection') {
if (selected.type === '01' || selected.type === '03') { if (selected.type === '01' || selected.type === '03') {
this.editModel.leftSectionCode = selected.code; this.editModel.leftSectionCode = selected.code;
@ -423,6 +426,7 @@ export default {
return; return;
} }
this.clear(); this.clear();
this.handleInit();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
this.oldPoint = selected.points; this.oldPoint = selected.points;

View File

@ -44,7 +44,7 @@ export default {
{ code: true, name: '向右' } { code: true, name: '向右' }
], ],
SignalLeftOrRightList: [], SignalLeftOrRightList: [],
CentralizedStationList:[], // CentralizedStationList:[],
mergeRules: { mergeRules: {
sectionCode: [ sectionCode: [
{ required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' } { required: true, message: this.$t('rules.selectPhysicalExtentName'), trigger: 'change' }
@ -87,6 +87,13 @@ export default {
}); });
return list; return list;
}, },
ciStationList() {
let list = [];
list = this.stationList.filter(station=>{
return station.ciStation;
});
return list;
},
isButtonType() { isButtonType() {
return this.field == 'selectSingalCode'; return this.field == 'selectSingalCode';
}, },
@ -104,7 +111,7 @@ export default {
{ prop: 'right', label: this.$t('map.signalDirectionTypeX'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalDirectionList}, { prop: 'right', label: this.$t('map.signalDirectionTypeX'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalDirectionList},
{ prop: 'positionType', label: this.$t('map.positionType'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalPositionTypeList}, { prop: 'positionType', label: this.$t('map.positionType'), type: 'radio', optionLabel: 'name', optionValue:'code', border:true, radioList: this.SignalPositionTypeList},
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList}, { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList},
{ prop: 'interlockStationCode', label: '所属联锁站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList} { prop: 'interlockStationCode', label: '所属联锁站:', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.ciStationList}
] ]
} }
} }

View File

@ -266,7 +266,9 @@ export default {
}, },
lampPositionModel: { lampPositionModel: {
lampPositionType: '' lampPositionType: ''
} },
centralizedStationList: [], //
ciStationList: [] //
}; };
}, },
computed: { computed: {
@ -293,20 +295,6 @@ export default {
} }
return list; return list;
}, },
centralizedStationList() {
let list = [];
list = this.stationList.filter(station=>{
return station.centralized;
});
return list;
},
ciStationList() {
let list = [];
list = this.stationList.filter(station=> {
return station.ciStation;
});
return list;
},
form() { form() {
return { return {
labelWidth: '150px', labelWidth: '150px',
@ -426,6 +414,12 @@ export default {
}); });
}, },
methods: { methods: {
handleInit() {
if (this.stationList && this.stationList.length) {
this.centralizedStationList = this.stationList.filter(station=> station.centralized);
this.ciStationList = this.stationList.filter(station=> station.ciStation);
}
},
hover(field) { hover(field) {
this.field = field == this.field ? '' : field; this.field = field == this.field ? '' : field;
this.signalSectionCode(this.field); this.signalSectionCode(this.field);
@ -435,12 +429,13 @@ export default {
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
}, },
deviceSelect(selected) { deviceSelect(selected) {
if (selected && selected._type.toUpperCase() == 'Signal'.toUpperCase() && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd' && this.field != 'signalCodes')) { if (selected && selected._type == 'Signal' && (this.field != 'selectSingalCode' && this.field != 'signalCodesType' && this.field != 'signalIgnoreRouteEnd' && this.field != 'signalCodes')) {
this.handleInit();
this.editModel = getModel('Signal'); this.editModel = getModel('Signal');
this.$refs.dataform && this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.activeName = 'first'; this.activeName = 'first';
this.editModel = deepAssign(this.editModel, selected); this.editModel = deepAssign(this.editModel, selected);
} else if (selected && selected._type.toUpperCase() == 'Section'.toUpperCase() && this.field == 'selectSingalCode') { } else if (selected && selected._type == 'Section' && this.field == 'selectSingalCode') {
if (selected.type == '01' || selected.type === '03') { if (selected.type == '01' || selected.type === '03') {
this.$refs.createSignal.setSectionCode(selected.code); this.$refs.createSignal.setSectionCode(selected.code);
} else if (selected.type == '02') { } else if (selected.type == '02') {
@ -464,12 +459,12 @@ export default {
this.signalStationModel.signalLists.push(selected.code); this.signalStationModel.signalLists.push(selected.code);
} }
this.activeName = 'three'; this.activeName = 'three';
} else if (selected && selected._type === 'Signal' && this.field == 'signalIgnoreRouteEnd') { } else if (selected && selected._type == 'Signal' && this.field == 'signalIgnoreRouteEnd') {
if (!this.editModel.ignoreRouteEnd.includes(selected.code) && this.editModel.code != selected.code) { if (!this.editModel.ignoreRouteEnd.includes(selected.code) && this.editModel.code != selected.code) {
this.editModel.ignoreRouteEnd.push(selected.code); this.editModel.ignoreRouteEnd.push(selected.code);
} }
this.activeName = 'first'; this.activeName = 'first';
} else if (selected && selected._type === 'Signal' && this.field == 'signalCodes') { } else if (selected && selected._type == 'Signal' && this.field == 'signalCodes') {
if (!this.ciModelForm.signalList.includes(selected.code)) { if (!this.ciModelForm.signalList.includes(selected.code)) {
this.ciModelForm.signalList.push(selected.code); this.ciModelForm.signalList.push(selected.code);
} }

View File

@ -21,7 +21,8 @@ export default {
}, },
data() { data() {
return { return {
editModel: getModel('Switch') editModel: getModel('Switch'),
centralizedStationList: []
}; };
}, },
computed: { computed: {
@ -98,21 +99,27 @@ export default {
'switchList', 'switchList',
'stationList', 'stationList',
'lineCode' 'lineCode'
]), ])
centralizedStationList() { // centralizedStationList() {
let list = []; // let list = [];
list = this.stationList.filter(station=>{ // list = this.stationList.filter(station=>{
return station.centralized; // return station.centralized;
}); // });
return list; // return list;
} // }
}, },
methods:{ methods:{
handleInit() {
if (this.stationList && this.stationList.length) {
this.centralizedStationList = this.stationList.filter(station=> station.centralized );
}
},
deviceChange(code) { deviceChange(code) {
this.$emit('setCenter', code); this.$emit('setCenter', code);
this.setModel(this.$store.getters['map/getDeviceByCode'](code)); this.setModel(this.$store.getters['map/getDeviceByCode'](code));
}, },
setModel(data) { setModel(data) {
this.handleInit();
this.$refs.dataform && this.$refs.dataform.resetFields(); this.$refs.dataform && this.$refs.dataform.resetFields();
this.editModel = deepAssign(this.editModel, data); this.editModel = deepAssign(this.editModel, data);
}, },

View File

@ -5,7 +5,7 @@
<el-button v-if="isCreate" size="mini" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button> <el-button v-if="isCreate" size="mini" type="primary" class="createRunPlan" @click="handleCreate">{{ $t('planMonitor.createRunningDiagram') }}</el-button>
</div> </div>
<!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />--> <!--<QueryListPage ref="queryListPage" :query-form="queryForm" :pager-config="pagerConfig" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />-->
<el-card v-loading="loading" style="width: 91%;margin-left:4%;margin-top:20px;"> <el-card v-loading="loading" style="width: 91%;margin-left:4%;margin-top:20px;padding:50px">
<el-table <el-table
:data="runPlanList" :data="runPlanList"
highlight-current-row highlight-current-row

View File

@ -115,32 +115,32 @@
</el-table> </el-table>
</el-row> </el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;"> <el-row style=" margin-bottom: 5px;margin-top: 10px;">
{{ $t('global.details')+$t('global.colon') }} {{ '经停转换轨 / 站台轨'+$t('global.colon') }}
</el-row> </el-row>
<el-row> <el-row>
<el-table :data="addModel.arriveConfigList" border :height="230"> <el-table :data="addModel.arriveConfigList" border :height="230">
<el-table-column prop="stationCode" :label="this.$t('planMonitor.station')"> <el-table-column prop="stationCode" :label="this.$t('planMonitor.station')" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.stationCode) }} {{ formatName(scope.row.stationCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="sectionCode" :label="this.$t('planMonitor.section')"> <el-table-column prop="sectionCode" :label="this.$t('planMonitor.section')" width="95">
<template slot-scope="scope"> <template slot-scope="scope">
{{ formatName(scope.row.sectionCode) }} {{ formatName(scope.row.sectionCode) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="arriveTime" :label="this.$t('planMonitor.arriveTime')" /> <el-table-column prop="arriveTime" :label="this.$t('planMonitor.arriveTime')" width="100px" />
<!-- prop="stopTime" --> <!-- prop="stopTime" -->
<el-table-column :label="this.$t('planMonitor.stopTime')"> <el-table-column :label="this.$t('planMonitor.stopTime')" width="100px">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" /> <el-input v-model="scope.row.stopTime" placeholder="请输入时间" size="mini" @input="changeStopTime(scope.$index, scope.row.stopTime)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="departureTime" :label="this.$t('planMonitor.departureTime')" /> <el-table-column prop="departureTime" :label="this.$t('planMonitor.departureTime')" width="100px" />
<el-table-column :label="this.$t('planMonitor.runLevel')"> <el-table-column :label="this.$t('planMonitor.runLevel')">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.speedLevel }} <span style="font-size:13px;">{{ scope.row.speedLevel }}</span>
<el-input v-model="scope.row.speedLevelTime" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" /> <el-input v-model="scope.row.speedLevelTime" style="width:70px" placeholder="请输入运行等级" size="mini" @input="changeSpeedLevelTime(scope.$index, scope.row.speedLevelTime)" />
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -233,6 +233,7 @@ export default {
if (planId) { if (planId) {
getRoutingList(planId).then(resp => { getRoutingList(planId).then(resp => {
this.routingList = resp.data; this.routingList = resp.data;
// debugger;
const startStationFilterMap = {}; const startStationFilterMap = {};
const endStationFilterMap = {}; const endStationFilterMap = {};
this.routingList.forEach(routing=>{ this.routingList.forEach(routing=>{
@ -242,6 +243,18 @@ export default {
if (!endStationFilterMap[routing.endStationCode]) { if (!endStationFilterMap[routing.endStationCode]) {
endStationFilterMap[routing.endStationCode] = {text:formatName(routing.endStationCode), value:routing.endStationCode}; endStationFilterMap[routing.endStationCode] = {text:formatName(routing.endStationCode), value:routing.endStationCode};
} }
let length = routing.parkSectionCodeList.length;
if ( length >= 4) {
if (routing.parkSectionCodeList[0].stationCode == routing.parkSectionCodeList[1].stationCode) {
// routing.startSectionCode = routing.parkSectionCodeList[1].sectionCode;
routing.parkSectionCodeList.shift();
}
length = routing.parkSectionCodeList.length;
if (routing.parkSectionCodeList[length - 1].stationCode == routing.parkSectionCodeList[length - 2].stationCode) {
// routing.endSectionCode = routing.parkSectionCodeList[length - 2].sectionCode;
routing.parkSectionCodeList.pop();
}
}
}); });
this.startStationFilters = Object.values(startStationFilterMap); this.startStationFilters = Object.values(startStationFilterMap);
this.endStationFilters = Object.values(endStationFilterMap); this.endStationFilters = Object.values(endStationFilterMap);
@ -387,7 +400,7 @@ export default {
}, },
handleClick(row, column, event) { handleClick(row, column, event) {
const arriveConfigList = []; const arriveConfigList = [];
row.parkSectionCodeList.forEach(parkSectionCode=>{ row.parkSectionCodeList.forEach((parkSectionCode, index)=>{
arriveConfigList.push({arriveTime:'', departureTime:'', sectionCode:parkSectionCode.sectionCode, stationCode:parkSectionCode.stationCode}); arriveConfigList.push({arriveTime:'', departureTime:'', sectionCode:parkSectionCode.sectionCode, stationCode:parkSectionCode.stationCode});
}); });
this.$set(this.addModel, 'arriveConfigList', arriveConfigList); this.$set(this.addModel, 'arriveConfigList', arriveConfigList);

View File

@ -190,7 +190,7 @@
</el-table> </el-table>
</el-row> </el-row>
<el-row style=" margin-bottom: 5px;margin-top: 10px;"> <el-row style=" margin-bottom: 5px;margin-top: 10px;">
{{ $t('planMonitor.modifying.detail') }} {{ '经停转换轨 / 站台轨:' }}
</el-row> </el-row>
<el-row> <el-row>
<el-table :data="editModel.arriveConfigList" border :height="230"> <el-table :data="editModel.arriveConfigList" border :height="230">
@ -406,17 +406,24 @@ export default {
planId: this.$route.query.planId || this.loadRunPlanId, planId: this.$route.query.planId || this.loadRunPlanId,
SDTNumber: `${this.serviceNumber}${this.tripNumber}` SDTNumber: `${this.serviceNumber}${this.tripNumber}`
}; };
this.editModel.routingList = []; this.routingList = [];
getRoutingBySDTNumber(model).then(resp => { // getRoutingBySDTNumber(model).then(resp => { //
// const routingObj = resp.data; // const routingObj = resp.data;
const editData = this.$store.state.runPlan.editData[this.serviceNumber]; const editData = this.$store.state.runPlan.editData[this.serviceNumber];
if (editData) { if (editData) {
const trainInfo = editData.trainMap[this.tripNumber]; const trainInfo = editData.trainMap[this.tripNumber];
const lastIndex = trainInfo.stationTimeList.length - 1; const lastIndex = trainInfo.stationTimeList.length - 1;
this.routingList.push({
code:resp.data.code,
startStationCode:resp.data.startStationCode,
endStationCode:resp.data.endStationCode,
endSectionCode:resp.data.endSectionCode,
startSectionCode:resp.data.startSectionCode
});
this.editModel = { this.editModel = {
tripNumber: this.tripNumber, tripNumber: this.tripNumber,
startStationCode: resp.data.startStationCode, startStationCode: resp.data.startStationCode,
startTime: formatTime(trainInfo.stationTimeList[0].secondTime + 7200), startTime: formatTime(trainInfo.stationTimeList[1].secondTime + 7200),
endStationCode: resp.data.endStationCode, endStationCode: resp.data.endStationCode,
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200), endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
routingCode : resp.data.code, routingCode : resp.data.code,

View File

@ -293,9 +293,11 @@ export default {
const op = this.myChart.getOption(); const op = this.myChart.getOption();
op.series.forEach((item, index) => { op.series.forEach((item, index) => {
item.lineStyle.color = '#000'; item.lineStyle.color = '#000';
item.lineStyle.width = 0.5;
switch (item.name) { switch (item.name) {
case serviceNumber: { case serviceNumber: {
item.lineStyle.color = 'red'; item.lineStyle.color = 'red';
item.lineStyle.width = 1;
break; break;
} }
case 'trainLabel': { case 'trainLabel': {
@ -327,6 +329,8 @@ export default {
data.push(nor); data.push(nor);
} }
}); });
// item.lineStyle.color = '#000';
item.lineStyle.width = 0.5;
break; break;
} }
case 'trainLabel': { case 'trainLabel': {
@ -339,7 +343,8 @@ export default {
op.series.push({ op.series.push({
name: 'trainLabel', name: 'trainLabel',
lineStyle: { lineStyle: {
color: 'green' color: 'green',
width:2
}, },
type: 'line', type: 'line',
data: data data: data

View File

@ -65,7 +65,7 @@ export default {
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
const el = document.createElement('a'); const el = document.createElement('a');
el.href = url; el.href = url;
el.download = `${this.row.name}.json`; el.download = `综合-${this.row.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); urlObject.revokeObjectURL(url);
this.$set(this.row, 'loading' + this.idx, false); this.$set(this.row, 'loading' + this.idx, false);

View File

@ -309,7 +309,7 @@ export default {
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
const el = document.createElement('a'); const el = document.createElement('a');
el.href = url; el.href = url;
el.download = `${resultData.name}.json`; el.download = `地图-${resultData.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); urlObject.revokeObjectURL(url);
this.$set(row, 'loading' + idx, false); this.$set(row, 'loading' + idx, false);

View File

@ -0,0 +1,307 @@
<template>
<div v-if="dialogVisible" v-quickMenuDrag class="reminder-drag">
<div style="width: 100%;text-align: center;font-size: 18px;padding-top: 8px;">条件管理</div>
<i style="position: relative;top: -25px;right: -370px;font-size: 20px;cursor: pointer;" class="el-icon-close" @click="handleClose" />
<div @mousedown="handleMouseDown">
<el-tabs v-model="activeName" style="cursor: default;">
<el-tab-pane label="列车触发" name="first">
<div>
<el-table
:data="tableData"
style="width: 100%"
height="200px"
>
<el-table-column prop="code" label="触发列车" />
<el-table-column prop="physicalCode" label="到达区段">
<template slot-scope="scope">
<span>{{ getSectionName(scope.row.physicalCode) }}</span>
</template>
</el-table-column>
<el-table-column prop="stop" label="是否停车">
<template slot-scope="scope">
<span>{{ handleStopValue(scope.row.stop) }}</span>
</template>
</el-table-column>
<el-table-column width="150">
<template slot-scope="scope">
<el-button
size="mini"
@click="handleEdit(scope.$index, scope.row)"
>编辑</el-button>
<el-button
size="mini"
type="danger"
@click="handleDelete(scope.$index, scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-form ref="form" label-width="80px" style="margin-top: 8px;padding: 10px;" :model="formModel" :rules="rules">
<el-form-item label="触发列车" prop="code">
<el-select v-model="formModel.code" size="small" filterable placeholder="请选择">
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.code"
:value="item.code"
/>
</el-select>
<el-button :type="field === 'triggerTrain'? 'danger': 'primary'" size="small" @click="hover('triggerTrain')">{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="到达区段" prop="physicalCode">
<el-select v-model="formModel.physicalCode" size="small" filterable placeholder="请选择">
<el-option
v-for="item in sectionList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
<el-button :type="field === 'triggerSection'? 'danger': 'primary'" size="small" @click="hover('triggerSection')">{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="是否停车">
<el-select v-model="formModel.stop" clearable size="small" placeholder="请选择">
<el-option
v-for="item in stopList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item style="text-align: center;" label-width="0">
<el-button v-if="!update" size="small" type="primary" @click="onCommit">添加</el-button>
<el-button v-if="update" size="small" type="primary" @click="onUpdate">修改</el-button>
<el-button v-if="update" size="small" @click="initData">取消</el-button>
</el-form-item>
</el-form>
</div>
</el-tab-pane>
<el-tab-pane label="延时触发" name="second">
<div style="text-align: center;height: 480px;">
<div style="display: inline-block;margin-right: 10px;font-size: 14px;">延时时间</div>
<el-input-number v-model="delay" size="small" controls-position="right" :min="0" />
<span>s</span>
<div style="margin-top: 10px;">
<el-button type="primary" size="mini" @click="onUpdateDelay">修改</el-button>
</div>
</div>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import { updateActionCondition } from '@/api/script';
import { mapGetters } from 'vuex';
export default {
name: 'ConditionManage',
data() {
return {
dialogVisible: false,
tableData: [],
stopList: [
{label: '是', value: 1},
{label: '否', value: 0}
],
formModel: {
code: '',
physicalCode: '',
stop: ''
},
rules: {
code: [
{ required: true, message: '请选择触发列车', trigger: 'change' }
],
physicalCode: [
{ required: true, message: '请选择到达区段', trigger: 'change' }
]
},
actionId: '',
update: false,
updateIndex: '',
field: '',
delay: 0,
activeName: 'first',
actionInfo: {}
};
},
computed: {
...mapGetters('map', [
'trainList',
'sectionList'
])
},
watch: {
'$store.state.menuOperation.selectedCount':function(em) {
const device = this.$store.state.menuOperation.selected;
if (device.code) {
this.deviceSelect(device);
}
}
},
methods:{
doShow(actionInfo) {
this.actionInfo = actionInfo;
if (this.actionId === actionInfo.id && this.dialogVisible) {
this.handleClose();
} else {
this.tableData = [];
this.delay = 0;
this.actionId = actionInfo.id;
if (this.actionInfo.condition) {
this.tableData = [...(this.actionInfo.condition.trainStatuses || [])];
this.delay = (this.actionInfo.condition.delay || 0) / 1000;
}
this.dialogVisible = true;
}
},
handleClose() {
this.dialogVisible = false;
this.$emit('clearConditionActionId');
this.initData();
},
getSectionName(code) {
const section = this.$store.getters['map/getDeviceByCode'](code);
return section.name;
},
handleStopValue(stop) {
if (stop === 0) {
return '否';
} else if (stop === 1) {
return '是';
} else {
return '/';
}
},
handleMouseDown(e) {
e.stopPropagation();
},
handleEdit(index, row) {
this.updateIndex = index;
this.update = true;
this.formModel.code = row.code;
this.formModel.physicalCode = row.physicalCode;
this.formModel.stop = row.stop;
},
handleDelete(index, row) {
const data = [...this.tableData];
data.splice(index, 1);
const param = { trainStatuses: data };
if (this.delay) {
param.delay = this.delay * 1000;
}
updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => {
this.tableData = data;
this.actionInfo.condition = {
trainStatuses: data,
delay:this.delay * 1000
};
this.initData();
this.$message.success('删除条件成功');
}).catch(()=>{
this.$message.error('删除条件失败');
});
},
onUpdate() {
this.$refs.form.validate((valid) => {
if (valid) {
const data = [...this.tableData];
data[this.updateIndex] = {code: this.formModel.code, physicalCode: this.formModel.physicalCode, stop: this.formModel.stop};
const param = { trainStatuses: data };
if (this.delay) {
param.delay = this.delay * 1000;
}
updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => {
this.tableData = data;
this.actionInfo.condition = {
trainStatuses: data,
delay:this.delay * 1000
};
this.initData();
this.$message.success('修改条件成功');
}).catch(()=>{
this.$message.error('修改条件失败');
});
}
});
},
onUpdateDelay() {
const param = { trainStatuses: this.tableData };
if (this.delay) {
param.delay = this.delay * 1000;
}
updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => {
this.actionInfo.condition = {
trainStatuses: [...this.tableData],
delay:this.delay * 1000
};
this.initData();
this.$message.success('修改条件成功');
}).catch(()=>{
this.$message.error('修改条件失败');
});
},
initData() {
this.update = false;
this.updateIndex = '';
this.field = '';
this.$refs.form && this.$refs.form.resetFields();
this.formModel.stop = '';
this.actionInfo = {};
},
onCommit() {
this.$refs.form.validate((valid) => {
if (valid) {
const data = [...this.tableData];
data.push({code: this.formModel.code, physicalCode: this.formModel.physicalCode, stop: this.formModel.stop});
const param = { trainStatuses: data };
if (this.delay) {
param.delay = this.delay * 1000;
}
updateActionCondition(this.$route.query.group, this.actionId, param).then(resp => {
this.tableData = data;
this.actionInfo.condition = {
trainStatuses: data,
delay:this.delay * 1000
};
this.initData();
this.$message.success('添加条件成功');
}).catch(()=>{
this.$message.error('添加条件失败');
});
}
});
},
hover(field) {
if (this.field === field) {
this.field = '';
} else {
this.field = field;
}
},
deviceSelect(em) {
if (this.field.toUpperCase() === 'triggerSection'.toUpperCase() && em._type.toUpperCase() === 'Section'.toUpperCase()) {
this.formModel.physicalCode = em.code;
} else if (this.field.toUpperCase() === 'triggerTrain'.toUpperCase() && em._type.toUpperCase() === 'Train'.toUpperCase()) {
this.formModel.code = em.code;
}
}
}
};
</script>
<style scoped>
.reminder-drag{
position: absolute;
bottom: 10px;
left: 15px;
z-index: 200;
padding: 5px;
background: #FFF;
width: 400px;
height: 600px;
border-radius: 5px;
}
</style>

View File

@ -43,6 +43,7 @@
</span> </span>
</div> </div>
<div class="btnGroup"> <div class="btnGroup">
<el-button :type="conditionActionId === actionInfo.id? 'danger':'primary'" size="mini" @click="handleCondition(actionInfo)">{{ getConditionNum(actionInfo.condition) }}</el-button>
<el-button v-if="actionInfo.visible && !actionInfo.isModify" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button> <el-button v-if="actionInfo.visible && !actionInfo.isModify" type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo)">{{ $t('scriptRecord.modifyConversitionButton') }}</el-button>
<el-button v-if="actionInfo.visible && actionInfo.isModify" :loading="modifyTextLoading" type="danger" size="mini" style="margin-left:10px;" @click="confirmModify(actionInfo)">确定</el-button> <el-button v-if="actionInfo.visible && actionInfo.isModify" :loading="modifyTextLoading" type="danger" size="mini" style="margin-left:10px;" @click="confirmModify(actionInfo)">确定</el-button>
<el-button v-if="actionInfo.visible && actionInfo.isModify" type="" size="mini" style="margin-left:10px;" @click="cancleModify(actionInfo)">取消</el-button> <el-button v-if="actionInfo.visible && actionInfo.isModify" type="" size="mini" style="margin-left:10px;" @click="cancleModify(actionInfo)">取消</el-button>
@ -85,19 +86,24 @@ export default {
modifyTextLoading:false, modifyTextLoading:false,
deleteLoading:false, deleteLoading:false,
// behaviorName:"", // behaviorName:"",
memberName: '' memberName: '',
conditionActionId: ''
}; };
}, },
watch: { watch: {
actionInfoList: function(val) { // actionInfoList: function(val) {
// this.$nextTick(function() {
// var div = this.$refs['elActionScrollbar'].$refs['wrap'];
// div.scrollTop = this.$refs['elActionScrollbar'].wrap.scrollHeight;
// });
// },
'$store.state.socket.scriptAction':function(val) {
this.covertData(this.memberList, val);
this.$nextTick(function() { this.$nextTick(function() {
var div = this.$refs['elActionScrollbar'].$refs['wrap']; var div = this.$refs['elActionScrollbar'].$refs['wrap'];
div.scrollTop = this.$refs['elActionScrollbar'].wrap.scrollHeight; div.scrollTop = this.$refs['elActionScrollbar'].wrap.scrollHeight;
}); });
}, },
'$store.state.socket.scriptAction':function(val) {
this.covertData(this.memberList, val);
},
'memberList':function(val) { 'memberList':function(val) {
this.loadInitData(); this.loadInitData();
} }
@ -108,6 +114,14 @@ export default {
loadInitData() { loadInitData() {
this.loadOtherData(this.$route.query); this.loadOtherData(this.$route.query);
}, },
handleCondition(actionInfo) {
if (this.conditionActionId === actionInfo.id) {
this.conditionActionId = '';
} else {
this.conditionActionId = actionInfo.id;
}
this.$emit('showConditionManage', actionInfo);
},
covertData(memberList, element) { covertData(memberList, element) {
const member = memberList.find(elem=>{ return elem.id == element.memberId; }); const member = memberList.find(elem=>{ return elem.id == element.memberId; });
const memberName = member.type + member.deviceName + (member.name ? member.name : ''); const memberName = member.type + member.deviceName + (member.name ? member.name : '');
@ -130,16 +144,16 @@ export default {
}); });
} }
this.actionInfoList.push({id: element.id, isStartCoversition: true, memberName: memberName, targetName:targetNameList.toString() }); this.actionInfoList.push({id: element.id, isStartCoversition: true, memberName: memberName, targetName:targetNameList.toString(), condition: element.condition });
break; break;
} }
case 'Drive': { case 'Drive': {
this.actionInfoList.push({id: element.id, isDrive: true, memberName: memberName, targetName:this.covertSection(element.targetSectionCode)}); this.actionInfoList.push({id: element.id, isDrive: true, memberName: memberName, targetName:this.covertSection(element.targetSectionCode), condition: element.condition});
break; break;
} }
case 'Conversation': case 'Conversation':
{ {
this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, reply: element.content, row: element, visible: true, isModify:false, modifyText:''}); this.actionInfoList.push({id: element.id, isCoversition: true, memberName: memberName, reply: element.content, row: element, visible: true, isModify:false, modifyText:'', condition: element.condition});
break; break;
} }
// case 'Exit_Conversation': { // case 'Exit_Conversation': {
@ -151,37 +165,50 @@ export default {
// const command = CommandHandler.getScriptDefinition(element.operationType); // const command = CommandHandler.getScriptDefinition(element.operationType);
const commandName = element.operationType; const commandName = element.operationType;
if (commandName != 'Set_Fault' && commandName != 'Cancel_Fault' ) { if (commandName != 'Set_Fault' && commandName != 'Cancel_Fault' ) {
const list = ['Train_Update_Type', // const list = ['Train_Update_Type',
'Train_Add_Train_Trace', // 'Train_Add_Train_Trace',
'Train_Remove_Train_Trace', // 'Train_Remove_Train_Trace',
'Train_Move_Train_Trace', // 'Train_Move_Train_Trace',
'Train_Set_Plan', // 'Train_Set_Plan',
'Train_Set_Head', // 'Train_Set_Head',
'Train_Set_Manual', // 'Train_Set_Manual',
'Train_Set_Crew_Number', // 'Train_Set_Crew_Number',
'Train_Tag_Atp_Cut', // 'Train_Tag_Atp_Cut',
'Train_Tag_Atp_Recover', // 'Train_Tag_Atp_Recover',
'Train_Allow_Pass', // 'Train_Allow_Pass',
'Train_Info']; // 'Train_Info'];
let operateType = commandName.split('_')[0]; // let operateType = commandName.split('_')[0];
if (list.includes(commandName)) { // if (list.includes(commandName)) {
operateType = 'TrainWindow'; // operateType = 'TrainWindow';
// }
// if (operateType == 'CM') {
// operateType = 'ControlConvertMenu';
// }
let operateName = null;
let operateType = '';
Object.keys(CMD).forEach(key => {
Object.values(CMD[key]).forEach(el => {
if (el.value == commandName) {
operateType = key;
operateName = el;
return;
}
});
});
// const operateName = Object.values(CMD[operateType]).find(res=>{ return res.value == commandName; });
if (operateName) {
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式', Driver:'司机', Train:'列车'};
const operateTypeName = deviceTypeList[operateType];
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false, condition: element.condition});
} }
if (operateType == 'CM') {
operateType = 'ControlConvertMenu';
}
const operateName = Object.values(CMD[operateType]).find(res=>{ return res.value == commandName; });
const deviceTypeList = {Section:'区段', Switch:'道岔', Signal:'信号机', Stand:'站台', Station:'车站', TrainWindow:'车次窗', ControlConvertMenu:'控制模式', Driver:'司机', Train:'列车'};
const operateTypeName = deviceTypeList[operateType];
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: operateTypeName + '(' + operateName.label + ')', row: element, visible: false});
} else { } else {
// deviceFaultType // deviceFaultType
// element.operationParamMap.faultType; // element.operationParamMap.faultType;
// '(' + operateName.label + ')' // '(' + operateName.label + ')'
if (commandName == 'Set_Fault') { if (commandName == 'Set_Fault') {
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '设置故障', row: element, visible: false}); this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '设置故障', row: element, visible: false, condition: element.condition});
} else if (commandName == 'Cancel_Fault') { } else if (commandName == 'Cancel_Fault') {
this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '取消故障', row: element, visible: false}); this.actionInfoList.push({id: element.id, isOperation: true, memberName: memberName, command: '取消故障', row: element, visible: false, condition: element.condition});
} }
} }
break; break;
@ -198,7 +225,7 @@ export default {
Open_Or_Close_Door:'开关门', Open_Or_Close_Door:'开关门',
Switch_Hook_Lock: '道岔钩锁' Switch_Hook_Lock: '道岔钩锁'
}; };
this.actionInfoList.push({id: element.id, isCommand: true, memberName: memberName, command: CommandList[element.commandInitiateVO.commandType], targetName:targetName.name, row: element, visible: false}); this.actionInfoList.push({id: element.id, isCommand: true, memberName: memberName, command: CommandList[element.commandInitiateVO.commandType], targetName:targetName.name, row: element, visible: false, condition: element.condition});
break; break;
} }
} }
@ -211,20 +238,29 @@ export default {
return ''; return '';
} }
}, },
loadOtherData(obj) { loadOtherData(obj, judge = true) {
const group = obj.group; const group = obj.group;
const scrollTop = this.$refs.elActionScrollbar.wrap.scrollTop;
getScriptAllAction(group).then(resp=>{ getScriptAllAction(group).then(resp=>{
this.actionInfoList = []; this.actionInfoList = [];
const actionList = resp.data; const actionList = resp.data;
actionList.forEach(element => { actionList.forEach(element => {
this.covertData(this.memberList, element); this.covertData(this.memberList, element);
}); });
this.$nextTick(() => {
if (judge) {
var div = this.$refs['elActionScrollbar'].$refs['wrap'];
div.scrollTop = this.$refs['elActionScrollbar'].wrap.scrollHeight;
} else {
this.$refs.elActionScrollbar.wrap.scrollTop = scrollTop;
}
});
}).catch(error => { }).catch(error => {
this.$message(error.message); this.$message(error.message);
}); });
}, },
reloadTable() { reloadTable() {
this.loadInitData(); this.loadOtherData(this.$route.query, false);
}, },
modifyAction(actionInfo) { modifyAction(actionInfo) {
actionInfo.modifyText = actionInfo.row.content; actionInfo.modifyText = actionInfo.row.content;
@ -269,6 +305,16 @@ export default {
this.deleteLoading = false; this.deleteLoading = false;
this.$messageBox('删除会话/动作失败:' + error.message); this.$messageBox('删除会话/动作失败:' + error.message);
}); });
},
getConditionNum(condition) {
let num = 0;
if (condition && condition.trainStatuses) {
num = num + condition.trainStatuses.length;
}
if (condition && condition.delay) {
num = num + 1;
}
return `触发条件(${num})`;
} }
} }
}; };

View File

@ -7,7 +7,7 @@
导入剧本 导入剧本
</el-button> </el-button>
</div> </div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" /> <QueryListPage ref="queryListPage" :card-padding="50" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" style="width: 91%;margin-left:4%;margin-top:20px;" />
<script-publish ref="publishScript" :title="$t('scriptRecord.publishScript')" @reloadTable="reloadTable" @create="handleConfirmPublish" /> <script-publish ref="publishScript" :title="$t('scriptRecord.publishScript')" @reloadTable="reloadTable" @create="handleConfirmPublish" />
<create-script ref="createScript" :title="$t('scriptRecord.createScript')" @reloadTable="reloadTable" @create="handleConfirmCreate" /> <create-script ref="createScript" :title="$t('scriptRecord.createScript')" @reloadTable="reloadTable" @create="handleConfirmCreate" />
<create-script ref="modifyScript" :title="$t('scriptRecord.modifyScript')" @reloadTable="reloadTable" @create="handleConfirmModify" /> <create-script ref="modifyScript" :title="$t('scriptRecord.modifyScript')" @reloadTable="reloadTable" @create="handleConfirmModify" />
@ -145,7 +145,7 @@ export default {
}, },
drawUp(index, row) { drawUp(index, row) {
scriptRecordNotifyNew(row.id).then(resp => { scriptRecordNotifyNew(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode}; const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode, record: true};
this.$router.push({ path: `${UrlConfig.scriptDisplayNew}/script`, query }); this.$router.push({ path: `${UrlConfig.scriptDisplayNew}/script`, query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {
@ -293,7 +293,7 @@ export default {
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
const el = document.createElement('a'); const el = document.createElement('a');
el.href = url; el.href = url;
el.download = `${resultData.name}.json`; el.download = `剧本-${resultData.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); urlObject.revokeObjectURL(url);
}); });

View File

@ -1,5 +1,5 @@
<template> <template>
<div> <div style="position:relative">
<div class="scriptRecordNew" :style="{bottom:(offsetBottom-15)+'px'}"> <div class="scriptRecordNew" :style="{bottom:(offsetBottom-15)+'px'}">
<div v-show="isShow" class="scriptRecordNewIn"> <div v-show="isShow" class="scriptRecordNewIn">
<el-tabs type="card"> <el-tabs type="card">
@ -24,18 +24,28 @@
</div> </div>
</div> </div>
</div> </div>
<el-button-group class="button-group"> <el-button-group v-if="!isReplaceBg" class="button-group">
<el-button v-if="isPause" size="small" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button> <el-button v-if="isPause" size="small" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button>
<el-button v-else size="small" type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复</el-button> <el-button v-else size="small" type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复</el-button>
<el-button size="small" type="danger" :disabled="!backDisabled" @click="dumpScenesData">{{ $t('scriptRecord.resetScript') }}</el-button> <el-button size="small" type="danger" :disabled="!backDisabled" @click="dumpScenesData">{{ $t('scriptRecord.resetScript') }}</el-button>
<el-button size="small" type="primary" :disabled="backDisabled" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button> <el-button v-if="backDisabled" size="small" type="primary" @click="startReplaceBg">{{ $t('scriptRecord.startReplaceBg') }}</el-button>
<el-button v-else size="small" type="primary" :disabled="backDisabled" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</el-button>
<el-button size="small" type="success" :loading="isSavingScript" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button> <el-button size="small" type="success" :loading="isSavingScript" @click="saveScenesData">{{ $t('scriptRecord.saveData') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<div class="scriptPanelRight"> <div class="scriptPanelRight">
<get-action-new ref="getAction" :group="group" :size="size" :member-list="memberList" /> <get-action-new ref="getAction" :group="group" :size="size" :member-list="memberList" @showConditionManage="showConditionManage" />
</div> </div>
</div> </div>
<template v-if="isReplaceBg">
<div class="mask" />
<el-button-group class="button-group">
<el-button v-if="isPause" size="small" type="primary" :disabled="executeDisabled" @click="pauseScript">{{ $t('scriptRecord.drivingPause') }}</el-button>
<el-button v-else size="small" type="primary" :disabled="executeDisabled" @click="executePlayScript">恢复</el-button>
<el-button size="small" type="primary" @click="confirmReplaceBg">{{ $t('scriptRecord.confirmReplaceBg') }}</el-button>
<el-button size="small" type="info" @click="cancelReplaceBg">{{ $t('scriptRecord.cancelReplaceBg') }}</el-button>
</el-button-group>
</template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="所有成员"> <el-tab-pane label="所有成员">
<div class="eachScriptPanel"> <div class="eachScriptPanel">
@ -56,6 +66,7 @@
</div> </div>
</div> </div>
<add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" /> <add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" />
<condition-manage ref="conditionManage" @clearConditionActionId="clearConditionActionId" />
</div> </div>
</template> </template>
<script> <script>
@ -68,13 +79,15 @@ import {covertMemberData} from '@/views/newMap/displayNew/utils';
import GetActionNew from './getAction'; import GetActionNew from './getAction';
import AllScriptRole from './allScriptRole'; import AllScriptRole from './allScriptRole';
import { getToken } from '@/utils/auth'; import { getToken } from '@/utils/auth';
import {executeScriptNew, dumpScriptDataNew, saveScriptDataNew, saveScriptScenesNew, updateMapLocationNew, simulationPause} from '@/api/simulation'; import ConditionManage from './conditionManage';
import {executeScriptNew, dumpScriptDataNew, saveScriptDataNew, saveScriptScenesNew, updateMapLocationNew, simulationPause, startReplaceBg, confirmReplaceBg, cancelReplaceBg} from '@/api/simulation';
export default { export default {
name:'TipScriptRecord', name:'TipScriptRecord',
components: { components: {
GetActionNew, GetActionNew,
AllScriptRole, AllScriptRole,
AddScriptMember AddScriptMember,
ConditionManage
}, },
props: { props: {
group: { group: {
@ -88,6 +101,10 @@ export default {
offset:{ offset:{
type: Number, type: Number,
required: true required: true
},
isReplaceBg: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@ -395,7 +412,7 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
dumpScriptDataNew(group).then(resp => { dumpScriptDataNew(group).then(resp => {
this.$parent.resetBeginTime(); // this.$parent.resetBeginTime();
this.$refs['getAction'].loadInitData(); this.$refs['getAction'].loadInitData();
this.$store.dispatch('training/updateMemberListInScript', this.$store.dispatch('training/updateMemberListInScript',
{ {
@ -413,6 +430,8 @@ export default {
this.quickChangeMember.list = [new_member]; this.quickChangeMember.list = [new_member];
this.$emit('resetChat'); this.$emit('resetChat');
} }
this.$refs.conditionManage && this.$refs.conditionManage.handleClose();
this.$refs.getAction.conditionActionId = '';
this.$store.dispatch('training/setPrdType', '02'); this.$store.dispatch('training/setPrdType', '02');
this.$store.dispatch('map/resetActiveTrainList'); this.$store.dispatch('map/resetActiveTrainList');
this.$store.dispatch('scriptRecord/updateRole', new_member.type + ':' + this.orignalUserRoleId); this.$store.dispatch('scriptRecord/updateRole', new_member.type + ':' + this.orignalUserRoleId);
@ -421,6 +440,7 @@ export default {
this.oldMember = {id:this.orignalUserRoleId, type:new_member.type}; this.oldMember = {id:this.orignalUserRoleId, type:new_member.type};
this.$message.success(this.$t('scriptRecord.resetDataSuccess')); this.$message.success(this.$t('scriptRecord.resetDataSuccess'));
}).catch(() => { }).catch(() => {
// console.log(error);
this.$messageBox(this.$t('scriptRecord.resetDataFail')); this.$messageBox(this.$t('scriptRecord.resetDataFail'));
}); });
}); });
@ -518,6 +538,34 @@ export default {
); );
this.oldMember = Object.assign({}, role); this.oldMember = Object.assign({}, role);
this.$refs.allScriptRole.updateLoading(); this.$refs.allScriptRole.updateLoading();
},
startReplaceBg() {
startReplaceBg(this.group).then(resp => {
this.$emit('setReplace', true);
}).catch(error => {
this.$messageBox(error.message);
});
},
confirmReplaceBg() {
confirmReplaceBg(this.group).then(resp => {
this.$message.success('替换成功');
this.$emit('setReplace', false);
}).catch(error => {
this.$messageBox(error.message);
});
},
cancelReplaceBg() {
cancelReplaceBg(this.group).then(resp => {
this.$emit('setReplace', false);
}).catch(error => {
this.$messageBox(error.message);
});
},
showConditionManage(actionInfo) {
this.$refs.conditionManage.doShow(actionInfo);
},
clearConditionActionId() {
this.$refs.getAction.conditionActionId = '';
} }
} }
}; };
@ -528,7 +576,9 @@ export default {
} }
.button-group{ .button-group{
position: absolute; position: absolute;
bottom: 0; left: 0;
bottom: 0;
z-index: 5;
} }
.eachScriptPanel{ .eachScriptPanel{
height: 300px; height: 300px;
@ -546,6 +596,7 @@ export default {
} }
.scriptPanelRight{ .scriptPanelRight{
width: 680px; width: 680px;
position: relative;
} }
.scriptRecordNew{ .scriptRecordNew{
position: absolute; position: absolute;
@ -609,5 +660,25 @@ export default {
text-align: center; text-align: center;
display: inline-block; display: inline-block;
} }
.mask {
position: absolute;
top:0;
right:0;
bottom:0;
left:0;
opacity: 0.5;
z-index: 2;
&::before {
content: '';
position: absolute;
top:0;
right:0;
bottom:0;
left:0;
background: #aaa;
filter: blur(20px);
}
}
</style> </style>