This commit is contained in:
ival 2019-11-12 13:44:30 +08:00
commit 79219792c9
30 changed files with 1045 additions and 1031 deletions

View File

@ -16,14 +16,14 @@ export default class Train extends Group {
this.z = 40; this.z = 40;
this.size = 0; this.size = 0;
this.section = null; this.section = null;
this.fontSize = style.Train.common.useSelfText?style.Train.common.nameFontSize || style.Train.common.trainTextFontSize:model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize; this.fontSize = style.Train.common.useSelfText ? style.Train.common.nameFontSize || style.Train.common.trainTextFontSize : model.nameFontSize || style.Train.common.nameFontSize || style.Train.common.trainTextFontSize;
this.newScale = this.fontSize / style.Train.common.trainTextFontSize; this.newScale = this.fontSize / style.Train.common.trainTextFontSize;
this.nameFormat = style.Train.common.useSelfFormat?style.Train.trainBody.trainNameFormat:model.nameFormat || style.Train.trainBody.trainNameFormat; this.nameFormat = style.Train.common.useSelfFormat ? style.Train.trainBody.trainNameFormat : model.nameFormat || style.Train.trainBody.trainNameFormat;
if ( style.Train.trainBody.specialTrainType.length > 0) { if ( style.Train.trainBody.specialTrainType.length > 0) {
style.Train.trainBody.specialTrainType.some((item) =>{ style.Train.trainBody.specialTrainType.some((item) =>{
if (model.type === item.type) { if (model.type === item.type) {
this.nameFormat = item.nameFormat; this.nameFormat = item.nameFormat;
model.serviceNumber = item.serviceNumber?item.serviceNumber : model.serviceNumber; model.serviceNumber = item.serviceNumber ? item.serviceNumber : model.serviceNumber;
return true; return true;
} }
}); });
@ -127,6 +127,7 @@ export default class Train extends Group {
this.trainB && this.trainB.setSShow(false); this.trainB && this.trainB.setSShow(false);
this.trainB && this.trainB.setDShow(false); this.trainB && this.trainB.setDShow(false);
this.trainB && this.trainB.setAShow(false); this.trainB && this.trainB.setAShow(false);
this.trainL && this.trainL.setLineShow(false); this.trainL && this.trainL.setLineShow(false);
this.trainR && this.trainR.setLineShow(false); this.trainR && this.trainR.setLineShow(false);
this.trainL && this.trainL.setArrowShow(false); this.trainL && this.trainL.setArrowShow(false);
@ -135,7 +136,7 @@ export default class Train extends Group {
// 设置服务号状态类型 // 设置服务号状态类型
setServerNoType(type) { setServerNoType(type) {
if (this.style.Train.trainStatusStyle.serverNoType.length>0) { if (this.style.Train.trainStatusStyle.serverNoType.length > 0) {
const flag = this.style.Train.trainStatusStyle.serverNoType.some((item) =>{ const flag = this.style.Train.trainStatusStyle.serverNoType.some((item) =>{
if (type === item.type) { if (type === item.type) {
this.trainB && this.trainB.setTextTrainServerColor(item.showColor); this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
@ -150,7 +151,7 @@ export default class Train extends Group {
// 设置目的地状态 // 设置目的地状态
setDestinationStatus(status) { setDestinationStatus(status) {
if (this.style.Train.trainStatusStyle.destinationStatus.length>0) { if (this.style.Train.trainStatusStyle.destinationStatus.length > 0) {
const flag = this.style.Train.trainStatusStyle.destinationStatus.some((item) =>{ const flag = this.style.Train.trainStatusStyle.destinationStatus.some((item) =>{
if (status === item.status) { if (status === item.status) {
switch (this.style.Train.trainStatusStyle.destinationStatusSetText) { switch (this.style.Train.trainStatusStyle.destinationStatusSetText) {
@ -188,14 +189,24 @@ export default class Train extends Group {
} }
// 设置运行方向状态类型 // 设置运行方向状态类型
setDirectionType(type) { setDirectionType(type, flag) {
if (this.style.Train.trainStatusStyle.directionType.length > 0) { if (this.style.Train.trainStatusStyle.directionType.length > 0) {
this.style.Train.trainStatusStyle.directionType.some((item) => { this.style.Train.trainStatusStyle.directionType.forEach((item) => {
if (type === item.type) { if (type === item.type) {
this.trainL && this.trainL.setLineShow(item.lineLShow); let lineLShow = item.lineLShow;
this.trainL && this.trainL.setArrowShow(item.arrowLShow); let arrowLShow = item.arrowLShow;
this.trainR && this.trainR.setLineShow(item.lineRShow); let lineRShow = item.lineRShow;
this.trainR && this.trainR.setArrowShow(item.arrowRShow); let arrowRShow = item.arrowRShow;
if (flag) {
lineLShow = !item.lineLShow;
arrowLShow = !item.arrowLShow;
lineRShow = !item.lineRShow;
arrowRShow = !item.arrowRShow;
}
this.trainL && this.trainL.setLineShow(lineLShow);
this.trainL && this.trainL.setArrowShow(arrowLShow);
this.trainR && this.trainR.setLineShow(lineRShow);
this.trainR && this.trainR.setArrowShow(arrowRShow);
return true; return true;
} }
}); });
@ -204,7 +215,7 @@ export default class Train extends Group {
// 设置列车停止方向类型 // 设置列车停止方向类型
setDirectionStopType(type) { setDirectionStopType(type) {
if (this.style.Train.trainStatusStyle.directionStopType.length > 0) { if (this.style.Train.trainStatusStyle.directionStopType.length > 0) {
this.style.Train.trainStatusStyle.directionStopType.some((item) => { this.style.Train.trainStatusStyle.directionStopType.forEach((item) => {
if (type === item.type) { if (type === item.type) {
this.trainL && this.trainL.setLineShow(item.lineLShow); this.trainL && this.trainL.setLineShow(item.lineLShow);
this.trainR && this.trainR.setLineShow(item.lineRShow); this.trainR && this.trainR.setLineShow(item.lineRShow);
@ -214,13 +225,13 @@ export default class Train extends Group {
} }
} }
// 设置运行状态 // 设置运行状态
setRunStatus(status) { setRunStatus(status, flag) {
switch (status) { switch (status) {
case '01': // 停止 case '01': // 停止
this.setDirectionStopType(this.model.directionType); // 设置运行方向状态类型 this.setDirectionStopType(this.model.directionType); // 设置运行方向状态类型
break; break;
case '02': // 运行 case '02': // 运行
this.setDirectionType(this.model.directionType); // 设置运行方向状态类型 this.setDirectionType(this.model.directionType, flag); // 设置运行方向状态类型
break; break;
} }
@ -231,7 +242,7 @@ export default class Train extends Group {
this.style.Train.trainStatusStyle.runModeStatus.some((item) => { this.style.Train.trainStatusStyle.runModeStatus.some((item) => {
if (status === item.status) { if (status === item.status) {
this.trainL && this.trainL.setColor(item.trainLColor); this.trainL && this.trainL.setColor(item.trainLColor);
this.trainR &&this.trainR.setColor(item.trainRColor); this.trainR && this.trainR.setColor(item.trainRColor);
return true; return true;
} }
}); });
@ -273,7 +284,7 @@ export default class Train extends Group {
} }
// 设置报警状态 // 设置报警状态
setAlarmStatus(status) { setAlarmStatus(status) {
if (this.style.Train.trainStatusStyle.alarmStatus.length >0) { if (this.style.Train.trainStatusStyle.alarmStatus.length > 0) {
this.style.Train.trainStatusStyle.alarmStatus.some((item) => { this.style.Train.trainStatusStyle.alarmStatus.some((item) => {
if (status === item.status) { if (status === item.status) {
this.trainB && this.trainB.setAShow(item.aShow); this.trainB && this.trainB.setAShow(item.aShow);
@ -297,11 +308,22 @@ export default class Train extends Group {
// 设置状态 // 设置状态
setState(model) { setState(model) {
this.model = model; this.model = model;
// let points = [];
const flag = false;
// if (this.model.sectionModel && this.model.sectionModel.points) {
// points = this.model.sectionModel.points;
// if (points.length) {
// const pointFlag = points[0].x - points[points.length - 1].x;
// if (pointFlag > 0) {
// flag = true; // 方向去反
// }
// }
// }
if (model) { if (model) {
this.recover(); this.recover();
this.setServerNoType(model.serverNoType); // 设置服务号状态类型 this.setServerNoType(model.serverNoType); // 设置服务号状态类型
this.setDestinationStatus(model.destinationStatus); // 设置目的地状态 this.setDestinationStatus(model.destinationStatus); // 设置目的地状态
this.setRunStatus(model.runStatus); // 设置运行状态 this.setRunStatus(model.runStatus, flag); // 设置运行状态
this.setRunMode(model.runMode); // 设置运行模式 this.setRunMode(model.runMode); // 设置运行模式
this.setRunControlStatus(model.runControlStatus); // 设置运行控制状态类型 this.setRunControlStatus(model.runControlStatus); // 设置运行控制状态类型
this.setDoorStatus(model.doorStatus); // 设置车门状态类型 this.setDoorStatus(model.doorStatus); // 设置车门状态类型

View File

@ -134,7 +134,7 @@ export const userSimulation = '013'; // 仿真系统
export const userScreen = '014'; // 大屏系统 export const userScreen = '014'; // 大屏系统
export const userPlan = '015'; // 计划系统 export const userPlan = '015'; // 计划系统
export const userDesign = '016'; // 设计系统 export const userDesign = '016'; // 设计系统
const isDev = process.env.NODE_ENV === 'development'; // const isDev = process.env.NODE_ENV === 'development';
export const UrlConfig = { export const UrlConfig = {
display: '/display', display: '/display',

View File

@ -135,9 +135,9 @@ export default {
this.$refs.applyReject.doShow(row); this.$refs.applyReject.doShow(row);
}, },
scriptPreview(index, row) { scriptPreview(index, row) {
// const mapInfo = this.allMapList.find(elem=>{ return elem.id == row.mapId; }); const mapInfo = this.allMapList.find(elem=>{ return elem.id == row.mapId; });
scriptDraftRecordNotify(row.id).then(resp => { scriptDraftRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0}; const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:mapInfo.lineCode};
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query }); this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {

View File

@ -25,7 +25,7 @@
</template> </template>
<script> <script>
// import { getPublishMapInfo } from '@/api/jmap/map'; import { getPublishMapInfo } from '@/api/jmap/map';
import { getGoodsTryUse } from '@/api/management/goods'; import { getGoodsTryUse } from '@/api/management/goods';
import { PermissionType } from '@/scripts/ConstDic'; import { PermissionType } from '@/scripts/ConstDic';
import { launchFullscreen } from '@/utils/screen'; import { launchFullscreen } from '@/utils/screen';
@ -61,7 +61,8 @@ export default {
pmsList: [] pmsList: []
}, },
jointShow: false, jointShow: false,
jointGroup: '' jointGroup: '',
lineCode:''
}; };
}, },
computed: { computed: {
@ -84,6 +85,10 @@ export default {
mapId() { mapId() {
return this.$route.query.mapId; return this.$route.query.mapId;
} }
// lineCode() {
// // return this.$route.query.lineCode;
// }
}, },
watch: { watch: {
'$route': function (val) { '$route': function (val) {
@ -97,6 +102,7 @@ export default {
async loadInitData() { async loadInitData() {
this.loading = true; this.loading = true;
try { try {
const res = await getPublishMapInfo(this.mapId);
const resp = await getSubSystemDetail(this.$route.params.subSystem); const resp = await getSubSystemDetail(this.$route.params.subSystem);
this.tryUser = 0; this.tryUser = 0;
this.loading = false; this.loading = false;
@ -105,7 +111,7 @@ export default {
id: resp.data.mapPrd.id, id: resp.data.mapPrd.id,
name: resp.data.mapPrd.name, name: resp.data.mapPrd.name,
mapId: this.mapId, mapId: this.mapId,
lineCode: resp.data.mapPrd.lineCode, lineCode: res.data.lineCode,
remarks: resp.data.mapPrd.remarks, remarks: resp.data.mapPrd.remarks,
prdType: resp.data.mapPrd.prdType, prdType: resp.data.mapPrd.prdType,
prdId: resp.data.mapPrd.id, prdId: resp.data.mapPrd.id,
@ -226,6 +232,7 @@ export default {
const data = { mapId: this.courseModel.mapId, mapPrdId: this.currentPrdId }; const data = { mapId: this.courseModel.mapId, mapPrdId: this.currentPrdId };
this.buttonLoading = true; this.buttonLoading = true;
simulationNotify(data).then(resp => { simulationNotify(data).then(resp => {
const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser }; const query = { lineCode: this.courseModel.lineCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query }); this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
launchFullscreen(); launchFullscreen();
@ -235,11 +242,18 @@ export default {
}); });
}, },
buy() { buy() {
this.buttonLoading = true; this.$confirm('支付系统正在改进,如需购买请联系客服<br/>客服电话13289398171', this.$t('global.tips'), {
this.$router.push({ confirmButtonText: this.$t('global.confirm'),
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, dangerouslyUseHTMLString: true,
query: { permissionType: PermissionType.SIMULATION, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem } type: 'warning',
showCancelButton: false,
center: true
}); });
// this.buttonLoading = true;
// this.$router.push({
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
// query: { permissionType: PermissionType.SIMULATION, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
// });
}, },
transfer() { transfer() {
this.buttonLoading = false; this.buttonLoading = false;

View File

@ -90,7 +90,7 @@ export default {
switch (obj.type) { switch (obj.type) {
case 'scriptDesign': { case 'scriptDesign': {
setSessionStorage('designType', 'scriptDesign'); setSessionStorage('designType', 'scriptDesign');
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}` }); this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}?lineCode=${obj.lineCode}` });
break; break;
} }
case 'lessonDesign': { case 'lessonDesign': {
@ -141,7 +141,8 @@ export default {
name: this.$t('designPlatform.scriptDesign'), name: this.$t('designPlatform.scriptDesign'),
type: 'scriptDesign', type: 'scriptDesign',
mapId: elem.id, mapId: elem.id,
cityCode: elem.cityCode cityCode: elem.cityCode,
lineCode: elem.lineCode
// code:elem.children.find(n => { return n.name.includes("")}) // code:elem.children.find(n => { return n.name.includes("")})
}); });
elem.children.push( elem.children.push(

View File

@ -70,8 +70,8 @@ export default {
title() { title() {
return this.$t('display.faultChoose.selectFault'); return this.$t('display.faultChoose.selectFault');
}, },
skinCode() { lineCode() {
return this.$route.query.skinCode; return this.$route.query.lineCode;
} }
}, },
mounted() { mounted() {
@ -109,7 +109,7 @@ export default {
doShow() { doShow() {
this.dialogShow = true; this.dialogShow = true;
this.queryList.data = []; this.queryList.data = [];
getFailureGenerateRules({ skin: this.skinCode, group: this.group }).then(response => { getFailureGenerateRules({ skin: this.lineCode, group: this.group }).then(response => {
const data = response.data; const data = response.data;
data.forEach(elem => { data.forEach(elem => {
this.queryList.data.push({ this.queryList.data.push({

View File

@ -137,11 +137,18 @@ export default {
}); });
}, },
buy() { buy() {
this.loading = true; this.$confirm('支付系统正在改进,如需购买请联系客服<br/>客服电话13289398171', this.$t('global.tips'), {
this.$router.push({ confirmButtonText: this.$t('global.confirm'),
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, dangerouslyUseHTMLString: true,
query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem } type: 'warning',
showCancelButton: false,
center: true
}); });
// this.loading = true;
// this.$router.push({
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
// query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
// });
}, },
checkCourse() { checkCourse() {
this.loading = true; this.loading = true;

View File

@ -251,14 +251,7 @@ export default {
}, },
// //
onContextMenu(em) { onContextMenu(em) {
const path = window.location.href;
let mouseWheelFlag = false;
if (path.includes('design/userlist/map/draw')) {
mouseWheelFlag = true;
}
if (!mouseWheelFlag) { //
this.$emit('onMenu', em); this.$emit('onMenu', em);
}
}, },
// //
mapViewLoaded(loading) { mapViewLoaded(loading) {

View File

@ -8,7 +8,7 @@
<el-button size="small" :disabled="!recoverStepData.length" @click="recover">恢复</el-button> <el-button size="small" :disabled="!recoverStepData.length" @click="recover">恢复</el-button>
</el-button-group> </el-button-group>
</div> </div>
<jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" /> <jlmap-visual ref="jlmapVisual" @onSelect="clickEvent" @onMenu="onContextmenu" />
</div> </div>
<div class="map-draft"> <div class="map-draft">
<div v-show="viewDraft === 'draft'" class="box"> <div v-show="viewDraft === 'draft'" class="box">
@ -49,7 +49,7 @@
</template> </template>
<script> <script>
import { saveMap, getMapDetail, verifyMap, postBuildMapImport } from '@/api/jmap/mapdraft'; import { saveMap, getMapDetail, verifyMap, postBuildMapImport } from '@/api/jmap/mapdraft';
import { ViewMode, TrainingMode } from '@/scripts/ConstDic'; import { ViewMode, TrainingMode, getDeviceMenuByDeviceType } from '@/scripts/ConstDic';
import { checkLoginLine } from '@/api/login'; import { checkLoginLine } from '@/api/login';
import JlmapVisual from '@/views/jlmap/index'; import JlmapVisual from '@/views/jlmap/index';
import MapOperate from './mapoperate/index'; import MapOperate from './mapoperate/index';
@ -59,7 +59,6 @@ import { mapGetters } from 'vuex';
import ConfigMap from './configMap'; import ConfigMap from './configMap';
import DataRelation from './dataRelation/index'; import DataRelation from './dataRelation/index';
// import { deepAssign } from '@/utils/index';
export default { export default {
name: 'MapView', name: 'MapView',
@ -204,16 +203,16 @@ export default {
this.selected = device || null; this.selected = device || null;
this.selected && this.handleSelectControlPage(device); this.selected && this.handleSelectControlPage(device);
}, },
// onContextmenu(em) { onContextmenu(em) {
// this.point = { this.point = {
// x: em.clientX, x: em.clientX,
// y: em.clientY y: em.clientY
// }; };
// if (!em.deviceType) { if (!em.deviceType) {
// var menu = getDeviceMenuByDeviceType('Cancel'); var menu = getDeviceMenuByDeviceType('Cancel');
// this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu }); this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
// } }
// }, },
saveMapEvent() { saveMapEvent() {
if (this.$refs.jlmapVisual) { if (this.$refs.jlmapVisual) {
const map = this.$store.state.map.map; const map = this.$store.state.map.map;

View File

@ -231,7 +231,6 @@ export default {
cancelButtonText: this.$t('map.cancel'), cancelButtonText: this.$t('map.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -241,7 +241,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -233,7 +233,6 @@ export default {
cancelButtonText: this.$t('map.cancel'), cancelButtonText: this.$t('map.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -215,7 +215,6 @@ export default {
cancelButtonText: this.$t('map.cancel'), cancelButtonText: this.$t('map.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -322,9 +322,6 @@ export default {
updateMapModel(obj) { updateMapModel(obj) {
this.$emit('updateMapModel', obj); this.$emit('updateMapModel', obj);
}, },
// delMapModel(obj) {
// this.$emit('delMapModel', obj);
// },
setCenter(code) { setCenter(code) {
this.$emit('setCenter', code); this.$emit('setCenter', code);
} }

View File

@ -211,7 +211,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -202,7 +202,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -244,7 +244,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -423,7 +423,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -232,7 +232,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', _that.selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -286,7 +286,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -327,7 +327,6 @@ export default {
// / // /
handleDelete(selected) { handleDelete(selected) {
const models = []; const models = [];
// const remove = [];
this.sectionList.forEach(elem => { this.sectionList.forEach(elem => {
if (elem.type == '03' && elem.relSwitchCode == selected.code) { if (elem.type == '03' && elem.relSwitchCode == selected.code) {
models.push(deepAssign({ _type: 'Section', code: elem.code }, { _dispose: true })); models.push(deepAssign({ _type: 'Section', code: elem.code }, { _dispose: true }));
@ -339,8 +338,6 @@ export default {
} }
}); });
models.push(deepAssign(selected, { _dispose: true })); models.push(deepAssign(selected, { _dispose: true }));
// this.$emit('delMapModel', selected);
// this.$emit('delMapModel', remove);
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
}, },
findLinkData(code) { findLinkData(code) {
@ -389,7 +386,6 @@ export default {
}, },
// //
removeSwitchSection() { removeSwitchSection() {
// const remove = [];
const models = []; const models = [];
if (this.sectionList && this.sectionList.length) { if (this.sectionList && this.sectionList.length) {
this.sectionList.forEach(elem => { this.sectionList.forEach(elem => {
@ -403,7 +399,6 @@ export default {
models.push(elem); models.push(elem);
} }
}); });
// this.$emit('delMapModel', remove);
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
} }
}, },

View File

@ -222,7 +222,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -161,7 +161,7 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('delMapModel', train); this.$emit('updateMapModel', {...train, _dispose: true});
this.deviceSelect(); this.deviceSelect();
}).catch(() => { }).catch(() => {
this.$message.info(this.$t('tip.cancelledDelete')); this.$message.info(this.$t('tip.cancelledDelete'));
@ -177,7 +177,10 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$emit('delMapModel', this.trainList); this.trainList.forEach(item => {
item['_dispose'] = true;
});
this.$emit('updateMapModel', this.trainList);
this.deviceSelect(); this.deviceSelect();
}).catch(() => { }).catch(() => {
this.$message.info(this.$t('tip.cancelledDelete')); this.$message.info(this.$t('tip.cancelledDelete'));

View File

@ -16,7 +16,6 @@
<el-tab-pane class="view-control" :label="$t('map.batchOperation')" name="three"> <el-tab-pane class="view-control" :label="$t('map.batchOperation')" name="three">
<div style="height: 100%"> <div style="height: 100%">
<el-scrollbar wrap-class="scrollbar-wrapper"> <el-scrollbar wrap-class="scrollbar-wrapper">
<!-- style="display: flex;justify-content: center;" -->
<div style="text-align:center;"> <div style="text-align:center;">
<el-button type="danger" size="big" @click="removeTrainWindow">{{ $t('map.deleteTrainWindow') }}</el-button> <el-button type="danger" size="big" @click="removeTrainWindow">{{ $t('map.deleteTrainWindow') }}</el-button>
<el-button type="primary" size="big" style="margin-top:10px" @click="createTrainWindow">{{ $t('map.createTrainWindow') }}</el-button> <el-button type="primary" size="big" style="margin-top:10px" @click="createTrainWindow">{{ $t('map.createTrainWindow') }}</el-button>
@ -59,7 +58,8 @@ export default {
}, },
width: 0, width: 0,
height: 0, height: 0,
sectionCode: '' sectionCode: '',
isReversal: false
}, },
rules: { rules: {
code: [ code: [
@ -119,7 +119,8 @@ export default {
map: { map: {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ item: [
{ prop: 'sectionCode', label: this.$t('map.trainWindowSectionCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.filterSectionList } { prop: 'sectionCode', label: this.$t('map.trainWindowSectionCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.filterSectionList },
{ prop: 'isReversal', label: '车头翻转', type: 'checkbox' }
] ]
} }
} }
@ -155,7 +156,8 @@ export default {
_type: 'TrainWindow', _type: 'TrainWindow',
code: getUID('TrainWindow'), code: getUID('TrainWindow'),
trainWindowShow: true, trainWindowShow: true,
point: {} point: {},
isReversal: false
}; };
if (opts) { if (opts) {
@ -221,10 +223,11 @@ export default {
this.trainWindowList.forEach(elem => { this.trainWindowList.forEach(elem => {
remove.push({ remove.push({
_type: 'TrainWindow', _type: 'TrainWindow',
code: elem.code code: elem.code,
_dispose: true
}); });
}); });
this.$emit('delMapModel', remove); this.$emit('updateMapModel', remove);
} }
}).catch(() => { }).catch(() => {
this.$message.info(this.$t('tip.cancelledDelete')); this.$message.info(this.$t('tip.cancelledDelete'));
@ -240,10 +243,11 @@ export default {
this.trainWindowList.forEach(elem => { this.trainWindowList.forEach(elem => {
remove.push({ remove.push({
_type: 'TrainWindow', _type: 'TrainWindow',
code: elem.code code: elem.code,
_dispose: true
}); });
}); });
this.$emit('delMapModel', remove); this.$emit('updateMapModel', remove);
} }
if (collection && collection.length) { if (collection && collection.length) {
@ -284,7 +288,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -209,7 +209,6 @@ export default {
cancelButtonText: this.$t('tip.cancel'), cancelButtonText: this.$t('tip.cancel'),
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
// _that.$emit('delMapModel', selected);
_that.$emit('updateMapModel', {...selected, _dispose: true}); _that.$emit('updateMapModel', {...selected, _dispose: true});
_that.deviceSelect(); _that.deviceSelect();
}).catch(() => { }).catch(() => {

View File

@ -178,21 +178,6 @@ export default {
}, },
reloadTable() { reloadTable() {
this.queryList.reload(); this.queryList.reload();
},
handleCitySelect(form) {
this.queryForm.queryObject.mapId.config.data = [];
form.mapId = '';
if (!form.cityCode) {
this.mapList.forEach(elem => {
this.queryForm.queryObject.mapId.config.data.push({value: elem.id, label: elem.name});
});
} else {
this.mapList.forEach(elem => {
if (elem.cityCode === form.cityCode) {
this.queryForm.queryObject.mapId.config.data.push({value: elem.id, label: elem.name});
}
});
}
} }
} }
}; };

View File

@ -126,7 +126,7 @@ export default {
}, },
drawUp(index, row) { drawUp(index, row) {
scriptRecordNotify(row.id).then(resp => { scriptRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang }; const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, lang:row.lang, lineCode:this.$route.query.lineCode };
this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query }); this.$router.push({ path: `${UrlConfig.scriptDisplay}/script`, query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {
@ -253,7 +253,7 @@ export default {
}, },
previewScript(index, row) { previewScript(index, row) {
scriptDraftRecordNotify(row.id).then(resp => { scriptDraftRecordNotify(row.id).then(resp => {
const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0}; const query = { mapId: row.mapId, group: resp.data, scriptId: row.id, try:0, lineCode:this.$route.query.lineCode};
this.$router.push({ path: `${UrlConfig.design.display}/demon`, query }); this.$router.push({ path: `${UrlConfig.design.display}/demon`, query });
launchFullscreen(); launchFullscreen();
}).catch(error => { }).catch(error => {

View File

@ -157,10 +157,17 @@ export default {
return data.name.indexOf(value) !== -1; return data.name.indexOf(value) !== -1;
}, },
buy() { buy() {
this.$router.push({ this.$confirm('支付系统正在改进,如需购买请联系客服<br/>客服电话13289398171', this.$t('global.tips'), {
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query: confirmButtonText: this.$t('global.confirm'),
{ permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdId: this.$route.query.prdId, mapId: this.$route.query.mapId, subSystem: this.$route.params.subSystem } dangerouslyUseHTMLString: true,
type: 'warning',
showCancelButton: false,
center: true
}); });
// this.$router.push({
// path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
// { permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdId: this.$route.query.prdId, mapId: this.$route.query.mapId, subSystem: this.$route.params.subSystem }
// });
}, },
nodeExpand(obj, node, ele) { nodeExpand(obj, node, ele) {
const key = obj.id; const key = obj.id;

View File

@ -205,16 +205,21 @@ export default {
}; };
if (old) { if (old) {
if (old.userRole) { if (!user.userRole) {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}被提出房间`});
if (this.userId == user.id) {
this.jumpOutRoom();
}
} else if (old.userRole) {
if (!user.inRoom) { if (!user.inRoom) {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}退出房间`}); this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}离线`});
if (this.userId == user.id) { if (this.userId == user.id) {
this.jumpOutRoom(); this.jumpOutRoom();
} }
} }
if (!old.inRoom && user.inRoom) { if (!old.inRoom && user.inRoom) {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}进入房间`}); this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}在线`});
} }
if (user.inSimulation) { if (user.inSimulation) {
@ -223,11 +228,6 @@ export default {
this.jumpInSimulation(); this.jumpInSimulation();
} }
} }
} else {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}被提出房间`});
if (this.userId == user.id) {
this.jumpOutRoom();
}
} }
} else { } else {
this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}进入房间`}); this.$store.dispatch('socket/setChatContent', {...message, roomTip: `${user.nickName}进入房间`});