diff --git a/src/api/competition.js b/src/api/competition.js
index a156cafe6..3c73a5b57 100644
--- a/src/api/competition.js
+++ b/src/api/competition.js
@@ -163,3 +163,17 @@ export function getTestPaperDatail(competitionId) {
method: 'get'
});
}
+/** 提交实操结果 */
+export function submitPracticalCompetition(group, competitionId, data) {
+ return request({
+ url: `/api/v1/competitionPractical/${group}/${competitionId}/finish`,
+ method: 'put',
+ data
+ });
+}
+/** 开始实操竞赛 */
+export function startPracticalCompetition(group, competitionId, data) {
+ return request({
+ url: `/api/v1/competitionPractical/${group}/${competitionId}/start`
+ });
+}
diff --git a/src/api/simulation.js b/src/api/simulation.js
index 921119a33..e3d9cf520 100644
--- a/src/api/simulation.js
+++ b/src/api/simulation.js
@@ -693,3 +693,10 @@ export function getTrainDetailBytripNumber(group, params) {
params: params
});
}
+/** 根据memberId获取综合演练角色信息 */
+export function getMemberInfo(group, memberId) {
+ return request({
+ url: `/simulation/${group}/${memberId}/memberInfo`,
+ method: 'get'
+ });
+}
diff --git a/src/iscs/shape/components/pathsvg.js b/src/iscs/shape/components/pathsvg.js
index 88706e8af..0d87b7833 100644
--- a/src/iscs/shape/components/pathsvg.js
+++ b/src/iscs/shape/components/pathsvg.js
@@ -64,14 +64,18 @@ const map = {
width: 73,
path: 'M77,24V61L63,55V71H55V52L40.476,45.165,30,50V71H22V53L4,61V24L37,40.923V34.835C28.523,33.828,22,27.8,22,20.5,22,12.492,29.835,6,39.5,6S57,12.492,57,20.5c0,7.3-6.523,13.328-15,14.335v7.113ZM50.8,22H47l-4,3-4-3H30l3-5h5l4,2,3-1h5.534C48.973,14.409,43.6,10.881,38,11c-6.646.141-11,5.858-11,10s4.516,9.141,13,9C47.178,29.88,50.075,25.771,50.8,22Z'
},
- ElectricButterflyValve: {
- width: 39,
+ ElectricButterflyValve: {
+ width: 39,
path: 'M38,24V44H1V24H18.237L18,21s-6.5.6-9-8C7.705,8.542,10.288,2,20,2S31.849,8.083,31,13c-1.586,9.183-9,8-9,8v3H38Zm-3,4.077L24,34a4.361,4.361,0,0,1-3,5c-3.052,1.215-7,0-7,0L9,41H35V28.077ZM25.872,17.466A6.259,6.259,0,0,0,29,12a18.6,18.6,0,0,0-1-4L25,5H16L12.511,7.279C10.464,8.908,11.044,14.092,11,10.9a10.963,10.963,0,0,0,2.23,5.284L14,7h2l3.181,6.95L23,7h2Zm-1.924.915L23.261,10.13,19.91,17H18l-2.341-5.907L15.1,17.8A8.481,8.481,0,0,0,20,19C17.855,19.073,20.85,19.478,23.948,18.38ZM4,27V39.556L12,36a6.888,6.888,0,0,1,3-7c4.261-2.736,8,1,8,1l6-3H4Z'
},
Cistern: {
width: 323,
path: 'M264,27v3l-13-5.353V31s-8.068-6-16-6c-8.067,0-16,6-16,6V26H207V84H167v28H135v6s-7.614-6-16-6c-8.11,0-17,6-17,6v-6H23.467L26,119,4,109l23-9-3.13,7H76V31h72V12h59v9h12V14s8.08,5,16,5c8.079,0,16-5,16-5v7.353L264,16v7h54v4H264ZM148,37H82v70h20V99s8.89,8,17,8c8.386,0,16-8,16-8v8h26V84H148V37Zm54-20H153V55h15.5s-5.715-3.318-4.5-15c0.657-6.32,9-9,9-9l22-10h7V17Zm0,9h-6l-13,5s8.644,5.651,8,13c-0.827,9.433-4.75,11-4.75,11H202V26Zm-25,8a9,9,0,1,1-9,9A9,9,0,0,1,177,34Z'
- }
+ },
+ StaircaseOneWay: {
+ width: 51,
+ path: 'M51,71H0V0H12V15H23V-1h4V15H39V0H51V71ZM23,19H12v4H23V19Zm0,8H12v3H23V27Zm0,7H12v3H23V34Zm0,7H12v3H23V41Zm0,7H12v3H23V48Zm0,7H12v4H23V55ZM39,19H27v4H39V19Zm0,8H27v3H39V27Zm0,7H27v3H39V34Zm0,7H27v3H39V41Zm0,7H27v3H39V48Zm0,7H27v4H39V55ZM43,4V63H8V4H4V66H47V4H43Z'
+ }
};
export default function createPathSvg(model) {
diff --git a/src/iscs/shape/staircase.js b/src/iscs/shape/staircase.js
index 10ad2863f..d89496b71 100644
--- a/src/iscs/shape/staircase.js
+++ b/src/iscs/shape/staircase.js
@@ -16,13 +16,30 @@ export default class Staircase extends Group {
id: this.model.code,
position: [this.model.point.x, this.model.point.y]
});
- this.path = createPathSvg(this.model);
- this.add(this.grouper);
- if (this.model.isRight) {
+ let model = {};
+ let rotationAngle = this.model.rotationAngle;
+ if (this.model.oneWay) {
+ model = {
+ _type: 'StaircaseOneWay',
+ z:this.z,
+ zlevel:this.zlevel,
+ width: this.model.width,
+ fill: '#FFF'
+ };
+ rotationAngle = rotationAngle - 90;
+ this.grouper.origin = [this.model.width / 2, this.model.width * 0.718 / 2];
+ } else {
+ model = this.model;
this.grouper.origin = [this.model.width / 2, this.model.width * 1.368 / 2];
- this.grouper.scale = [-1, 1];
}
- this.grouper.rotation = Math.PI / 180 * (this.model.rotationAngle || 0);
+ this.path = createPathSvg(model);
+ this.add(this.grouper);
+ if (this.model.isRight && !this.model.oneWay) {
+ this.grouper.scale = [-1, 1];
+ } else if (this.model.isRight && this.model.oneWay) {
+ this.grouper.scale = [1, -1];
+ }
+ this.grouper.rotation = Math.PI / 180 * (rotationAngle || 0);
this.grouper.add(this.path);
}
setModel(dx, dy) {
diff --git a/src/jmapNew/theme/xian_01/menus/dialog/childDialog/confirmControl.vue b/src/jmapNew/theme/xian_01/menus/dialog/childDialog/confirmControl.vue
index 5e7296eb6..55410ef94 100644
--- a/src/jmapNew/theme/xian_01/menus/dialog/childDialog/confirmControl.vue
+++ b/src/jmapNew/theme/xian_01/menus/dialog/childDialog/confirmControl.vue
@@ -218,7 +218,7 @@ export default {
const operate = {
over: true,
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
- cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
+ cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
};
this.loading = true;
diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/childDialog/twoConfirmation.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/childDialog/twoConfirmation.vue
index 0b4323659..1dceb8591 100644
--- a/src/jmapNew/theme/xian_01/menus/menuDialog/childDialog/twoConfirmation.vue
+++ b/src/jmapNew/theme/xian_01/menus/menuDialog/childDialog/twoConfirmation.vue
@@ -123,11 +123,9 @@ export default {
if (valid) {
this.doClose();
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
- this.$emit('requestResult', {selection:this.operate.selection, operation: this.operation, flag: true});
}
}).catch(() => {
this.$refs.noticeInfo.doShow();
- this.$emit('requestResult', {selection:this.operate.selection, operation: this.operation, flag: false});
});
}
}
diff --git a/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue b/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue
index d0a30e56d..9066bcd50 100644
--- a/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue
+++ b/src/jmapNew/theme/xian_01/menus/menuDialog/stationControlConvert.vue
@@ -59,7 +59,7 @@
-
+
@@ -154,22 +154,26 @@ export default {
}
},
watch: {
- // '$store.state.socket.msgHead': function (elem) {
- // if (elem) {
- // this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
- // if (elem.hasOwnProperty('timeout')) {
- // this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
- // } else if (elem.hasOwnProperty('agree')) {
- // if (elem.agree) {
- // this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
- // } else {
- // this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
- // }
- // }
- // this.disabledClose = false;
- // this.disabledSure = false;
- // }
- // },
+ '$store.state.socket.msgHead': function (elem) {
+ if (elem) {
+ this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
+ if (elem.hasOwnProperty('success')) {
+ if (elem.success) {
+ (elem.stationCodes || []).forEach(code => {
+ this.updateTableValue(code, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
+ this.removeSelection(code);
+ });
+ } else {
+ (elem.stationCodes || []).forEach(code => {
+ this.updateTableValue(code, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
+ this.removeSelection(code);
+ });
+ }
+ }
+ this.disabledClose = false;
+ this.disabledSure = false;
+ }
+ },
backOperate: function (operate) {
if (this.dialogShow && operate) {
if (operate.selection && operate.selection.length) {
@@ -327,18 +331,20 @@ export default {
this.timer = null;
}
},
- setRequestTimeout(elem) {
- this.updateTableValue(elem.code, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
- },
- requestResult({selection, flag}) {
- selection.map(elem => {
- if (flag) {
- this.updateTableValue(elem.code, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
- } else {
- this.updateTableValue(elem.code, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, true);
+ removeSelection(code) {
+ let selectionIndex = -1;
+ this.selection.forEach((item, index) => {
+ if (item.code === code) {
+ selectionIndex = index;
}
});
- this.disabledClose = false;
+ if (selectionIndex > -1) {
+ this.selection.splice(selectionIndex, 1);
+ }
+ },
+ setRequestTimeout(elem) {
+ this.updateTableValue(elem.code, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
+ this.removeSelection(elem.code);
},
handleChooseChange(selection) {
this.selection = selection;
diff --git a/src/jmapNew/theme/xian_01/menus/menuSignal.vue b/src/jmapNew/theme/xian_01/menus/menuSignal.vue
index 959f4201f..fb0d7274c 100644
--- a/src/jmapNew/theme/xian_01/menus/menuSignal.vue
+++ b/src/jmapNew/theme/xian_01/menus/menuSignal.vue
@@ -59,7 +59,7 @@ export default {
{
label: '进路取消',
handler: this.cancelTrainRoute,
- cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
+ cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
},
{
label: '信号封锁',
@@ -131,7 +131,7 @@ export default {
{
label: '进路取消',
handler: this.cancelTrainRoute,
- cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
+ cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
},
{
label: '信号封锁',
diff --git a/src/jmapNew/theme/xian_01/menus/passiveDialog/control.vue b/src/jmapNew/theme/xian_01/menus/passiveDialog/control.vue
index 55e1d23be..2c4bbe47f 100644
--- a/src/jmapNew/theme/xian_01/menus/passiveDialog/control.vue
+++ b/src/jmapNew/theme/xian_01/menus/passiveDialog/control.vue
@@ -62,6 +62,7 @@
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
+import {getMemberInfo} from '@/api/simulation';
export default {
name: 'RequestControl',
@@ -75,24 +76,24 @@ export default {
disabledRefuse: false,
requestInfo: this.$t('menu.passiveDialog.dispatcherWorkstation'),
controlProps: {
- '01': this.$t('menu.passiveDialog.inTheControl'),
- '02': this.$t('menu.passiveDialog.stationControl')
+ 'Center': this.$t('menu.passiveDialog.inTheControl'),
+ 'Local': this.$t('menu.passiveDialog.stationControl')
},
selection: [],
tableData: [],
timer: null,
- timeout: 61,
+ timeout: 55,
count: 0,
- commandId: ''
+ sourceMemberId: ''
};
},
computed: {
targetStatus() {
if (this.$store.state.training.prdType == '01') {
- return '01';
+ return 'Center';
}
if (this.$store.state.training.prdType == '02') {
- return '02';
+ return 'Local';
}
return '';
},
@@ -117,10 +118,10 @@ export default {
deep: true
},
'$store.state.socket.msgHead': function (elem) {
- if (elem && elem.type == 'req') {
- if (elem.stationControlCode) {
+ if (elem && (elem.operateType == 'CM_Apply_For_Station_Control' || elem.operateType == 'CM_Apply_For_Center_Control' || elem.operateType == 'CM_Force_Station_Control')) {
+ if (elem.params.stationCodes && elem.params.stationCodes.length) {
this.doShow(elem);
- this.commandId = elem.commandId;
+ this.sourceMemberId = elem.sourceMemberId;
}
}
}
@@ -164,43 +165,41 @@ export default {
this.disabledAgree = this.selection.length <= 0;
}
},
- updateTableData(code) {
+ updateTableData(codes) {
this.tableData = [];
+ (codes || []).forEach(code=> {
+ const model = {
+ code: code,
+ operate: '',
+ control: { code: '', name: '' },
+ target: { code: '', name: '' },
+ agree: false,
+ disabled: false
+ };
- const model = {
- code: code,
- operate: '',
- control: { code: '', name: '' },
- target: { code: '', name: '' },
- agree: false,
- disabled: false
- };
-
- const device = this.$store.getters['map/getDeviceByCode'](code);
- if (device) {
- const control = (device || {}).state;
- if (control) {
- model.control = { status: control.status, name: this.controlProps[control.status] };
- model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
+ const device = this.$store.getters['map/getDeviceByCode'](code);
+ if (device) {
+ const control = (device || {}).controlMode;
+ if (control) {
+ model.control = { status: control, name: this.controlProps[control] };
+ model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
+ }
+ model.operate = device.name || '';
}
-
- const station = this.$store.getters['map/getDeviceByCode'](device.stationCode);
- if (station) {
- model.operate = station.name || '';
- }
- }
-
- this.tableData.push(model);
+ console.log(code, device);
+ this.tableData.push(model);
+ });
},
doShow(msgHead) {
- this.requestInfo = `${msgHead.fromMember.deviceName}`;
- if (msgHead.fromMember.nickName) {
- this.requestInfo = `${msgHead.fromMember.deviceName}(${msgHead.fromMember.nickName})`;
- }
+ getMemberInfo(this.$route.query.group, msgHead.sourceMemberId).then(resp => {
+ if (resp.data && resp.data.deviceName && resp.data.name) {
+ this.requestInfo = `${ resp.data.deviceName}(${resp.data.name})`;
+ }
+ });
this.dialogShow = true;
this.disabledAgree = true;
this.createTimer();
- this.updateTableData(msgHead.stationControlCode);
+ this.updateTableData(msgHead.params.stationCodes);
const operate = {
start: true,
@@ -220,7 +219,6 @@ export default {
if (this.dialogShow) {
this.$store.dispatch('socket/shiftMsgQueue');
}
-
this.count = 0;
this.dialogShow = false;
this.clearTimer();
@@ -247,22 +245,27 @@ export default {
}
},
agree() {
+ const stationCodes = [];
+ this.tableData.forEach(item => {
+ if (item.agree) {
+ stationCodes.push(item.code);
+ }
+ });
const operate = {
start: true,
operation: OperationEvent.StationControl.controlResponse.agree.operation,
- code: this.tableData[0].code,
- val: this.commandId,
+ send: true,
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
param: {
- ControlMode_Code: this.tableData[0].code,
- Reply_Command_Id: this.commandId,
- ControlMode_Reply: true
+ sourceMemberId: this.sourceMemberId,
+ stationCodes: stationCodes,
+ agree: true
}
};
this.clearTimer();
this.disabledAgree = true;
- 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 });
this.doClose();
@@ -272,22 +275,27 @@ export default {
});
},
refuse() {
+ const stationCodes = [];
+ this.tableData.forEach(item => {
+ if (item.agree) {
+ stationCodes.push(item.code);
+ }
+ });
const operate = {
start: true,
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
- code: this.tableData[0].code,
- val: this.commandId,
+ send: true,
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
param: {
- ControlMode_Code: this.tableData[0].code,
- Reply_Command_Id: this.commandId,
- ControlMode_Reply: false
+ sourceMemberId: this.sourceMemberId,
+ stationCodes: stationCodes,
+ agree: false
}
};
this.clearTimer();
this.disabledAgree = true;
- this.$store.dispatch('training/next', operate).then(({ valid }) => {
+ this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js
index 778caeb7b..55d352581 100644
--- a/src/utils/baseUrl.js
+++ b/src/utils/baseUrl.js
@@ -2,10 +2,10 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
- BASE_API = 'https://test.joylink.club/jlcloud';
+ // BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
- // BASE_API = 'http://192.168.3.41:9000'; // 张赛
+ BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
diff --git a/src/views/competitionManage/competition/index.vue b/src/views/competitionManage/competition/index.vue
index eb02095ac..9054b4414 100644
--- a/src/views/competitionManage/competition/index.vue
+++ b/src/views/competitionManage/competition/index.vue
@@ -174,7 +174,7 @@ export default {
});
},
generatePaper(index, row) {
- this.$router.push({ path: `/design/race/generate`, query: {raceId:row.id} });
+ this.$router.push({ path: `/design/race/generate`, query: {raceId:row.id, mapId: row.mapId} });
}
}
};
diff --git a/src/views/competitionManage/generatePaper.vue b/src/views/competitionManage/generatePaper.vue
index f8abc9cb3..451dce225 100644
--- a/src/views/competitionManage/generatePaper.vue
+++ b/src/views/competitionManage/generatePaper.vue
@@ -56,8 +56,16 @@
:summary-method="getSummaries"
:show-summary="showSummary"
>
-
-
+
+
+ {{ scope.row.question.name }}
+
+
+
+
+ {{ scope.row.question.description }}
+
+
{{ scope.row.score }}
@@ -127,12 +135,13 @@ export default {
}
},
addOperateQuestionList(row) {
- if (this.operateQuestionList.length) {
+ const length = this.operateQuestionList.length;
+ if (length) {
this.operateIndexList.push(row.id);
- this.operateQuestionList.push(row);
+ this.operateQuestionList.push({id:length + 1, score:0, question: row});
} else {
this.operateIndexList = [row.id];
- this.operateQuestionList = [row];
+ this.operateQuestionList = [{id:1, score:0, question: row}];
}
},
addTheoryQuestion() {
diff --git a/src/views/competitionManage/operateQuestion.vue b/src/views/competitionManage/operateQuestion.vue
index 9c1f017b9..59954af9f 100644
--- a/src/views/competitionManage/operateQuestion.vue
+++ b/src/views/competitionManage/operateQuestion.vue
@@ -6,6 +6,7 @@