Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
49c61f8c8d
@ -163,3 +163,17 @@ export function getTestPaperDatail(competitionId) {
|
|||||||
method: 'get'
|
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`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -693,3 +693,10 @@ export function getTrainDetailBytripNumber(group, params) {
|
|||||||
params: params
|
params: params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 根据memberId获取综合演练角色信息 */
|
||||||
|
export function getMemberInfo(group, memberId) {
|
||||||
|
return request({
|
||||||
|
url: `/simulation/${group}/${memberId}/memberInfo`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -71,6 +71,10 @@ const map = {
|
|||||||
Cistern: {
|
Cistern: {
|
||||||
width: 323,
|
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'
|
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'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -16,13 +16,30 @@ export default class Staircase extends Group {
|
|||||||
id: this.model.code,
|
id: this.model.code,
|
||||||
position: [this.model.point.x, this.model.point.y]
|
position: [this.model.point.x, this.model.point.y]
|
||||||
});
|
});
|
||||||
this.path = createPathSvg(this.model);
|
let model = {};
|
||||||
this.add(this.grouper);
|
let rotationAngle = this.model.rotationAngle;
|
||||||
if (this.model.isRight) {
|
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.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);
|
this.grouper.add(this.path);
|
||||||
}
|
}
|
||||||
setModel(dx, dy) {
|
setModel(dx, dy) {
|
||||||
|
@ -218,7 +218,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
over: true,
|
over: true,
|
||||||
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
operation: OperationEvent.Signal.cancelTrainRoute.confirm.operation,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -123,11 +123,9 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$emit('requestResult', {selection:this.operate.selection, operation: this.operation, flag: true});
|
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow();
|
this.$refs.noticeInfo.doShow();
|
||||||
this.$emit('requestResult', {selection:this.operate.selection, operation: this.operation, flag: false});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" @requestResult="requestResult" />
|
<two-confirmation ref="twoConfirmation" @setOperate="getOperate" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -154,22 +154,26 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// '$store.state.socket.msgHead': function (elem) {
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
// if (elem) {
|
if (elem) {
|
||||||
// this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
|
this.flagListBit[this.selection.forEach(elem => { return elem.stationControlCode == elem.code; })] = false;
|
||||||
// if (elem.hasOwnProperty('timeout')) {
|
if (elem.hasOwnProperty('success')) {
|
||||||
// this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
|
if (elem.success) {
|
||||||
// } else if (elem.hasOwnProperty('agree')) {
|
(elem.stationCodes || []).forEach(code => {
|
||||||
// if (elem.agree) {
|
this.updateTableValue(code, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
|
||||||
// this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransfersuccees') }, true);
|
this.removeSelection(code);
|
||||||
// } else {
|
});
|
||||||
// this.updateTableValue(elem.stationControlCode, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
|
} else {
|
||||||
// }
|
(elem.stationCodes || []).forEach(code => {
|
||||||
// }
|
this.updateTableValue(code, { result: this.$t('menu.menuDialog.controlModeTransferFailed') }, false);
|
||||||
// this.disabledClose = false;
|
this.removeSelection(code);
|
||||||
// this.disabledSure = false;
|
});
|
||||||
// }
|
}
|
||||||
// },
|
}
|
||||||
|
this.disabledClose = false;
|
||||||
|
this.disabledSure = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
backOperate: function (operate) {
|
backOperate: function (operate) {
|
||||||
if (this.dialogShow && operate) {
|
if (this.dialogShow && operate) {
|
||||||
if (operate.selection && operate.selection.length) {
|
if (operate.selection && operate.selection.length) {
|
||||||
@ -327,18 +331,20 @@ export default {
|
|||||||
this.timer = null;
|
this.timer = null;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setRequestTimeout(elem) {
|
removeSelection(code) {
|
||||||
this.updateTableValue(elem.code, { result: this.$t('menu.menuDialog.acceptConversionResponseTimeout') }, false);
|
let selectionIndex = -1;
|
||||||
},
|
this.selection.forEach((item, index) => {
|
||||||
requestResult({selection, flag}) {
|
if (item.code === code) {
|
||||||
selection.map(elem => {
|
selectionIndex = index;
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
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) {
|
handleChooseChange(selection) {
|
||||||
this.selection = selection;
|
this.selection = selection;
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '进路取消',
|
label: '进路取消',
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号封锁',
|
label: '信号封锁',
|
||||||
@ -131,7 +131,7 @@ export default {
|
|||||||
{
|
{
|
||||||
label: '进路取消',
|
label: '进路取消',
|
||||||
handler: this.cancelTrainRoute,
|
handler: this.cancelTrainRoute,
|
||||||
cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE
|
cmdType: CMD.Signal.CMD_SIGNAL_FORCE_CANCEL_ROUTE
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '信号封锁',
|
label: '信号封锁',
|
||||||
|
@ -62,6 +62,7 @@
|
|||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from '../dialog/childDialog/childDialog/noticeInfo';
|
||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
|
import {getMemberInfo} from '@/api/simulation';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RequestControl',
|
name: 'RequestControl',
|
||||||
@ -75,24 +76,24 @@ export default {
|
|||||||
disabledRefuse: false,
|
disabledRefuse: false,
|
||||||
requestInfo: this.$t('menu.passiveDialog.dispatcherWorkstation'),
|
requestInfo: this.$t('menu.passiveDialog.dispatcherWorkstation'),
|
||||||
controlProps: {
|
controlProps: {
|
||||||
'01': this.$t('menu.passiveDialog.inTheControl'),
|
'Center': this.$t('menu.passiveDialog.inTheControl'),
|
||||||
'02': this.$t('menu.passiveDialog.stationControl')
|
'Local': this.$t('menu.passiveDialog.stationControl')
|
||||||
},
|
},
|
||||||
selection: [],
|
selection: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
timer: null,
|
timer: null,
|
||||||
timeout: 61,
|
timeout: 55,
|
||||||
count: 0,
|
count: 0,
|
||||||
commandId: ''
|
sourceMemberId: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
targetStatus() {
|
targetStatus() {
|
||||||
if (this.$store.state.training.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
return '01';
|
return 'Center';
|
||||||
}
|
}
|
||||||
if (this.$store.state.training.prdType == '02') {
|
if (this.$store.state.training.prdType == '02') {
|
||||||
return '02';
|
return 'Local';
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
@ -117,10 +118,10 @@ export default {
|
|||||||
deep: true
|
deep: true
|
||||||
},
|
},
|
||||||
'$store.state.socket.msgHead': function (elem) {
|
'$store.state.socket.msgHead': function (elem) {
|
||||||
if (elem && elem.type == 'req') {
|
if (elem && (elem.operateType == 'CM_Apply_For_Station_Control' || elem.operateType == 'CM_Apply_For_Center_Control' || elem.operateType == 'CM_Force_Station_Control')) {
|
||||||
if (elem.stationControlCode) {
|
if (elem.params.stationCodes && elem.params.stationCodes.length) {
|
||||||
this.doShow(elem);
|
this.doShow(elem);
|
||||||
this.commandId = elem.commandId;
|
this.sourceMemberId = elem.sourceMemberId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -164,9 +165,9 @@ export default {
|
|||||||
this.disabledAgree = this.selection.length <= 0;
|
this.disabledAgree = this.selection.length <= 0;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
updateTableData(code) {
|
updateTableData(codes) {
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
|
(codes || []).forEach(code=> {
|
||||||
const model = {
|
const model = {
|
||||||
code: code,
|
code: code,
|
||||||
operate: '',
|
operate: '',
|
||||||
@ -178,29 +179,27 @@ export default {
|
|||||||
|
|
||||||
const device = this.$store.getters['map/getDeviceByCode'](code);
|
const device = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
if (device) {
|
if (device) {
|
||||||
const control = (device || {}).state;
|
const control = (device || {}).controlMode;
|
||||||
if (control) {
|
if (control) {
|
||||||
model.control = { status: control.status, name: this.controlProps[control.status] };
|
model.control = { status: control, name: this.controlProps[control] };
|
||||||
model.target = { status: this.targetStatus, name: this.controlProps[this.targetStatus] };
|
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 || '';
|
|
||||||
}
|
}
|
||||||
}
|
console.log(code, device);
|
||||||
|
|
||||||
this.tableData.push(model);
|
this.tableData.push(model);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
doShow(msgHead) {
|
doShow(msgHead) {
|
||||||
this.requestInfo = `${msgHead.fromMember.deviceName}`;
|
getMemberInfo(this.$route.query.group, msgHead.sourceMemberId).then(resp => {
|
||||||
if (msgHead.fromMember.nickName) {
|
if (resp.data && resp.data.deviceName && resp.data.name) {
|
||||||
this.requestInfo = `${msgHead.fromMember.deviceName}(${msgHead.fromMember.nickName})`;
|
this.requestInfo = `${ resp.data.deviceName}(${resp.data.name})`;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.createTimer();
|
this.createTimer();
|
||||||
this.updateTableData(msgHead.stationControlCode);
|
this.updateTableData(msgHead.params.stationCodes);
|
||||||
|
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
@ -220,7 +219,6 @@ export default {
|
|||||||
if (this.dialogShow) {
|
if (this.dialogShow) {
|
||||||
this.$store.dispatch('socket/shiftMsgQueue');
|
this.$store.dispatch('socket/shiftMsgQueue');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.count = 0;
|
this.count = 0;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
@ -247,22 +245,27 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
agree() {
|
agree() {
|
||||||
|
const stationCodes = [];
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.agree) {
|
||||||
|
stationCodes.push(item.code);
|
||||||
|
}
|
||||||
|
});
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
operation: OperationEvent.StationControl.controlResponse.agree.operation,
|
||||||
code: this.tableData[0].code,
|
send: true,
|
||||||
val: this.commandId,
|
|
||||||
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
param: {
|
param: {
|
||||||
ControlMode_Code: this.tableData[0].code,
|
sourceMemberId: this.sourceMemberId,
|
||||||
Reply_Command_Id: this.commandId,
|
stationCodes: stationCodes,
|
||||||
ControlMode_Reply: true
|
agree: true
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -272,22 +275,27 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
refuse() {
|
refuse() {
|
||||||
|
const stationCodes = [];
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
if (item.agree) {
|
||||||
|
stationCodes.push(item.code);
|
||||||
|
}
|
||||||
|
});
|
||||||
const operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
operation: OperationEvent.StationControl.controlResponse.refuse.operation,
|
||||||
code: this.tableData[0].code,
|
send: true,
|
||||||
val: this.commandId,
|
|
||||||
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
cmdType: this.$store.state.training.prdType == '01' ? CMD.ControlConvertMenu.CMD_CM_REPLY_CENTER_CONTROL : CMD.ControlConvertMenu.CMD_CM_REPLY_STATION_CONTROL,
|
||||||
param: {
|
param: {
|
||||||
ControlMode_Code: this.tableData[0].code,
|
sourceMemberId: this.sourceMemberId,
|
||||||
Reply_Command_Id: this.commandId,
|
stationCodes: stationCodes,
|
||||||
ControlMode_Reply: false
|
agree: false
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.clearTimer();
|
this.clearTimer();
|
||||||
this.disabledAgree = true;
|
this.disabledAgree = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,10 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// 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.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6: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://192.168.3.82:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
|
@ -174,7 +174,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
generatePaper(index, row) {
|
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} });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -56,8 +56,16 @@
|
|||||||
:summary-method="getSummaries"
|
:summary-method="getSummaries"
|
||||||
:show-summary="showSummary"
|
:show-summary="showSummary"
|
||||||
>
|
>
|
||||||
<el-table-column prop="name" label="实操名称" />
|
<el-table-column prop="question" label="实操名称">
|
||||||
<el-table-column prop="creatorName" label="创建人" />
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.question.name }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="question" label="实操描述">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.question.description }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="score" label="分值">
|
<el-table-column prop="score" label="分值">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
|
<span v-if="!scope.row.editScope" @click="editScope(scope.row)">{{ scope.row.score }}</span>
|
||||||
@ -127,12 +135,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
addOperateQuestionList(row) {
|
addOperateQuestionList(row) {
|
||||||
if (this.operateQuestionList.length) {
|
const length = this.operateQuestionList.length;
|
||||||
|
if (length) {
|
||||||
this.operateIndexList.push(row.id);
|
this.operateIndexList.push(row.id);
|
||||||
this.operateQuestionList.push(row);
|
this.operateQuestionList.push({id:length + 1, score:0, question: row});
|
||||||
} else {
|
} else {
|
||||||
this.operateIndexList = [row.id];
|
this.operateIndexList = [row.id];
|
||||||
this.operateQuestionList = [row];
|
this.operateQuestionList = [{id:1, score:0, question: row}];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
addTheoryQuestion() {
|
addTheoryQuestion() {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { getPracticeList } from '@/api/race';
|
||||||
export default {
|
export default {
|
||||||
mixins: [
|
mixins: [
|
||||||
// WindowResizeHandler
|
// WindowResizeHandler
|
||||||
@ -31,31 +32,27 @@ export default {
|
|||||||
queryForm: {
|
queryForm: {
|
||||||
reset: true,
|
reset: true,
|
||||||
labelWidth: '80px',
|
labelWidth: '80px',
|
||||||
queryObject: {
|
queryObject: {}
|
||||||
name: {
|
|
||||||
type: 'text',
|
|
||||||
label: '实操名称'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
// query: getPracticeList,
|
query: getPracticeList,
|
||||||
data:[
|
beforeQuery: this.beforeQuery,
|
||||||
{id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
|
// data:[
|
||||||
{id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
|
// {id:1, raceId:2, name:'行调进行扣车操作', creatorName:'水墨'},
|
||||||
{id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
|
// {id:2, raceId:4, name:'行调进行扣车操作', creatorName:'zyy'},
|
||||||
],
|
// {id:3, raceId:3, name:'行调进行扣车操作', creatorName:'水墨'}
|
||||||
|
// ],
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '实操名称',
|
title: '实操名称',
|
||||||
prop: 'name'
|
prop: 'name',
|
||||||
|
width: '400'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建人',
|
title: '实操描述',
|
||||||
prop: 'creatorName',
|
prop: 'description'
|
||||||
width: '100'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -100,9 +97,12 @@ export default {
|
|||||||
},
|
},
|
||||||
addQuestion(index, row) {
|
addQuestion(index, row) {
|
||||||
this.$set(row, 'paper', true);
|
this.$set(row, 'paper', true);
|
||||||
row.score = 0;
|
|
||||||
this.$emit('addQuestion', row);
|
this.$emit('addQuestion', row);
|
||||||
},
|
},
|
||||||
|
beforeQuery(params) {
|
||||||
|
params.mapId = this.$route.query.mapId;
|
||||||
|
return params;
|
||||||
|
},
|
||||||
afterQuery(data) {
|
afterQuery(data) {
|
||||||
if (data && data.list) {
|
if (data && data.list) {
|
||||||
const that = this;
|
const that = this;
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
<el-form-item label="扶梯朝右" prop="isRight">
|
<el-form-item label="扶梯朝右" prop="isRight">
|
||||||
<el-checkbox v-model="addModel.isRight" />
|
<el-checkbox v-model="addModel.isRight" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="单向" prop="oneWay">
|
||||||
|
<el-checkbox v-model="addModel.oneWay" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="旋转角度">
|
<el-form-item label="旋转角度">
|
||||||
<el-input-number v-model="addModel.rotationAngle" />
|
<el-input-number v-model="addModel.rotationAngle" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -41,7 +44,8 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
rotationAngle: 0,
|
rotationAngle: 0,
|
||||||
isRight:false
|
isRight:false,
|
||||||
|
oneWay: false
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],
|
width:[{ required: true, message:'请输入设备图形宽度', trigger: 'blur' }],
|
||||||
@ -71,6 +75,7 @@ export default {
|
|||||||
this.addModel.y = model.point.y;
|
this.addModel.y = model.point.y;
|
||||||
this.addModel.isRight = model.isRight;
|
this.addModel.isRight = model.isRight;
|
||||||
this.addModel.rotationAngle = model.rotationAngle || 0;
|
this.addModel.rotationAngle = model.rotationAngle || 0;
|
||||||
|
this.addModel.oneWay = !!model.oneWay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -88,7 +93,8 @@ export default {
|
|||||||
rotationAngle: this.addModel.rotationAngle,
|
rotationAngle: this.addModel.rotationAngle,
|
||||||
code: this.isUpdate ? this.addModel.code : getUID('Staircase', this.iscs.staircaseList),
|
code: this.isUpdate ? this.addModel.code : getUID('Staircase', this.iscs.staircaseList),
|
||||||
_type: 'Staircase',
|
_type: 'Staircase',
|
||||||
width: this.addModel.width
|
width: this.addModel.width,
|
||||||
|
oneWay: this.addModel.oneWay
|
||||||
};
|
};
|
||||||
this.$emit('createDataModel', staircaseModel);
|
this.$emit('createDataModel', staircaseModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -107,7 +113,8 @@ export default {
|
|||||||
isRight: this.addModel.isRight,
|
isRight: this.addModel.isRight,
|
||||||
rotationAngle: this.addModel.rotationAngle,
|
rotationAngle: this.addModel.rotationAngle,
|
||||||
_type: 'Staircase',
|
_type: 'Staircase',
|
||||||
width: this.addModel.width
|
width: this.addModel.width,
|
||||||
|
oneWay: this.addModel.oneWay
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', staircaseModel);
|
this.$emit('deleteDataModel', staircaseModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -122,7 +129,8 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
isRight:false,
|
isRight:false,
|
||||||
rotationAngle: 0
|
rotationAngle: 0,
|
||||||
|
oneWay: false
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ import ConstConfig from '@/scripts/ConstConfig';
|
|||||||
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
import CMD from '@/scripts/cmdPlugin/CommandEnum';
|
||||||
import {getRaceUserById} from '@/api/competition';
|
import {getRaceUserById} from '@/api/competition';
|
||||||
import { participantCreatTrainingRoom, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
|
import { participantCreatTrainingRoom, getPracticalQuestion, getTheoryQuestion } from '@/api/competition';
|
||||||
|
import {getRaceById } from '@/api/competition';
|
||||||
// import applyImg from '@/assets/apply.png';
|
// import applyImg from '@/assets/apply.png';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -181,10 +182,11 @@ export default {
|
|||||||
this.$messageBox('试卷还没被加载');
|
this.$messageBox('试卷还没被加载');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
getRaceById(this.$route.query.raceId).then(resp => {
|
||||||
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
|
getPracticalQuestion(this.$route.query.raceId).then((responese)=>{
|
||||||
if (responese.data) {
|
if (responese.data) {
|
||||||
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: 41, prdType: '03'}).then(resp => {
|
participantCreatTrainingRoom(this.$route.query.raceId, {mapId: resp.data.mapId, prdType: '03'}).then(resp => {
|
||||||
const query = { lineCode: '11', mapId: '41', group: resp.data, raceId: this.$route.query.raceId};
|
const query = { lineCode: '11', mapId: resp.data.mapId, group: resp.data, raceId: this.$route.query.raceId};
|
||||||
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
this.$router.replace({ path: `/jointTrainingNew`, query: query});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -193,6 +195,7 @@ export default {
|
|||||||
}).catch(()=>{
|
}).catch(()=>{
|
||||||
this.$messageBox('试卷还没被加载');
|
this.$messageBox('试卷还没被加载');
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -89,25 +89,25 @@ export default {
|
|||||||
const day = date.getDay();
|
const day = date.getDay();
|
||||||
switch (day) {
|
switch (day) {
|
||||||
case 0:
|
case 0:
|
||||||
this.dayString = '星 期 一';
|
this.dayString = '星 期 日';
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.dayString = '星 期 二';
|
this.dayString = '星 期 一';
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
this.dayString = '星 期 三';
|
this.dayString = '星 期 二';
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
this.dayString = '星 期 四';
|
this.dayString = '星 期 三';
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
this.dayString = '星 期 五';
|
this.dayString = '星 期 四';
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
this.dayString = '星 期 六';
|
this.dayString = '星 期 五';
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
this.dayString = '星 期 日';
|
this.dayString = '星 期 六';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,6 +287,9 @@ export default {
|
|||||||
let startOffset = 0;
|
let startOffset = 0;
|
||||||
const sectionMap = {};
|
const sectionMap = {};
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||||
|
const sectionModel = deepAssign({}, section);
|
||||||
|
sectionModel.lengthFact = Number(sectionModel.logicSectionCodeList.reduce((pre, code) => pre + Number(this.$store.getters['map/getDeviceByCode'](code).lengthFact), 0).toFixed(3));
|
||||||
|
models.push(sectionModel);
|
||||||
section.logicSectionCodeList.forEach(sectionCode => {
|
section.logicSectionCodeList.forEach(sectionCode => {
|
||||||
const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
||||||
sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection;
|
sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection;
|
||||||
|
@ -568,7 +568,7 @@ export default {
|
|||||||
}
|
}
|
||||||
const changeSectionList = this.handleOtherSectionChange(model);
|
const changeSectionList = this.handleOtherSectionChange(model);
|
||||||
const changeStandList = this.handleRelevanceStand(model);
|
const changeStandList = this.handleRelevanceStand(model);
|
||||||
models = [model, ...changeSectionList, ...changeStandList];
|
models = [...changeSectionList, ...changeStandList];
|
||||||
|
|
||||||
this.$emit('updateMapModel', models);
|
this.$emit('updateMapModel', models);
|
||||||
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
this.oldPoint = JSON.parse(JSON.stringify(model.points));
|
||||||
@ -593,7 +593,7 @@ export default {
|
|||||||
return models;
|
return models;
|
||||||
},
|
},
|
||||||
handleOtherSectionChange(model) { // 处理该区段改变导致的相关区段的变化
|
handleOtherSectionChange(model) { // 处理该区段改变导致的相关区段的变化
|
||||||
let models = [];
|
let models = [model];
|
||||||
const pointModel = [];
|
const pointModel = [];
|
||||||
const slope1 = (this.oldPoint[this.oldPoint.length - 1].y - this.oldPoint[0].y) / (this.oldPoint[this.oldPoint.length - 1].x - this.oldPoint[0].x);
|
const slope1 = (this.oldPoint[this.oldPoint.length - 1].y - this.oldPoint[0].y) / (this.oldPoint[this.oldPoint.length - 1].x - this.oldPoint[0].x);
|
||||||
this.sectionList.forEach(section => {
|
this.sectionList.forEach(section => {
|
||||||
@ -634,7 +634,7 @@ export default {
|
|||||||
return pre + Number(length);
|
return pre + Number(length);
|
||||||
}, 0);
|
}, 0);
|
||||||
lengthFact += model.lengthFact;
|
lengthFact += model.lengthFact;
|
||||||
copySection.lengthFact = lengthFact.toFixed(3); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
copySection.lengthFact = Number(lengthFact.toFixed(3)); // 自动获取 物理区段的 实际长度 是由逻辑区段相加
|
||||||
if (copySection.lengthFact > 5) {
|
if (copySection.lengthFact > 5) {
|
||||||
copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5;
|
copySection.leftStopPointOffset = copySection.leftStopPointOffset || 5;
|
||||||
copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5;
|
copySection.rightStopPointOffset = copySection.rightStopPointOffset || copySection.lengthFact - 5;
|
||||||
@ -670,17 +670,26 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (!model.parentCode) {
|
if (!model.parentCode) {
|
||||||
const arr = this.setLogicOffset(model);
|
const arr = this.setLogicOffset(model, models);
|
||||||
models = [...models, ...arr];
|
models = [...models, ...arr];
|
||||||
} else {
|
} else {
|
||||||
const sectionModel = this.$store.getters['map/getDeviceByCode'](model.parentCode);
|
const sectionModel = this.$store.getters['map/getDeviceByCode'](model.parentCode);
|
||||||
const arr = this.setLogicOffset(sectionModel);
|
const arr = this.setLogicOffset(sectionModel, models);
|
||||||
models = [...models, ...arr];
|
models = [...models, ...arr];
|
||||||
}
|
}
|
||||||
|
|
||||||
return models;
|
return models;
|
||||||
},
|
},
|
||||||
setLogicOffset(section) { // 构建逻辑区段偏移量
|
selectSectionCode(code, list) {
|
||||||
|
let model = list.find(ele => ele.code == code);
|
||||||
|
if (!model) {
|
||||||
|
model = this.$store.getters['map/getDeviceByCode'](code);
|
||||||
|
} else {
|
||||||
|
model.deepFlag = true;
|
||||||
|
}
|
||||||
|
return model;
|
||||||
|
},
|
||||||
|
setLogicOffset(section, list) { // 构建逻辑区段偏移量
|
||||||
const models = [];
|
const models = [];
|
||||||
// 正常情况下logicSectionCodeList下逻辑区段为从左向右
|
// 正常情况下logicSectionCodeList下逻辑区段为从左向右
|
||||||
let startPoint = section.points[0].x + 's' + section.points[0].y;
|
let startPoint = section.points[0].x + 's' + section.points[0].y;
|
||||||
@ -688,18 +697,18 @@ export default {
|
|||||||
const sectionMap = {};
|
const sectionMap = {};
|
||||||
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
if (section.logicSectionCodeList && section.logicSectionCodeList.length) {
|
||||||
section.logicSectionCodeList.forEach(sectionCode => {
|
section.logicSectionCodeList.forEach(sectionCode => {
|
||||||
const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode);
|
const logicSection = this.selectSectionCode(sectionCode, list);
|
||||||
sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection;
|
sectionMap[logicSection.points[0].x + 's' + logicSection.points[0].y] = logicSection;
|
||||||
});
|
});
|
||||||
while (sectionMap[startPoint]) {
|
while (sectionMap[startPoint]) {
|
||||||
const model = deepAssign({}, sectionMap[startPoint]);
|
const model = sectionMap[startPoint].deepFlag ? sectionMap[startPoint] : deepAssign({}, sectionMap[startPoint]);
|
||||||
if (!model.lengthFact) {
|
if (!model.lengthFact) {
|
||||||
const length = section.lengthFact / section.logicSectionCodeList.length;
|
const length = section.lengthFact / section.logicSectionCodeList.length;
|
||||||
model.lengthFact = length.toFixed(3);
|
model.lengthFact = length.toFixed(3);
|
||||||
}
|
}
|
||||||
model.logicSectionStartOffset = startOffset;
|
model.logicSectionStartOffset = startOffset;
|
||||||
model.logicSectionEndOffset = (model.lengthFact * 1000 + startOffset * 1000) / 1000;
|
model.logicSectionEndOffset = (model.lengthFact * 1000 + startOffset * 1000) / 1000;
|
||||||
models.push(model);
|
!sectionMap[startPoint].deepFlag && models.push(model);
|
||||||
startOffset = (startOffset * 1000 + model.lengthFact * 1000) / 1000;
|
startOffset = (startOffset * 1000 + model.lengthFact * 1000) / 1000;
|
||||||
startPoint = model.points[model.points.length - 1].x + 's' + model.points[model.points.length - 1].y;
|
startPoint = model.points[model.points.length - 1].x + 's' + model.points[model.points.length - 1].y;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user