This commit is contained in:
sunzhenyu 2020-05-28 13:39:50 +08:00
commit bfe172ff30
147 changed files with 5762 additions and 1716 deletions

View File

@ -38,6 +38,7 @@
"three": "^0.107.0",
"vue": "^2.6.10",
"vue-i18n": "^8.12.0",
"vue-quill-editor": "^3.0.6",
"vue-router": "^3.1.6",
"vuedraggable": "^2.23.2",
"vuex": "^3.1.0",

View File

@ -312,11 +312,11 @@ export function getSimulationConversationListNew(group) {
}
// 获取/创建仿真会话(新版地图)
export function getSimulationConversationIdNew(params, group) {
export function getSimulationConversationIdNew(data, group) {
return request({
url: `/simulation/${group}/wx/conversation`,
method: 'get',
params: params
method: 'post',
data
});
}
@ -336,3 +336,12 @@ export function getSimulationContextListNew(group, conversationId) {
method: 'get'
});
}
// 获取仿真会话消息列表(新版地图)
export function getSimulationChatMemberNew(group, conversationId) {
return request({
url: `/simulation/${group}/${conversationId}/members`,
method: 'get'
});
}

View File

@ -46,10 +46,10 @@ export function getQuestionListByMapId(params) {
});
}
// 加载实操及内容
export function loadQuestionList(competitionId, data) {
// 加载试卷
export function loadingPaper(competitionId, data) {
return request({
url: `api/v1/competitionPractical/competition/${competitionId}/distribute`,
url: `/api/v1/competition/${competitionId}/testPaper`,
method: 'post',
data
});
@ -64,19 +64,85 @@ export function postSignUp(id, data) {
}
/** 查询用户是否已经报名该竞赛 */
export function getIsSignUp(raceId) {
export function getIsSignUp(raceId, params = {}) {
return request({
url: `/api/race/${raceId}/isSignUp`,
method: 'get'
method: 'get',
params
});
}
/** 分页查询竞赛报名人员 */
export function getRaceUserList(params) {
return request({
url: `/api/race/${params.raceId}/raceUser`,
url: `/api/race/${params.raceId}/raceUser/page`,
method: 'get',
params
});
}
// /** 分页查询理论题列表 */
// export function getCompetitionTheory(params) {
// return request({
// url: `/api/v1/competitionTheory`,
// method: 'get',
// params
// });
// }
/** 提交试卷 */
export function postCompetitionTheory(data) {
return request({
url: `/api/v1/competitionTheory/submit`,
method: 'post',
data
});
}
/** 查询本竞赛用的实操列表 */
export function getCompetitionPractical(competitionId) {
return request({
url: `/api/v1/competitionPractical/competition/${competitionId}`,
method: 'get'
});
}
/** 查询竞赛报名人员详情 */
export function getRaceUserById(raceId) {
return request({
url: `/api/race/${raceId}/raceUser`,
method: 'get'
});
}
/** 查询加载的实操题 */
export function getPracticalQuestion(competitionId) {
return request({
url: `/api/v1/competitionPractical/competition/${competitionId}`,
method: 'get'
});
}
/** 查询加载的理论题 */
export function getTheoryQuestion(competitionId) {
return request({
url: `/api/v1/competitionTheory/competition/${competitionId}`,
method: 'get'
});
}
/** 查询理论题作答详情 */
export function getCompetitionDetail(competitionId) {
return request({
url: `/api/v1/competitionTheory/detail/competition/${competitionId}`,
method: 'get'
});
}
/** 根据id查询竞赛信息 */
export function getRaceById(id) {
return request({
url: `/api/race/${id}`,
method: 'get'
});
}

45
src/api/questionBank.js Normal file
View File

@ -0,0 +1,45 @@
import request from '@/utils/request';
// 分页查询理论试题
export function listQuestionPage(params) {
return request({
url: `/api/questionBank/questions/paging`,
method: 'get',
params
});
}
// 创建题目
export function createQuestion(data) {
return request({
url: `/api/questionBank/questions`,
method: 'post',
data
});
}
// 删除题目
export function deleteQuestion(questionId) {
return request({
url: `/api/questionBank/questions/${questionId}`,
method: 'delete'
});
}
// 更新题目
export function updateOption(data) {
return request({
url: `/api/questionBank/questions/${data.id}`,
method: 'put',
data
});
}
// 获取题目信息
export function getQuestionInfo(questionId) {
return request({
url: `/api/questionBank/questions/${questionId}`,
method: 'get'
});
}

View File

@ -24,3 +24,54 @@ export function updateRace(id, data) {
data
});
}
/** 获取实操试题列表(题库)*/
export function getPracticeList() {
return request({
url: `/api/v1/competitionPractical/competition`,
method: 'get'
});
}
/** 获取单个实操试题详情(题库)*/
export function getPracticeByIdBasic() {
return request({
url: `/api/v1/competitionPractical/competition`,
method: 'get'
});
}
/** 创建实操试题 */
export function createPractice(data) {
return request({
url: `/api/v1/competitionPractical/competition`,
method: 'post',
data
});
}
/** 更新实操试题信息 */
export function putPracticeInfo(id, params) {
return request({
url: `/api/v1/competitionPractical/competition/${id}`,
method: 'put',
data: params
});
}
/** 删除实操试题 */
export function deletePractice(id) {
return request({
url: `/api/v1/competitionPractical/competition/${id}`,
method: 'delete'
});
}
/** 录制实操试题 */
export function practiceRecordNotify(practiceId) {
return request({
url: `/api/scriptSimulation/${practiceId}/scriptWrite`,
method: 'get'
});
}

View File

@ -685,3 +685,11 @@ export function simulationLoadRunPlan(group, templateId) {
method: 'put'
});
}
/** 根据车次号获取列车信息 */
export function getTrainDetailBytripNumber(group, params) {
return request({
url: `/simulation/${group}/planTripInfo`,
method: 'get',
params: params
});
}

BIN
src/assets/SAFS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

BIN
src/assets/apply.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

BIN
src/assets/applyAlready.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -1,5 +1,5 @@
<template>
<div v-show="show" class="pop-menu" :style="{ height: height, left: tPosition.x+'px', top: tPosition.y+'px' }">
<div v-show="show" class="pop-menu" :class="popMenuClass" :style="{ height: height, left: tPosition.x+'px', top: tPosition.y+'px' }">
<div v-for="(item, index) in menu" :key="index" class="" :style="{ width: width }">
<div v-if="item.children">
<el-popover
@ -99,6 +99,12 @@ export default {
default() {
return '';
}
},
popMenuClass: {
type: String,
default() {
return '';
}
}
},
data() {

View File

@ -150,7 +150,7 @@
<template v-for="(button, index) in queryList.actions">
<el-button v-if="button.fileType==='file' && (button.hasOwnProperty('show') ? button.show: true)" :key="index" :type="button.type ? button.type: 'primary'" size="small" class="button_style uploadDemo" :disabled="button.disabled" :loading="button.disabled">
<input id="queryFormFilesInput" type="file" class="file_box" accept=".json, application/json" @change="button.handler">
{{ $t('map.importMap') }}
{{ button.text }}
</el-button>
<el-button
v-else-if="button.hasOwnProperty('show') ? button.show: true"

View File

@ -49,6 +49,20 @@
:sortable="column.sortable"
:sort-by="column.sortBy"
/>
<el-table-column
v-else-if="checkColumnTyep(column, 'html')"
:key="index"
:prop="column.prop"
:label="column.title"
:width="column.width"
show-overflow-tooltip
:sortable="column.sortable"
:sort-by="column.sortBy"
>
<template slot-scope="scope">
<div v-html="scope.row[column.prop]" />
</template>
</el-table-column>
<el-table-column
v-else-if="checkColumnTyep(column, 'basicText')"
:key="index"
@ -142,7 +156,7 @@
@click="queryList.selectAllClick(queryList.selection)"
>{{ $t('global.selectAdd') }}</el-button>
</div>
<div class="page-container " style="text-align: center; margin: 10px 0; height: 40px;">
<div v-if="!queryList.paginationHiden" class="page-container " style="text-align: center; margin: 10px 0; height: 40px;">
<el-pagination
:current-page="pageIndex"
:page-sizes="[10, 20, 50, 100] "

View File

@ -0,0 +1,116 @@
<template>
<div>
<quill-editor
ref="editor"
v-model="content"
:options="options"
:style="{height: height+'px', 'margin-bottom': '80px'}"
@change="onChange"
@blur="onBlur"
@focus="onFocus"
/>
</div>
</template>
<script>
import { quillEditor } from 'vue-quill-editor';
import 'quill/dist/quill.snow.css';
export default {
components: {
quillEditor
},
props: {
value: {
type: String,
default: ''
},
height: {
type: Number,
default: 200
},
placeholder: {
type: String,
default: ''
}
},
data() {
return {
content: '',
options: {
modules: {
toolbar: [
['bold', 'italic', 'underline', 'strike'],
[],
[],
[{'list': 'ordered'}, {'list': 'bullet'}],
[{'script': 'sub'}, {'script': 'super'}],
[{'indent': '-1'}, {'indent': '+1'}],
[{'direction': 'rtl'}],
[{'size': ['small', 'large', 'huge']}],
[{'color': [], 'background': []}],
[{'font': []}],
[{'align': []}],
['clean']
]
}
}
};
},
computed: {
editor() {
return this.$refs.editor.quill;
},
titleConfig () {
return {
'ql-bold': '加粗',
'ql-color': '颜色',
'ql-font': '字体',
'ql-code': '插入代码',
'ql-italic': '斜体',
'ql-link': '添加链接',
'ql-background': '背景颜色',
'ql-size': '字体大小',
'ql-strike': '删除线',
'ql-script': '上标/下标',
'ql-underline': '下划线',
'ql-blockquote': '引用',
'ql-header': '标题',
'ql-indent': '缩进',
'ql-list': '列表',
'ql-align': '文本对齐',
'ql-direction': '文本方向',
'ql-code-block': '代码块',
'ql-formula': '公式',
'ql-image': '图片',
'ql-video': '视频',
'ql-clean': '清除字体样式'
};
}
},
watch: {
'value': function(val) {
this.$nextTick(() => {
if (val != this.$escapeHTML(this.content)) {
this.editor.enable(false);
this.content = val;
this.editor.enable(true);
this.editor.blur();
}
});
}
},
mounted() {
this.content = this.value;
},
methods: {
onChange(e) {
this.$emit('input', this.$escapeHTML(this.content));
},
onBlur(e) {
},
onFocus(e) {
}
}
};
</script>

View File

@ -3,10 +3,13 @@ export default {
inserted: function (el, obj) {
// 这是需要页面刚加载就能进行聚焦操作使用的钩子函数,可以省略的,视具体需求而定
// 对值进行判断
if (obj.value) {
// 聚焦元素
el.focus();
}
const dom = el.querySelector('input') || el.querySelector('textarea');
dom.focus();
// el.focus();
// if (obj.value) {
// // 聚焦元素
// el.focus();
// }
},
// 当指令所在组件的 VNode 及其子 VNode 全部更新后调用
// 这是每当绑定的值发生改变时触发的钩子函数

View File

@ -77,5 +77,7 @@ export default {
iscsSystem: 'Iscs System',
studentManage: 'Student manage',
examDetail: 'Exam detail',
raceManage: 'Race manage'
raceManage: 'Race manage',
practiceManage:'Practice manage',
bankManage: 'Bank manage'
};

View File

@ -315,12 +315,12 @@ export default {
centralized: '是否集中站:',
stationRunPlanName: '真实名称:',
stationVisible: '是否显示:',
stationNameFont: '车站字体:',
stationNameFont: '车站字体大小:',
stationNameFontColor: '车站字体颜色:',
stationKmPostShow: '是否显示公里标名称:',
stationKmRange: '公里标距离:',
stationKmPost: '公里标名称:',
stationKmPostFont: '公里标字体:',
stationKmPostFont: '公里标字体大小:',
stationKmPostFontColor: '公里标字体颜色:',
stationPositionX: 'x坐标:',
stationPositionY: 'y坐标:',
@ -350,7 +350,7 @@ export default {
stationstandPosition: '车站坐标:',
subhead:'副标题:',
subheadDisplay:'是否显示副标题:',
subheadFont:'副标题字体:',
subheadFont:'副标题字体大小:',
subheadFontColor:'副标题字体颜色:',
subheadPosition:'副标题坐标:',
@ -377,7 +377,7 @@ export default {
textCode: '文字编码:',
textContent: '文本内容:',
textFont: '字体格式:',
textFont: '字体大小:',
textFontColor: '字体颜色:',
trainCode: '列车编号:',

View File

@ -82,5 +82,7 @@ export default {
homeJsxt: '首页',
examDetail: '考试详情',
raceManage: '竞赛管理',
recaList: '报名列表'
recaList: '报名列表',
bankManage: '题库列表',
practiceManage:'实操列表'
};

File diff suppressed because one or more lines are too long

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
@ -541,6 +542,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 0.1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
@ -491,6 +492,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [], // 特殊列车类型需设置显示格式

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: true // 进路触发颜色
@ -659,6 +660,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
@ -523,6 +524,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 0, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
@ -515,6 +516,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 0, // 车身line宽
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
@ -540,6 +541,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 2, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
@ -521,6 +522,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 1, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [], // 特殊列车类型需设置显示格式

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
@ -545,16 +546,17 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 0, // 车身line宽
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [
{
type: '03',
type: 'MANUAL',
serviceNumber: 'MM',
nameFormat: 'serviceNumber:groupNumber'
},
{
type: '02',
type: 'HEAD',
nameFormat: 'targetCode:groupNumber'
}
], // 特殊列车类型需设置显示格式
@ -574,7 +576,8 @@ class SkinCode extends defaultStyle {
normalColor: '#FFF'
},
hsda: {
trainHSDATextFontSize: 8// 列车HDSA字号
trainHSDATextFontSize: 8, // 列车HDSA字号
upPaddingHSDA: 0
},
trainNumber: {
targetCodePrefix: '000', // 目的地码前缀
@ -585,7 +588,8 @@ class SkinCode extends defaultStyle {
trainServer: {
serviceNumberPrefix: '00', // 服务号(表号)前缀
defaultServiceNumber: 'BB', // 默认服务号(表号)
trainServerOffset: { x: 26, y: 1}// 列车服务号偏移
trainServerOffset: { x: 26, y: 1}, // 列车服务号偏移
manualTypeText: 'MM' // 人工车填充
},
trainTarget: {
tripNumberPrefix: '0000', // 车次号前缀
@ -595,14 +599,14 @@ class SkinCode extends defaultStyle {
smallColor: '#70ECEE', // 小交路颜色
bigColor: '#FFFFFF', // 大交路颜色
inboundColor: '#00FF00', // 回库颜色
planTypeColor: '#FFFFFF', // 计划车颜色
manualTypeColor: '#FF0', // 人工车
headTypeColor: '#FF0' // 头码车
planTypeColor: '#FFFFFF' // 计划车颜色
},
trainTargetNumber: {
groupNumberPrefix: '000', // 车组号前缀
defaultGroupNumber: 'EEE', // 默认车组号
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
trainTargetNumberOffset: {x: -1, y: 1}, // 车组号偏移量
manualTypeColor: '#FF0', // 人工车
headTypeColor: '#FF0' // 头码车
},
trainHead: {
trainMoreLength: 1, // 列车车头比车身高出的长度,上下相比车体伸出去的边框

View File

@ -4,6 +4,7 @@ import deviceType from '../../constant/deviceType';
class SkinCode extends defaultStyle {
constructor() {
super();
this.fontFamily = '宋体';
this[deviceType.Section] = {
active: {
routeColor: false // 进路触发颜色
@ -659,6 +660,7 @@ class SkinCode extends defaultStyle {
};
this[deviceType.Train] = {
trainBody: {
fontFamily: 'consolas',
trainBodyLineWidth: 2, // 车身line宽
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
specialTrainType: [], // 特殊列车类型需设置显示格式

View File

@ -291,6 +291,13 @@ class Jlmap {
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
if (elem.deviceType === 'TRAIN' && elem.type === 'HEAD') {
elem.serviceNumber = '';
} else if (elem.deviceType === 'TRAIN' && elem.type === 'MANUAL') {
elem.serviceNumber = '';
elem.tripNumber = '';
elem.destinationCode = '';
}
const oDevice = this.mapDevice[code] || deviceFactory(type, elem);
this.hookHandle(oDevice, elem);
});
@ -371,7 +378,6 @@ class Jlmap {
update(list) {
this.setUpdateMapDevice(list || []); // 增加一个 前数据 处理 为了在区段中 获取全部的 道岔信息
const signalDeviceList = [];
const signalStatusList = [];
(list || []).forEach(elem => {
const code = elem.code;
const type = elem._type;
@ -386,13 +392,9 @@ class Jlmap {
}
}
const signalDevice = this.mapDevice[route.startSignalCode];
const signalStatus = {atsControl: elem.atsControl, fleetMode: elem.fleetMode};
const index = signalDeviceList.indexOf(signalDevice);
if (index === -1) {
signalDeviceList.push(signalDevice);
signalStatusList.push(signalStatus);
} else {
signalStatusList[index] = {atsControl: signalStatusList[index].atsControl && elem.atsControl, fleetMode: signalStatusList[index].fleetMode || elem.fleetMode};
}
} else if (elem.deviceType === 'CYCLE') {
store.dispatch('map/updateAutoReentryState', elem);
@ -418,6 +420,8 @@ class Jlmap {
if (elem.deviceType === 'TRAIN') {
store.dispatch('map/updateTrainState', elem);
store.dispatch('map/setTrainListUpdate', elem);
} else if (elem.deviceType === 'STAND') {
store.dispatch('map/updateStationStand', elem);
}
const oDevice = this.mapDevice[code] || deviceFactory(type, elem, this.showConfig);
if (elem.dispose) {
@ -429,15 +433,28 @@ class Jlmap {
}
}
});
this.handleRouteSignalStatus(signalDeviceList, signalStatusList);
this.handleRouteSignalStatus(signalDeviceList);
// 状态后处理
this.postHandle(list || []);
if (this.methods.stateUpdate instanceof Function) { this.methods.stateUpdate(list); }
}
handleRouteSignalStatus(signalDeviceList, signalStatusList) {
handleRouteSignalStatus(signalDeviceList) {
const routeStartSignalData = store.state.map.routeStartSignalData;
signalDeviceList.forEach((item, index)=> {
if (item && this.hookHandle(item, signalStatusList[index])) {
const status = {};
if (routeStartSignalData[item.code] && routeStartSignalData[item.code].length) {
routeStartSignalData[item.code].forEach((elem, index)=> {
if (index) {
status.atsControl = status.atsControl && elem.atsControl;
status.fleetMode = status.fleetMode || elem.fleetMode;
} else {
status.atsControl = elem.atsControl;
status.fleetMode = elem.fleetMode;
}
});
}
if (item && this.hookHandle(item, status)) {
this.$painter.update(item);
}
});

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
fontFamily: this.device.style.fontFamily,
text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -9,7 +9,7 @@ import EMouse from './EMouse';
import BoundingRect from 'zrender/src/core/BoundingRect';
import {isShowThePrdType} from '../../utils/handlePath';
export default class Automactic extends Group {
export default class AutoTurnBack extends Group {
constructor(model, style) {
super();
this.z = 20;

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
fontFamily: this.device.style.fontFamily,
text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
fontFamily: this.device.style.fontFamily,
text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
fontFamily: this.device.style.fontFamily,
text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -10,14 +10,14 @@ export default class EMouse extends Group {
create() {
this.text = new Text({
zlevel: this.device.zlevel,
z: this.device.z+1,
z: this.device.z + 1,
position: [0, 0],
style: {
x: this.device.model.position.x,
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance-30,
y: this.device.model.position.y + this.device.style.LcControl.lamp.radiusR + this.device.style.LcControl.text.distance - 30,
fontWeight: 'normal',
fontSize: this.device.style.LcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LcControl.mouseOverStyle.fontFamily,
fontFamily: this.device.style.fontFamily,
text: this.device.model.name,
textFill: this.device.style.LcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LcControl.mouseOverStyle.textAlign,

View File

@ -11,14 +11,14 @@ export default class EMouse extends Group {
this.text = new Text({
_subType: 'Text',
zlevel: this.device.zlevel,
z: this.device.z+1,
z: this.device.z + 1,
position: [0, 0],
style: {
x: this.device.model.position.x,
y: this.device.model.position.y + this.device.style.LimitControl.lamp.radiusR + this.device.style.LimitControl.text.distance-30,
y: this.device.model.position.y + this.device.style.LimitControl.lamp.radiusR + this.device.style.LimitControl.text.distance - 30,
fontWeight: this.device.style.LimitControl.mouseOverStyle.fontWeight,
fontSize: this.device.style.LimitControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.LimitControl.mouseOverStyle.fontFormat,
fontFamily: this.device.style.fontFormat,
text: this.device.model.name,
textFill: this.device.style.LimitControl.mouseOverStyle.fontColor,
textAlign: this.device.style.LimitControl.mouseOverStyle.textAlign,

View File

@ -17,7 +17,7 @@ export default class EMouse extends Group {
y: this.device.model.position.y + this.device.deviceStyle.lamp.radiusR + this.device.deviceStyle.text.distance - 30,
fontWeight: 'normal',
fontSize: this.device.deviceStyle.mouseOverStyle.fontSize,
fontFamily: this.device.deviceStyle.mouseOverStyle.fontFamily,
fontFamily: this.device.style.fontFamily,
text: this.device.model.name,
textFill: this.device.deviceStyle.mouseOverStyle.fontColor,
textAlign: this.device.deviceStyle.mouseOverStyle.textAlign,

View File

@ -59,6 +59,7 @@ class EMouse extends Group {
x: rect.x + (rect.width / 2),
y: rect.y + (rect.height / 2),
text: this.device.model.name,
fontFamily: this.device.style.fontFamily,
textFill: this.device.style.Section.mouseOverStyle.textShadowColor, // 黄色
textAlign: 'middle',
textVerticalAlign: 'top',

View File

@ -8,7 +8,7 @@ export default class ESeparator extends Group {
super();
this.model = model;
this.zlevel = model.zlevel;
this.z = model.style.Section.separator.z || 6;
this.z = model.z || 6;
this.style = model.style;
this.setType();
}

View File

@ -481,6 +481,7 @@ export default class Section extends Group {
this.lPartition = new ESeparator({
style: style,
zlevel: this.zlevel,
z: this.z + 3,
traingle: traingle,
point: {
x: model.points[0].x,
@ -495,6 +496,7 @@ export default class Section extends Group {
this.rPartition = new ESeparator({
style: style,
zlevel: this.zlevel,
z: this.z + 3,
traingle: traingle,
point: {
x: model.points[model.points.length - 1].x,

View File

@ -33,6 +33,7 @@ class ESigPost extends Group {
this.hor = new Polyline({
zlevel: model.zlevel,
z: model.z,
_val: '3',
shape: {
points: [
[model.x, model.y],

View File

@ -67,6 +67,7 @@ class Signal extends Group {
this.ciConfirm = new Text({
zlevel: this.zlevel,
z: this.z,
_val: '3',
silent: false,
_subType: 'enabled',
style: {
@ -110,6 +111,7 @@ class Signal extends Group {
this.tText = new Text({
zlevel: this.zlevel,
z: this.z,
_val: '3',
style: {
x: endPoint.x,
y: endPoint.y,

View File

@ -53,7 +53,7 @@ export default class ESingleControl extends Group {
y: model.point.y + model.style.Station.StationControl.lamp.radiusR + model.style.Station.StationControl.text.distance,
fontWeight: model.style.Station.StationControl.text.fontWeight,
fontSize: model.style.Station.StationControl.text.fontSize,
fontFamily: model.style.Station.StationControl.text.fontFormat,
fontFamily: model.style.fontFamily,
text: model.context,
textFill: model.style.Station.StationControl.text.fontColor,
textAlign: model.style.Station.StationControl.text.textAlign,

View File

@ -23,7 +23,8 @@ class EDetain extends Group {
x: model.x,
y: model.y,
text: style.StationStand.detainCar.text,
fontSize: `${style.StationStand.detainCar.fontSize} px ${style.fontFamily}`,
fontSize: `${style.StationStand.detainCar.fontSize}px`,
fontFamily: style.fontFamily,
textFill: style.StationStand.detainCar.centerTrainColor,
textStroke: style.backgroundColor,
textAlign: style.textStyle.textAlign,
@ -59,11 +60,13 @@ class EDetain extends Group {
hideMode() {
this.detain && this.detain.hide();
this.circleDetain && this.circleDetain.hide();
}
showMode() {
this.create();
this.detain && this.detain.show();
this.circleDetain && this.circleDetain.show();
}
}

View File

@ -37,7 +37,7 @@ class EMouse extends Group {
text = ` The planned train: ${trainType} \n Table No.: ${this.device.model.serviceNumber} \n Train Trip No.: ${this.device.model.tripNumber}\n Destination: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n Train No.: ${this.device.model.groupNumber}\n Early or late: ${destinationText}\n Direction: ${direction ? 'up' : 'down'}\n Crew No.: \n Start Station: \n Terminal Station: \n Occupied Track: ${this.device.model.sectionModel ? this.device.model.sectionModel.parentName : ''}\n Current Station: \n Train-ground communication: normal \n Operation Speed level: 4 \n Detained: ${this.device.model.hold ? 'Detained' : 'Normal'}\n \n 跳停状态: ${this.device.model.jump ? 'Skip to continue moving' : 'Normal'}Stationary: ${!this.device.model.stop ? 'No' : 'Yes'}\n Blocked: No \n Speed: ${this.device.model.speed || 0} km/h \n Authorized Distance: ${this.device.model.maLen || 0} m`;
} else {
if (Vue.prototype.$jlmap.lineCode == '11' || Vue.prototype.$jlmap.lineCode == '10') {
text = `列车类型: ${trainType}\n\0\0\0\0源:人工标记\n\0\0号: ${this.device.model.groupNumber}\n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.parentName : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: 无跳停\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: CTC车\n最高信号系统控制: CTC\n驾驶模式: SM模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
text = `列车类型: ${trainType}\n\0\0\0\0源:人工标记\n\0\0号: ${this.device.model.groupNumber}\n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\nATP报告方向: ${direction ? '上行' : '下行'}\n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.parentName : ''}\n所在车站: \n车次通信: 通信车\n运行时间: \n停站时间: \n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n车载扣车: 不执行\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'}\n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车状态: CTC车\n最高信号系统控制: CTC\n驾驶模式: SM模式\n最高ATP模式: AM\nATP1状态: 激活\nATP2状态: 备用\n速度: ${this.device.model.speed || 0} km/h\n车门状态: ${this.device.model.speed ? '关闭' : direction ? '左开右关' : '左关右开'}\n制动状态: 无紧急制动\n停车保证: 可保证停车\n站台无法进入: 否\n前方站台停车点: 中间\n折法策略: \n折返状态: \n屏蔽门开门许可: 是\n运营里程: 无效\n总重量: 196T\n车长: 11860cm\n列车编组: 1`;
} else {
text = `列车类型: ${trainType} \n\0\0\0\0号: ${this.device.model.serviceNumber}\n\0\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.destinationCode ? this.device.model.destinationCode : ''}\n\0\0号: ${this.device.model.groupNumber}\n\0\0点: ${destinationText}\n运行方向: ${direction ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.parentName : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${ this.device.model.hold ? '扣车' : '正常'}\n跳停状态: ${this.device.model.jump ? '跳停' : '正常'} \n停稳状态: ${!this.device.model.stop ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`;
}

View File

@ -99,7 +99,7 @@ export default class TrainBody extends Group {
textAlign: 'middle',
textVerticalAlign: 'top'
}) : '';
const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || style.Train.trainServer.defaultServiceNumber) + '';// 服务号(表号)
const serviceNumber = style.Train.trainServer.serviceNumberPrefix + (model.serviceNumber || model.model.specialServiceNumber || style.Train.trainServer.defaultServiceNumber) + '';// 服务号(表号)
const tripNumber = style.Train.trainTarget.tripNumberPrefix + (style.Train.trainTarget.defaultDirectionCode
? (model.directionCode || style.Train.trainTarget.defaultDirectionCode) + (model.tripNumber || style.Train.trainTarget.defaultTripNumber)
: model.tripNumber || style.Train.trainTarget.defaultTripNumber) + ''; // 车次号
@ -320,9 +320,9 @@ export default class TrainBody extends Group {
if (type === 'PLAN') {
this.style.Train.trainTarget.planTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.planTypeColor});
} else if (type === 'MANUAL') {
this.style.Train.trainTarget.manualTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.manualTypeColor});
this.style.Train.trainTargetNumber.manualTypeColor && this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle({textFill: this.style.Train.trainTargetNumber.manualTypeColor});
} else if (type === 'HEAD') {
this.style.Train.trainTarget.headTypeColor && this.textTrainTarget && this.textTrainTarget.setStyle({textFill: this.style.Train.trainTarget.headTypeColor});
this.style.Train.trainTargetNumber.headTypeColor && this.textTrainTargetNumber && this.textTrainTargetNumber.setStyle({textFill: this.style.Train.trainTargetNumber.headTypeColor});
}
}
setSoonerOrLater(dt) {
@ -344,10 +344,10 @@ export default class TrainBody extends Group {
this.delayTime && this.delayTime.setStyle({textFill: this.style.Train.soonerOrLater.normalColor});
}
} else if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 3) {
if (dt > 0) {
if (dt > 120) {
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.earlyColor});
this.style.Train.soonerOrLater.trainBody && this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.earlyColor});
} else if (dt < 0) {
} else if (dt < -120) {
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.lateColor});
this.style.Train.soonerOrLater.trainBody && this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.lateColor});
} else {

View File

@ -29,12 +29,11 @@ export default class Train extends Group {
style.Train.trainBody.specialTrainType.some((item) => {
if (model.type === item.type) {
this.nameFormat = item.nameFormat;
model.serviceNumber = item.serviceNumber ? item.serviceNumber : model.serviceNumber;
model.specialServiceNumber = item.serviceNumber ? item.serviceNumber : model.serviceNumber;
return true;
}
});
}
this.create();
this.setState(model, this);
this.initShowStation(model);
@ -408,8 +407,8 @@ export default class Train extends Group {
this.setHoldStatus(model.hold);
this.setJumpStatus(model.jump);
this.setSoonerOrLater(model.dt);
this.setPlanRoutingTypeColor(model.planRoutingType);
this.setTrainTypeColor(model.type);
this.setPlanRoutingTypeColor(model.planRoutingType);
const style = this.style;
if (style.Section.trainPosition.display) {
this.updateSection(object);

View File

@ -11,14 +11,14 @@ export default class EMouse extends Group {
this.text = new Text({
_subType: 'Text',
zlevel: this.device.zlevel,
z: this.device.z+1,
z: this.device.z + 1,
position: [0, 0],
style: {
x: this.device.model.position.x,
y: this.device.model.position.y + this.device.style.ZcControl.lamp.radiusR + this.device.style.ZcControl.text.distance-30,
y: this.device.model.position.y + this.device.style.ZcControl.lamp.radiusR + this.device.style.ZcControl.text.distance - 30,
fontWeight: this.device.style.ZcControl.mouseOverStyle.fontWeight,
fontSize: this.device.style.ZcControl.mouseOverStyle.fontSize,
fontFamily: this.device.style.ZcControl.mouseOverStyle.fontFormat,
fontFamily: this.device.style.fontFamily,
text: this.device.model.name,
textFill: this.device.style.ZcControl.mouseOverStyle.fontColor,
textAlign: this.device.style.ZcControl.mouseOverStyle.textAlign,

View File

@ -17,7 +17,7 @@ import Line from './Line/index.js';
import Text2 from './Text/index.js';
import AxleReset from './AxleReset/index';
import GuideLock from './GuideLock/index';
import AutoTurnBack from './Automactic/index.js';
import AutoTurnBack from './AutoTurnBack/index.js';
import OutFrame from './OutFrame/index.js';
import CheckBox from './checkBox/checkBox.js';
import AutomaticRoute from './AutomacticRoute/index.js';

View File

@ -21,50 +21,51 @@
<el-radio-group
:id="domIdTrainType"
v-model="formModel.type"
style="margin-left: 15px;"
style="margin-left: 45px;"
@change="trainTypeChange"
>
<el-radio :label="'PLAN'">{{ $t('menu.planTrain') }}</el-radio>
<el-radio :label="'MANUAL'">{{ $t('menu.headCodeTrain') }}</el-radio>
<el-radio :label="'HEAD'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
<el-radio :label="'HEAD'">{{ $t('menu.headCodeTrain') }}</el-radio>
<el-radio :label="'MANUAL'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item v-if="formModel.type == 'PLAN'" prop="serviceNumber">
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
<el-form-item v-if="formModel.type == 'PLAN'|| formModel.type == 'HEAD'" prop="serviceNumber">
<span slot="label">{{ $t('menu.serviceNumber') + '' }}</span>
<el-input
:id="domIdServerNo"
v-model="formModel.serviceNumber"
:disabled="serverNoIsDisabled"
/>
</el-form-item>
<el-form-item v-if="formModel.type == 'PLAN'|| formModel.type == 'MANUAL'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
<el-form-item v-if="formModel.type == 'PLAN'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
<el-input
:id="domIdTrainNo"
v-model="formModel.tripNumber"
maxlength="4"
/>
</el-form-item>
<el-form-item v-if="formModel.type == 'PLAN' || formModel.type == 'MANUAL'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="destinationCode">
<el-form-item v-if="formModel.type == 'PLAN' || formModel.type == 'HEAD'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="destinationCode">
<el-input
:id="domIdTargetCode"
v-model="formModel.destinationCode"
:disabled="formModel.type !== 'HEAD'"
/>
</el-form-item>
<!--<el-form-item v-if="formModel.type == '03'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">-->
<!--<el-select-->
<!--:id="domIdTrainNumber"-->
<!--v-model="formModel.category"-->
<!--filterable-->
<!--:disabled="true"-->
<!--&gt;-->
<!--<el-option-->
<!--v-for="item in categoryList"-->
<!--:key="item.value"-->
<!--:label="item.name"-->
<!--:value="item.value"-->
<!--/>-->
<!--</el-select>-->
<!--</el-form-item>-->
<el-form-item v-if="formModel.type == 'MANUAL'" :label="this.$t('menu.category')+this.$t('global.colon')" prop="category">
<el-select
:id="domIdTrainNumber"
v-model="formModel.category"
filterable
:disabled="true"
>
<el-option
v-for="item in categoryList"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
@ -82,11 +83,11 @@
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import Handler from '@/scripts/cmdPlugin/Handler';
import { menuOperate, commitOperate } from '../utils/menuOperate';
import {getTrainDetailBytripNumber} from '@/api/simulation';
export default {
name: 'TrainControl',
@ -97,9 +98,7 @@ export default {
data() {
return {
trainList: [],
categoryList: [
{ name: 'MM', value: '01' }
],
serviceNumber:'',
formModel: {
tripNumber: '',
groupNumber: '',
@ -108,7 +107,9 @@ export default {
destinationCode: '',
category: 'MM'
},
categoryList: [
{ name: 'MM', value: '01' }
],
rules: {
groupNumber: [
{ required: true, message: this.$t('rules.selectGroupNumber'), trigger: 'change' }
@ -116,9 +117,6 @@ export default {
type: [
{ required: true, message: this.$t('rules.selectATrainType'), trigger: 'change' }
],
serviceNumber: [
{ required: true, message: this.$t('rules.enterTheServiceNumber'), trigger: 'blur' }
],
tripNumber: [
{ required: true, message: this.$t('rules.enterTheTripNumber'), trigger: 'blur' }
],
@ -136,27 +134,15 @@ export default {
...mapGetters('map', [
'map'
]),
trainNoIsDisabled() {
return false;
},
serverNoIsDisabled() {
return true;
},
targetCodeIsDisabled() {
return true;
},
trainNumberIsDisabled() {
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
return true;
}
return '';
},
// trainTypeIsDisabled() {
// if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
// return true;
// }
// return '';
// },
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
@ -242,29 +228,23 @@ export default {
return this.$t('menu.menuTrain.editTrainId');
}
return '';
},
istargetCode() {
if (this.formModel.serviceNumber && this.formModel.targetCode) {
return false;
}
return true;
}
},
watch: {
// 'formModel.tripNumber': function(val) {
// if (val.length == 4) {
// // this.trainNoChange(val);
// } else {
// this.formModel = {
// groupNumber: this.formModel.groupNumber,
// tripNumber: val,
// type: this.formModel.type,
// serviceNumber: '',
// destinationCode: '',
// category: 'MM'
// };
// }
// }
'formModel.tripNumber': function(val) {
if (val.length == 4) {
this.trainNoChange(val);
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: val,
type: this.formModel.type,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
}
}
},
mounted() {
this.$nextTick(() => {
@ -279,6 +259,7 @@ export default {
this.operation = operate.operation;
}
const model = this.$store.getters['map/getDeviceByCode'](selected.code);
this.serviceNumber = model.serviceNumber;
this.formModel = {
groupNumber: model.groupNumber,
tripNumber: model.tripNumber,
@ -302,37 +283,37 @@ export default {
},
trainNumberChange(groupNumber) {
const operate = {
val: `${groupNumber}`,
groupNumber: groupNumber,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNumberChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNumberChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainTypeChange(trainType) {
if (trainType === 'HEAD') {
this.formModel.serviceNumber = '';
} else if (trainType === 'PLAN' && this.serviceNumber) {
this.formModel.serviceNumber = this.serviceNumber;
}
const operate = {
val: `${trainType}`,
type: trainType,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainTypeChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainTypeChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
@ -340,42 +321,26 @@ export default {
},
trainNoChange(tripNumber) {
const operate = {
send: true,
val: tripNumber,
tripNumber: tripNumber,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.trainNoChange.operation;
operate.cmdType = CMD.Train.addTrainId;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
operate.cmdType = CMD.Train.editTrainId;
}
Handler.undo(1);
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
if (valid) {
if (response.data) {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: response.data.serviceNumber,
targetCode: response.data.targetCode,
category: 'MM'
};
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: this.formModel.trainType,
serviceNumber: '',
targetCode: '',
category: 'MM'
};
getTrainDetailBytripNumber(this.$route.query.group, {tripNumber:tripNumber}).then(resp => {
if (resp.data) {
this.formModel.serviceNumber = resp.data.serviceNumber;
this.formModel.destinationCode = resp.data.destinationCode;
}
}).catch(() => {
this.$message.error('获取列车信息失败!');
});
this.$store.dispatch('training/tripNumber', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
@ -392,23 +357,25 @@ export default {
addTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
const model = this.formModel;
const operate = {
send: true,
operation: OperationEvent.Train.addTrainId.menu.operation,
cmdType: CMD.Train.CMD_ADD_TRAIN_ID,
messages: [this.$t('tip.addTrainIdTip')],
val: `${model.groupNumber}::${model.trainType}::${model.serviceNumber}::${model.tripNumber}::${model.targetCode}`
const params = {
groupNumber: this.formModel.groupNumber,
type: this.formModel.type,
serviceNumber: '',
tripNumber: '',
destinationCode: ''
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (this.formModel.type === 'PLAN') {
params.serviceNumber = this.formModel.serviceNumber;
params.tripNumber = this.formModel.tripNumber;
params.destinationCode = this.formModel.destinationCode;
} else if (this.formModel.type === 'HEAD') {
params.tripNumber = this.formModel.tripNumber;
params.destinationCode = this.formModel.destinationCode;
}
commitOperate(menuOperate.TrainWindow.addTrainId, params, 2).then(({valid})=>{
this.loading = false;
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.confirmTrain.doShow(operate);
}
}).catch(() => {
this.loading = false;
@ -424,28 +391,6 @@ export default {
editTrainId() {
this.$refs['form'].validate((valid) => {
if (valid) {
// const operate = {
// send: true,
//
// operation: OperationEvent.Train.editTrainId.menu.operation,
// cmdType: CMD.Train.CMD_EDIT_TRAIN_ID,
// messages: [this.$t('tip.editTrainIdTip')],
// val: `${this.formModel.trainType}::${this.formModel.tripNumber}`
// };
//
// this.loading = true;
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
// this.loading = false;
// if (valid) {
// this.doClose();
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.confirmTrain.doShow(operate);
// }
// }).catch(() => {
// this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow();
// });
const params = {
groupNumber: this.formModel.groupNumber,
type: this.formModel.type,
@ -453,11 +398,11 @@ export default {
tripNumber: '',
destinationCode: ''
};
if (this.formModel.type === '01') {
if (this.formModel.type === 'PLAN') {
params.serviceNumber = this.formModel.serviceNumber;
params.tripNumber = this.formModel.tripNumber;
params.destinationCode = this.formModel.destinationCode;
} else if (this.formModel.type === '02') {
} else if (this.formModel.type === 'HEAD') {
params.tripNumber = this.formModel.tripNumber;
params.destinationCode = this.formModel.destinationCode;
}

View File

@ -3,6 +3,8 @@
<el-select
v-model="groupNumber"
filterable
size="small"
style="width: 100%;"
:disabled="true"
>
<el-option
@ -12,7 +14,13 @@
:value="train.groupNumber"
/>
</el-select>
<el-table :data="tableData" :show-header="false">
<div style="margin-top: 5px;">
<div :class="[tabType==='baseInfo'?'simulate-tabs-button-active':'simulate-tabs-button']" style="margin-right: 6px" @click="changeTabs('baseInfo')">基本信息</div>
<div :class="[tabType==='groupInfo'?'simulate-tabs-button-active':'simulate-tabs-button']" style="margin-right: 6px" @click="changeTabs('groupInfo')">车组信息</div>
<div :class="[tabType==='planInfo'?'simulate-tabs-button-active':'simulate-tabs-button']" style="margin-right: 6px" @click="changeTabs('planInfo')">计划信息</div>
<div :class="[tabType==='atcInfo'?'simulate-tabs-button-active':'simulate-tabs-button']" @click="changeTabs('atcInfo')">ATC信息</div>
</div>
<el-table :data="tableData" :show-header="false" border style="margin-top: 5px;height: 360px;">
<el-table-column prop="key" label="key" />
<el-table-column prop="value" label="value" />
</el-table>
@ -32,6 +40,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import Handler from '@/scripts/cmdPlugin/Handler';
import { menuOperate, commitOperate } from '../utils/menuOperate';
import {TrainType} from '@/scripts/ConstDic';
export default {
name: 'TrainControl',
@ -42,13 +51,14 @@ export default {
trainList: [],
tableData: [],
baseInfo: [],
marshallingInfo: [],
groupInfo: [],
planInfo: [],
atcInfo: [],
operation: null,
dialogShow: false,
loading: false,
groupNumber: ''
groupNumber: '',
tabType: 'baseInfo'
};
},
computed: {
@ -80,64 +90,7 @@ export default {
if (!this.dialogShow) {
this.operation = operate.operation;
}
const model = this.$store.getters['map/getDeviceByCode'](selected.code);
this.groupNumber = model.groupNumber;
this.baseInfo = [
{key: '车组号', value: model.groupNumber},
{key: '车次号', value: ''},
{key: '表号', value: ''},
{key: '目的地号', value: ''},
{key: '类型', value: ''},
{key: '司机号', value: ''},
{key: '车站', value: ''},
{key: '所处设备', value: ''},
{key: '跟踪模式', value: ''},
{key: 'ATP切除', value: ''},
{key: '停站状态', value: ''}
];
this.marshallingInfo = [
{key: '车组号', value: ''},
{key: '设备ID', value: ''},
{key: '车头号1', value: ''},
{key: '车头号2', value: ''},
{key: '车厢号1', value: ''},
{key: '车厢号2', value: ''},
{key: '车厢号3', value: ''},
{key: '车厢号4', value: ''},
{key: '车厢号5', value: ''},
{key: '车厢号6', value: ''},
{key: '车厢号7', value: ''},
{key: '车厢号8', value: ''}
];
this.planInfo = [
{key: '车组号', value: ''},
{key: '车次号', value: ''},
{key: '表号', value: ''},
{key: '运行等级', value: ''},
{key: '状态', value: ''},
{key: '计划偏离', value: ''},
{key: '停站时间', value: ''},
{key: '计划到站', value: ''},
{key: '计划到点', value: ''},
{key: '计划发点', value: ''},
{key: '终端发车站台', value: ''},
{key: '终端发车时间', value: ''},
{key: '预计离开站台', value: ''},
{key: '预计离开时间', value: ''},
{key: '预计到达站台', value: ''},
{key: '预计到达时间', value: ''},
{key: '区间运行时分', value: ''}
];
this.atcInfo = [
{key: '车组号', value: ''},
{key: '车次号', value: ''},
{key: '表号', value: ''},
{key: '运行方向', value: ''},
{key: '扣车状态', value: ''},
{key: '车门状态', value: ''},
{key: '驾驶模式', value: ''},
{key: '目的地号', value: ''}
];
this.initData(selected);
this.tableData = this.baseInfo;
/** 加载列车数据*/
this.dialogShow = true;
@ -174,7 +127,118 @@ export default {
}).catch(() => {
this.doClose();
});
},
changeTabs(type) {
switch (type) {
case 'baseInfo':
this.tableData = this.baseInfo;
this.tabType = 'baseInfo';
break;
case 'groupInfo':
this.tableData = this.groupInfo;
this.tabType = 'groupInfo';
break;
case 'planInfo':
this.tableData = this.planInfo;
this.tabType = 'planInfo';
break;
case 'atcInfo':
this.tableData = this.atcInfo;
this.tabType = 'atcInfo';
break;
}
},
initData(model) {
this.groupNumber = model.groupNumber;
this.baseInfo = [
{key: '车组号', value: model.groupNumber},
{key: '车次号', value: model.tripNumber},
{key: '表号', value: model.serviceNumber},
{key: '目的地号', value: model.destinationCode},
{key: '类型', value: TrainType[model.type]},
{key: '司机号', value: ''},
{key: '车站', value: ''},
{key: '所处设备', value: ''},
{key: '跟踪模式', value: ''},
{key: 'ATP切除', value: ''},
{key: '停站状态', value: ''}
];
this.groupInfo = [
{key: '车组号', value: model.groupNumber},
{key: '设备ID', value: ''},
{key: '车头号1', value: ''},
{key: '车头号2', value: ''},
{key: '车厢号1', value: ''},
{key: '车厢号2', value: ''},
{key: '车厢号3', value: ''},
{key: '车厢号4', value: ''},
{key: '车厢号5', value: ''},
{key: '车厢号6', value: ''},
{key: '车厢号7', value: ''},
{key: '车厢号8', value: ''}
];
this.planInfo = [
{key: '车组号', value: model.groupNumber},
{key: '车次号', value: model.tripNumber},
{key: '表号', value: model.serviceNumber},
{key: '运行等级', value: model.runLevel},
{key: '状态', value: ''},
{key: '计划偏离', value: model.dt},
{key: '停站时间', value: ''},
{key: '计划到站', value: ''},
{key: '计划到点', value: ''},
{key: '计划发点', value: ''},
{key: '终端发车站台', value: ''},
{key: '终端发车时间', value: ''},
{key: '预计离开站台', value: ''},
{key: '预计离开时间', value: ''},
{key: '预计到达站台', value: ''},
{key: '预计到达时间', value: ''},
{key: '区间运行时分', value: ''}
];
this.atcInfo = [
{key: '车组号', value: model.groupNumber},
{key: '车次号', value: model.tripNumber},
{key: '表号', value: model.serviceNumber},
{key: '运行方向', value: model.right ? '上行' : '下行'},
{key: '扣车状态', value: model.runControlStatus === '01' ? '正常' : model.runControlStatus === '03' ? '跳停' : '扣车'},
{key: '车门状态', value: model.speed ? '关闭' : '开启'},
{key: '驾驶模式', value: 'SM模式'},
{key: '目的地号', value: model.destinationCode}
];
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.simulate-tabs-button {
display: inline;
border-top: solid 1px #FBFAEF;
border-left: solid 1px #FBFAEF;
border-bottom: solid 1px #858273;
border-right: solid 1px #858273;
width: 90px;
height: 28px;
font-size: 14px;
line-height: 28px;
padding: 2px 10px;
}
.simulate-tabs-button:active{
border-top: solid 1px #858273;
border-left: solid 1px #858273;
border-bottom: solid 1px #FBFAEF;
border-right: solid 1px #FBFAEF;
}
.simulate-tabs-button-active{
display: inline;
border-top: solid 1px #858273;
border-left: solid 1px #858273;
border-bottom: solid 1px #FBFAEF;
border-right: solid 1px #FBFAEF;
width: 90px;
height: 28px;
font-size: 14px;
line-height: 28px;
padding: 2px 10px;
}
</style>

View File

@ -96,6 +96,21 @@ export default {
overflow: hidden !important;
}
.xian-01__systerm.pop-menu{
padding: 0;
padding-left: 20px;
}
.xian-01__systerm.pop-menu .dsp-block {
display: block;
text-align: left;
width: 100%;
border-radius: unset;
border: 1px solid transparent;
color: #000;
padding: 6px 6px;
border-left: 1px solid #bdbcbc;
}
.xian-01__systerm .el-dialog {
background: rgba(100, 100, 100, 0.3);
border: 2px solid rgb(144, 144, 144, 0.8);

View File

@ -67,6 +67,10 @@
</template>
</template>
</div>
<!--<div class="deviceStatus">-->
<!--<div class="holdTrainStatus">H</div>-->
<!--<div class="jumpStopStatus">S</div>-->
<!--</div>-->
<station-control-convert ref="stationControlConvert" />
<password-box ref="passwordBox" @setLoginResult="getLoginResult" />
<view-train-id ref="viewTrainId" />
@ -694,7 +698,7 @@ export default {
<style scoped rel="stylesheet/scss" lang="scss">
@import "src/styles/mixin.scss";
$width: 30px;
$height: 30px;
$height:30px;
$menuPadding: 10px;
$menuItemHeight: 30px;
$menuItemWidth: 190px;
@ -810,4 +814,21 @@ export default {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.deviceStatus{
display: inline-block;
font-size: 0;
height: 40px;
background: #f0f0f0;
width: 300px;
}
.holdTrainStatus,.jumpStopStatus{
color: #fff;
display: inline-block;
width: 30px;
height: 30px;
text-align: center;
background: #ccc;
font-size:14px;
}
</style>

View File

@ -63,18 +63,12 @@ export default {
initMenu() {
this.menuNormal = [];
this.stationList.forEach(station => {
if (station.chargeStationCodeList && station.chargeStationCodeList.length) {
if (station.relStationCodeList && station.relStationCodeList.length) {
const node = {
label: station.name,
children: [
{
code: station.code,
label: station.name,
handler: this.mapLocation
}
]
children: []
};
station.chargeStationCodeList.forEach(item => {
station.relStationCodeList.forEach(item => {
const next = this.$store.getters['map/getDeviceByCode'](item);
node.children.push({
code: next.code,

View File

@ -1,12 +1,10 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<section-control ref="sectionControl" />
<section-cmd-control ref="sectionCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
<train-add-plan ref="trainAddPlan" />
</div>
</template>
@ -21,9 +19,7 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import TrainAddPlan from './dialog/trainAddPlan';
export default {
name: 'SectionMenu',
@ -32,9 +28,7 @@ export default {
SectionControl,
SectionCmdControl,
SpeedCmdControl,
NoticeInfo,
SetFault,
TrainAddPlan
NoticeInfo
},
props: {
selected: {
@ -199,7 +193,7 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(step, this.selected);
this.$store.dispatch('training/setCommonMenuStep', step);
}
});
},
@ -207,7 +201,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
}
});
},
@ -215,7 +209,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
},

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<route-selection ref="routeSelection" />
<route-lock ref="routeLock" />
<route-control ref="routeControl" />
@ -8,7 +8,6 @@
<route-hand-control ref="routeHandControl" />
<route-detail ref="routeDetail" />
<notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div>
</template>
@ -26,7 +25,6 @@ import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import { menuOperate, commitOperate } from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SignalMenu',
@ -38,8 +36,7 @@ export default {
RouteCmdControl,
RouteHandControl,
RouteDetail,
NoticeInfo,
SetFault
NoticeInfo
},
props: {
selected: {
@ -231,7 +228,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
}
});
},
@ -239,7 +236,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
},

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<station-cmd-control ref="stationCmdControl" />
<station-human-control-all ref="stationHumanControlAll" />
<station-set-route-control-all ref="stationSetRouteControlAll" />
@ -131,11 +131,13 @@ export default {
}
},
doShow(point) {
if (this.selected.ciStation) {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
@ -245,7 +247,10 @@ export default {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Station.humanControlALL.menu.operation
operation: OperationEvent.Station.humanControlALL.menu.operation,
param:{
stationCode:this.selected.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -259,7 +264,10 @@ export default {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Station.atsAutoControlALL.menu.operation
operation: OperationEvent.Station.atsAutoControlALL.menu.operation,
param:{
stationCode:this.selected.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {

View File

@ -1,6 +1,6 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<stand-control ref="standControl" />
<stand-detail ref="standDetail" />
<stand-run-level ref="standRunLevel" />
@ -8,7 +8,6 @@
<stand-detain-train-all ref="standDetainTrainAll" />
<notice-info ref="noticeInfo" />
<stand-back-strategy ref="standBackStrategy" />
<set-fault ref="setFault" />
</div>
</template>
@ -22,12 +21,11 @@ import StandStopTime from './dialog/standStopTime';
import StandDetainTrainAll from './dialog/standDetainTrainAll';
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
// import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'StationStandMenu',
@ -39,8 +37,7 @@ export default {
NoticeInfo,
StandBackStrategy,
StandStopTime,
StandDetainTrainAll,
SetFault
StandDetainTrainAll
},
props: {
selected: {
@ -196,7 +193,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
}
});
},
@ -204,7 +201,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
},

View File

@ -1,11 +1,10 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<switch-control ref="switchControl" />
<switch-cmd-control ref="switchCmdControl" />
<speed-cmd-control ref="speedCmdControl" />
<notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div>
</template>
@ -20,7 +19,6 @@ import { mapGetters } from 'vuex';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import { menuOperate, commitOperate } from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SwitchMenu',
@ -29,8 +27,7 @@ export default {
SwitchControl,
SwitchCmdControl,
SpeedCmdControl,
NoticeInfo,
SetFault
NoticeInfo
},
props: {
selected: {
@ -220,7 +217,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
}
});
},
@ -228,7 +225,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
},

View File

@ -1,12 +1,13 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" />
<pop-menu ref="popMenu" :menu="menu" pop-menu-class="xian-01__systerm" />
<notice-info ref="noticeInfo" />
<train-control ref="trainControl" />
<train-delete ref="trainDelete" />
<train-move ref="trainMove" />
<train-switch ref="trainSwitch" />
<train-edit-number ref="trainEditNumber" />
<train-detail ref="trainDetail" />
</div>
</template>
@ -22,6 +23,7 @@ import TrainDelete from './dialog/trainDelete';
import TrainMove from './dialog/trainMove';
import TrainSwitch from './dialog/trainSwitch';
import TrainEditNumber from './dialog/trainEditNumber';
import TrainDetail from './dialog/trainDetail';
import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
export default {
@ -33,7 +35,8 @@ export default {
TrainDelete,
TrainMove,
TrainSwitch,
TrainEditNumber
TrainEditNumber,
TrainDetail
},
props: {
selected: {
@ -50,48 +53,48 @@ export default {
Local: [],
Center: [
{
label: this.$t('menu.menuTrain.addTrainId'),
handler: this.addTrainId,
cmdType:''
label: '添加列车识别号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.deleteTrainId'),
handler: this.delTrainId,
cmdType:''
label: '删除列车识别号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.editTrainId'),
label: '修改列车识别号',
handler: this.editTrainId,
cmdType:CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.editTrainNo'),
handler: this.editTrainNo,
cmdType:''
label: '修改车组号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.moveTrainId'),
handler: this.moveTrainId,
cmdType:''
label: '移动列车识别号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: this.$t('menu.menuTrain.switchTrainId'),
handler: this.switchTrainId,
cmdType:''
label: '交换列车识别号',
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '标记ATP切除',
handler: this.undeveloped(),
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_CUT
},
{
label: '标记ATP激活',
handler: this.undeveloped(),
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_TAG_ATP_RECOVER
},
{
label: '查看列车详细运行信息',
handler: this.undeveloped(),
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_INFO
}
]
@ -144,10 +147,9 @@ export default {
},
initMenu() {
//
// this.menu = MenuContextHandler.menuFiltration(this.menuNormal);
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.operatemode === OperateMode.ADMIN) {
this.menu = [...this.menu, ...this.menuForce, ...this.menuSpeed];
this.menu = [...this.menu, ...this.menuForce];
}
//
@ -159,28 +161,26 @@ export default {
this.clickEvent();
this.initMenu();
if (this.$refs && this.$refs.popMenu && this.menu && this.menu.length) {
if (this.$refs.popMenu && this.menu && this.menu.length) {
this.$refs.popMenu.resetShowPosition(point);
}
},
doClose() {
if (this.$refs && this.$refs.popMenu) {
if (this.$refs.popMenu) {
this.$refs.popMenu.close();
// this.$store.dispatch('map/setTrainWindowShow', false);
}
},
//
setStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.stoppage.menu.operation,
cmdType: CMD.Train.CMD_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
@ -194,14 +194,13 @@ export default {
cancelStoppage() {
const step = {
start: true,
operation: OperationEvent.Train.cancelStoppage.menu.operation,
cmdType: CMD.Train.CMD_CANCEL_STOPPAGE,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
@ -215,14 +214,13 @@ export default {
limitSpeed() {
const step = {
start: true,
operation: OperationEvent.Train.limitSpeed.menu.operation,
cmdType: CMD.Train.CMD_LIMIT_SPEED,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
} else {
@ -236,13 +234,12 @@ export default {
addTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.addTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);
@ -253,13 +250,12 @@ export default {
delTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.delTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDelete.doShow(step, this.selected);
@ -270,13 +266,12 @@ export default {
editTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainControl.doShow(step, this.selected);
@ -287,13 +282,12 @@ export default {
editTrainNo() {
const step = {
start: true,
operation: OperationEvent.Train.editTrainNo.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainEditNumber.doShow(step, this.selected);
@ -304,36 +298,57 @@ export default {
moveTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.moveTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainMove.doShow(step, this.selected);
}
});
},
undeveloped() {},
undeveloped() {
this.doClose();
this.$alert('实现中......', '提示', {
confirmButtonText: '确定',
callback: action => {
}
});
},
//
switchTrainId() {
const step = {
start: true,
operation: OperationEvent.Train.switchTrainId.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/next', step).then(({ valid }) => {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainSwitch.doShow(step, this.selected);
}
});
},
checkTrainDetails() {
const step = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.trainDetailInfo.menu.operation,
param: {
code: this.selected.code
}
};
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainDetail.doShow(step, this.selected);
}
});
}
}
};

View File

@ -60,7 +60,7 @@ export const menuOperate = {
cancelTrainRoute:{
// 取消进路
operation: OperationEvent.Signal.cancelTrainRoute.menu.operation,
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
},
lock:{
// 信号封锁
@ -268,15 +268,19 @@ export const menuOperate = {
editTrainId: {
operation: OperationEvent.Train.editTrainId.menu.operation,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
addTrainId: {
operation: OperationEvent.Train.addTrainId.menu.operation,
cmdType: ''
}
},
Common: {
setFault: {
operation: OperationEvent.Section.stoppage.menu.operation,
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT
},
cancelFault: {
operation: OperationEvent.Section.cancelStoppage.menu.operation,
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
}

View File

@ -220,7 +220,7 @@ export default {
serie.markPoint.data.push(createMartPoint({
directionCode: elem.directionCode,
coord: [parseInt(elem.secondTime), this.getCoordYByElem(stations, kmRangeCoordMap, elem, false)],
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.directionCode}${elem.tripNumber}`,
name: `(${elem.groupNumber})${elem.serviceNumber}${elem.tripNumber}`,
color: lineStyle.color || '#000'
}));
}

View File

@ -1,212 +0,0 @@
<template>
<el-dialog
v-dialogDrag
class="xian-02__system stand-stop-time"
:title="title"
:visible.sync="show"
width="340px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules">
<div style="width: 96%;">
<el-form-item label="车 次 号:" label-width="95px" prop="tripNumber">
<el-select v-model="addModel.tripNumber" filterable @change="tripNumberChange">
<el-option
v-for="tripNum in tripNumberList"
:key="tripNum"
:label="tripNum"
:value="tripNum"
/>
</el-select>
</el-form-item>
<el-form-item label="服 务 号:" label-width="95px" prop="serviceNumber">
<el-select v-model="addModel.serviceNumber" filterable>
<el-option
v-for="serviceNumber in serviceNumberList"
:key="serviceNumber"
:label="serviceNumber"
:value="serviceNumber"
/>
</el-select>
</el-form-item>
</div>
</el-form>
<el-row justify="center" class="button-group">
<el-col :span="10" :offset="2">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @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-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { getTripNumberList, getServiceNumbersByTripNum } from '@/api/simulation';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
export default {
// name: 'TrainMove',
name: 'TrainAddPlan',
components: {
},
data() {
return {
trainNoList: [],
selected: null,
tripNumberList: [],
serviceNumberList: [],
addModel: {
serviceNumber: '', //
tripNumber: '' //
},
rules: {
serviceNumber: [
{ required: true, message: '请输入服务号', trigger: 'blur' }
],
tripNumber: [
{ required: true, message: '请输入车次号', trigger: 'change' }
]
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'trainList',
'stationStandList',
'trainWindowSectionCode'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.createPlanTrain.menu.domId : '';
},
title() {
return '创建计划车';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
tripNumberChange(tripNumber) {
getServiceNumbersByTripNum(this.$route.query.group, tripNumber).then(resp => {
this.serviceNumberList = [];
if (typeof resp.data == 'string') {
this.serviceNumberList.push(resp.data);
} else {
resp.data.forEach(item => {
if (!this.serviceNumberList.includes(item)) {
this.serviceNumberList.push(item);
}
});
}
if (this.serviceNumberList.length === 1) {
this.addModel.serviceNumber = this.serviceNumberList[0];
}
});
},
doShow(operate, selected) {
this.selected = selected;
//
// if (!this.dialogShow) {
// }
this.addModel = {
tripNumber:'',
serviceNumber:''
};
getTripNumberList(this.$route.query.group).then(resp => {
this.tripNumberList = [];
resp.data.forEach(item => {
if (!this.tripNumberList.includes(item)) {
this.tripNumberList.push(item);
}
});
}).catch(error => {
console.log(error);
// this.$messageBox(error.message);
});
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
// this.mouseCancelState(this.selected);
},
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
const operate = {
over: true,
operation: OperationEvent.Train.createPlanTrain.menu.operation,
cmdType: CMD.Section.CMD_Train_Init_Plan,
param: {
serviceNumber: this.addModel.serviceNumber, //
tripNumber: this.addModel.tripNumber //
}
};
this.loading = true;
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
});
} else {
return false;
}
});
},
cancel() {
const operate = {
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store
.dispatch('training/nextNew', operate)
.then(({ valid }) => {
if (valid) {
this.doClose();
}
})
.catch(() => {
this.doClose();
});
}
}
};
</script>
<style scoped>
.xian-02__system .el-dialog .base-label {
background: rgba(0, 0, 0, x);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -0,0 +1,190 @@
<template>
<el-dialog
v-dialogDrag
class="xian-02__system train-move"
:title="title"
:visible.sync="show"
width="760px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-row>
<el-col :span="12">车体号:</el-col>
<el-col :span="12">追踪号:</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" style="width: 100px;" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>
<el-col :span="12">实际的DID</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>
<el-col :span="12">被请求的DID</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row>
<el-col :span="12">DID浏览选项</el-col>
<el-col :span="12">
<el-input :id="domIdInput" v-model="addModel.groupNumber" @change="inputGroupNumber" />
</el-col>
</el-row>
<el-row justify="center" class="button-group">
<el-col :span="10">
<el-button :id="domIdConfirm" type="primary" :loading="loading" @click="commit">确定</el-button>
</el-col>
<el-col :span="8" :offset="5">
<el-button :id="domIdCancel" @click="cancel"> </el-button>
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
name: 'TrainMove',
components: {
NoticeInfo
},
data() {
return {
trainNoList: [],
selected: null,
addModel: {
stationName: '',
trainWindowCode: '',
groupNumber: ''
},
dialogShow: false,
loading: false
};
},
computed: {
...mapGetters('map', [
'stationStandList'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
domIdInput() {
return this.dialogShow ? OperationEvent.Train.addTrainId.input.domId : '';
},
domIdCancel() {
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
},
domIdConfirm() {
return this.dialogShow ? OperationEvent.Train.addTrainId.menu.domId : '';
},
title() {
return '移动车组号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
});
},
methods: {
doShow(operate, selected) {
this.selected = selected;
//
if (!this.dialogShow) {
const section = this.$store.getters['map/getDeviceByCode'](selected.sectionCode);
if (section) {
const station = this.$store.getters['map/getDeviceByCode'](section.stationCode);
if (station) {
this.addModel.stationName = station.name;
}
}
this.addModel.trainWindowCode = selected.code;
}
this.dialogShow = true;
this.$nextTick(function () {
this.$store.dispatch('training/emitTipFresh');
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
this.$store.dispatch('training/emitTipFresh');
this.$store.dispatch('map/setTrainWindowShow', false);
this.mouseCancelState(this.selected);
},
inputGroupNumber() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.input.operation,
val: this.addModel.groupNumber
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
commit() {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.addTrainId.menu.operation,
val: this.addModel.groupNumber
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
/deep/ .el-row {
margin: 10px
}
.xian-02__system .el-dialog .base-label {
background: rgba(0, 0, 0, 0.3);
position: relative;
left: -5px;
top: -18px;
padding: 0 5px;
background-color: #F0F0F0;
}
</style>

View File

@ -6,8 +6,6 @@
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
<train-add-plan ref="trainAddPlan" />
<set-fault ref="setFault" />
</div>
</template>
@ -24,8 +22,6 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
// import MenuContextHandler from '@/scripts/cmdPlugin/MenuContextHandler';
import {menuOperate, commitOperate} from './utils/menuOperate';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import TrainAddPlan from './dialog/trainAddPlan';
export default {
name: 'SectionMenu',
@ -36,8 +32,6 @@ export default {
SpeedLimitControl,
AlxeEffective,
NoticeInfo,
SetFault,
TrainAddPlan
},
props: {
selected: {
@ -205,7 +199,8 @@ export default {
this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.trainAddPlan.doShow(step, this.selected);
// this.$refs.trainAddPlan.doShow(step, this.selected);
this.$store.dispatch('training/setCommonMenuStep', step);
}
});
},
@ -213,7 +208,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
}
});
},
@ -221,7 +216,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
},

View File

@ -9,7 +9,6 @@
<route-detail ref="routeDetail" />
<router-command ref="routerCommand" />
<notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div>
</template>
@ -29,7 +28,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SignalMenu',
@ -42,8 +40,7 @@ export default {
RouteHandControl,
RouteDetail,
RouterCommand,
NoticeInfo,
SetFault
NoticeInfo
},
props: {
selected: {
@ -268,7 +265,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
}
});
},
@ -276,7 +273,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
},

View File

@ -6,7 +6,6 @@
<speed-limit-control ref="speedLimitControl" />
<alxe-effective ref="alxeEffective" />
<notice-info ref="noticeInfo" />
<set-fault ref="setFault" />
</div>
</template>
@ -24,7 +23,6 @@ import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import {menuOperate, commitOperate} from './utils/menuOperate';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
export default {
name: 'SwitchMenu',
@ -34,8 +32,7 @@ export default {
SwitchUnLock,
SpeedLimitControl,
AlxeEffective,
NoticeInfo,
SetFault
NoticeInfo
},
props: {
selected: {
@ -245,7 +242,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
}
});
},
@ -253,7 +250,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
},

View File

@ -1,18 +1,15 @@
<template>
<div>
<pop-menu ref="popMenu" :menu="menu" :tip-msg="topTip" :tip-subhead="tipSubhead" />
<pop-menu ref="popMenu" :menu="menu" :tip-msg="topTip" :tip-subhead="tipSubhead" pop-class="xian-02__pop_tip_station" />
<notice-info ref="noticeInfo" />
<train-delete ref="trainDelete" />
<train-define ref="trainDefine" />
<train-move ref="trainMove" />
<!-- <train-edit ref="trainEdit" /> -->
<train-set-plan ref="trainSetPlan" />
<train-add-plan ref="trainAddPlan" />
<!-- <train-move-evently ref="trainMoveEvently" /> -->
<!-- <train-delete-plan ref="trainDeletePlan" /> -->
<train-set-head ref="trainSetHead" />
<train-set-work ref="trainSetWork" />
<trainSetWorkATP ref="trainSetWorkATP" />
<train-destination ref="trainDestination" />
</div>
</template>
@ -24,10 +21,10 @@ import TrainDelete from './dialog/trainDelete';
import TrainDefine from './dialog/trainDefine';
import TrainMove from './dialog/trainMove';
import TrainSetPlan from './dialog/trainSetPlan';
import TrainAddPlan from './dialog/trainAddPlan';
import TrainSetHead from './dialog/trainSetHead';
import TrainSetWork from './dialog/trainSetWork';
import trainSetWorkATP from './dialog/trainSetWorkATP';
import TrainDestination from './dialog/trainDestination';
import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
@ -44,10 +41,10 @@ export default {
TrainDefine,
TrainMove,
TrainSetPlan,
TrainAddPlan,
TrainSetHead,
TrainSetWork,
trainSetWorkATP
trainSetWorkATP,
TrainDestination
},
props: {
selected: {
@ -64,75 +61,6 @@ export default {
menu: [],
menuNormal: {
Local: [
// {
// label: '',
// handler: this.addTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.delTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.moveTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.addPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.setPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setHeadTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setWorkTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: 'ATP',
// handler: this.setTrainATPdel,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: 'ATP',
// handler: this.setTrainATPRec,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// }
],
Center: [
{
@ -140,41 +68,51 @@ export default {
children: [
{
label: '目的地ID',
handler: this.atsAutoControlALL
// handler: this.updateDestination,
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '删除ID',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '更改追踪号',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '交换追踪号',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '运行等级',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '列车模式',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '惰性模式',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '旁路模式',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
}
]
},
{
label: '列车明细',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '请求',
@ -184,37 +122,45 @@ export default {
children:[
{
label: '扣车',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '发车 ',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
}
]
},
{
label: '停车/放行',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '就绪状态',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '测试',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '救援列车',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '开车门',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '关车门',
handler: this.atsAutoControlALL
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
}
]
},
@ -223,19 +169,23 @@ export default {
children: [
{
label: '创建设备标签',
handler: this.undeveloped
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '查看设备标签',
handler: this.undeveloped
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '更改设备标签',
handler: this.undeveloped
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '删除设备标签',
handler: this.undeveloped
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
}
]
},
@ -244,87 +194,21 @@ export default {
children: [
{
label: '完整性报警确认',
handler: this.undeveloped
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
}
]
},
{
label: '更新列车计划',
handler: this.undeveloped
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
},
{
label: '帮助',
handler: this.undeveloped
handler: this.undeveloped,
cmdType: CMD.TrainWindow.CMD_TRAIN_UPDATE_TYPE
}
// {
// label: '',
// handler: this.addTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.delTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.moveTrainId,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.addPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.setPlanTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setHeadTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.setWorkTrain,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: 'ATP',
// handler: this.setTrainATPdel,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: 'ATP',
// handler: this.setTrainATPRec,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// type: 'separator'
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// },
// {
// label: '',
// handler: this.undeveloped,
// cmdType: CMD.TrainWindow.CMD_Train_Init_Plan
// }
]
},
menuForce: [
@ -375,14 +259,16 @@ export default {
},
initMenu() {
//
this.menu = MenuContextHandler.covert(this.menuNormal);
if (this.$store.state.training.prdType === '02') {
this.menu = this.menuNormal.Center;
}
//
if (this.operatemode === OperateMode.FAULT) {
this.menu = this.menuForce;
}
},
doShow(point) {
this.topTip = `道岔: ${this.selected.name}`;
this.topTip = `车辆: ${this.selected.serviceNumber}`;
this.clickEvent();
this.initMenu();
@ -604,6 +490,23 @@ export default {
this.$refs.trainSetWorkATP.doShow(operate, this.selected);
}
});
},
updateDestination() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Train.destinationTrainId.menu.operation,
param: {
trainCode: this.selected.code
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) =>{
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', {break: true});
this.$refs.trainDestination.doShow(operate, this.selected);
this.doClose();
}
});
}
}
};

View File

@ -5,7 +5,6 @@
<update-stand-plan ref="updateStandPlan" :selected="selected" />
<warning-confirm ref="warningConfirm" :selected="selected" />
<stop-profile ref="stopProfile" :selected="selected" />
<set-fault ref="setFault" />
</div>
</template>
@ -19,7 +18,6 @@ import { mapGetters } from 'vuex';
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import SetFault from '@/views/newMap/mapsystemNew/plugin/setFault';
import {menuOperate, commitOperate} from './utils/menuOperate';
export default {
@ -29,8 +27,7 @@ export default {
NoticeInfo,
UpdateStandPlan,
WarningConfirm,
StopProfile,
SetFault
StopProfile
},
props: {
selected: {
@ -282,7 +279,7 @@ export default {
setStoppage() {
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.setFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.setFault);
}
});
},
@ -290,7 +287,7 @@ export default {
cancelStoppage() {
commitOperate(menuOperate.Common.cancelFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
if (valid) {
this.$refs.setFault.doShow(menuOperate.Common.cancelFault, this.selected);
this.$store.dispatch('training/setCommonMenuStep', menuOperate.Common.cancelFault);
}
});
},

View File

@ -260,11 +260,11 @@ export const menuOperate = {
},
Common: {
setFault: {
operation: OperationEvent.Section.stoppage.menu.operation,
operation: OperationEvent.MixinCommand.stoppage.menu.operation,
cmdType: CMD.Fault.CMD_SET_FAULT
},
cancelFault: {
operation: OperationEvent.Section.cancelStoppage.menu.operation,
operation: OperationEvent.MixinCommand.cancelStoppage.menu.operation,
cmdType: CMD.Fault.CMD_CANCEL_FAULT
}
}

View File

@ -4,6 +4,7 @@ import 'normalize.css/normalize.css'; // A modern alternative to CSS resets
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/styles/index.scss'; // global css
import 'quill/dist/quill.snow.css';
import LangStorage from '@/utils/lang';
import App from './App';

View File

@ -19,7 +19,7 @@ function hasPermission(roles, permissionRoles) {
const whiteList = ['/login', '/design/login', '/gzzbxy/relay']; // 不重定向白名单
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/];
const designPageRegex = [/^\/design/, /^\/scriptDisplay/, /^\/publish/, /^\/orderauthor/, /^\/system/, /^\/iscs/, /^\/display\/record/, /^\/display\/manage/, /^\/apply/, /^\/plan/, /^\/display\/plan/, /^\/displayNew\/record/, /^\/displayNew\/manage/, /^\/displayNew\/plan/, /^\/practiceDisplayNew/];
function isDesignPage(toRoutePath) {
return designPageRegex.some(item => item.test(toRoutePath) );
@ -47,6 +47,10 @@ function getRouteInfo(to) {
} else {
const whitePage = PermissionParam[current_session] ? PermissionParam[current_session].whitePage : '';
loginPath = whitePage || loginPage;
if (current_session && current_session.startsWith('jsxt') || current_session && current_session.startsWith('refereeJsxt')) {
const raceId = getSessionStorage('raceId'); // 登陆时候保存 竞赛id
loginPath = `${loginPath}?raceId=${raceId}`;
}
if (current_session && current_session.startsWith('design')) {
removeToken();
}

View File

@ -64,6 +64,7 @@ const LessonDetail = () => import('@/views/lesson/details');
const ScriptmanageHome = () => import('@/views/scriptManage/home');
const ScriptDisplay = () => import('@/views/scriptManage/display/index');
const ScriptDisplayNew = () => import('@/views/scriptManage/display/indexNew');
const PracticeDisplayNew = () => import('@/views/competitionManage/practiceList/display/index');
const IbpHome = () => import('@/views/ibp/home');
const IbpDraw = () => import('@/views/ibp/ibpDraw/index');
@ -122,7 +123,12 @@ const RunPlanApproval = () => import('@/views/approval/runPlan/index');
const DeviceManage = () => import('@/views/system/deviceManage/index');
const MapSort = () => import('@/views/publish/publishMap/mapSort');
const StudentManage = () => import('@/views/studentManage');
const RaceManage = () => import('@/views/competitionManage/index');
const RaceManage = () => import('@/views/competitionManage/competition/index');
const BankManage = () => import('@/views/competitionManage/bankList/index');
const PracticeManage = () => import('@/views/competitionManage/practiceList/index');
const QuestionCreatePage = () => import('@/views/competitionManage/bankList/question-create-page');
const QuestionUpdatePage = () => import('@/views/competitionManage/bankList/question-update-page');
const GeneratePaper = () => import('@/views/competitionManage/generatePaper');
const CompetitionDetail = () => import('@/views/jsxt/competition/examDetail');
const CompetitionManage = () => import('@/views/jsxt/competition/index');
@ -132,11 +138,9 @@ const JsxtExamResult = () => import('@/views/jsxt/competition/result');
const JsxtApply = () => import('@/views/jsxt/apply/index');
// const theoryManage = () => import('@/views/jsxt/competition/theory/index');
const RefereeList = () => import('@/views/jsxt/refereeList/index');
const homeJsxt = () => import('@/views/jsxt/home/index');
const RecaList = () => import('@/views/jsxt/reca/list');
import { GenerateRouteProjectList } from '@/scripts/ProjectConfig';
import { getSessionStorage } from '@/utils/auth';
// import { getSessionStorage } from '@/utils/auth';
/**
* Note: sub-menu only appear when route children.length >= 1
@ -279,6 +283,11 @@ export const publicAsyncRoute = [
component: ScriptDisplayNew,
hidden: true
},
{ // 实操试题编辑 战场图
path: '/practiceDisplayNew/:mode',
component: PracticeDisplayNew,
hidden: true
},
{
path: '/displayBigScreen/:mapId',
component: BigScreen,
@ -916,11 +925,10 @@ export const asyncRouter = [
]
},
{
path: '/design/race',
redirect: '/design/race/manage',
path: '/design/race', // 竞赛管理
component: Layout,
meta: {
i18n: 'route.raceManage',
i18n: 'router.raceManage',
roles: [admin]
},
children: [
@ -931,6 +939,37 @@ export const asyncRouter = [
i18n: 'router.raceManage',
icon: 'design'
}
},
{
path: 'bank',
component: BankManage,
meta: {
i18n: 'router.bankManage',
icon: 'design'
}
},
{
path: 'practice',
component: PracticeManage,
meta: {
i18n: 'router.practiceManage',
icon: 'design'
}
},
{
path: 'questionCreate',
component: QuestionCreatePage,
hidden: true
},
{
path: 'questionUpdate/:questionId',
component: QuestionUpdatePage,
hidden: true
},
{
path: 'generate',
component: GeneratePaper,
hidden: true
}
]
}
@ -1007,34 +1046,16 @@ export const JSXT = [
component: Refereedetail,
hidden: true
},
// 裁判系统
{
path: '/refereeJsxt',
redirect: '/refereeJsxt/home',
component: Layout,
meta: {
i18n: 'router.homeJsxt',
roles: [user, admin]
},
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
children: [
{
path: 'preview',
component: homeJsxt,
meta: {
i18n: 'router.homeJsxt',
icon: 'design',
hidden: true
}
}
]
},
{
path: '/referee',
component: Layout,
meta: {
i18n: 'router.refereeJManage',
roles: [user, admin]
},
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
hidden: true,
children: [
{
path: 'home',
@ -1046,26 +1067,6 @@ export const JSXT = [
}
}
]
},
{
path: '/referee',
component: Layout,
meta: {
i18n: 'router.recaList',
roles: [user, admin]
},
hidden: getSessionStorage('project') ? !getSessionStorage('project').endsWith('refereeJsxt') && !window.document.location.pathname.includes('refereeJsxt') : !window.document.location.pathname.includes('refereeJsxt'),
children: [
{
path: 'recaList',
component: RecaList,
meta: {
i18n: 'router.recaList',
icon: 'design',
hidden: true
}
}
]
}
];
const createRouter = () => new Router({

View File

@ -147,6 +147,10 @@ export default {
{ label: '控制模式', value: 'ControlConvertMenu' },
{ label: '车次窗', value: 'TrainWindow' }
],
QuestionTypeList: [
{ label: '选择题', value: 'select' },
{ label: '判断题', value: 'judge' }
],
// 新版的产品类型枚举
prdType:[
{ enlabel: 'ATS local workstation', label: 'ATS现地工作站', value: '01'},

View File

@ -2211,12 +2211,18 @@ export const IbpShowCondition = {
Show_Open_Screen_Door: {statusKey: 'screenDoorOpenStatus', statusValue:['02'], defaultStatus: 'close'},
Show_Close_Screen_Door: {statusKey: 'screenDoorOpenStatus', statusValue: ['01'], defaultStatus: 'open'}
};
/** 列车类型 */
export const TrainType = {
PLAN: '计划车',
HEAD: '头码车',
MANUAL: '人工车'
};
export const UrlConfig = {
display: '/display',
displayNew: '/displayNew',
scriptDisplay: '/scriptDisplay',
scriptDisplayNew:'/scriptDisplayNew',
practiceDisplayNew:'/practiceDisplayNew',
examRuleDraft: '/examRule/draft',
examRuleManage: '/examRule/manage',
lesson: {
@ -2307,5 +2313,9 @@ export const UrlConfig = {
draft: '/trainingPlatform/draft',
pay: '/trainingPlatform/pay',
runPlan: '/trainingPlatform/runPlan/manage'
},
bank: {
questionCreate: '/design/race/questionCreate',
questionUpdate: '/design/race/questionUpdate'
}
};

View File

@ -5,11 +5,13 @@ import TurnbackBar from '@/components/TurnbackBar';
import ConstConfig from '@/scripts/ConstConfig';
import Dictionary from '@/scripts/DictionaryData';
import Theme from '@/jmapNew/theme/factory';
import QuillEditor from '@/components/QuillEditor/index';
// 全局组件
Vue.component('DataForm', DataForm);
Vue.component('QueryListPage', QueryListPage);
Vue.component('TurnbackBar', TurnbackBar);
Vue.component('QuillEditor', QuillEditor);
Vue.prototype.$ConstSelect = (function() {
ConstConfig.ConstSelect.translate = function(value, codeName) {
@ -116,7 +118,7 @@ Vue.prototype.$copyClone = function(obj1, obj2 = {}) {
};
Vue.prototype.$escapeHTML = function (context) {
const pattern = /<\w*>(.*)<\/\w*>/;
const pattern = /<\p>(.*)<\/\p>/;
if (pattern.test(context)) {
context = pattern.exec(context)[1];

View File

@ -78,6 +78,8 @@ export default {
CMD_SIGNAL_SET_ROUTE: {value:'Signal_Set_Route', label: '排列进路'},
/** 取消进路 */
CMD_SIGNAL_CANCEL_ROUTE: {value:'Signal_Cancel_Route', label: '取消进路'},
/** 强制取消进路 */
CMD_SIGNAL_FORCE_CANCEL_ROUTE: {value: 'Signal_Force_Cancel_Route', label: '强制取消进路'},
/** 人解进路 */
CMD_SIGNAL_HUMAN_RELEASE_ROUTE: {value:'Signal_Human_Release_Route', label: '人解进路'},
/** 信号关灯 */

View File

@ -36,7 +36,7 @@ export const deviceFaultType = {
{label: '主灯丝熔断故障', value: 'MAIN_FILAMENT_BROKEN'}
],
Switch: [
{label: '挤岔', value: 'SPLIT'}
{label: '失表', value: 'SPLIT'}
],
StationStand: [
{label: '屏蔽门无法关闭', value: 'FAULT'}

View File

@ -2079,6 +2079,18 @@ export const OperationEvent = {
operation: '2994',
domId: '_Tips-TotalCancel-Button{TOP}'
}
},
// 取消故障
cancelStoppage: {
menu: {
operation: '2995'
}
},
// 道岔故障
stoppage: {
menu: {
operation: '2996'
}
}
}

View File

@ -181,6 +181,7 @@ const map = {
state: {
routeData: {}, // 进路数据
routeList: [], // 进路list
routeStartSignalData: {}, // 进路始端信号机数据
autoReentryData: {}, // 自动折返数据
autoReentryList: [], // 自动折返list
signalApproachSectionData: {}, // 信号机接近区段数据
@ -209,7 +210,11 @@ const map = {
showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
showCentralizedStationNum: 0, // 现地分集中站显示判断
overlapList: [], // 延续保护list
overlapData: {} // 延续保护数据
overlapData: {}, // 延续保护数据
holdStandList: [], // 扣车站台列表
holdStatus: false, // 是否有扣车状态
jumpStandList: [], // 跳停站台列表
jumpStatus: false // 是否有跳停状态
},
getters: {
@ -228,6 +233,13 @@ const map = {
routeData: (state) => {
return state.routeData;
},
routeStartSignalData: (state) => {
if (state.map) {
return state.map.routeStartSignalData || {};
} else {
return {};
}
},
overlapData: (state) => {
return state.overlapData;
},
@ -715,6 +727,11 @@ const map = {
setRouteData: (state, routeDataList) => {
routeDataList.forEach(data => {
state.routeData[data.code] = data;
if (state.routeStartSignalData[data.startSignalCode] && state.routeStartSignalData[data.startSignalCode].length) {
state.routeStartSignalData[data.startSignalCode].push(data);
} else {
state.routeStartSignalData[data.startSignalCode] = [data];
}
});
state.map.automaticRouteButtonList && state.map.automaticRouteButtonList.forEach(item => {
state.routeData[item.automaticRouteCode].automaticRouteCode = item.code;
@ -751,6 +768,22 @@ const map = {
updateTrainState:(state, status) =>{
state.map.trainList[parseInt(status.code) - 1] = deepAssign(state.map.trainList[parseInt(status.code) - 1] || {}, status);
},
updateStationStand: (state, status) => {
const holdIndex = state.holdStandList.indexOf(status.code);
const jumpIndex = state.jumpStandList.indexOf(status.code);
if ((status.stationHoldTrain || status.centerHoldTrain) && holdIndex < 0) {
state.holdStandList.push(status.code);
} else if (!(status.stationHoldTrain && status.centerHoldTrain) && holdIndex > -1) {
state.holdStandList.splice(holdIndex, 1);
}
state.holdStatus = state.holdStandList.length > 0;
if ((status.assignSkip || status.allSkip) && jumpIndex < 0) {
state.jumpStandList.push(status.code);
} else if (!(status.assignSkip && status.allSkip) && jumpIndex > -1) {
state.jumpStandList.splice(jumpIndex, 1);
}
state.jumpStatus = state.jumpStandList.length > 0;
},
setMapVersion:(state, version) => {
state.version = version;
},
@ -819,6 +852,9 @@ const map = {
updateTrainState:({ commit }, status) => {
commit('updateTrainState', status);
},
updateStationStand: ({ commit }, status) => {
commit('updateStationStand', status);
},
getRouteDataListByCode: ({ state, commit }, code) => { // 获取进路数据
return new Promise((resolve) => {
const list = [];

View File

@ -163,7 +163,7 @@ function handleSimulationInfo(state, data) {
targetOnline:data.targetMember ? data.targetMember.online : null,
targetName:data.targetMember ? data.targetMember : 'All',
targetRole:data.targetMember ? data.targetMember.role : null,
group: data.group,
all: data.all,
date: +new Date(`${myDate1} ${chatTime}`)
};
state.simulationText = params;

View File

@ -35,7 +35,9 @@ const training = {
prdType: '', // 产品类型
roles: '', // 角色权限类型
group: '', // 设置全局 group
centerStationCode:'' // 当前居中的集中站code
centerStationCode:'', // 当前居中的集中站code
commonMenuCount: 0, // 公共菜单计数
commonMenuStep: null // 公共菜单步骤
},
getters: {
@ -92,6 +94,12 @@ const training = {
});
return trainList;
},
commonMenuCount: (state) => {
return state.commonMenuCount;
},
commonMenuStep: (state) => {
return state.commonMenuStep;
}
},
@ -209,6 +217,10 @@ const training = {
},
setCenterStationCode:(state, centerStationCode) => {
state.centerStationCode = centerStationCode;
},
setCommonMenuStep: (state, commonMenuStep) => {
state.commonMenuStep = commonMenuStep;
state.commonMenuCount++;
}
},
@ -611,6 +623,11 @@ const training = {
/** 设置当前居中的集中站code */
setCenterStationCode:({ commit }, centerStationCode) => {
commit('setCenterStationCode', centerStationCode);
},
/** 公共菜单操作 */
setCommonMenuStep:({ commit }, commonMenuStep) => {
commit('setCommonMenuStep', commonMenuStep);
}
}
};

View File

@ -7,7 +7,6 @@ export function getBaseUrl() {
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛

View File

@ -0,0 +1,78 @@
<template>
<el-dialog v-dialogDrag :close-on-click-moda="false" :title="title" :visible.sync="show" width="860px" :close-on-click-modal="false" :before-close="doClose">
<div class="ql-editor" v-html="$escapeHTML(` : ${form.topic}`)" />
<template v-if="checkType(form, 'judge')">
<div class="answer">
:
<template v-for="(el,i) in options">
<span v-if="el.correct" :key="i">{{ el.content }} </span>
</template>
</div>
</template>
<template v-else-if="checkType(form, 'select')">
<div v-for="(el,i) in options" :key="i" class="option" :label="$str2number(el.id)">
<span>{{ $asc2chart(i+65) }}. </span>
<div class="ql-editor" style="display: inline; padding: 0" v-html="$escapeHTML(el.content)" />
</div>
<div class="answer">
:
<template v-for="(el,i) in options">
<span v-if="el.correct" :key="i">{{ $asc2chart(i+65) }} </span>
</template>
</div>
</template>
<span slot="footer" class="dialog-footer">
<el-button @click="show = false">关闭</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
show: false,
form: {
optionList: []
}
};
},
computed: {
title() {
return '详 情';
},
options() {
return this.form.optionList;
}
},
methods: {
checkType(option, type) {
return option.type == type;
},
appendIndex(str, index) {
return `${index + 1}. ${str}`;
},
doShow(node) {
this.form = node.row || {};
this.show = true;
},
doClose(done) {
this.show = false;
}
}
};
</script>
<style lang="scss" scoped>
.option {
line-height: 22px;
padding-left: 20px;
}
.answer {
line-height: 32px;
color: #000;
padding-left: 15px;
}
</style>

View File

@ -0,0 +1,46 @@
<template>
<el-dialog v-dialogDrag :close-on-click-moda="false" :title="title" :visible.sync="show" width="40%" :close-on-click-modal="false" :before-close="doClose">
<quill-editor v-model="content" placeholder="请输入内容" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doInput"> </el-button>
<el-button @click="show = false"> </el-button>
</span>
</el-dialog>
</template>
<script>
export default {
data() {
return {
show: false,
content: '',
node: {
model: {},
prop: ''
}
};
},
computed: {
title() {
return '富文本输入';
}
},
methods: {
doShow(node) {
this.node = node;
this.content = (node.model || {})[node.prop] || '';
this.show = true;
},
doClose(done) {
this.show = false;
},
doInput() {
const node = this.node;
node.model[node.prop] = this.content;
this.$emit('update', node.model);
this.doClose();
}
}
};
</script>

View File

@ -0,0 +1,158 @@
<template>
<div>
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<dialog-detail ref="detail" />
</div>
</template>
<script>
import { UrlConfig } from '@/scripts/ConstDic';
import { listQuestionPage, deleteQuestion } from '@/api/questionBank.js';
import DialogDetail from './dialog-detail';
export default {
components: {
DialogDetail
},
data() {
return {
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '80px',
queryObject: {
type: {
type: 'select',
label: '类 型',
config: {
data: this.$ConstSelect.QuestionTypeList
}
},
topic: {
type: 'text',
label: '题 目'
}
}
},
queryList: {
query: listQuestionPage,
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '题 目',
prop: 'topic'
},
{
title: '类 型',
prop: 'type',
type: 'tag',
width: '120',
columnValue: (row) => { return this.$ConstSelect.translate(row.type, 'QuestionTypeList'); },
tagType: (row) => {
return '';
}
},
{
title: '答 案',
prop: 'answer',
type: 'tagMore',
width: '100',
columnValue: (row) => { return this.answerTags(row); },
tagType: (row) => {
return '';
}
},
// {
// title: '',
// prop: 'createUserName',
// width: '100'
// },
{
type: 'button',
title: '操 作',
width: '420',
buttons: [
{
name: '编辑',
handleClick: this.edit
},
{
name: '删 除',
handleClick: this.doDelete,
// showControl: (row) => { return row.createUserId == this.userId; },
type: 'danger'
},
{
name: '预 览',
handleClick: this.doDetail
}
]
}
],
actions: [
{ text: '添 加', handler: this.doCreate }
]
}
};
},
computed: {
userId() {
return this.$store.state.user.id;
}
},
methods: {
doCreate() {
this.$router.push({path: `${UrlConfig.bank.questionCreate}`});
},
edit(index, row) {
this.$router.push({path: `${UrlConfig.bank.questionUpdate}/${row.id}`});
},
doDelete(index, row) {
this.$confirm('删除试题,是否继续?', '提 示', {
confirmButtonText: '确 定',
cancelButtonText: '取 消',
type: 'warning'
}).then(() => {
deleteQuestion(row.id).then(resp => {
this.reloadTable();
}).catch(error => {
this.$message.error(`删除试题失败: ${error.message}`);
});
}).catch( () => { });
},
doDetail(index, row) {
this.$refs.detail.doShow({index, row});
},
answerTags(row) {
const answer = [];
row.optionList.forEach((el, i) => {
switch (row.type) {
case 'select':
if (el.correct) {
answer.push(this.$asc2chart(i + 65));
}
break;
case 'judge':
if (el.correct) {
answer.push(el.content);
}
break;
}
});
return answer;
},
reloadTable() {
this.queryList.reload();
}
}
};
</script>

View File

@ -0,0 +1,55 @@
<template>
<div>
<template v-if="type=='select'">
<el-radio-group v-model="active" @change="onChange">
<el-radio v-for="(el,i) in optionList" :key="i" :label="i"> 选项-{{ $asc2chart(65+i) }} </el-radio>
</el-radio-group>
</template>
<template v-if="type=='judge'">
<el-radio-group v-model="active" @change="onChange">
<el-radio :label="0"> </el-radio>
<el-radio :label="1"> × </el-radio>
</el-radio-group>
</template>
</div>
</template>
<script>
export default {
props: {
value: {
type: Number,
default: 0
},
optionList: {
type: Array,
required: true
},
type: {
type: String,
required: true
}
},
data() {
return {
active: 0
};
},
watch: {
value(val) {
this.active = val;
}
},
methods: {
onChange(e) {
this.$emit('input', e);
this.$emit('change', e);
}
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,62 @@
<template>
<div class="option">
<template v-if="type=='select'">
<div v-for="(el,i) in optionList" :key="i" class="option__item">
<div> 选项-{{ $asc2chart(65+i) }} </div>
<item-rich v-model="el.content" :remove="remove" @modify="doModify(el)" @remove="doRemove(i)" />
</div>
<el-button v-if="add" class="item__button" type="primary" size="mini" icon="el-icon-plus" @click="doAppend" />
</template>
</div>
</template>
<script>
import ItemRich from './item-rich';
export default {
components: {
ItemRich
},
props: {
optionList: {
type: Array,
required: true
},
type: {
type: String,
required: true
},
add: {
type: Boolean,
default: false
},
remove: {
type: Boolean,
default: false
}
},
data() {
return {
};
},
methods: {
doModify(el) {
this.$emit('modify', {model: el, prop: 'content'});
},
doRemove(index) {
this.$emit('remove', index);
},
doAppend() {
this.$emit('append');
}
}
};
</script>
<style lang="scss" scoped>
.option {
&__item {
margin-bottom: 10px;
}
}
</style>

View File

@ -0,0 +1,55 @@
<template>
<div class="item no-select" :style="{height: height+'px'}">
<div class="ql-editor item__text" @click="doModify" v-html="$escapeHTML(`${value}`)" />
<el-button class="item__button" type="primary" size="mini" icon="el-icon-edit" circle @click="doModify" />
<el-button v-if="remove" class="item__button" type="danger" size="mini" icon="el-icon-delete" circle @click="doRemove" />
</div>
</template>
<script>
export default {
props: {
value: {
type: String,
default: ''
},
height: {
type: Number,
default: 60
},
remove: {
type: Boolean,
default: false
}
},
methods: {
doModify() {
this.$emit('modify', this.value);
},
doRemove() {
this.$emit('remove', this.value);
}
}
};
</script>
<style lang="scss" scoped>
.item {
display: flex;
justify-content: space-between;
align-items: center;
&__text {
flex: 1;
background: #f1f1f1;
}
&__button {
width: 32px;
margin-left: 10px;
place-self: flex-end;
}
}
</style>

View File

@ -0,0 +1,110 @@
<template>
<div class="page">
<div class="page__container">
<el-card class="page__container-body">
<question-form ref="info" :option="formModel" :remove="true" @modify="doModify" />
</el-card>
<div class="page__container-footer">
<el-button type="primary" :is-create="true" @click="create"> </el-button>
<el-button @click="back"> </el-button>
</div>
</div>
<dialog-modify-rich ref="rich" />
</div>
</template>
<script>
import QuestionForm from './question-form.vue';
import DialogModifyRich from './dialog-modify-rich';
import { createQuestion } from '@/api/questionBank.js';
import * as authUtils from '@/utils/auth.js';
export default {
components: {
QuestionForm,
DialogModifyRich
},
data() {
return {
active: 0,
formModel: {
id: '',
topic: '',
type: 'select',
answer: 0,
optionList: []
}
};
},
computed: {
deviceId() {
return this.$route.params.deviceId;
},
path() {
return this.$route.path;
}
},
created() {
const value = authUtils.getSessionStorage(this.path);
if (value) {
const model = JSON.parse(value);
this.formModel.type = model.type;
}
},
methods: {
doBack() {
this.$router.go(-1);
},
doModify(node) {
this.$refs.rich.doShow(node);
},
create() {
this.$refs.info.validate().then(valid => {
if (valid) {
createQuestion(this.formModel).then(resp => {
authUtils.setSessionStorage(this.path, JSON.stringify({
type: this.formModel.type
}));
this.doBack();
}).catch(error => {
this.$message.error(`创建试题失败: ${error.message}`);
});
}
}).catch(error => { this.$message.warning(error.message); });
},
back() {
this.$router.go(-1);
}
}
};
</script>
<style lang="scss" scoped>
.page {
width: 100%;
&__container {
width: 55%;
margin: auto;
padding:20px 0px;
&-header {
margin-bottom: 10px;
.step-group {
margin: 10px 0;
.box {
display: flex;
justify-content: flex-end;
}
}
}
&-body {
padding: 40px;
}
&-footer {
margin-top: 20px;
display: flex;
justify-content: center;
}
}
}
</style>

View File

@ -0,0 +1,129 @@
<template>
<div>
<el-form ref="form" :model="option" :rules="rules" label-width="80px">
<el-form-item label="类 型" prop="type">
<el-select v-model="option.type" :disabled="update" placeholder="请选择试题类型" @change="onTypeChnage">
<el-option v-for="it in QuestionTypeList" :key="it.value" :label="it.label" :value="it.value" />
</el-select>
</el-form-item>
<el-form-item label="问 题" prop="topic">
<item-rich v-model="option.topic" @modify="onModify({model: option, prop: 'topic'})" />
</el-form-item>
<template v-if="isCreate">
<el-form-item v-if="option.type != 'judge'" label="选 项" prop="optionList">
<item-options :option-list="optionList" :type="option.type" :add="isSelect" :remove="remove" @remove="onRemove" @modify="onModify" @append="onAppend" />
</el-form-item>
<el-form-item label="答 案" prop="answer">
<item-answer v-model="option.answer" :option-list="optionList" :type="option.type" @change="onAnswerChnage" />
</el-form-item>
</template>
</el-form>
</div>
</template>
<script>
import ItemRich from './item-rich';
import ItemOptions from './item-options';
import ItemAnswer from './item-answer';
export default {
components: {
ItemRich,
ItemOptions,
ItemAnswer
},
props: {
option: {
type: Object,
required: true
},
isCreate: {
type: Boolean,
default: true
},
remove: {
type: Boolean,
default: false
},
update: {
type: Boolean,
default: false
}
},
data() {
return {
};
},
computed: {
isSelect() {
return this.remove && this.option.type == 'select';
},
templateMap() {
return {
select: function() {
return [
{ content: '', correct: true },
{ content: '', correct: false },
{ content: '', correct: false },
{ content: '', correct: false }
];
},
judge: function() {
return [
{ content: '√', correct: true },
{ content: '×', correct: false }
];
}
};
},
optionList() {
return this.option.optionList;
},
QuestionTypeList() {
return this.$ConstSelect.QuestionTypeList;
},
rules() {
return {
topic: [
{ required: true, message: '请输入试题内容', trigger: 'blur' }
],
type: [
{ required: true, message: '请输入试题类型', trigger: 'change' }
],
answer: [
{ required: true, message: '请选择正确答案', trigger: 'change' }
]
};
}
},
mounted() {
this.onTypeChnage(this.option.type);
},
methods: {
validate() {
return new Promise((resolve, reject) => {
this.$refs['form'].validate((valid) => {
resolve(valid);
});
});
},
onTypeChnage(type) {
if (this.templateMap[type]) {
this.option.optionList = this.templateMap[type]();
}
},
onAnswerChnage(answer) {
this.option.optionList.forEach((el, i) => { el.correct = i == answer; });
},
onModify(node) {
this.$emit('modify', node);
},
onAppend() {
this.option.optionList.push({content: '', correct: false});
},
onRemove(index) {
this.option.optionList.splice(index, 1);
}
}
};
</script>

View File

@ -0,0 +1,109 @@
<template>
<div class="page">
<div class="page__container">
<el-card class="page__container-body">
<question-form ref="info" :option="formModel" :remove="true" :update="true" @modify="doModify" />
</el-card>
</div>
<div class="page__container-footer">
<el-button type="primary" :is-create="true" @click="update"> </el-button>
<el-button @click="back"> </el-button>
</div>
<dialog-modify-rich ref="rich" />
</div>
</template>
<script>
import QuestionForm from './question-form.vue';
import DialogModifyRich from './dialog-modify-rich';
import { getQuestionInfo, updateOption } from '@/api/questionBank.js';
export default {
components: {
QuestionForm,
DialogModifyRich
},
data() {
return {
formModel: {
id: '',
topic: '',
type: 'select',
answer: 0,
optionList: []
},
optionList: []
};
},
computed: {
questionId() {
return this.$route.params.questionId;
}
},
watch: {
'$router': function() {
this.loadInitData();
}
},
created() {
this.loadInitData();
},
methods: {
loadInitData() {
getQuestionInfo(this.questionId).then(resp => {
this.formModel = resp.data;
this.formModel.answer = this.formModel.optionList.findIndex(ele => ele.correct);
});
},
doBack() {
this.$router.go(-1);
},
doModify(node) {
this.$refs.rich.doShow(node);
},
update() {
this.$refs.info.validate().then(valid => {
if (valid) {
updateOption(this.formModel).then(resp => {
this.doBack();
}).catch(error => {
this.$message.error(`创建试题失败: ${error.message}`);
});
}
}).catch(error => { this.$message.warning(error.message); });
},
back() {
this.$router.go(-1);
}
}
};
</script>
<style lang="scss" scoped>
.page {
width: 100%;
&__container {
width: 55%;
margin: auto;
&-header {
margin-bottom: 10px;
.step-group {
margin: 10px 0;
.box {
display: flex;
justify-content: flex-end;
}
}
}
&-body {
padding: 40px;
}
&-footer {
margin-top: 20px;
display: flex;
justify-content: center;
}
}
}
</style>

View File

@ -73,7 +73,8 @@ export default {
name: '',
startDate: '',
endDate: '',
mapId: ''
mapId: '',
optionalRoles: ['DISPATCHER']
},
pickerOptions: {
disabledDate(time) {

View File

@ -3,6 +3,7 @@
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<create-race ref="createRace" :map-list="mapList" @refresh="refresh" />
<input id="competition-manage-url" v-model="url" style="opacity: 0;">
<div id="bm" ref="bm" />
</div>
</template>
@ -84,6 +85,10 @@ export default {
{
name: '裁判地址',
handleClick: this.showRefereeUrl
},
{
name: '生成试卷',
handleClick: this.generatePaper
}
]
}
@ -167,6 +172,9 @@ export default {
document.execCommand('Copy'); //
this.$message.success('报名路径已经复制到粘贴板');
});
},
generatePaper(index, row) {
this.$router.push({ path: `/design/race/generate`, query: {raceId:row.id} });
}
}
};

View File

@ -0,0 +1,225 @@
<template>
<div style="width: 100%;height: 100%;">
<div style="margin-top: 10px;position: absolute; right: 50px;">
<el-button size="small" type="primary" @click="exportPaper">导出试题</el-button>
<el-button size="small" type="primary" @click="goBack">返回</el-button>
</div>
<el-card style="width: 45%;margin-left: 50px;margin-top: 60px;display: inline-block;height: calc(100% - 100px);">
<div slot="header">
<span>理论试题列表</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="addTheoryQuestion">添加试题</el-button>
<el-button style="float: right; padding: 3px 0;margin-right: 5px" type="text" @click="theoryReview">预览</el-button>
</div>
<el-table
:data="theoryQuestionList"
style="width: 100%"
height="100%"
:summary-method="getSummaries"
:show-summary="showSummary"
:row-style="handleRowStyle"
>
<el-table-column prop="type" label="类型" width="100">
<template slot-scope="scope">
<el-tag type="primary" disable-transitions>{{ QuestionTypeMap[scope.row.type] }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="topic" label="题目" show-overflow-tooltip="">
<template slot-scope="scope">
<span v-html="scope.row.topic" />
</template>
</el-table-column>
<el-table-column prop="score" label="分值" width="100">
<template slot-scope="scope">
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
<i v-if="!scope.row.editScope" class="el-icon-edit" @click="editScope(scope.row)" />
<el-input-number v-if="scope.row.editScope" v-model="scope.row.score" v-focus="scope.row.editFocus" :controls="noControls" :min="0" size="mini" style="width: 90px" @blur="editScopeBlur(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="operate" label="操作" width="100">
<template slot-scope="scope">
<el-button type="warning" size="mini" @click="removeTheoryQuestion(scope.row)">移出</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<el-card style="width: 45%;margin-left: calc(10% - 100px);margin-top: 60px;display: inline-block;height: calc(100% - 100px);">
<div slot="header">
<span>实操试题列表</span>
<el-button style="float: right; padding: 3px 0" type="text" @click="addOperateQuestion">添加试题</el-button>
<el-button style="float: right; padding: 3px 0;margin-right: 5px" type="text" @click="operateReview">预览</el-button>
</div>
<el-table
:data="operateQuestionList"
style="width: 100%"
height="100%"
:row-style="handleRowStyle"
:summary-method="getSummaries"
:show-summary="showSummary"
>
<el-table-column prop="name" label="实操名称" />
<el-table-column prop="creatorName" label="创建人" />
<el-table-column prop="score" label="分值">
<template slot-scope="scope">
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
<i v-if="!scope.row.editScope" class="el-icon-edit" @click="editScope(scope.row)" />
<el-input-number v-if="scope.row.editScope" v-model="scope.row.score" v-focus="scope.row.editFocus" :controls="noControls" :min="0" size="mini" @blur="editScopeBlur(scope.row)" />
</template>
</el-table-column>
<el-table-column prop="operate" label="操作">
<template slot-scope="scope">
<el-button type="warning" size="mini" @click="removeOperateQuestion(scope.row)">移出</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
<set-exam-time ref="setExamTime" :theory-question-list="theoryQuestionList" :operate-question-list="operateQuestionList" />
<theory-review ref="theoryReview" :theory-question-list="theoryQuestionList" />
<theory-question ref="theoryQuestion" :theory-index-list="theoryIndexList" @addQuestion="addTheoryQuestionList" @removeQuestion="removeTheoryQuestion" />
<operate-question ref="operateQuestion" :operate-index-list="operateIndexList" @addQuestion="addOperateQuestionList" @removeQuestion="removeOperateQuestion" />
</div>
</template>
<script>
import TheoryReview from './theoryReview';
import TheoryQuestion from './theoryQuestion';
import OperateQuestion from './operateQuestion';
import SetExamTime from './setExamTime';
export default {
name: 'GeneratPaper',
components: {
SetExamTime,
TheoryReview,
TheoryQuestion,
OperateQuestion
},
data() {
return {
QuestionTypeMap: {
select: '选择题',
judge: '判断题'
},
showSummary: true,
noControls: false,
theoryQuestionList: [], //
operateQuestionList: [], //
theoryIndexList: [], //
operateIndexList: []//
};
},
methods: {
removeOperateQuestion(row) {
const index = this.operateIndexList.indexOf(row.id);
this.operateIndexList.splice(index, 1);
this.operateQuestionList.splice(index, 1);
},
removeTheoryQuestion(row) {
const index = this.theoryIndexList.indexOf(row.id);
this.theoryIndexList.splice(index, 1);
this.theoryQuestionList.splice(index, 1);
},
addTheoryQuestionList(row) {
if (this.theoryQuestionList.length) {
this.theoryIndexList.push(row.id);
this.theoryQuestionList.push(row);
} else {
this.theoryIndexList = [row.id];
this.theoryQuestionList = [row];
}
},
addOperateQuestionList(row) {
if (this.operateQuestionList.length) {
this.operateIndexList.push(row.id);
this.operateQuestionList.push(row);
} else {
this.operateIndexList = [row.id];
this.operateQuestionList = [row];
}
},
addTheoryQuestion() {
this.$refs.theoryQuestion.doShow();
},
addOperateQuestion() {
this.$refs.operateQuestion.doShow();
},
goBack() {
this.$router.go(-1);
},
theoryReview() {
this.$refs.theoryReview.doShow();
},
operateReview() {
},
editScope(row) {
this.$set(row, 'editScope', true);
this.$nextTick(() => {
this.$set(row, 'editFocus', true);
});
},
editScopeBlur(row) {
this.$set(row, 'editScope', false);
this.$set(row, 'editFocus', true);
if (row.score > 0) {
this.$set(row, 'isError', false);
}
this.showSummary = false;
this.$nextTick(() => {
this.getSummaries({data: this.theoryQuestionList});
});
},
handleRowStyle({row, rowIndex}) {
return row.isError ? {background: '#F00'} : {background: '#FFF'};
},
getSummaries(param) {
const { data } = param;
const sums = [];
sums[0] = '总分';
const values = data.map(item => Number(item.score));
if (!values.every(value => isNaN(value))) {
sums[2] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[2] += ' 分';
}
this.showSummary = true;
return sums;
},
exportPaper() {
let flag = false;
this.theoryQuestionList.forEach((item) => {
if (item.score <= 0) {
flag = true;
this.$set(item, 'isError', true);
}
});
this.operateQuestionList.forEach((item) => {
if (item.score <= 0) {
flag = true;
this.$set(item, 'isError', true);
}
});
if (flag) {
this.$message.error('试题分分值不得为0');
} else {
this.$refs.setExamTime.doShow();
}
}
}
};
</script>
<style scoped>
/deep/
.el-card__body{
height: calc(100% - 47px);
}
/deep/
.el-table__body-wrapper {
height: calc(100% - 97px) !important;
}
</style>

View File

@ -0,0 +1,219 @@
<template>
<el-dialog :visible.sync="dialogVisible" :before-close="handleClose" title="实操试题" width="80%">
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-dialog>
</template>
<script>
export default {
mixins: [
// WindowResizeHandler
],
props: {
operateIndexList: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
index: 0,
height: 0,
loading: false,
dialogVisible: false,
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '80px',
queryObject: {
name: {
type: 'text',
label: '实操名称'
}
}
},
queryList: {
// query: getPracticeList,
data:[
{id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
{id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
{id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
],
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '实操名称',
prop: 'name'
},
{
title: '创建人',
prop: 'creatorName',
width: '100'
},
{
type: 'button',
title: '操 作',
width: '420',
buttons: [
{
name: '添加',
handleClick: this.addQuestion,
showControl: (row) => { return !row.paper; },
type: 'success'
},
{
name: '移出',
handleClick: this.removeQuestion,
showControl: (row) => { return row.paper; },
type: 'warning'
}
]
}
]
}
};
},
computed: {
},
watch: {
},
methods: {
loadInitData() {
this.$nextTick(() => {
this.queryList.reload();
});
},
doShow() {
this.dialogVisible = true;
this.loadInitData();
},
handleClose() {
this.dialogVisible = false;
},
addQuestion(index, row) {
this.$set(row, 'paper', true);
row.score = 0;
this.$emit('addQuestion', row);
},
afterQuery(data) {
if (data && data.list) {
const that = this;
const list = data.list;
if (list) {
list.map(elem => {
this.$set(elem, 'paper', that.operateIndexList.includes(elem.id));
});
}
}
return data;
},
removeQuestion(index, row) {
this.$set(row, 'paper', false);
this.$emit('removeQuestion', row);
},
answerTags(row) {
const answer = [];
row.optionList.forEach((el, i) => {
switch (row.type) {
case 'select':
if (el.correct) {
answer.push(this.$asc2chart(i + 65));
}
break;
case 'judge':
if (el.correct) {
answer.push(el.content);
}
break;
}
});
return answer;
}
}
};
</script>
<style lang="scss" scoped>
.layer-center {
width: 900px;
height: 100%;
margin: auto;
background: #fff;
}
.quiz {
background: #eee;
height: 100%;
&::-webkit-scrollbar {
display:none
}
&__card {
height: 100%;
.dir-item {
padding-left: 25px;
}
.dir-caption {
padding-left: 10px;
line-height: 26px;
background: #f1f1f1;
}
}
&__container {
height: 100%;
&-header {
height: auto !important;
.title {
font-size: 24px;
line-height: 60px;
font-weight: bold;
text-align: center;
}
.notes {
color:#606266;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0 20px;
}
}
&-main {
.section {
padding: 5px 20px;
.caption {
line-height: 26px;
}
.context {
}
}
}
&-footer {
text-align: right;
position: sticky;
bottom: 0px;
padding: 40px ;
.buttons {
position: relative;
bottom: 20px;
}
}
}
}
</style>

View File

@ -0,0 +1,127 @@
<template>
<el-dialog :title="title" :visible.sync="dialogVisible" width="500px" :before-close="doClose" center>
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { getPracticeByIdBasic} from '@/api/race';
export default {
name: 'ScriptDraft',
props: {
title: {
type: String,
default() {
return '';
}
},
raceList:{
type: Array,
default() {
return '';
}
}
},
data() {
return {
dialogVisible: false,
isEdit:false,
formModel: {
name: '',
mapId: '',
description:''
}
};
},
computed: {
raceInfoList() {
const racelist = [];
this.raceList.forEach(each=>{
racelist.push({label:each.name, value:each.id});
});
return racelist;
},
form() {
const form = {
labelWidth: '120px',
items: [
{ prop: 'name', label: '实操名称', type: 'text' },
{ prop:'raceId', label:'竞赛名称', type:'select', options:this.raceInfoList, disabled:this.isEdit},
{ prop: 'description', label: '实操描述', type: 'textarea' }
]
};
return form;
},
rules() {
const crules = {
name: [
{ validator: this.validateScriptName, trigger: 'blur' },
{ validator: this.validateScriptName, trigger: 'change' }
],
description: [
{ validator: this.validateDescription, trigger: 'blur' },
{ validator: this.validateDescription, trigger: 'change' }
],
raceId:[
{ required: true, message: '请选择竞赛', trigger: 'change' }
]
};
return crules;
}
},
methods: {
validateScriptName(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.name = this.formModel.name.replace(/\s/g, '');
return callback(new Error('请输入实操名称'));
} else {
return callback();
}
},
validateDescription(rule, value, callback) {
if (value.trim().length === 0) {
this.formModel.description = this.formModel.description.replace(/\s/g, '');
return callback(new Error('请输入实操描述'));
} else {
return callback();
}
},
doShow(questid) {
if (questid) {
getPracticeByIdBasic(questid).then(resp=>{
const data = {'name':resp.data.name, 'description':resp.data.description, 'mapId':resp.data.mapId};
this.formModel = data;
this.formModel.id = questid;
this.dialogVisible = true;
this.isEdit = true;
});
} else {
this.formModel.mapId = this.$route.params.mapId;
this.dialogVisible = true;
this.isEdit = false;
}
},
doCreate() {
const self = this;
this.$refs.dataform.validateForm(() => {
self.$emit('create', Object.assign({}, this.formModel));
self.doClose();
});
},
doClose() {
this.$refs.dataform.resetForm();
this.dialogVisible = false;
}
}
};
</script>
<style lang="scss" scoped>
/deep/ .el-dialog--center .el-dialog__body{
padding: 25px 65px 30px 10px;
}
</style>

View File

@ -0,0 +1,59 @@
<template>
<div class="script-parent">
<div class="script-card" :style="{width: widthLeft+'px'}">
<practice-record ref="tipTaskRecord" :group="group" :width="widthLeft" />
</div>
<drap-left :width-left="widthLeft" :min="480" :max="580" @drapWidth="drapWidth" />
<div class="script-display">
<display ref="display" :size="size" />
</div>
</div>
</template>
<script>
import Display from '@/views/newMap/displayNew/index';
import PracticeRecord from './practiceRecord';
import drapLeft from '@/views/components/drapLeft/index';
export default {
name: 'ScriptDisplayNew',
components: {
Display,
PracticeRecord,
drapLeft
},
data() {
return {
widthLeft: 480,
size: {
width: document.documentElement.clientWidth - 480,
height: document.documentElement.clientHeight
},
group: this.$route.query.group
};
},
watch: {
'$store.state.app.windowSizeCount': function() {
this.size = { width: this.$store.state.app.width - 480, height: this.$store.state.app.height};
},
widthLeft: function(val) {
this.size = { width: this.$store.state.app.width - val, height: this.$store.state.app.height};
}
},
methods: {
drapWidth(width) {
this.widthLeft = Number(width);
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss";
.script-parent {
display: flex;
flex-flow: row;
.script-card {
width: 780px;
}
}
</style>

View File

@ -0,0 +1,10 @@
<template>
<div>
111
</div>
</template>
<script>
export default {
};
</script>

View File

@ -0,0 +1,186 @@
<template>
<div>
<query-list-page ref="user" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
<create-practice ref="createPractice" :race-list="raceList" title="创建实操" @reloadTable="reloadTable" @create="handleConfirmCreate" />
<create-practice ref="modifyPractice" :race-list="raceList" title="修改实操" @reloadTable="reloadTable" @create="handleConfirmModify" />
</div>
</template>
<script>
import { getPracticeList, getRaceList, putPracticeInfo, deletePractice, createPractice, practiceRecordNotify } from '@/api/race';
import { launchFullscreen } from '@/utils/screen';
import { UrlConfig } from '@/scripts/ConstDic';
import CreatePractice from './create';
export default {
name:'PracticeManage',
components:{
CreatePractice
},
data() {
return {
raceList:[],
pagerConfig: {
pageSize: 'pageSize',
pageIndex: 'pageNum'
},
queryForm: {
reset: true,
labelWidth: '80px',
queryObject: {
raceId: {
type: 'select',
label: '竞赛名称',
config: {
data: []
}
},
name: {
type: 'text',
label: '实操名称'
}
}
},
queryList: {
// query: getPracticeList,
data:[
{id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
{id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
{id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
],
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '竞赛名称',
prop: 'raceId',
type: 'tag',
width: '320',
columnValue: (row) => { return this.getRaceName(row.raceId); },
tagType: (row) => {
return '';
}
},
{
title: '实操名称',
prop: 'name'
},
{
title: '创建人',
prop: 'creatorName',
width: '100'
},
{
type: 'button',
title: '操 作',
width: '420',
buttons: [
{
name: '录 制',
handleClick: this.doRecord,
type: 'success'
},
{
name: '更 新',
handleClick: this.doUpdate,
type: 'primary'
},
{
name: '删 除',
handleClick: this.doDelete,
type: 'danger'
}
// {
// name: ' ',
// handleClick: this.doDetail
// }
]
}
],
actions: [
{ text: '添 加', handler: this.doCreate }
]
}
};
},
mounted() {
getRaceList({pageSize:999, pageNum:1}).then(res=>{
this.raceList = res.data.list;
this.queryForm.queryObject.raceId.config.data = [];
this.raceList.forEach(each=>{
this.queryForm.queryObject.raceId.config.data.push({label:each.name, value:each.id});
});
});
},
methods:{
doCreate() {
this.$refs.createPractice.doShow(null);
},
doDetail() {
},
doDelete(index, row) {
this.$confirm('此操作将删除此实操, 是否继续?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
deletePractice(row.id).then(response => {
this.$message.success('删除实操试题成功');
this.reloadTable();
}).catch((error) => {
this.$messageBox(`删除实操试题失败: ${error.message}`);
});
}).catch(() => { });
},
doRecord(index, row) {
// row.id
let raceInfo;
this.raceList.forEach(each=>{
if (each.id == row.raceId) {
raceInfo = each;
}
});
practiceRecordNotify(83).then(resp => {
const query = { mapId: raceInfo.mapId, group: resp.data, scriptId: row.id, lineCode:raceInfo.lineCode};
this.$router.push({ path: `${UrlConfig.practiceDisplayNew}/practice`, query });
launchFullscreen();
}).catch(error => {
this.$messageBox(`创建仿真失败: ${error.message}`);
});
},
//
doUpdate(index, row) {
this.$refs.modifyPractice.doShow(row.id);
},
getRaceName(raceId) {
let raceName = '';
this.raceList.forEach(each=>{
if (each.id == raceId) {
raceName = each.name;
}
});
return raceName;
},
reloadTable() {
if (this.queryList && this.queryList.reload) {
this.queryList.reload();
}
},
handleConfirmCreate(data) {
createPractice(data).then(resp => {
this.reloadTable();
this.$message.success('创建实操试题成功');
}).catch(error => {
this.$messageBox(`创建实操试题失败: ${error.message}`);
});
},
handleConfirmModify(data) {
putPracticeInfo(data.id, data).then(resp => {
this.reloadTable();
this.$message.success('修改实操试题成功');
}).catch(error => {
this.$messageBox(`修改实操试题失败: ${error.message}`);
});
}
}
};
</script>

View File

@ -0,0 +1,172 @@
<template>
<el-dialog :visible.sync="dialogVisible" :before-close="handleClose" title="试卷导出" width="500px">
<el-form ref="form" :model="form" label-width="150px" :rules="rules">
<el-form-item label="理论竞赛时长:" prop="theoryExamTime">
<el-input-number v-model="form.theoryExamTime" controls-position :min="1" /><span>&nbsp&nbsp分</span>
</el-form-item>
<el-form-item label="实操竞赛时长:" prop="operateExamTime">
<el-input-number v-model="form.operateExamTime" controls-position :min="1" /><span>&nbsp&nbsp分</span>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleExport">导出</el-button>
<el-button @click="handleClose">取消</el-button>
</el-form-item>
</el-form>
</el-dialog>
</template>
<script>
import { getRaceById } from '@/api/competition';
export default {
mixins: [
// WindowResizeHandler
],
props: {
operateQuestionList: {
type: Array,
default() {
return [];
}
},
theoryQuestionList: {
type: Array,
default() {
return [];
}
}
},
data() {
return {
index: 0,
height: 0,
loading: false,
dialogVisible: false,
form: {
theoryExamTime: 1,
operateExamTime: 1
},
rules: {
theoryExamTime: [
{ required: true, message: '请输入理论竞赛时长', trigger: 'blur' }
],
operateExamTime: [
{ required: true, message: '请输入实操竞赛时长', trigger: 'blur' }
]
}
};
},
computed: {
},
watch: {
},
methods: {
doShow() {
this.dialogVisible = true;
},
handleClose() {
this.dialogVisible = false;
},
handleExport() {
getRaceById(this.$route.query.raceId).then(resp => {
const exportData = {
practicalQuestions: this.operateQuestionList,
theoryQuestions: this.theoryQuestionList,
competitionId: this.$route.query.raceId,
theoryExamTime: this.form.theoryExamTime,
practicalExamTime: this.form.operateExamTime
};
const content = new Blob([JSON.stringify(exportData)]);
const urlObject = window.URL || window.webkitURL || window;
const url = urlObject.createObjectURL(content);
const el = document.createElement('a');
el.href = url;
el.download = `${resp.data.name}试卷.json`;
el.click();
urlObject.revokeObjectURL(url);
this.dialogVisible = false;
}).catch(()=> {
this.$message.error('查询竞赛详情失败!');
});
}
}
};
</script>
<style lang="scss" scoped>
.layer-center {
width: 900px;
height: 100%;
margin: auto;
background: #fff;
}
.quiz {
background: #eee;
height: 100%;
&::-webkit-scrollbar {
display:none
}
&__card {
height: 100%;
.dir-item {
padding-left: 25px;
}
.dir-caption {
padding-left: 10px;
line-height: 26px;
background: #f1f1f1;
}
}
&__container {
height: 100%;
&-header {
height: auto !important;
.title {
font-size: 24px;
line-height: 60px;
font-weight: bold;
text-align: center;
}
.notes {
color:#606266;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0 20px;
}
}
&-main {
.section {
padding: 5px 20px;
.caption {
line-height: 26px;
}
.context {
}
}
}
&-footer {
text-align: right;
position: sticky;
bottom: 0px;
padding: 40px ;
.buttons {
position: relative;
bottom: 20px;
}
}
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More