This commit is contained in:
fan 2020-11-05 09:33:08 +08:00
commit 636757ddbe
11 changed files with 166 additions and 94 deletions

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

@ -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,
@ -168,6 +168,7 @@ export default {
var isBackup = true; var isBackup = true;
var opt = { name: '', markPointData: [], data: [] }; var opt = { name: '', markPointData: [], data: [] };
if (service.tripNumberDataList && service.tripNumberDataList.length) { if (service.tripNumberDataList && service.tripNumberDataList.length) {
debugger;
service.tripNumberDataList.forEach((train, j) => { service.tripNumberDataList.forEach((train, j) => {
var pointdata = {}; var pointdata = {};
var idx = 0; var idx = 0;
@ -178,7 +179,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 +275,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

@ -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

@ -22,6 +22,7 @@ export function createMartPoint(opt) {
/** 创建一个车次数据点*/ /** 创建一个车次数据点*/
export function createMartPointReverse(opt) { export function createMartPointReverse(opt) {
debugger;
const rotate = opt.directionCode == '1' ? 45 : (opt.directionCode == '2' ? -45 : 0); const rotate = opt.directionCode == '1' ? 45 : (opt.directionCode == '2' ? -45 : 0);
const position = opt.type ? 'insideBottomLeft' : 'insideTopLeft'; const position = opt.type ? 'insideBottomLeft' : 'insideTopLeft';
return { return {

View File

@ -119,7 +119,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

@ -159,29 +159,42 @@ 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});
} }
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;

View File

@ -24,28 +24,28 @@
</div> </div>
</div> </div>
</div> </div>
<el-button-group class="button-group" v-if="!isReplaceBg"> <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" v-if="backDisabled" @click="startReplaceBg">{{ $t('scriptRecord.startReplaceBg') }}</el-button> <el-button v-if="backDisabled" size="small" type="primary" @click="startReplaceBg">{{ $t('scriptRecord.startReplaceBg') }}</el-button>
<el-button size="small" type="primary" v-else :disabled="backDisabled" @click="saveScenesStage">{{ $t('scriptRecord.saveBackground') }}</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" @showConditionManage="showConditionManage" /> <get-action-new ref="getAction" :group="group" :size="size" :member-list="memberList" @showConditionManage="showConditionManage" />
</div> </div>
</div> </div>
<template v-if="isReplaceBg"> <template v-if="isReplaceBg">
<div class="mask"/> <div class="mask" />
<el-button-group class="button-group"> <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-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="primary" @click="confirmReplaceBg">{{ $t('scriptRecord.confirmReplaceBg') }}</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 size="small" type="info" @click="cancelReplaceBg">{{ $t('scriptRecord.cancelReplaceBg') }}</el-button>
</el-button-group> </el-button-group>
</template> </template>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="所有成员"> <el-tab-pane label="所有成员">
<div class="eachScriptPanel"> <div class="eachScriptPanel">
@ -60,10 +60,10 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
<div class="scriptRecordNewTitle" @click="minisize"> <div class="scriptRecordNewTitle" @click="minisize">
<span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span> <span class="titleStyle">{{ $t('scriptRecord.scriptRecordTitle') }}</span>
</div> </div>
</div> </div>
<add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" /> <add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" />
<condition-manage ref="conditionManage" /> <condition-manage ref="conditionManage" />
@ -102,10 +102,10 @@ export default {
type: Number, type: Number,
required: true required: true
}, },
isReplaceBg: { isReplaceBg: {
type: Boolean, type: Boolean,
default: false default: false
} }
}, },
data() { data() {
return { return {
@ -140,7 +140,7 @@ export default {
}, },
orignalUserRoleId() { orignalUserRoleId() {
return this.$store.state.training.orignalUserRoleId; return this.$store.state.training.orignalUserRoleId;
} }
}, },
watch:{ watch:{
'$store.state.map.mapViewLoadedCount': function (val) { '$store.state.map.mapViewLoadedCount': function (val) {
@ -535,32 +535,32 @@ export default {
); );
this.oldMember = Object.assign({}, role); this.oldMember = Object.assign({}, role);
this.$refs.allScriptRole.updateLoading(); this.$refs.allScriptRole.updateLoading();
}, },
startReplaceBg() { startReplaceBg() {
startReplaceBg(this.group).then(resp => { startReplaceBg(this.group).then(resp => {
this.$emit('setReplace', true); this.$emit('setReplace', true);
}).catch(error => { }).catch(error => {
this.$messageBox(error.message); this.$messageBox(error.message);
}) });
}, },
confirmReplaceBg() { confirmReplaceBg() {
confirmReplaceBg(this.group).then(resp => { confirmReplaceBg(this.group).then(resp => {
this.$message.success('替换成功'); this.$message.success('替换成功');
this.$emit('setReplace', false); this.$emit('setReplace', false);
}).catch(error => { }).catch(error => {
this.$messageBox(error.message); this.$messageBox(error.message);
}) });
}, },
cancelReplaceBg() { cancelReplaceBg() {
cancelReplaceBg(this.group).then(resp => { cancelReplaceBg(this.group).then(resp => {
this.$emit('setReplace', false); this.$emit('setReplace', false);
}).catch(error => { }).catch(error => {
this.$messageBox(error.message); this.$messageBox(error.message);
}) });
}, },
showConditionManage(actionInfo) { showConditionManage(actionInfo) {
this.$refs.conditionManage.doShow(actionInfo); this.$refs.conditionManage.doShow(actionInfo);
} }
} }
}; };
</script> </script>