Merge remote-tracking branch 'origin/test_dispaly' into thailand

# Conflicts:
#	src/jmapNew/theme/datie_02/menus/dialog/applyOrAgreeModeCovert.vue
#	src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue
This commit is contained in:
fan 2023-02-21 17:29:47 +08:00
commit 05cebda4cb
38 changed files with 2146 additions and 230 deletions

View File

@ -80,8 +80,9 @@ export default {
},
created() {
this.project = getSessionStorage('project');
if (this.project) {
document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project];
const linkIcon = loginInfo[this.project] ? loginInfo[this.project].linkIcon : (ProjectIcon[this.project] || '');
if (this.project && linkIcon) {
document.querySelector("link[rel*='icon']").href = linkIcon;
}
},
mounted() {

View File

@ -146,3 +146,50 @@ export function updateMapFunctionSubset(data) {
data
});
}
/** 根据模板生成地图功能 */
export function generateMapFunctionByTemplate(data) {
return request({
url: `/api/mapFunction/generate/from/template`,
method: 'post',
data
});
}
/** 创建模板线路功能 */
export function createTemplateMapFunction(data) {
return request({
url: `/api/mapFunction/template`,
method: 'post',
data
});
}
/** 修改模板线路功能 */
export function updateTemplateMapFunction(data) {
return request({
url: `/api/mapFunction/template/${data.id}`,
method: 'put',
data
});
}
/** 删除模板线路功能 */
export function deleteTemplateMapFunction(id) {
return request({
url: `/api/mapFunction/template/${id}`,
method: 'delete'
});
}
/** 查询模板线路功能列表 */
export function queryTemplateMapFunctionList(params) {
return request({
url: `/api/mapFunction/template/list`,
method: 'get',
params
});
}
/** 分页查询模板线路功能列表 */
export function queryTemplateMapFunPaged(params) {
return request({
url: `/api/mapFunction/template/paged`,
method: 'get',
params
});
}

View File

@ -18,5 +18,7 @@ export default {
getLoginQrCode: 'Failed to get login qr code, please refresh and try again',
language: 'Language',
clickSwitchLanguage: 'Click switch language',
accountName: 'Account name'
accountName: 'Account name',
registerAccount: 'Register account',
forgetPassword: 'Forget password?'
};

View File

@ -18,5 +18,7 @@ export default {
getLoginQrCode: '获取登录二维码失败,请刷新重试',
language: '语言',
clickSwitchLanguage: '点击切换语言',
accountName: '账户名'
accountName: '账户名',
registerAccount: '注册账号',
forgetPassword: '忘记密码?'
};

View File

@ -476,49 +476,49 @@ class SkinCode extends defaultStyle {
offset: { x: 0, y: 0 },
text: '分散自律',
lightColor: '#0f0',
defaultColor: '#ccc'
defaultColor: '#7F7F7F'
},
graphRoad: {
show: true,
offset: { x: 0, y: 0 },
text: '按图排路',
lightColor: '#0f0',
defaultColor: '#ccc'
lightColor: '#ff0',
defaultColor: '#0f0'
},
planControl: {
show: true,
offset: { x: 0, y: 0 },
text: '计划控制',
lightColor: '#0f0',
defaultColor: '#ccc'
defaultColor: '#7F7F7F'
},
centerCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '中心通信',
lightColor: '#0f0',
defaultColor: '#ccc'
lightColor: '#FF0000',
defaultColor: '#0f0'
},
selfDisciplineCommunication: {
show: true,
offset: { x: 0, y: 30 },
text: '自律机通信',
lightColor: '#0f0',
defaultColor: '#ccc'
lightColor: '#7F7F7F',
defaultColor: '#0f0'
},
allowedTurnBack: {
show: true,
offset: { x: 0, y: 30 },
text: '允许转回',
lightColor: '#0f0',
defaultColor: '#ccc'
lightColor: '#ff0',
defaultColor: '#7F7F7F'
},
trainControl: {
show: true,
offset: { x: 0, y: 30 },
text: '列控',
lightColor: '#0f0',
defaultColor: '#ccc'
lightColor: '#ff0',
defaultColor: '#0f0'
}
}
};

View File

@ -165,7 +165,11 @@ export default class Station extends Group {
const queryCtc = queryList.find(item => {
return item.includes('ctc');
});
if (queryCtc && model.createControlMode) {
const queryCtcLineCode = queryList.find(item => {
return item.includes('lineCode=16');
});
const pic = store.state.map.picture;
if ((queryCtc || (pic == 'trafficTerminal' && queryCtcLineCode)) && model.createControlMode) {
this.createCtcControlMode();
} else if (this.style.Station.StationControl.special) {
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
@ -850,7 +854,7 @@ export default class Station extends Group {
// }
}
handleLocal() { // 站控
handleLocal(model) { // 站控
this.noneBeforeMode = 'Local';
this.emergencyControl && this.emergencyControl.setColor(this.style.Station.StationControl.lamp.grayColor);
this.substationControl && this.substationControl.setColor(this.style.Station.StationControl.lamp.yellowColor);
@ -859,7 +863,23 @@ export default class Station extends Group {
this.substationArrowsControl && this.substationArrowsControl.setColor(this.style.Station.StationControl.lamp.greenColor);
this.stationControlCC && this.stationControlCC.setStyle({text:'LC', textFill:this.style.Station.StationControl.text.stationControlColor});
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.lightColor);
this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.lightColor, 3);
// this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.lightColor, 3);
if (this.selfDisciplineThree) {
const arr = ['', 'Center', 'Station', 'Station_Shunt'];
let index = arr.findIndex(item => {
return model.operationMode == item;
});
if (index < 1) {
index = 1;
}
this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.lightColor, index);
}
if (this.graphRoad && model.routeSetMode == 'Manual_Set_Route') {
this.graphRoad.setColor(this.style.Station.StationControl.graphRoad.lightColor);
}
if (this.planControl && model.planControl) {
this.planControl.setColor(this.style.Station.StationControl.planControl.lightColor);
}
// if (this.style.Station.StationControl.disPlayNone) {
// this.stationText && this.stationText.setStyle('textFill', '#fff');
// if (this.model.subheadDisplay) { // 副标题
@ -938,7 +958,17 @@ export default class Station extends Group {
this.selfDiscipline && this.selfDiscipline.setColor(this.style.Station.StationControl.selfDiscipline.defaultColor);
this.selfDisciplineControl && this.selfDisciplineControl.setColor(this.style.Station.StationControl.selfDisciplineControl.defaultColor);
this.veryControlButton && this.veryControlButton.setStyle({ fill: this.style.Station.StationControl.veryControlButton.defaultColor });
this.selfDisciplineThree && this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 3);
this.centerCommunication && this.centerCommunication.setColor(this.style.Station.StationControl.centerCommunication.defaultColor);
this.graphRoad && this.graphRoad.setColor(this.style.Station.StationControl.graphRoad.defaultColor);
this.planControl && this.planControl.setColor(this.style.Station.StationControl.planControl.defaultColor);
this.trainControl && this.trainControl.setColor(this.style.Station.StationControl.trainControl.defaultColor);
this.allowedTurnBack && this.allowedTurnBack.setColor(this.style.Station.StationControl.allowedTurnBack.defaultColor);
this.selfDisciplineCommunication && this.selfDisciplineCommunication.setColor(this.style.Station.StationControl.selfDisciplineCommunication.defaultColor);
if (this.selfDisciplineThree) {
this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 1);
this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 2);
this.selfDisciplineThree.setColor(this.style.Station.StationControl.selfDisciplineThree.defaultColor, 3);
}
if (this.style.Station.stationText.isSpecialType) {
this.stationText.setColor(this.style.Station.stationText.noneModeColor);
this.stationText.setBackground(this.style.Station.stationText.defaultBackColor);
@ -972,12 +1002,12 @@ export default class Station extends Group {
this.eachChild(item => { item.hide(); });
} else {
store.getters['map/checkStationGuideMaster'](this._code, model.sguideMasterLock, model.xguideMasterLock);
model.controlMode && this['handle' + model.controlMode]();
model.controlMode && this['handle' + model.controlMode](model);
model.preResetValidDuration && this.handlePreResetLamp();
model.controller && this.handleComplexControl(model.controller);
model.emergencyController != undefined && this.handleEmergencyChange(model.emergencyController);
model.controlApplicant && this.handleControlApplicant(model);
model.allowAutonomy && this.handleAllowAutonomy();
model.allowAutonomy && this.handleAllowAutonomy(model);
this.handleGuideLock(model);
if (this.style.Station.syncCentralizeStation && (model.controlMode || model.controller || model.emergencyController != undefined) && model.centralized) {
model.chargeStationCodeList.forEach(item => {

View File

@ -899,6 +899,16 @@ export const menuOperate = {
switchRouteSetModel:{
operation: OperationEvent.CTCCommand.switchRouteSetModel.confirm.operation,
cmdType: CMD.CTC.CTC_SWITCH_ROUTE_SET_MODEL
},
// 操作模式转换
switchControlMode:{
operation: OperationEvent.MixinCommand.modeCovert.applyModeCovertCommit.operation,
cmdType: CMD.CTC.CTC_SWITCH_CONTROL_OPERATION_MODEL
},
// 同意操作模式转换
agreeSwitchControlMode:{
operation: OperationEvent.MixinCommand.modeCovert.agreeModeCovertCommit.operation,
cmdType: CMD.CTC.CTC_AGREE_OPERATION_MODEL
}
},
Rail: {

View File

@ -5,47 +5,61 @@
class="apply-agree chengdou-03__systerm"
:title="title"
:visible.sync="show"
width="500px"
width="600px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div class="applyOrAgreeAll">
<div class="applyOrAgreeTitle">
<div class="applyOrAgreeStation">Station name</div>
<!-- <el-radio-group v-model="controlTypeAll"> -->
<div class="applyOrAgreeCenterControl">
<el-radio key="centerControlAll" v-model="controlTypeAll" label="centerControlAll" size="small">Select all</el-radio>
</div>
<div class="applyOrAgreeStationControl">
<el-radio key="stationControlAll" v-model="controlTypeAll" label="stationControlAll" size="small">Select all</el-radio>
</div>
<div class="applyOrAgreeStationDispatchControl">
<el-radio key="stationDispatchControlAll" v-model="controlTypeAll" label="stationDispatchControlAll" size="small">Select all</el-radio>
</div>
</div>
<div class="applyOrAgreeContent">
<div v-for="(station,index) in stationList" :key="index" class="applyOrAgreeContentIn">
<div class="applyOrAgreeStation">{{ station.name }}</div>
<div class="applyOrAgreeCenterControl">
<el-radio key="centerControlAll" v-model="selectedControlList[index]" label="centerControlAll" size="small">Central control</el-radio>
</div>
<div class="applyOrAgreeStationControl">
<el-radio key="stationControlAll" v-model="selectedControlList[index]" label="stationControlAll" size="small">Station control</el-radio>
</div>
<div class="applyOrAgreeStationDispatchControl">
<el-radio key="stationDispatchControlAll" v-model="selectedControlList[index]" label="stationDispatchControlAll" size="small">Station switching</el-radio>
</div>
</div>
</div>
<div class="tableBox">
<el-table :data="tableData" height="300px">
<el-table-column prop="name" label="站名" width="150" />
<el-table-column v-if="isAgreeMode">
<template slot="header" slot-scope="scope">
<el-checkbox v-model="allAgreeChecked" @change="changeAllAgreeChecked">全选</el-checkbox>
</template>
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isAgree">同意</el-checkbox>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<el-radio v-model="controlTypeAll" label="Center" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio>
</template>
<template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Center" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Center')">中心控制</span>
</el-radio>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<el-radio v-model="controlTypeAll" label="Station" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio>
</template>
<template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Station" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Station')">车站控制</span>
</el-radio>
</template>
</el-table-column>
<el-table-column>
<template slot="header" slot-scope="scope">
<el-radio v-model="controlTypeAll" label="Station_Shunt" :disabled="isAgreeMode" @input="changeControlTypeAll">全选</el-radio>
</template>
<template slot-scope="scope">
<el-radio v-model="scope.row.target" label="Station_Shunt" :disabled="isAgreeMode">
<span :class="getTextColor(scope.row, 'Station_Shunt')">车站调车</span>
</el-radio>
</template>
</el-table-column>
</el-table>
</div>
<el-row justify="center" class="button-group" style="margin-bottom:20px;margin-top:20px">
<el-row justify="center" class="button-group">
<el-col :span="5" :offset="6">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">Confirm</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="5" :offset="2">
<el-button :id="domIdCancel" @click="cancel">Cancel</el-button>
<el-button :id="domIdCancel" @click="cancel"></el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
@ -55,19 +69,31 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import {menuOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { UserOperationType } from '@/scripts/ConstDic';
export default {
name: 'ForkDirective',
components: {
NoticeInfo
},
props: {
work: {
type: String,
default: () => {
return 'ctcWork';
}
}
},
data() {
return {
dialogShow: false,
title:'Mode of operation conversion',
controlTypeAll:'',
selectedControlList:[],
title: '操作方式转换',
controlTypeAll: '',
tableData: [],
loading: false,
domIdConfirm:''
isAgreeMode: false,
allAgreeChecked: false,
domIdConfirm: ''
};
},
computed: {
@ -79,33 +105,190 @@ export default {
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
roleDeviceCode() {
return this.$store.state.training.roleDeviceCode;
},
operationModeApplyList() {
return this.$store.state.socket.operationModeApplyList;
}
},
watch: {
tableData: {
handler: function() {
const hasTableData = !!this.tableData.length;
const isAgreeEvery = hasTableData && this.tableData.every(item => {
return item.isAgree;
});
this.allAgreeChecked = isAgreeEvery;
const centerEvery = hasTableData && this.tableData.every(item => {
return item.target == 'Center';
});
const stationEvery = hasTableData && this.tableData.every(item => {
return item.target == 'Station';
});
const shuntEvery = hasTableData && this.tableData.every(item => {
return item.target == 'Station_Shunt';
});
if (centerEvery) {
this.controlTypeAll = 'Center';
} else if (stationEvery) {
this.controlTypeAll = 'Station';
} else if (shuntEvery) {
this.controlTypeAll = 'Station_Shunt';
} else {
this.controlTypeAll = '';
}
},
deep: true
}
},
methods:{
getTextColor(row, type) {
let colorClass = '';
if (row.source == type) {
colorClass = 'redText';
}
if (this.isAgreeMode) {
if (row.target == type) {
colorClass = 'orangeText';
}
}
return colorClass;
},
changeAllAgreeChecked() {
this.tableData.forEach(item => {
this.$set(item, 'isAgree', this.allAgreeChecked);
});
},
changeControlTypeAll() {
this.tableData.forEach(item => {
this.$set(item, 'target', this.controlTypeAll);
});
},
doShow(operate) {
this.operation = operate.operation;
if (this.operation == OperationEvent.MixinCommand.modeCovert.applyModeCovert.operation) {
this.domIdConfirm = OperationEvent.MixinCommand.modeCovert.applyModeCovertCommit.domId;
this.isAgreeMode = false;
} else if (this.operation == OperationEvent.MixinCommand.modeCovert.agreeModeCovert.operation) {
this.domIdConfirm = OperationEvent.MixinCommand.modeCovert.agreeModeCovertCommit.domId;
this.isAgreeMode = true;
}
this.selectedControlList = [];
this.getListData();
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
getListData() {
this.tableData = [];
if (this.isAgreeMode) {
this.operationModeApplyList.forEach(item => {
const info = this.$store.getters['map/getDeviceByCode'](item.code);
const obj = {
...item,
name: info ? info.name : '',
isAgree: false
};
this.tableData.push(obj);
});
} else {
let list = this.stationList;
if (this.work == 'ctcWork') {
const roleDeviceInfo = this.$store.getters['map/getDeviceByCode'](this.roleDeviceCode);
if (roleDeviceInfo) {
list = [roleDeviceInfo];
}
}
list.forEach(item => {
const info = this.$store.getters['map/getDeviceByCode'](item.code);
if (info) {
const obj = {
name: info.name,
isAgree: false,
code: info.code,
source: info.operationMode,
target: info.operationMode
};
this.tableData.push(obj);
}
});
}
},
commit() {
console.log('--commit---');
if (this.isAgreeMode) {
const list = [];
const noList = [];
this.tableData.forEach(item => {
if (item.isAgree) {
list.push(item.code);
} else {
noList.push(item.code);
}
});
const operate = {
over: true,
operation: menuOperate.CTC.agreeSwitchControlMode.operation,
userOperationType: UserOperationType.LEFTCLICK,
cmdType: menuOperate.CTC.agreeSwitchControlMode.cmdType,
param: {
agreeStationCodes: list,
noAgreeStationCodes: noList
}
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.loading = false;
this.doClose();
this.$store.commit('socket/clearOperationModeApplyList', JSON.parse(JSON.stringify(this.tableData)));
}
}).catch((err) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(err.message);
});
} else {
const list = [];
this.tableData.forEach(item => {
if (item.source != item.target) {
list.push({
stationCode: item.code,
target: item.target
});
}
});
if (list.length) {
const operate = {
over: true,
operation: menuOperate.CTC.switchControlMode.operation,
userOperationType: UserOperationType.LEFTCLICK,
cmdType: menuOperate.CTC.switchControlMode.cmdType,
param: {
params: list
}
};
this.loading = true;
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.loading = false;
this.doClose();
}
}).catch((err) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(err.message);
});
}
}
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
this.doClose();
}).catch(() => {
this.doClose();
});
@ -119,33 +302,17 @@ export default {
}
};
</script>
<style lang="scss">
.applyOrAgreeAll{display:inline-block;min-height:200px}
.applyOrAgreeTitle{display:inline-block;font-size:0px}
.applyOrAgreeContentIn{font-size:0px}
.applyOrAgreeStation{
display: inline-block;
border-right: 1px #6e6e6e solid;
border-bottom: 1px #6e6e6e solid;
background: #fff2f0;
font-size: 14px;
width: 100px;
text-align: center;
padding-top: 5px;
padding-bottom: 5px;
<style lang="scss" scoped>
.tableBox {
padding-bottom: 10px;
}
.applyOrAgreeCenterControl,.applyOrAgreeStationControl,.applyOrAgreeStationDispatchControl{
display: inline-block;
background: #fff2f0;
padding: 2px 0px;
border-right: 1px #6e6e6e solid;
border-bottom: 1px #6e6e6e solid;
font-size: 14px;
vertical-align: top;
text-align: center;
width: 128px;
.button-group {
text-align: center;
}
.apply-agree.chengdou-03__systerm .el-dialog .el-dialog__body{
padding:0px;
.redText {
color: red;
}
.orangeText {
color: orange;
}
</style>

View File

@ -155,7 +155,7 @@ export default {
const localArr = ['Station'];
list.forEach(item => {
const obj = this.$store.getters['map/getDeviceByCode'](item.code);
if (obj && localArr.includes(obj.operationMode)) {
if (obj && obj.controlMode == 'Local' && localArr.includes(obj.operationMode)) {
const param = {
code: obj.code,
name: obj.name,
@ -194,7 +194,6 @@ export default {
},
commit() {
const list = this.getChangeInfoList();
console.log('🚀 ~ file: statusSelect.vue:154 ~ commit ~ list', list);
if (list.length) {
const operate = {
over: true,
@ -211,10 +210,10 @@ export default {
this.loading = false;
this.doClose();
}
}).catch(() => {
}).catch((err) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
this.$refs.noticeInfo.doShow(err.message);
});
}
},
@ -224,9 +223,7 @@ export default {
operation: OperationEvent.CTCCommand.switchRouteSetModel.cancel.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.doClose();
}
this.doClose();
});
},
doClose() {

View File

@ -10,6 +10,7 @@
<passive-contorl ref="passiveControl" pop-class="chengdou-03__systerm" />
<!-- <bottom-table ref="bottomTable" /> -->
<div id="playBtn" />
<menu-button-ctc ref="menuButtonCtc" :selected="selected" :work="'dispatchWork'" />
</div>
</template>
@ -28,6 +29,7 @@ import PassiveContorl from '@/jmapNew/theme/components/menus/passiveDialog/contr
import { timestampFormat } from '@/utils/date';
// import BottomTable from './bottomTable';
import { deviceFaultType, deviceType} from '@/scripts/cmdPlugin/Config';
import MenuButtonCtc from './menuButtonCtc';
export default {
name: 'DispatchWorkMenu',
@ -39,7 +41,8 @@ export default {
MenuStationStand,
MenuStation,
MenuTrain,
PassiveContorl
PassiveContorl,
MenuButtonCtc
// BottomTable
},
props: {

View File

@ -1,96 +1,96 @@
<template>
<div id="menuButtons_box" class="menu menuButton" style="height: 35px;" :style="{left: point.x+'px', bottom: point.y+'px' }">
<button :id="Signal.arrangementRoute.button.domId" class="button_box" style="width: 100px;" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal','SignalButton'])">
<button :id="Signal.arrangementRoute.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 100px;" @click="buttonDown(Signal.arrangementRoute.button.operation, ['Signal','SignalButton'])">
<span :style="{ color: operation === Signal.arrangementRoute.button.operation ? '#ccc':'black'}">
<center><b>Approach</b></center>
<center><b>establishment</b></center>
</span>
</button>
<button :id="MixinCommand.totalCancel.button.domId" class="button_box" style="width: 85px;" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])">
<button :id="MixinCommand.totalCancel.button.domId" :disabled="isDispatchWork" style="width: 85px;" :class="isDispatchWork ? 'disabled' : ''" class="button_box" @click="buttonDown(MixinCommand.totalCancel.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === MixinCommand.totalCancel.button.operation ? '#ccc': 'black'}">
<center><b>Total </b></center>
<center><b>cancellation</b></center>
</span>
</button>
<button :id="Signal.reopenSignal.button.domId" class="button_box" style="width: 85px;" @click="buttonDown(Signal.reopenSignal.button.operation, ['Signal','SignalButton'])">
<button :id="Signal.reopenSignal.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 85px;" @click="buttonDown(Signal.reopenSignal.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === Signal.reopenSignal.button.operation ? '#ccc': 'black'}">
<center><b>Signal</b></center>
<center><b>re-opening</b></center>
</span>
</button>
<button :id="Signal.guide.button.domId" class="button_box" style="width: 60px;" @click="buttonDown(Signal.guide.button.operation, ['SignalButton'])">
<button :id="Signal.guide.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 60px;" @click="buttonDown(Signal.guide.button.operation, ['SignalButton'])">
<span :style="{color: operation === Signal.guide.button.operation? '#ccc':'#800000'}">
<center><b>Guide</b></center>
<center><b>buttons</b></center>
</span>
</button>
<button :id="Station.guideLock.button.domId" class="button_box" style="width: 85px;" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">
<button :id="Station.guideLock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 85px;" @click="buttonDown(Station.guideLock.button.operation, ['GuideLock'])">
<span :style="{color: operation === Station.guideLock.button.operation?'#ccc':'#800000'}">
<center><b>Guided</b></center>
<center><b>Master</b><b>Lock</b></center>
</span>
</button>
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" style="width: 85px;" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
<button :id="Signal.humanTrainRoute.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 85px;" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
<span :style="{color: operation === Signal.humanTrainRoute.button.operation ? '#ccc':'#800000'}">
<center><b>Total</b></center>
<center><b>man</b><b>unlock</b></center>
</span>
</button>
<button :id="Switch.locate.button.domId" class="button_box" style="width: 85px;" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
<button :id="Switch.locate.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 85px;" @click="buttonDown(Switch.locate.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.locate.button.operation? '#ccc':'black'}">
<center><b>Turnout</b></center>
<center><b>total</b><b>setting</b></center>
</span>
</button>
<button :id="Switch.reverse.button.domId" class="button_box" style="width: 70px;" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
<button :id="Switch.reverse.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 70px;" @click="buttonDown(Switch.reverse.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.reverse.button.operation? '#ccc':'black'}">
<center><b>Turnout</b></center>
<center><b>reversal</b></center>
</span>
</button>
<button :id="Switch.lock.button.domId" class="button_box" style="width: 125px;" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
<button :id="Switch.lock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 125px;" @click="buttonDown(Switch.lock.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.lock.button.operation ? '#ccc':'black'}">
<center><b>Turnout</b></center>
<center><b>individually</b><b>locked</b></center>
</span>
</button>
<button :id="Switch.unlock.button.domId" class="button_box" style="width: 140px;" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
<button :id="Switch.unlock.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" style="width: 140px;" class="button_box" @click="buttonDown(Switch.unlock.button.operation, ['Switch'])">
<span :style="{color: operation === Switch.unlock.button.operation ? '#ccc':'black'}">
<center><b>Turnout</b></center>
<center><b>individually</b><b>unlocked</b></center>
</span>
</button>
<button :id="MixinCommand.block.button.domId" class="button_box" style="width: 70px;" @click="buttonDown(MixinCommand.block.button.operation, ['Switch', 'Signal'])">
<button :id="MixinCommand.block.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 70px;" @click="buttonDown(MixinCommand.block.button.operation, ['Switch', 'Signal'])">
<span :style="{color: operation === MixinCommand.block.button.operation ? '#ccc':'black'}">
<center><b>Blocking</b></center>
<center><b>buttons</b></center>
</span>
</button>
<button :id="MixinCommand.functionButton.button.domId" class="button_box" style="width: 70px;" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station','SignalButton'])">
<button :id="MixinCommand.functionButton.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 70px;" @click="buttonDown(MixinCommand.functionButton.button.operation, ['StationStand', 'Station','SignalButton'])">
<span :style="{color: operation === MixinCommand.functionButton.button.operation ? '#ccc':'black'}">
<center><b>Function</b></center>
<center><b>buttons</b></center>
</span>
</button>
<button :id="111" class="button_box" style="width: 70px;" @click="buttonDown()">
<button :id="111" class="button_box" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" style="width: 70px;" @click="buttonDown()">
<span style="color: black;">
<center><b>Ramp</b></center>
<center><b>unlocking</b></center>
</span>
</button>
<button :id="Section.defectiveShunting.button.domId" class="button_box" style="width: 50px;" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section','Switch'])">
<button :id="Section.defectiveShunting.button.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 50px;" @click="buttonDown(Section.defectiveShunting.button.operation, ['Section','Switch'])">
<span :style="{color: operation === Section.defectiveShunting.button.operation ? '#ccc':'black'}">
<center><b>Bad</b></center>
<center><b>split</b></center>
</span>
</button>
<button :id="Command.cancel.clearMbm.domId" class="button_box" style="width: 75px;" @click="commandClear">
<button :id="Command.cancel.clearMbm.domId" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" class="button_box" style="width: 75px;" @click="commandClear">
<span style="color: black;">
<center><b>Command</b></center>
<center><b>clear</b></center>
</span>
</button>
<button :id="333" class="button_box" style="width: 75px;" @click="commandOrders">
<button :id="333" class="button_box" style="width: 75px;" :disabled="isDispatchWork" :class="isDispatchWork ? 'disabled' : ''" @click="commandOrders">
<span style="color: black;">
<center><b>Command</b></center>
<center><b>given</b></center>
@ -102,15 +102,15 @@
<center><b>selection</b></center>
</span>
</button>
<button :id="MixinCommand.modeCovert.button.domId" class="button_box" style="width: 55px;" @click="buttonDown(MixinCommand.modeCovert.button.operation)">
<span :style="{color: operation === MixinCommand.modeCovert.button.operation ? '#ccc':'black'}">
<button :id="MixinCommand.modeCovert.button.domId" class="button_box" style="width: 55px;" :class="{flicker: hasModeApplyList && !modeCovertShow, redFlick: hasModeApplyList && !modeCovertShow}" @click="modeCovertBtn(MixinCommand.modeCovert.button.operation)">
<span :style="{color: modeCovertShow ? '#ccc':'black'}">
<center><b>Mode</b></center>
<center><b>change</b></center>
</span>
</button>
<div v-if="modeCovertShow" class="modeCovertPopList">
<div :id="MixinCommand.modeCovert.applyModeCovert.domId" class="eachModeCovertPop" @click="applyModeCovert">Pattern application</div>
<div :id="MixinCommand.modeCovert.agreeModeCovert.domId" class="eachModeCovertPop" @click="agreeModeCovert">Consent mode application</div>
<div :id="MixinCommand.modeCovert.agreeModeCovert.domId" class="eachModeCovertPop" :class="{flicker: hasModeApplyList && modeCovertShow, redFlick: hasModeApplyList && modeCovertShow}" @click="agreeModeCovert">Pattern application</div>
</div>
<password-box ref="password" @checkOver="passWordCommit" @checkCancel="clearOperate" />
<notice-info ref="noticeInfo" pop-class="chengdou-03__systerm" />
@ -118,7 +118,7 @@
<train-route ref="trainRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
<shunt-route ref="shuntRoute" @routeCommit="routeCommit" @routeCancel="clearOperate" />
<fork-directive ref="forkDirective" />
<apply-or-agree-mode-covert ref="applyOrAgreeModeCovert" />
<apply-or-agree-mode-covert ref="applyOrAgreeModeCovert" :work="work" />
<statusSelect ref="statusSelect" :work="work" />
</div>
</template>
@ -216,6 +216,12 @@ export default {
'autoReentryList',
'autoReentryData'
]),
hasModeApplyList() {
return this.$store.state.socket.operationModeApplyList.length;
},
isDispatchWork () {
return this.work == 'dispatchWork';
},
Switch() {
return OperationEvent.Switch;
},
@ -282,7 +288,11 @@ export default {
this.$store.dispatch('menuOperation/setButtonOperation', null);
this.clearOperate();
},
'$store.state.menuOperation.leftClickCount': function (val) {
this.modeCovertShow = false;
},
'$store.state.menuOperation.menuCount': function (val) {
this.modeCovertShow = false;
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
const operate = {
userOperationType: 'rightClick',
@ -309,6 +319,7 @@ export default {
}
},
beforeDestroy() {
this.$store.dispatch('menuOperation/setButtonOperation', null);
this.routeDataMap = null;
this.routeButtonCodeList = [];
},
@ -399,13 +410,23 @@ export default {
operation: OperationEvent.CTCCommand.switchRouteSetModel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.$refs.statusSelect.doShow();
}
// if (valid) {
this.$refs.statusSelect.doShow();
// }
});
},
modeCovertBtn(operation) {
const operate = {
operation: operation
};
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
this.modeCovertShow = true;
// this.operation = operation;
});
},
buttonDown(operation, commandTypeList) {
// MixinCommand.modeCovert.button.operation
this.modeCovertShow = false;
const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.training.roleDeviceCode);
if (!station || station.controlMode === 'Interlock') { return; }
const operate = {
@ -419,7 +440,6 @@ export default {
this.operation = operation;
});
} else {
this.modeCovertShow = false;
this.$store.dispatch('trainingNew/next', operate).then(({valid}) => {
if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', operation === this.Command.cancel.clearMbm.operation ? null : operation);
@ -1052,4 +1072,27 @@ export default {
.eachModeCovertPop:hover{
background: #c3c3c3;
}
.disabled {
cursor: not-allowed;
span {
color: #ccc !important;
}
}
.redFlick {
background: red;
}
@keyframes fade {
from {
opacity: 1.0;
}
50% {
opacity: 0.2;
}
to {
opacity: 1.0;
}
}
.flicker {
animation: fade 600ms infinite;
}
</style>

View File

@ -3,9 +3,9 @@
ref="keMenu"
class="navbar"
router
background-color="#00172E"
:default-active="activePath"
mode="horizontal"
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b"
@select="handleSelect"
@ -35,7 +35,7 @@
</el-menu-item>
</template>
</template>
<el-submenu v-else :key="idx" :index="item.path" :show-timeout="100">
<el-submenu v-else :key="idx" :index="item.path" popper-append-to-body :show-timeout="100">
<template slot="title">
<span v-if="item.meta" slot="title">{{ $t(item.meta.i18n) }}</span>
</template>
@ -222,9 +222,39 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
<style lang="scss" scoped>
$height: 61px;
.el-menu.el-menu--horizontal{
border-bottom: solid 1px #01468B;
}
.el-menu {
background: linear-gradient(to bottom, #01468B, #00172E);
}
.el-menu-item{
background: linear-gradient(to bottom, #01468B, #00172E);
&:hover{
background-color: #00172E;
}
&:focus{
background-color: #00172E;
}
}
/deep/ {
.el-submenu {
&:hover{
background: #00172E;
}
}
.el-submenu__title{
background: linear-gradient(to bottom, #01468B, #00172E);
&:hover{
background: #00172E;
}
}
.el-menu-item.is-active{
background: #00172E;
}
}
.rightGroup{
display: inline-block;
padding: 0 20px;
@ -280,9 +310,11 @@ export default {
line-height: 36px;
color: #fff;
font-size: 14px;
}
.targetDiv :hover {
background-color: #434A50;
background: linear-gradient(to bottom, #01468B, #00172E);
&:hover {
background: #00172E;
}
}
.helpDiv {
height: 60px;

View File

@ -72,10 +72,10 @@ export default {
return this.$store.state.app.dialogMessage;
},
companyInfo() {
return loginInfo[getSessionStorage('project')].bottomColumn;
return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomColumn : '';
},
bottomIcon() {
return loginInfo[getSessionStorage('project')].bottomIcon;
return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomIcon : '';
}
},
watch:{

View File

@ -126,6 +126,7 @@ const SimulationPlatform = () => import('@/views/trainingPlatform/simulation');
const PublishMap = () => import('@/views/publish/publishMap/index');
const SubsystemManage = () => import('@/views/publish/publishMap/subsystem');
const MapFunTemManage = () => import('@/views/publish/publishMap/mapFunctionTemplate/index');
const SystemSubsetManage = () => import('@/views/publish/publishMap/systemSubset');
const IscsDataManage = () => import('@/views/publish/publishMap/iscsDataManage/index');
const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史
@ -1879,6 +1880,11 @@ export const asyncRouter = [
component: SubsystemManage,
hidden: true
},
{
path: 'mapFunTem',
component: MapFunTemManage,
hidden: true
},
{
path: 'systemSubset',
component: SystemSubsetManage,

View File

@ -492,7 +492,9 @@ export default {
CTC_SEND_DISPATCH_COMMAND:{value:'CTC_SEND_DISPATCH_COMMAND', label: '调度台命令下达'},
CTC_SIGN_DISPATCH_COMMAND:{value:'CTC_SIGN_DISPATCH_COMMAND', label: '调度台命令签收'},
CTC_READ_DISPATCH_COMMAND:{value:'CTC_READ_DISPATCH_COMMAND', label: '调度台命令已读'},
CTC_SWITCH_ROUTE_SET_MODEL:{value:'Station_Switch_Route_Set_Model', label: '状态切换操作'}
CTC_SWITCH_ROUTE_SET_MODEL:{value:'Station_Switch_Route_Set_Model', label: '状态切换操作'},
CTC_SWITCH_CONTROL_OPERATION_MODEL:{value:'Station_Switch_Control_Operation_Mode', label: '操作模式转换'},
CTC_AGREE_OPERATION_MODEL:{value:'Station_Handle_Operation_Mode_Apply', label: '同意操作模式转换'}
},
RAIL: {

View File

@ -3806,23 +3806,23 @@ export const OperationEvent = {
},
modeCovert:{
button:{
operation: '299d',
domId: '_Tips-Mode-Covert-Button{TOP}'
operation: '299e',
domId: '_Tips-Mode-Covert-Button{BOTTOM}'
},
agreeModeCovert:{
operation: '299e',
domId: '_Tips-Agree-Mode-Covert{TOP}'
operation: '299f',
domId: '_Tips-Agree-Mode-Covert{BOTTOM}'
},
applyModeCovert:{
operation: '299f',
domId: '_Tips-Apply-Mode-Covert{TOP}'
operation: '299g',
domId: '_Tips-Apply-Mode-Covert{BOTTOM}'
},
agreeModeCovertCommit:{
operation: '299g',
operation: '299h',
domId: '_Tips-Agree-Mode-Covert-Commit{TOP}'
},
applyModeCovertCommit:{
operation: '299g',
operation: '299i',
domId: '_Tips-Apply-Mode-Covert-Commit{TOP}'
}
}
@ -4252,7 +4252,7 @@ export const OperationEvent = {
switchRouteSetModel: {
menu: {
operation: 'a063',
domId: '_Tips-CTC-switchRouteSetModel-menu{TOP}'
domId: '_Tips-CTC-switchRouteSetModel-menu{BOTTOM}'
},
confirm: {
operation: 'a064',

View File

@ -118,7 +118,8 @@ const socket = {
},
simulationWorkParam: {},
conversationMessage: {},
controlTransfer: {}
controlTransfer: {},
operationModeApplyList: [] // 模式转换消息列表
},
getters: {
},
@ -392,6 +393,19 @@ const socket = {
},
setControlTransfer: (state, transfer) => {
state.controlTransfer = transfer;
},
operationModeApply: (state, list) => {
state.operationModeApplyList = list;
},
clearOperationModeApplyList: (state, list) => {
list.forEach(item => {
const index = state.operationModeApplyList.findIndex(every => {
return every.code == item.code && every.target == item.target;
});
if (index >= 0) {
state.operationModeApplyList.splice(index, 1);
}
});
}
},
@ -627,6 +641,9 @@ const socket = {
},
setControlTransfer: ({ commit }, transfer) => {
commit('setControlTransfer', transfer);
},
operationModeApply: ({ commit }, message) => {
commit('operationModeApply', message);
}
}
};

View File

@ -82,6 +82,10 @@ function handle(data) {
case 'Simulation_Control_Pause': // 暂停中
store.dispatch('scriptRecord/updateSimulationPause', msg);
break;
case 'Simulation_Operation_Mode_Apply': // 模式转换消息
console.log('模式转换消息', msg);
store.dispatch('socket/operationModeApply', msg);
break;
case 'BROADCAST': // 升级通知消息
Notification.warning({
title: msg.title,

View File

@ -1,5 +1,5 @@
<template>
<el-dialog title="权限分发到指定用户" :visible.sync="dialogVisible" width="1200px" :before-close="doClose" center :close-on-click-modal="false">
<el-dialog title="权限分发到指定用户" :visible.sync="dialogVisible" width="1400px" :before-close="doClose" center :close-on-click-modal="false">
<QueryListPage ref="queryListPage1" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
@ -28,6 +28,7 @@ export default {
],
queryForm: {
labelWidth: '80px',
leftSpan: 20,
reset: true,
queryObject: {
name: {
@ -38,6 +39,14 @@ export default {
type: 'text',
label: 'id'
},
account:{
type: 'text',
label: '账号'
},
parentAccount:{
type: 'text',
label: '父账号'
},
roles: {
type: 'select',
label: this.$t('system.roles'),
@ -85,6 +94,16 @@ export default {
prop: 'id',
width: 80
},
{
title: '账号',
prop: 'account',
width: 80
},
{
title: '父账号',
prop: 'parentAccount',
width: 80
},
{
title: this.$t('system.name'),
prop: 'name'

View File

@ -61,7 +61,7 @@
</div>
</el-popover> -->
<div class="popover_box active" @click="registerUser">
注册账号
{{ $t('login.registerAccount') }}
</div>
</div>
<el-form-item>
@ -71,7 +71,7 @@
</el-form-item>
<div v-if="!localProject" style="display: inline-block;width: 100%;">
<div class="popover_box active" style="bottom: 50px;" @click="forgetPassword">
忘记密码
{{ $t('login.forgetPassword') }}
</div>
</div>
</el-form>

View File

@ -286,8 +286,8 @@ import ArrowPic from '@/assets/datie/arrow.png';
import PicT3 from '@/assets/datie/picT3.png';
import ControlPanelPic from '@/assets/datie/controlPanel.png';
import ControlPanel2Pic from '@/assets/datie/controlPanel2.png';
import RecDep from '@/jmapNew/theme/datie_02/menus/dialog/recDep';
import RouteSelection from '@/jmapNew/theme/datie_02/menus/dialog/routeSelection1';
import RecDep from './lineBoard/recDep';
import RouteSelection from './lineBoard/routeSelection1';
import PopMenu from '@/components/PopMenu';
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import T3Pic from '@/assets/ctc_icon/t3.png';

View File

@ -0,0 +1,74 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm confirm-control-speed"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
append-to-body
>
<div style="height: 60px; padding-left: 20px">
<span style="font-size: 18px">{{ message }}</span>
</div>
<el-row justify="center" class="button-group">
<el-col :span="11">
<el-button :id="confirmId" type="primary" @click="confirm">确定</el-button>
</el-col>
<el-col :span="11" :offset="2">
<el-button @click="doClose"> </el-button>
</el-col>
</el-row>
</el-dialog>
</template>
<script>
export default {
name: 'ConfirmTip',
data() {
return {
dialogShow: false,
message: '',
confirmId: ''
};
},
computed: {
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '提示';
}
},
mounted() {
},
methods: {
doShow(operate) {
this.message = operate.message;
this.dialogShow = true;
this.confirmId = operate.confirmId;
},
confirm() {
this.$emit('close');
},
doClose() {
this.dialogShow = false;
}
}
};
</script>
<style scoped>
.confirm-control-speed .context {
padding-bottom: 40px !important;
border: 1px solid lightgray;
}
.chengdou-03__systerm .el-dialog .el-button{
display: block;
margin: 0 auto;
}
</style>

View File

@ -0,0 +1,245 @@
<template>
<div
ref="jlmapCanvas"
class="jlmap-canvas"
:style="{ width: width + 'px', height: height + 'px' }"
>
<div :id="canvasId" class="display_canvas" />
</div>
</template>
<script>
import Jlmap from '@/jmapNew/map';
import { parserFactory, ParserType } from '@/jmapNew/parser';
import { deepAssign } from '@/utils/index';
import deviceType from '@/jmapNew/constant/deviceType';
export default {
name: 'JLocalmapVisual',
props: {
width: {
type: Number,
default: 0
},
height: {
type: Number,
default: 0
},
mapData: {
type: Object,
defautl() {
return {};
}
}
},
data() {
return {
loading: true,
offset: {
x: 0,
y: 0
},
map: null,
mapDevice: {},
routeData: [],
autoReentryData: []
};
},
computed: {
canvasId() {
return ['map', Math.random().toFixed(5) * 100000].join('_');
}
},
watch: {
'$store.state.config.canvasSizeCount': function (val) {
this.resetSize();
}
// '$store.state.training.prdType': function (val) {
// if (val) {
// this.changePrdType(val);
// }
// }
},
mounted() {
this.init();
},
beforeDestroy() {
if (this.map) {
this.map.dispose();
this.map = null;
}
},
methods: {
init() {
document.getElementById(this.canvasId).oncontextmenu = function (e) {
return false;
};
const prdType = this.$store.state.training.prdType;
let showMode = '';
if (prdType == '01') {
showMode = '03';
} else if (prdType == '02') {
showMode = '02';
}
if (!this.map) {
this.map = new Jlmap({
dom: document.getElementById(this.canvasId),
config: {
renderer: 'canvas',
width: this.width,
height: this.height
},
options: {
scaleRate: 1,
offsetX: 0,
offsetY: 0,
zoomOnMouseWheel: false
},
showConfig: {
prdType: prdType,
previewOrMapDraw: true,
showMode: showMode
},
methods: {}
});
}
window.document.oncontextmenu = function () {
return false;
};
if (this.mapData && this.mapData.skinVO) {
const parser = parserFactory(ParserType.Graph.value);
this.mapDevice = parser.parser(this.mapData, this.mapData.skinVO.code, this.map.getShowConfig());
console.log('parsed mapDevice', this.mapDevice)
}
},
loadData() {
try {
this.setMap(this.mapData, this.mapDevice);
} catch (error) {
console.log('[ERROR] ', error);
}
},
//
setMap(data, mapDevice) {
if (data.skinVO) {
this.routeData = this.$store.state.map.routeData;
this.autoReentryData = this.$store.state.map.autoReentryData;
this.map.setMap(data, mapDevice, {
routeData: this.routeData,
autoReentryData: this.autoReentryData
});
this.setMapFree();
} else {
this.mapDevice = {};
this.map.clear();
}
},
// jlmap
resetSize() {
this.$nextTick(() => {
this.map && this.map.resize({ width: this.width, height: this.height });
});
},
//
setLevelVisible(levels) {
this.map && this.map.setLevelVisible(levels);
},
setMapFree() {
const list = [];
Object.values(this.mapDevice).forEach((elem) => {
const code = elem.code;
const type = elem._type;
//
type != deviceType.Train &&
list.push({ code, _type: type, _free: true });
});
this.map.update(list, false);
},
//
setCenterWithOffset(code, dx, y) {
this.map.setCenterWithOffset(code, dx, y - this.height / 2);
},
//
updateMapDevice(elems) {
const list = [];
elems.forEach((elem) => {
if (elem.code) {
list.push(deepAssign(this.mapDevice[elem.code], elem));
}
});
this.map.update(list, false);
},
getDeviceByCode(code) {
return this.mapDevice[code];
},
setShowStation(stationCode, setCenter) {
const list = [];
const mapDevice = this.$store.state.map.mapDevice;
for (const key in mapDevice) {
list.push(mapDevice[key]);
}
this.map.updateShowStation(list, stationCode);
!setCenter && this.setCenter(stationCode);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.mask {
opacity: 0;
background: #000;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 9;
}
.jlmap-canvas {
position: relative;
-moz-user-select: none;
-o-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
background: #000;
float: left;
}
.title {
text-align: right;
font-size: 14px;
color: #606266;
line-height: 32px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
font-weight: 700;
}
.zoom-view {
position: absolute;
bottom: 0;
background: #fff;
padding-top: 5px;
height: 42px;
border-bottom: 1px #f3f3f3 solid;
border-right: 1px #f3f3f3 solid;
}
/deep/ {
.el-form.el-form--inline {
height: 28px !important;
line-height: 28px !important;
}
.el-loading-mask {
background-color: rgba(0, 0, 0, 0.3);
}
}
</style>

View File

@ -0,0 +1,136 @@
<template>
<el-dialog
v-dialogDrag
class="chengdou-03__systerm stand-stop-time"
title="作业窗口"
:visible.sync="show"
width="500px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<div>
<el-form :model="form" class="demo-form-inline">
<el-form-item label="作业任务:">
<el-input v-model="form.work" type="textarea" :rows="2" :disabled="true" />
</el-form-item>
<el-form-item label="操作时间:">
<el-input v-model="form.time" type="textarea" :rows="1" :disabled="true" />
</el-form-item>
<el-form-item label="操作信息:">
<el-input v-model="form.info" type="textarea" :rows="2" :disabled="true" />
</el-form-item>
</el-form>
<div style="text-align: center;"><el-button v-if="type === 'rec'" style="width: 200px;" @click="commit(menuOperate.CTC.receivingNotice)">完成接预</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'dep'" style="width: 200px;" @click="commit(menuOperate.CTC.departureNotice)">完成发预</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'rec'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelReceivingNotice)">取消接预</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'dep'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelDepartureNotice)">取消发预</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'arrive'" style="width: 200px;" @click="commit(menuOperate.CTC.finishArrive)">完成到点</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'arrive'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelArrive)">取消到点</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'departure'" style="width: 200px;" @click="commit(menuOperate.CTC.finishDeparture)">完成发点</el-button></div>
<div style="text-align: center;margin-top: 10px;"><el-button v-if="type === 'departure'" style="width: 200px;" @click="commit(menuOperate.CTC.cancelDeparture)">取消发点</el-button></div>
<el-button style="height: 50px;width: 50px;position: relative;left: 370px;" @click="doClose">关闭</el-button>
</div>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import CancelMouseState from '@/mixin/CancelMouseState';
import {menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
export default {
name: 'TrainMove',
mixins: [
CancelMouseState
],
data() {
return {
selected: null,
selectedType: '',
dialogShow: false,
menuOperate: menuOperate,
type: '',
stationCode: '',
tripNumber: '',
loading: false,
tableData: [],
deviceTypeList: [
{ label: '区段', value: 'Section' },
{ label: '信号机', value: 'Signal' },
{ label: '道岔', value: 'Switch' },
{ label: '车站', value: 'Station' }
],
deviceIdList: [],
form: {
work: '',
time: '',
info: ''
}
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
}
},
methods: {
doShow(row, type, stationCode) {
this.type = type;
this.loading = true;
this.stationCode = stationCode;
this.tripNumber = row.tripNumber;
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
},
commit(type) {
this.loading = true;
commitOperate(type, {stationCode: this.stationCode, tripNumber: this.tripNumber}, 3).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((error) => {
this.loading = false;
this.doClose();
console.error(error);
// this.$refs.noticeInfo.doShow();
this.$message.error('操作失败!');
});
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {
/*background: rgba(0, 0, 0, x);*/
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
.text-button{
color: #148ad0;
cursor:pointer;
}
.text-button:active{
color: #b938e1;
text-decoration: underline;
}
.text-button:hover{
color: #b938e1;
text-decoration: underline;
}
</style>

View File

@ -0,0 +1,308 @@
<template>
<el-dialog v-dialogDrag top="12vh" class="ningbo-01__systerm route-setting" :title="title" :visible.sync="show" width="1100px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-row>
<el-col :span="2">列车车次</el-col>
<el-col :span="21"><span style="font-size: 18px;color: #f00;">{{ selected.tripNumber }}</span></el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="2">进路描述</el-col>
<el-col :span="21">
<div style="width: 100%;height: 50px;background: #DFE3E6;padding: 10px;">
<span>{{ `${type === 'dep' ? '发车/通过': '接车/通过'} 股道:${selected.trackName};进路按钮:${getRouteNames()}` }}</span>
</div>
</el-col>
</el-row>
<el-row style="margin-top: 10px;">
<el-col :span="2">进路显示</el-col>
<el-col :span="21">
<map-visual ref="map" :map-data="mapData" :width="960" :height="600" />
</el-col>
</el-row>
<!--<el-row :gutter="24">-->
<!--<el-col :span="6">-->
<!--<el-row class="header">-->
<!--<el-col :span="11"><span>集中站</span></el-col>-->
<!--<el-col :span="11" :offset="2"><span>始端信号机</span></el-col>-->
<!--</el-row>-->
<!--<el-row>-->
<!--<el-col :span="11">-->
<!--<el-input v-model="stationName" size="small" disabled />-->
<!--</el-col>-->
<!--<el-col :span="11" :offset="2">-->
<!--<el-input v-model="signalName" size="small" disabled />-->
<!--</el-col>-->
<!--</el-row>-->
<!--<el-row style="margin-top: 10px; line-height: 30px;">-->
<!--<el-col :span="11"><span>进路列表</span></el-col>-->
<!--</el-row>-->
<!--<el-table ref="table" :data="tempData" border :cell-style="tableStyle" style="width: 100%; height: 460px; margin-top:10px" size="mini" highlight-current-row :show-header="false" @row-click="clickEvent">-->
<!--<el-table-column :id="domIdChoose" prop="name" style="margin-left:30px" />-->
<!--</el-table>-->
<!--<el-row justify="center" class="button-group">-->
<!--<el-col :span="8" :offset="4">-->
<!--<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="commitDisabled" @click="commit">确定</el-button>-->
<!--</el-col>-->
<!--<el-col :span="8" :offset="4">-->
<!--<el-button :id="domIdCancel" @click="cancel"> </el-button>-->
<!--</el-col>-->
<!--</el-row>-->
<!--</el-col>-->
<!--<el-col :span="18">-->
<!--<map-visual ref="map" :map-data="mapData" :width="780" :height="600" />-->
<!--</el-col>-->
<!--</el-row>-->
<el-row style="margin-top: 10px;margin-bottom: 10px;">
<el-col :span="21" :offset="2">
<el-radio v-model="radio" disabled label="禁用">分段办理</el-radio>
</el-col>
</el-row>
<div style="display: flex;justify-content: space-between;margin-bottom: 10px;">
<el-button v-if="type === 'rec'" size="mini" :type="selected.receivingRouteAutoTrigger?'warning':''" :disabled="!!route.lock || !selected.receivingNotice" @click="commit">办理接车</el-button>
<el-button v-if="type === 'dep'" size="mini" :type="selected.departureRouteAutoTrigger?'warning':''" :disabled="!!route.lock || !selected.departureNotice" @click="commit">办理发车</el-button>
<el-button size="mini" disabled>办理通过</el-button>
<el-button size="mini" disabled>进路单锁</el-button>
<el-button size="mini" :disabled="cancelRouteDisabled" @click="commit">取消进路</el-button>
<el-button size="mini" @click="doClose">关闭</el-button>
</div>
<notice-info ref="noticeInfo" pop-class="ningbo-01__systerm" />
<confirm-tip ref="confirmTip" @close="doClose" />
</el-dialog>
</template>
<script>
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { menuOperate, commitOperate} from '@/jmapNew/theme/components/utils/menuOperate';
import { deepAssign } from '@/utils/index';
import { mouseCancelState} from '@/jmapNew/theme/components/utils/menuItemStatus';
import { mapGetters } from 'vuex';
// import { dbReadData } from '@/utils/indexedDb';
import ConfirmTip from './confirmTip';
import MapVisual from './mapVisual';
import NoticeInfo from '@/jmapNew/theme/components/menus/childDialog/noticeInfo';
import { UserOperationType } from '@/scripts/ConstDic';
export default {
name: 'RouteSelection',
components: {
NoticeInfo,
ConfirmTip,
MapVisual
},
data() {
return {
radio:'',
beforeSectionList: [],
beforeSwitchList: [],
dialogShow: false,
loading: false,
selected: {},
operation: '',
display: true,
mapData: null,
route: '',
tableStyle: {
'border-bottom': 'none'
},
type: ''
};
},
computed: {
...mapGetters('map', [
'overlapData'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdChoose() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.choose.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Signal.arrangementRoute.menu.domId : '';
},
title() {
return '进路办理';
},
cancelRouteDisabled() {
return !this.route.lock || (this.type === 'rec' && !this.selected.receivingNotice) || (this.type === 'dep' && !this.selected.departureNotice);
}
},
watch: {
'$store.state.map.mapDataLoadedCount': function (val) { //
this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map));
}
},
methods: {
getRouteNames() {
const receivingRoute = this.$store.state.map.routeData[this.selected.receivingRouteCode];
const departureRoute = this.$store.state.map.routeData[this.selected.departureRouteCode];
return (receivingRoute ? receivingRoute.name : '') + ',' + (departureRoute ? departureRoute.name : '');
},
doShow(selected, type) {
// this.$root.$emit('dialogOpen', selected);
if (!this.mapData) { this.mapData = JSON.parse(JSON.stringify(this.$store.state.map.map)); }
this.selected = selected;
this.type = type;
this.dialogShow = true;
this.$nextTick(function () {
this.loadData();
this.$store.dispatch('training/emitTipFresh');
});
},
loadData() {
this.beforeSwitchList = [];
this.beforeSectionList = [];
this.$refs.map.loadData(this.mapData);
setTimeout(() => {
if (this.type === 'rec') {
this.clickEvent(this.selected.receivingRouteCode);
} else if (this.type === 'dep') {
this.clickEvent(this.selected.departureRouteCode);
}
}, 100);
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.route = {};
this.restoreBeforeDevices();
this.$store.dispatch('training/emitTipFresh');
mouseCancelState(this.selected);
},
restoreBeforeDevices() {
//
if (this.beforeSectionList && this.beforeSectionList.length) {
this.beforeSectionList.forEach(el => {
el.routeLock = false;
el.preWhite = false;
});
}
if (this.beforeSwitchList && this.beforeSwitchList.length) {
this.beforeSwitchList.forEach(el => {
// N- R- NO-() EX-
el.pos = 'NO';
el.routeLock = false;
});
}
this.$refs.map.updateMapDevice([...this.beforeSectionList, ...this.beforeSwitchList]);
this.beforeSectionList = [];
this.beforeSwitchList = [];
},
clickEvent(routeCode) {
const route = this.$store.state.map.routeData[routeCode];
this.route = route;
if (route) {
//
this.restoreBeforeDevices();
const containSectionList = [];
const containSwitchList = [];
if (!route.setting) {
const signalBegin = this.$refs.map.getDeviceByCode(route.startSignalCode);
const code = route.startSignalCode;
const signal = signalBegin;
const switchCodeList = [];
this.$refs.map.setCenterWithOffset(code, 50, signal.position.y);
if (route.routeSectionList && route.routeSectionList.length) {
route.routeSectionList.forEach(code => {
const section = deepAssign({}, this.$refs.map.getDeviceByCode(code));
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
section.logicSectionCodeList.forEach(sectionCode => {
containSectionList.push({code: sectionCode, preWhite: true});
});
} else {
containSectionList.push({code, preWhite: true});
}
if (section.switchSection && section.switch) {
switchCodeList.push(section.switch.code);
}
});
}
if (route.routeSwitchList && route.routeSwitchList.length) {
route.routeSwitchList.filter(el => switchCodeList.includes(el.switchCode)).forEach(el => {
const swch = deepAssign({}, this.$refs.map.getDeviceByCode(el.switchCode));
const sectionA = this.$refs.map.getDeviceByCode(swch.sectionACode);
// const sectionB = this.$refs.map.getDeviceByCode(swch.sectionBCode);
const sectionC = this.$refs.map.getDeviceByCode(swch.sectionCCode);
// normalPosition: el.normal, reversePosition: !el.normal
containSwitchList.push({code: el.switchCode, routeLock: true, pos:el.pos });
if (el.normal) {
containSectionList.push({code: sectionA.code, routeLock:true });
// containSectionList.push({code: sectionC.code, preBlue: true });
} else {
containSectionList.push({code: sectionC.code, routeLock:true });
// containSectionList.push({code: sectionB.code, preBlue: true });
}
});
}
this.$refs.map.updateMapDevice([...containSectionList, ...containSwitchList]);
this.beforeSectionList = containSectionList;
this.beforeSwitchList = containSwitchList;
//
const operate = {
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Signal.arrangementRoute.choose.operation,
val: route.code
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
} else {
this.$refs.noticeInfo.doShow('当前进路不允许排列, 与其他进路可能发生冲突');
}
}
},
commit() {
if (this.route) {
this.loading = true;
const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute : menuOperate.CTC.setRoute;
const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code, tripNumber: this.selected.tripNumber, force: false, duration: null };
commitOperate(type, param, 3).then(({valid, operate})=>{
this.loading = false;
if (valid) {
this.doClose();
}
}).catch((e) => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow();
});
}
},
cancel() {
const operate = {
userOperationType: UserOperationType.LEFTCLICK,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('trainingNew/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
});
}
} // D3D8DC
};
</script>
<style scoped>
/deep/ .el-dialog__header{
background: #B4B6B9;
}
/deep/ .el-dialog__body{
background: #D3D8DC !important;
padding: 10px;
}
</style>

View File

@ -206,6 +206,7 @@ export default {
this.$store.dispatch('map/initJlmapLoadedCountClear');
this.$store.dispatch('socket/clearSimulationRoleList');
this.$store.dispatch('trainingNew/clearTrainingData');
this.$store.dispatch('map/resetActiveTrainList');
this.$store.dispatch('runPlan/setPlanData', []);
},
methods: {

View File

@ -468,6 +468,7 @@ export default {
this.addPlayerIdList(val);
},
addPlayerIdList(playId) {
console.log(this.playerIdList.includes(playId), this.playerIdList, playId);
if (!this.playerIdList.includes(playId)) {
this.playerIdList.push(playId);
}
@ -476,7 +477,7 @@ export default {
checkPlayerIdHas() {
const list = [];
this.tableData.forEach(elem => {
if (this.playerIdList.includes(elem.memberId)) {
if (this.playerIdList.includes(elem.memberId) && !list.includes(elem.memberId)) {
list.push(elem.memberId);
}
});

View File

@ -4,7 +4,6 @@
<el-menu
:default-active="defaultIndex"
class="el-menu-vertical-demo lessonManageMenu"
background-color="#545c64"
text-color="#fff"
router
active-text-color="#ffd04b"
@ -86,7 +85,15 @@ export default {
};
</script>
<style scoped>
<style scoped lang="scss">
.el-menu {
background: linear-gradient(to bottom, #01468B, #00172E);
}
.el-menu-item{
&:hover{
background: #00172E;
}
}
.teachMenu{width: 18px;height: 18px;margin-right: 8px;}
.lessonIcon{font-size: 16px;}
.lessonManageOther{

View File

@ -37,20 +37,21 @@
</el-col>
<el-col :span="12">
<el-form-item label="背景:" prop="bgUrl">
<div style="display: flex;align-items: flex-start;">
<el-select v-model="ruleForm.bgUrl" size="mini" clearable>
<el-option
v-for="item in bgUrlList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<img :src="ossUrl+ruleForm.bgUrl" style="width: 200px;margin-left: 15px;">
<div class="eachButton uploadLogo">
<img v-if="ruleForm.bgUrl" :src="computedLoginLogo" :alt="computedLoginLogo" class="loginLogo">
<i class="el-icon-plus avatar-uploader-icon el-icon-other" />
<input id="upload_file" ref="files" type="file" class="file_box" accept="image/jpeg,image/png" @change="uploadLogo">
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="分组:" prop="subset">
<el-input v-model="ruleForm.subset" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
<el-card style="padding: 10px;">
<el-table
:data="endTableData"
@ -131,7 +132,7 @@ import { queryPaperList } from '@/api/management/exam';
import { getTrainingDetailNew } from '@/api/jmap/training';
import ChooseTraining from './chooseTraining';
import { ClientList, TrainingTypeList } from '@/scripts/ConstDic';
import { getUploadUrl } from '@/api/projectConfig';
export default {
name: 'EditSubsystem',
components: {
@ -143,6 +144,7 @@ export default {
title: '',
trainingName: '',
mapSystemId: '',
loginProLogoImg: '',
memberList: [],
examList: [],
lpfDataList: [],
@ -179,29 +181,17 @@ export default {
name: '',
type: '',
desc: '',
bgUrl: ''
bgUrl: '',
subset: ''
},
memberMetroList: [],
memberRailwayList: [],
memberEmergencyList: [],
bgUrlList: [
{ label: '运行图编制', value: '/logo/chartPreparation.png' },
{ label: '调度仿真', value: '/logo/dispatchingPlan.png' },
{ label: '考试', value: '/logo/exam.png' },
{ label: '综合演练', value: '/logo/joinRoom.png' },
{ label: '场景实训', value: '/logo/sceneTraining.png' },
{ label: '派班', value: '/logo/schedulingSimulation.png' },
{ label: '单操仿真', value: '/logo/singleTraining.png' },
{ label: '车站仿真', value: '/logo/stationSimulation.png' },
{ label: '车辆段', value: '/logo/trainDepot.png' },
{ label: '实训设计', value: '/logo/trainingDesign.png' },
{ label: '模拟驾驶', value: '/logo/simulatedDriving.png' }
]
memberEmergencyList: []
};
},
computed: {
ossUrl() {
return this.$store.state.user.ossUrl;
computedLoginLogo() {
return this.loginProLogoImg ? this.$store.state.user.ossUrl + this.loginProLogoImg : '';
}
},
async mounted() {
@ -259,6 +249,8 @@ export default {
this.ruleForm.name = row.name;
this.ruleForm.desc = row.desc || '';
this.ruleForm.bgUrl = row.bgUrl || '';
this.loginProLogoImg = row.bgUrl || '';
this.ruleForm.subset = row.subset || '';
this.ruleForm.type = row.paramVO.type;
this.typeChange(this.ruleForm.type);
this.frontTableData.forEach(item => {
@ -378,7 +370,8 @@ export default {
name: '',
type: '',
desc: '',
bgUrl: ''
bgUrl: '',
subset: ''
};
this.frontTableData = [
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
@ -425,6 +418,7 @@ export default {
name: this.ruleForm.name,
desc: this.ruleForm.desc,
bgUrl: this.ruleForm.bgUrl,
subset: this.ruleForm.subset,
paramVO: {
type: this.ruleForm.type,
itemMap:itemMap,
@ -461,13 +455,99 @@ export default {
this.trainingName = data.name;
const training = this.endTableData.find(item => item.type === 'trainingChoose');
training.value = data.id;
},
uploadLogo() {
const pic = document.getElementById('upload_file');
if (!pic.files || !pic.files[0]) {
return;
}
const file = pic.files[0];
const mineType = file.type;
const fileSize = file.size;
if (mineType != 'image/png' && mineType != 'image/jpeg') {
this.$message.error('仅支持png和jpeg格式的图片');
return;
}
if (fileSize / (1024 * 1024) > 1) {
this.$message.error('图片应该小于1M');
return;
}
const fileArray = file.name.split('.');
const fileType = fileArray[fileArray.length - 1] || '';
if (!fileType) {
return;
}
const params = {
directory:'funBg',
fileName:'favicon_' + this.ruleForm.name + Math.ceil(Math.random() * 1000) + '.' + fileType,
method:'PUT'
};
const that = this;
getUploadUrl(params).then((response) => {
const url = response.data;
if (url) {
// var formData = new FormData();
// formData.append('body', file);
const xhr = new XMLHttpRequest();
xhr.open('PUT', url);
xhr.setRequestHeader('Content-Type', 'multipart/form-data');
xhr.send(file);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status == 200) {
that.ruleForm.bgUrl = '/funBg/' + params.fileName;
that.loginProLogoImg = '/funBg/' + params.fileName + '?' + Math.random() * 1000;
} else if (xhr.status != 200) {
that.$message.error('上传失败,请稍后再试');
}
};
}
});
}
}
};
</script>
<style scoped>
<style scoped lang="scss">
.dialog-footer {
text-align: center;
}
.loginLogo{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.el-icon-other{
width: 100%;
text-align: center;
height: 100%;
line-height: 98px;
font-size: 16px;
position: absolute;
color: #000;
}
.eachButton{
margin-left:10px;
width:200px;
height:100px;
border:1px #ccc dashed;
margin-bottom: 10px;
}
.uploadLogo {
position: relative;
overflow: hidden;
// float: right;
margin-right: 3px;
cursor: pointer;
input {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
}
</style>

View File

@ -66,7 +66,7 @@ export default {
queryForm: {
labelWidth: '80px',
reset: true,
leftSpan: 17,
leftSpan: 15,
queryObject: {
name: {
type: 'text',
@ -223,7 +223,8 @@ export default {
{ text: '地图排序', handler: this.mapSort },
{ text: '导出', handler: this.localExport, show: () => { return this.$store.state.user.roles.includes(superAdmin); }},
{ text: '导入', handler: this.localImport, fileType: 'file', show: () => { return this.$store.state.user.roles.includes(superAdmin); }},
{ text: '一键校验', handler: this.allCheck }
{ text: '一键校验', handler: this.allCheck },
{ text: '线路功能模板', handler: this.templateLineFunctionShow }
]
},
@ -416,6 +417,9 @@ export default {
this.$message.error('一键校验地图数据失败:' + e.message);
});
},
templateLineFunctionShow() {
this.$router.push({path:'/systemManagement/lineDataManage/mapFunTem'});
},
localExport() {
this.$refs['localMap'].doShow();
},

View File

@ -0,0 +1,438 @@
<template>
<el-dialog
:title="title"
:before-close="close"
:visible.sync="visible"
center
fullscreen
>
<div style="padding: 0 150px">
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px" size="small">
<el-row>
<el-col :span="12">
<el-form-item label="模板名称:" prop="templateName">
<el-input v-model="ruleForm.templateName" style="width: 200px;" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="线路功能名称:" prop="name">
<el-input v-model="ruleForm.name" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="系统:" prop="type">
<el-select v-model="ruleForm.type" placeholder="请选择类型">
<el-option label="地铁CBTC" value="METRO" />
<el-option label="大铁CTC" value="RAILWAY" />
<el-option label="应急调度" value="EMERGENCY" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="默认成员类型:" prop="defaultMemberType">
<el-select v-model="ruleForm.defaultMemberType" size="mini" clearable>
<el-option
v-for="item in memberTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="描述:" prop="desc">
<el-input
v-model="ruleForm.desc"
type="textarea"
:rows="4"
placeholder="请输入内容"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="背景:" prop="bgUrl">
<div class="eachButton uploadLogo">
<img v-if="ruleForm.bgUrl" :src="computedLoginLogo" :alt="computedLoginLogo" class="loginLogo">
<i class="el-icon-plus avatar-uploader-icon el-icon-other" />
<input id="upload_file" ref="files" type="file" class="file_box" accept="image/jpeg,image/png" @change="uploadLogo">
</div>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="分组:" prop="subset">
<el-input v-model="ruleForm.subset" placeholder="请输入内容" />
</el-form-item>
</el-col>
</el-row>
<el-card style="padding: 10px;">
<el-table
:data="endTableData"
border
size="mini"
style="width: 100%;margin-top: 10px;max-height: 300px;overflow: scroll;"
>
<el-table-column
prop="label"
label="后端配置项"
/>
<el-table-column
prop="value"
label="value"
>
<template slot-scope="scope">
<el-checkbox v-if="scope.row.type === 'checkbox'" v-model="scope.row.value" />
<el-select
v-else-if="scope.row.type === 'select'"
v-model="scope.row.value"
size="mini"
clearable
>
<el-option
v-for="item in scope.row.optionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="padding: 10px;margin-top: 20px;">
<el-table
:data="frontTableData"
border
size="mini"
style="width: 100%;margin-top: 10px;max-height: 300px;overflow: scroll;"
>
<el-table-column
prop="label"
label="前端配置项"
/>
<el-table-column
prop="value"
label="value"
>
<template slot-scope="scope">
<el-checkbox v-if="scope.row.type === 'checkbox'" v-model="scope.row.value" />
<el-select
v-else-if="scope.row.type === 'select'"
v-model="scope.row.value"
size="mini"
clearable
>
<el-option
v-for="item in scope.row.optionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</template>
</el-table-column>
</el-table>
</el-card>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="close"> </el-button>
<el-button type="primary" @click="commit"> </el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { createTemplateMapFunction, updateTemplateMapFunction } from '@/api/trainingPlatform';
import { ClientList, TrainingTypeList } from '@/scripts/ConstDic';
import ConstConfig from '@/scripts/ConstConfig';
import { getUploadUrl } from '@/api/projectConfig';
export default {
name: 'EditSubsystem',
data() {
return {
visible: false,
title: '',
loginProLogoImg: '',
memberTypeList: ConstConfig.ConstSelect.roleTypeList,
frontTableData: [
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
{ key: 'singleClient', label: '是否单客户端', value: false, type: 'checkbox' },
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: ClientList},
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
{ key: 'hasMemberManage', label: '是否有成员管理', value: false, type: 'checkbox' }
],
endTableData: [
// { key: 'DEFAULT_MEMBER', label: '仿', value: '', type: 'select', optionList: [] },
// { key: 'LPF', label: '', value: '', type: 'select', optionList: [] },
{ key: 'REAL_DEVICE', label: '真实设备', value: '', type: 'checkbox' }
// { key: 'TRAINING', label: '', value: '', type: 'trainingChoose' },
// { key: 'EXAM', label: '', value: '', type: 'select', optionList: [] }
],
rules: {
templateName: [
{ required: true, message: '请输入模板线路功能名称', trigger: 'blur' }
],
name: [
{ required: true, message: '请输入线路功能名称', trigger: 'blur' }
],
type: [
{ required: true, message: '请选择线路功能类型', trigger: 'change' }
]
},
ruleForm: {
templateName: '',
templateId: '',
defaultMemberType: '',
name: '',
type: '',
desc: '',
bgUrl: '',
subset: ''
}
};
},
computed: {
computedLoginLogo() {
return this.loginProLogoImg ? this.$store.state.user.ossUrl + this.loginProLogoImg : '';
}
},
methods: {
doShow(row) {
if (row && row.id) {
this.ruleForm.templateId = row.id;
this.ruleForm.templateName = row.name;
this.ruleForm.defaultMemberType = row.assistantParam.defaultMemberType;
this.loginProLogoImg = row.mapFunctionParam.bgUrl;
this.ruleForm.name = row.mapFunctionParam.name;
this.ruleForm.desc = row.mapFunctionParam.desc || '';
this.ruleForm.bgUrl = row.mapFunctionParam.bgUrl || '';
this.ruleForm.subset = row.mapFunctionParam.subset || '';
this.ruleForm.type = row.mapFunctionParam.paramVO.type;
this.frontTableData.forEach(item => {
item.value = row.mapFunctionParam.paramVO.domConfig[item.key];
});
this.endTableData.forEach(item => {
if (row.mapFunctionParam.paramVO.itemMap && row.mapFunctionParam.paramVO.itemMap[item.key]) {
if (row.mapFunctionParam.paramVO.itemMap[item.key] === 'true') {
item.value = true;
} else if (row.mapFunctionParam.paramVO.itemMap[item.key] === 'false') {
item.value = false;
} else {
item.value = row.mapFunctionParam.paramVO.itemMap[item.key] === null ? '' : row.mapFunctionParam.paramVO.itemMap[item.key];
}
}
});
this.title = '修改模板线路功能';
} else {
this.title = '创建模板线路功能';
}
this.visible = true;
},
close() {
this.ruleForm = {
templateId: '',
templateName: '',
defaultMemberType: '',
name: '',
type: '',
desc: '',
bgUrl: '',
subset: ''
};
this.loginProLogoImg = '';
this.frontTableData = [
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
{ key: 'singleClient', label: '是否单客户端', value: false, type: 'checkbox' },
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: ClientList},
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
{ key: 'hasMemberManage', label: '是否有成员管理', value: false, type: 'checkbox' }
];
this.endTableData = [
// { key: 'DEFAULT_MEMBER', label: '仿', value: '', type: 'select', optionList: [] },
// { key: 'LPF', label: '', value: '', type: 'select', optionList: this.lpfDataList },
{ key: 'REAL_DEVICE', label: '真实设备', value: '', type: 'checkbox' }
// { key: 'TRAINING', label: '', value: '', type: 'trainingChoose' },
// { key: 'EXAM', label: '', value: '', type: 'select', optionList: this.examList }
];
this.visible = false;
this.$refs.ruleForm.resetFields();
},
commit() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
const itemMap = {
DEFAULT_MEMBER: '',
LPF: '',
TRAINING: '',
EXAM: ''
};
this.endTableData.forEach(item => {
itemMap[item.key] = item.value === '' ? null : item.value;
});
const domConfig = {};
this.frontTableData.forEach(item => {
domConfig[item.key] = item.value;
});
if (!domConfig.trainingType) {
delete domConfig.trainingType;
}
const data = {
name: this.ruleForm.templateName,
assistantParam: {
defaultMemberType: this.ruleForm.defaultMemberType
},
mapFunctionParam: {
name: this.ruleForm.name,
desc: this.ruleForm.desc,
bgUrl: this.ruleForm.bgUrl,
subset: this.ruleForm.subset,
paramVO: {
type: this.ruleForm.type,
itemMap:itemMap,
domConfig: domConfig
}
}
};
if (this.title === '创建模板线路功能') {
createTemplateMapFunction(data).then(resp => {
this.visible = false;
this.$emit('tableReload');
this.$message.success('创建模板线路功能成功!');
this.close();
}).catch(() => {
this.$message.error('创建模板线路功能失败!');
});
} else {
data.id = this.ruleForm.templateId;
updateTemplateMapFunction(data).then(resp => {
this.visible = false;
this.$emit('tableReload');
this.close();
this.$message.success('修改模板线路功能成功!');
}).catch(() => {
this.$message.error('修改模板线路功能失败!');
});
}
}
});
},
uploadLogo() {
const pic = document.getElementById('upload_file');
if (!pic.files || !pic.files[0]) {
return;
}
const file = pic.files[0];
const mineType = file.type;
const fileSize = file.size;
if (mineType != 'image/png' && mineType != 'image/jpeg') {
this.$message.error('仅支持png和jpeg格式的图片');
return;
}
if (fileSize / (1024 * 1024) > 1) {
this.$message.error('图片应该小于1M');
return;
}
const fileArray = file.name.split('.');
const fileType = fileArray[fileArray.length - 1] || '';
if (!fileType) {
return;
}
const params = {
directory:'funBg',
fileName:'favicon_' + this.ruleForm.templateName + '.' + fileType,
method:'PUT'
};
const that = this;
getUploadUrl(params).then((response) => {
const url = response.data;
if (url) {
// var formData = new FormData();
// formData.append('body', file);
const xhr = new XMLHttpRequest();
xhr.open('PUT', url);
xhr.setRequestHeader('Content-Type', 'multipart/form-data');
xhr.send(file);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status == 200) {
that.ruleForm.bgUrl = '/funBg/' + params.fileName;
that.loginProLogoImg = '/funBg/' + params.fileName + '?' + Math.random() * 1000;
} else if (xhr.status != 200) {
that.$message.error('上传失败,请稍后再试');
}
};
}
});
// directoryMINIO
// fileName
// method
}
}
};
</script>
<style scoped lang="scss">
.dialog-footer {
text-align: center;
}
.loginLogo{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.el-icon-other{
width: 100%;
text-align: center;
height: 100%;
line-height: 98px;
font-size: 16px;
position: absolute;
color: #000;
}
.eachButton{
margin-left:10px;
width:200px;
height:100px;
border:1px #ccc dashed;
margin-bottom: 10px;
}
.uploadLogo {
position: relative;
overflow: hidden;
// float: right;
margin-right: 3px;
cursor: pointer;
input {
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
opacity: 0;
cursor: pointer;
}
}
</style>

View File

@ -0,0 +1,153 @@
<template>
<div>
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<edit-subsystem ref="editSubsystem" @tableReload="reloadTable" />
</div>
</template>
<script>
import { queryTemplateMapFunPaged, deleteTemplateMapFunction } from '@/api/trainingPlatform';
import EditSubsystem from './edit';
import ConstConfig from '@/scripts/ConstConfig';
const simTypeMap = {
METRO: '地铁CBTC',
RAILWAY: '大铁CTC',
EMERGENCY: '应急调度'
};
export default {
name: 'PublishMap',
components: {
EditSubsystem
},
data() {
return {
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
labelWidth: '80px',
reset: true,
leftSpan: 16,
queryObject: {
name: {
type: 'text',
label: '名称'
}
}
},
queryList: {
query: this.queryFunction,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '模板名称',
prop: 'name'
},
{
title: '线路功能名称',
prop: 'name',
type: 'tag',
columnValue: (row) => { return row.mapFunctionParam.name; },
tagType: () => { return 'success'; }
},
{
title: '分组',
prop: 'subset',
type: 'tag',
columnValue: (row) => { return row.mapFunctionParam.subset; },
tagType: () => { return 'success'; }
},
{
title: '系统',
prop: 'simType',
type: 'tag',
columnValue: (row) => { return simTypeMap[row.mapFunctionParam.paramVO.type]; },
tagType: () => { return 'success'; }
},
{
title: '默认扮演成员类型',
prop: 'DEFAULT_MEMBER',
type: 'tag',
columnValue: (row) => { return this.$convertField(row.assistantParam ? row.assistantParam.defaultMemberType : '', ConstConfig.ConstSelect.roleTypeList, ['value', 'label']); },
tagType: () => { return 'success'; }
},
{
title: '真实设备',
prop: 'REAL_DEVICE',
type: 'tag',
columnValue: (row) => { return row.mapFunctionParam.paramVO && row.mapFunctionParam.paramVO.itemMap && row.mapFunctionParam.paramVO.itemMap.REAL_DEVICE ? '是' : '否'; },
tagType: () => { return 'success'; }
},
{
title: '描述',
prop: 'desc',
type: 'tag',
columnValue: (row) => { return row.mapFunctionParam.desc; },
tagType: () => { return 'success'; }
},
{
type: 'button',
title: '操作',
width: '300',
buttons: [
{
name: '更新',
handleClick: this.updateRow
},
{
name: '删除',
handleClick: this.deleteRow
}
]
}
],
actions: [
{ text: '新建', handler: this.handleAddSubsystem },
{ text: '返回', handler: this.goBack }
]
}
};
},
methods: {
queryFunction(params) {
params['detail'] = true;
return queryTemplateMapFunPaged(params);
},
deleteRow(index, row) {
this.$confirm('删除线路功能,是否继续?', '提 示', {
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning'
}).then(() => {
deleteTemplateMapFunction(row.id).then(resp => {
this.reloadTable();
}).catch(error => {
this.$message.error(`删除模板线路功能失败:${error.message}`);
});
}).catch( () => { });
},
updateRow(index, row) {
this.$refs.editSubsystem.doShow(row);
},
handleAddSubsystem() {
this.$refs.editSubsystem.doShow();
},
reloadTable() {
this.queryList.reload();
},
goBack() {
this.$router.go(-1);
}
}
};
</script>
<style lang="scss" scoped>
/deep/
.el-button+.el-button{
margin-top: 5px;
margin-left: 5px;
}
</style>

View File

@ -10,13 +10,19 @@
center
>
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="120px">
<el-form-item label="系统:" prop="simTypes">
<el-select v-model="form.simTypes" multiple placeholder="请选择生成仿真类型">
<el-option label="地铁CBTC" value="METRO" />
<el-option label="大铁CTC" value="RAILWAY" />
<el-option label="应急调度" value="EMERGENCY" />
<el-form-item label="功能模板:" prop="templateIds">
<el-select v-model="form.templateIds" multiple clearable placeholder="请选择生成功能模板">
<el-option
v-for="item in templateList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
<el-form-item label="同名覆写:" prop="overwrite">
<el-checkbox v-model="form.overwrite" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="doCloseGenerate"> </el-button>
@ -27,7 +33,7 @@
</template>
<script>
import { queryMapFunctionPaged, deleteMapFunction, generateMapFunctionNew, deleteAllMapFunction } from '@/api/trainingPlatform';
import { queryMapFunctionPaged, deleteMapFunction, deleteAllMapFunction, queryTemplateMapFunctionList, generateMapFunctionByTemplate } from '@/api/trainingPlatform';
import { getPublishMapListOnline } from '@/api/jmap/map';
import EditSubsystem from './editSubsystem';
const simTypeMap = {
@ -35,25 +41,6 @@ const simTypeMap = {
RAILWAY: '大铁CTC',
EMERGENCY: '应急调度'
};
// const clientMap = {
// C_ATS: 'ATS',
// C_ATS_BS: 'ATS',
// C_PA: 'PA',
// C_CCTV: '',
// L_ATS: 'ATS',
// LCW: '',
// L_CCTV: '',
// L_PA: 'PA',
// GPC: '',
// IPC: '',
// STPC: '',
// DMP: '',
// ISCS: 'ISCS',
// IBP: 'IBP',
// PSL: 'PSL',
// RUN_PLAN_DESIGN: '',
// DRIVE: ''
// };
export default {
name: 'PublishMap',
components: {
@ -61,20 +48,21 @@ export default {
},
data() {
return {
dialogVisible: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
title: '一键生成线路功能',
visible: false,
templateList: [],
rules: {
type: [
{ required: true, message: '请选择生成仿真系统类型', trigger: 'change' }
templateIds: [
{ required: true, message: '请选择模板线路功能', trigger: 'change' }
]
},
form: {
simTypes: []
templateIds: [],
overwrite: false
},
queryForm: {
labelWidth: '80px',
@ -185,11 +173,6 @@ export default {
}
};
},
computed: {
isShow() {
return this.$store.getters['roles'].indexOf('05');
}
},
created() {
this.mapList = [];
getPublishMapListOnline().then(resp => {
@ -213,6 +196,7 @@ export default {
},
queryFunction(params) {
params['mapId'] = this.$route.query.mapId;
params['detail'] = true;
return queryMapFunctionPaged(params);
},
deleteRow(index, row) {
@ -229,19 +213,30 @@ export default {
}).catch( () => { });
},
generateMapSystem() {
if (!this.templateList.length) {
queryTemplateMapFunctionList({detail: false}).then(resp => {
this.templateList = resp.data || [];
}).catch(() => {
this.$message.error('获取模板线路功能列表失败!');
});
}
this.visible = true;
},
systemSubset() {
this.$router.push({ path:'/systemManagement/lineDataManage/systemSubset', query:{ mapId: this.$route.query.mapId, lineCode: this.$route.query.lineCode }});
},
doCloseGenerate() {
this.form.simTypes = [];
this.form = {
templateIds: [],
overwrite: false
};
this.visible = false;
},
generateCommit() {
this.$refs.ruleForm.validate((valid) => {
if (valid) {
generateMapFunctionNew(this.$route.query.mapId, this.form).then(resp => {
const data = { templateIds: this.form.templateIds, mapIds: [this.$route.query.mapId], overwrite: this.form.overwrite };
generateMapFunctionByTemplate(data).then(resp => {
if (resp.data && resp.data.length) {
let message = '';
resp.data.forEach(item => {

View File

@ -66,7 +66,7 @@ export default {
};
},
mounted() {
queryMapFunctionList({mapId: this.$route.query.mapId}).then(resp => {
queryMapFunctionList({mapId: this.$route.query.mapId, detail: false}).then(resp => {
this.functionList = resp.data;
this.functionList.forEach(item => {
if (item.subset && this.subsetList.includes(item.subset)) {

View File

@ -112,7 +112,7 @@ export default {
}
},
getRelatedFunctionList(mapId) {
queryMapFunctionList({mapId: mapId}).then(resp => {
queryMapFunctionList({mapId: mapId, detail: true}).then(resp => {
this.functionList = resp.data;
console.log(resp);
}).catch(() => {

View File

@ -12,7 +12,6 @@
<el-menu
:default-active="defaultIndex"
class="el-menu-vertical-demo"
background-color="#545c64"
text-color="#fff"
active-text-color="#ffd04b"
>
@ -81,16 +80,27 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.el-menu{
background-color: transparent;
}
.el-menu-item{
&:hover{
background: #00172E;
}
&:focus{
background-color: #00172E;
}
}
.mapListName{
padding: 10px 0 10px 17px;
color: #fff;
background: #545c64;
background: #01468B;
display: flex;
justify-content: left;
align-items: center;
position: sticky;
position: -webkit-sticky;
border-bottom: 3px solid #8c8a89;
border-bottom: 1px solid #00172E;
top: 0;
z-index: 9;
}
@ -98,16 +108,27 @@ export default {
width: 100%;
height: 100%;
flex: 1;
overflow: scroll;
overflow-y: scroll;
padding-bottom: 10px;
background: #545c64;
background: linear-gradient(to bottom, #01468B, #00172E);
&::-webkit-scrollbar{
background: #06284a;
}
&::-webkit-scrollbar-thumb{
background: #0c0909;
}
&::-webkit-scrollbar-track{
background: #06284a;
}
}
.map-list-main{
height: 100%;
display:flex;
flex-direction:column;
}
/deep/.el-menu{
border-right-width: 0;
/deep/{
.el-menu{
border-right-width: 0;
}
}
</style>

View File

@ -62,5 +62,6 @@ export default {
left:0;
top:0;
height: 100%;
background: #00172E;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<div style="height: 100%;width: 100%;padding-bottom: 20px;">
<div style="height: 50px;text-align: center;line-height: 50px;font-size: 26px;font-weight: bolder;">{{ mapName }}</div>
<el-tabs v-model="activeName" style="height: calc(100% - 30px);margin: 0 10px;overflow-y: auto;" type="border-card">
<div class="sim-box">
<div style="height: 50px;text-align: center;line-height: 50px;font-size: 26px;font-weight: bolder;color: #fff;">{{ mapName }}</div>
<el-tabs v-model="activeName" class="tabs-box" type="border-card">
<el-tab-pane label="功能" name="first" style="height: 100%;">
<el-collapse v-model="collapse" accordion>
<template v-for="item in subsetList">
@ -248,7 +248,7 @@ export default {
this.$refs.selectRole.doShow(row.id);
},
initMapSystem() {
queryMapFunctionList({mapId: this.$route.params.mapId}).then(resp => {
queryMapFunctionList({mapId: this.$route.params.mapId, detail: true}).then(resp => {
this.systemList = resp.data;
this.systemList.forEach(item => {
if (item.subset && this.subsetList.includes(item.subset)) {
@ -343,6 +343,72 @@ export default {
};
</script>
<style lang="scss" scoped>
/deep/{
.el-collapse-item__header {
background: #00172E;
color: #fff;
}
.el-collapse-item__content{
background: #00172E;
}
.el-tabs__nav-scroll{
background: #00172E;
}
.el-tabs--border-card>.el-tabs__header .el-tabs__item{
color: #fff;
border: solid 1px #01468B;
}
.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{
background: #01468B;
}
.el-form-item__label {
color: #fff;
}
.el-tabs--border-card{
border: solid 1px #01468B;
}
.el-collapse-item__header{
border-bottom: solid 1px #01468B;
}
.el-collapse{
border-top: solid 1px #01468B;
border-bottom: solid 1px #01468B;
}
.el-collapse-item__wrap{
border-bottom: solid 1px #01468B;
}
.el-table th.el-table__cell{
background-color: #01468B;
color: #fff;
}
.el-table--border, .el-table--group{
border-width: 0;
}
}
.el-card{
border: solid 1px #01468B;
}
.tabs-box{
height: calc(100% - 30px);
margin: 0 10px;
overflow-y: auto;
background: transparent;
&::-webkit-scrollbar{
background: #06284a;
}
&::-webkit-scrollbar-thumb{
background: #0c0909;
}
&::-webkit-scrollbar-track{
background: #06284a;
}
}
.sim-box{
height: 100%;
width: 100%;
padding-bottom: 20px;
background: #00172E;
}
.box-card {
width: 30%;
height: 220px;
@ -350,10 +416,12 @@ export default {
position: relative;
cursor: pointer;
user-select: none;
background: transparent;
}
.bg-img-box {
padding: 10px;
height: 220px;
background-color: #fff;
background-size: 100% 100%;
background-repeat:no-repeat;
}
@ -371,6 +439,7 @@ export default {
position: relative;
left: 45%;
height: 60px;
background: transparent;
}
.card-box-title {
text-align: center;
@ -386,6 +455,7 @@ export default {
display:-webkit-box;
-webkit-line-clamp:3;
-webkit-box-orient:vertical;
background: transparent;
}
.box-card .el-tooltip__popper {
width: 300px;