This commit is contained in:
fan 2019-10-22 13:51:17 +08:00
commit 6d665acbb5
22 changed files with 865 additions and 640 deletions

View File

@ -107,11 +107,7 @@ export default {
}
},
domIdConfirm() {
if (this.operate && this.operate.operateCode) {
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
} else {
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
}
return this.dialogShow ? getDomIdByOperation(this.operate.operateNext) : '';
}
},
mounted() {
@ -135,29 +131,10 @@ export default {
this.$store.dispatch('training/emitTipFresh');
},
commit() {
const operate = {
send: this.operate.operateCode != null,
type: this.operate.type,
operation: this.operate.operateCode != null ? this.operate.operateCode : OperationEvent.Command.close.confirm.operation
};
if (this.operate.val) {
operate['val'] = this.operate.val;
}
if (this.passwordCheck === this.correctPassword) {
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$emit('checkOver');
this.$emit('checkOver', this.operate);
this.doClose();
this.inputClear();
}
}).catch(() => {
this.loading = false;
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
});
} else {
this.showMistake = true;
}

View File

@ -27,7 +27,7 @@
</el-col>
</el-row>
<confirm-control ref="confirmControl" />
<password-box ref="password" @checkOver="doClose" />
<password-box ref="password" @checkOver="passWordCommit" />
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
@ -79,10 +79,6 @@ export default {
return '信号封锁';
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
return '信号解封';
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
return '进路收人工控';
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
return '进路交自动控';
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
return '信号关灯';
}
@ -138,17 +134,26 @@ export default {
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
/** 信号解封*/
this.unlock();
} else if (this.operation == OperationEvent.Signal.humanControl.menu.operation) {
/** 进路收人工控*/
this.humanControl();
} else if (this.operation == OperationEvent.Signal.atsAutoControl.menu.operation) {
/** 进路交自动控*/
this.atsAutoControl();
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
/** 信号关灯*/
this.signalClose();
}
},
passWordCommit(data) {
const operate = {
send: true,
type: data.type,
operation: data.operateNext
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) { this.doClose(); }
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
cancelTrainRoute() {
if (this.$store.state.training.prdType == '01') {
@ -174,7 +179,6 @@ export default {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
@ -194,7 +198,6 @@ export default {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
@ -204,7 +207,7 @@ export default {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
operateCode: OperationEvent.Signal.humanTrainRoute.confirm.operation
operateNext: OperationEvent.Signal.humanTrainRoute.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -213,7 +216,6 @@ export default {
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
@ -233,7 +235,6 @@ export default {
this.doClose();
}
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
@ -243,7 +244,7 @@ export default {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.lock.menu.operation,
operateCode: OperationEvent.Signal.lock.confirm.operation
operateNext: OperationEvent.Signal.lock.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -259,7 +260,7 @@ export default {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.unlock.menu.operation,
operateCode: OperationEvent.Signal.unlock.confirm.operation
operateNext: OperationEvent.Signal.unlock.confirm.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -270,51 +271,6 @@ export default {
}).catch(() => {
});
},
//
humanControl() {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.humanControl.menu.operation,
operateCode: OperationEvent.Signal.humanControl.confirm.operation,
val: this.operateCode
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
},
//
atsAutoControl() {
const operate = {
// send: true,
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.atsAutoControl.menu.operation,
operateCode: OperationEvent.Signal.atsAutoControl.confirm.operation,
val: this.operateCode
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.password.doShow(operate);
}
}).catch(() => {
this.loading = false;
// this.doClose();
// this.$refs.noticeInfo.doShow(operate);
});
},
//
signalClose() {
const operate = {

View File

@ -45,7 +45,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="doClose" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog>
</template>
@ -149,6 +149,25 @@ export default {
this.$store.dispatch('training/emitTipFresh');
});
},
passWordCommit(data) {
const operate = {
send: true,
type: data.type,
operation: data.operateNext
};
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);
});
},
doClose() {
this.loading = false;
this.dialogShow = false;
@ -179,7 +198,7 @@ export default {
const operate = {
type: MapDeviceType.Signal.type,
operation: OperationEvent.Signal.guide.menu.operation,
operateCode: OperationEvent.Signal.guide.confirm.operation
operateNext: OperationEvent.Signal.guide.confirm.operation
};
this.loading = true;

View File

@ -27,7 +27,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="doClose" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog>
</template>
@ -129,6 +129,22 @@ export default {
this.fault();
}
},
passWordCommit(data) {
const operate = {
send: true,
type: data.type,
operation: data.operateNext
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
lock() {
const operate = {
@ -192,10 +208,9 @@ export default {
//
fault() {
const operate = {
// send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.fault.menu.operation,
operateCode: OperationEvent.Section.fault.confirm.operation
operateNext: OperationEvent.Section.fault.confirm.operation
};
this.loading = true;

View File

@ -31,7 +31,7 @@
</el-col>
</el-row>
<notice-info ref="noticeInfo" />
<password-box ref="passwordBox" @checkOver="doClose" />
<password-box ref="passwordBox" @checkOver="passWordCommit" />
</el-dialog>
</template>
@ -153,6 +153,22 @@ export default {
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation);
}
},
passWordCommit(data) {
const operate = {
send: true,
type: data.type,
operation: data.operateNext
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(() => {
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
//
lock() {
const operate = {
@ -311,11 +327,11 @@ export default {
});
},
//
openPasswordBox(operation, code) {
openPasswordBox(operation, operateNext) {
const operate = {
type: MapDeviceType.Switch.type,
operation: operation,
operateCode: code
operateNext: operateNext
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {

View File

@ -1,25 +1,20 @@
<template>
<el-dialog class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="580px"
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
v-dialogDrag>
<el-dialog v-dialogDrag class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item label="列车:" prop="trainCode">
<el-select v-model="trainCode" filterable placeholder="列车">
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
:value="item.code"></el-option>
<el-option
v-for="item in trainList"
:key="item.code"
:label="item.groupNumber"
:value="item.code"
/>
</el-select>
</el-form-item>
<!-- <el-form-item label="列车车次:" prop="tripNumber">
<el-select v-model="tripNumber" filterable placeholder="列车车次">
<el-option v-for="no in trainNoList" :key="no" :label="no" :value="no"></el-option>
</el-select>
<div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div>
</el-form-item> -->
<el-form-item label="列车方向:" prop="direction">
<el-select v-model="direction" filterable placeholder="列车方向">
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value">
</el-option>
<el-option v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
</el-select>
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数下行路线车次号选择基数)</div> -->
</el-form-item>
@ -31,18 +26,18 @@
</el-col>
</el-row>
</div>
<notice-info ref="noticeInfo"></notice-info>
<notice-info ref="noticeInfo" />
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishTrainList } from '@/api/jmap/map';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo'
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishTrainList } from '@/api/jmap/map';
import { mouseCancelState } from '../utils/menuItemStatus';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
export default {
name: 'RouteCreate',
components: {
NoticeInfo
@ -67,7 +62,7 @@
tripNumber: '',
direction: '',
selected: null
}
};
},
computed: {
...mapGetters('map', [
@ -89,22 +84,22 @@
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(map) {
if (Object.keys(map || {}).length) {
getPublishTrainList(map.skinCode).then(response => {
this.trainList = response.data;
}).catch(error => {
}).catch(() => {
this.$messageBox(`获取列车列表失败`);
})
});
}
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
console.log(this.map);
/** 加载列车数据*/
this.loadInitData(this.map);
@ -121,38 +116,38 @@
mouseCancelState(this.selected);
},
commit() {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Section.type,
operation: OperationEvent.Section.newtrain.menu.operation,
val: '' + this.direction + '::' + this.trainCode
}
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
this.loading = false;
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
this.$refs.noticeInfo.doShow(operate);
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Section.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.doClose();
});
}
}
}
};
</script>

View File

@ -1,38 +1,33 @@
<template>
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
<el-dialog v-dialogDrag class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div class="el-dialog-div">
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form" label-position="left">
<el-row>
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
<el-form-item>
<el-col :span="11">
<el-form-item prop="stationName">
<span slot="label">车站</span>
<el-input v-model="addModel.stationName" :disabled="true"></el-input>
<el-input v-model="addModel.stationName" :disabled="true" />
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item prop="trainWindowCode">
<span slot="label">车次窗</span>
<el-input v-model="addModel.trainWindowCode" :disabled="true"></el-input>
<el-input v-model="addModel.trainWindowCode" :disabled="true" />
</el-form-item>
</el-col>
</el-row>
</el-form-item>
<el-row>
<el-col :span="11">
<el-form-item label="旧车组号" prop="oldGroupNumber">
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber"
:value="train.oldGroupNumber">
</el-option>
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" :offset="1">
<el-form-item label="新车组号" prop="newGroupNumber">
<el-select v-model="addModel.newGroupNumber">
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber"
:value="train.newGroupNumber">
</el-option>
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
</el-select>
</el-form-item>
</el-col>
@ -51,12 +46,12 @@
</template>
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { getPublishTrainList } from '@/api/jmap/map';
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { mouseCancelState } from '../utils/menuItemStatus';
import { getPublishTrainList } from '@/api/jmap/map';
export default {
export default {
name: 'TrainEditNumber',
components: {
},
@ -66,20 +61,20 @@
trainList: [],
selected: null,
addModel: {
stationName:'',
stationName: '',
trainWindowCode: '',
oldGroupNumber:'',
newGroupNumber:'',
oldGroupNumber: '',
newGroupNumber: ''
},
rules: {
newGroupNumber: [
{ required: true, message: '请输入新车组号', trigger: 'blur'}
],
]
},
dialogShow: false,
loading: false,
}
loading: false
};
},
computed: {
...mapGetters('map', [
@ -95,34 +90,34 @@
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
},
title() {
return '修改车组号'
return '修改车组号';
}
},
mounted() {
this.$nextTick(() => {
this.$store.dispatch('training/tipReload');
})
});
},
methods: {
loadInitData(map) {
if (map) {
getPublishTrainList(map.skinCode).then(resp => {
this.trainList = resp.data;
}).catch(error => {
}).catch(() => {
this.$messageBox(`获取列车车组号失败`);
});
}
},
doShow(operate, selected) {
this.selected = selected;
//
//
if (!this.dialogShow) {
this.addModel ={
stationName:'',
stationName: '',
trainWindowCode: '',
oldGroupNumber:'',
newGroupNumber:'',
}
oldGroupNumber: '',
newGroupNumber: ''
};
}
this.dialogShow = true;
this.$nextTick(function () {
@ -139,11 +134,11 @@
commit() {
this.$refs['form'].validate((valid) => {
if (valid) {
let operate = {
const operate = {
send: true,
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainNo.menu.operation,
}
operation: OperationEvent.Train.editTrainNo.menu.operation
};
this.loading = true;
this.$store.dispatch('training/next', operate).then(({ valid }) => {
@ -151,30 +146,29 @@
if (valid) {
this.doClose();
}
}).catch(error => {
}).catch(() => {
this.loading = false;
this.doClose();
// this.$refs.noticeInfo.doShow(operate);
})
});
} else {
return false;
}
});
},
cancel() {
let operate = {
const operate = {
type: MapDeviceType.Train.type,
operation: OperationEvent.Command.cancel.menu.operation,
}
operation: OperationEvent.Command.cancel.menu.operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.doClose();
}
}).catch(error => { this.doClose(); });
}
}).catch(() => { this.doClose(); });
}
}
};
</script>
<style scoped>
.chengdou-03__systerm .el-dialog .base-label {

View File

@ -97,13 +97,13 @@
<center><b></b><b></b></center>
</span>
</button>
<button id="mbm_clear" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown('mbm_clear')">
<button :id="Command.cancel.clearMbm.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Command.cancel.clearMbm.operation)">
<span style="color: black">
<center><b></b></center>
<center><b></b></center>
</span>
</button>
<password-box ref="password" @checkOver="doClose" />
<password-box ref="password" @checkOver="passWordCommit" />
</div>
</template>
@ -146,6 +146,9 @@ export default {
MixinCommand() {
return OperationEvent.MixinCommand;
},
Command() {
return OperationEvent.Command;
},
isShowBtn() {
return this.$store.state.training.prdType == '01';
}
@ -165,8 +168,19 @@ export default {
this.resetPosition();
},
methods: {
doClose() {
passWordCommit(data) {
const operate = {
type: 'mbm',
operation: data.operateNext
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch(() => {
this.$refs.noticeInfo.doShow(operate);
});
},
resetPosition() {
this.$nextTick(() => {
@ -199,31 +213,50 @@ export default {
}
},
buttonDown(operation) {
if (operation != 'mbm_clear') {
if (operation != this.Command.cancel.clearMbm.operation) {
const operate = {
type: 'mbm',
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.operation = operation;
this.$store.dispatch('menuOperation/setButtonOperation', operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
if (operation == this.Signal.humanTrainRoute.button.operation) { //
operate['operateCode'] = this.Signal.humanTrainRoute.button.operation;
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
} else if (operation == this.Section.fault.button.operation) { //
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
} else if (operation == this.Switch.unlock.button.operation) { //
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
} else if (operation == this.MixinCommand.unblock.button.operation) { //
operate['operateNext'] = this.Command.close.password.operation;
this.$refs.password.doShow(operate);
}
this.$store.dispatch('training/emitTipFresh');
}
});
} else {
OperateHandler.cleanOperates(); //
const operate = {
type: 'mbm',
operation: operation
};
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/setButtonOperation', null);
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
OperateHandler.cleanOperates(); //
}
});
}
},
selectedChange() {
//
if (this.$store.state.menuOperation.buttonOperation) {
const model = this.$store.state.menuOperation.selected;
const model = this.$store.state.menuOperation.selected; //
if (model._type) {
const deviceType = MapDeviceType[model._type];
const modelData = deepAssign({}, model);
@ -240,7 +273,12 @@ export default {
if (valid) {
if (response) {
this.tempData = response.data;
// console.log(this.tempData, '');
}
if (this.operation == this.Signal.guide.button.operation) { //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
operate['operateNext'] = this.Command.close.password.operation;
this.operation = '0';
this.$refs.password.doShow(operate);
}
}
});

View File

@ -1,15 +1,5 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm train-control"
:title="title"
:visible.sync="show"
width="370px"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-dialog v-dialogDrag class="fuzhou-01__systerm train-control" :title="title" :visible.sync="show" width="370px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-form ref="form" size="small" label-width="120px" :model="formModel" :rules="rules">
<el-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
<el-select
@ -32,46 +22,59 @@
:id="domIdTrainType"
v-model="formModel.trainType"
style="margin-left: 15px;"
:disabled="trainTypeIsDisabled"
@change="trainTypeChange"
>
<el-radio :label="'01'">{{$t('menu.planTrain')}}</el-radio>
<el-radio :label="'02'">{{$t('menu.headCodeTrain')}}</el-radio>
<el-radio :label="'03'" style="margin-top:5px;">{{$t('menu.artificialTrain')}}</el-radio>
<el-radio :label="'01'">{{ $t('menu.planTrain') }}</el-radio>
<el-radio :label="'02'">{{ $t('menu.headCodeTrain') }}</el-radio>
<el-radio :label="'03'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item prop="serviceNumber">
<span slot="label">{{$t('menu.serviceNumber')}}</span>
<el-form-item v-if="formModel.trainType == '01'" prop="serviceNumber">
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
<el-input
:id="domIdServerNo"
v-model="formModel.serviceNumber"
:disabled="serverNoIsDisabled"
@change="serverNoChange"
/>
</el-form-item>
<el-form-item :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.tripNumber')+this.$t('global.colon')" prop="tripNumber">
<el-input
:id="domIdTrainNo"
v-model="formModel.tripNumber"
:disabled="trainNoIsDisabled"
@change="trainNoChange"
maxlength="4"
/>
</el-form-item>
<el-form-item :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="targetCode">
<el-form-item v-if="formModel.trainType == '01'" :label="this.$t('menu.targetCode')+this.$t('global.colon')" prop="targetCode">
<el-input
:id="domIdTargetCode"
v-model="formModel.targetCode"
:disabled="targetCodeIsDisabled"
@change="targetCodeChange"
/>
</el-form-item>
<el-form-item v-if="formModel.trainType == '03'" :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
<el-select
:id="domIdTrainNumber"
v-model="formModel.groupNumber"
filterable
:disabled="trainNumberIsDisabled"
@change="trainNumberChange"
>
<el-option
v-for="train in trainList"
:key="train.groupNumber"
:label="train.groupNumber"
:value="train.groupNumber"
/>
</el-select>
</el-form-item>
</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">{{$t('global.confirm')}}</el-button>
<el-button :id="domIdConfirm" type="primary" :loading="loading" :disabled="istargetCode" @click="commit">{{ $t('global.confirm') }}</el-button>
</el-col>
<el-col :span="8" :offset="4">
<el-button :id="domIdCancel" @click="cancel">{{$t('global.cancel')}}</el-button>
<el-button :id="domIdCancel" @click="cancel">{{ $t('global.cancel') }}</el-button>
</el-col>
</el-row>
<confirm-train ref="confirmTrain" />
@ -85,6 +88,7 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishTrainList } from '@/api/jmap/map';
import ConfirmTrain from './childDialog/confirmTrain';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
export default {
name: 'TrainControl',
@ -134,10 +138,10 @@ export default {
return false;
},
serverNoIsDisabled() {
return false;
return true;
},
targetCodeIsDisabled() {
return false;
return true;
},
trainNumberIsDisabled() {
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
@ -145,12 +149,12 @@ export default {
}
return '';
},
trainTypeIsDisabled() {
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;
},
@ -236,6 +240,19 @@ 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);
}
}
},
mounted() {
@ -262,10 +279,11 @@ export default {
this.formModel = {
groupNumber: model.groupNumber,
tripNumber: model.tripNumber,
trainType: '01',
serviceNumber: model.serviceNumber,
targetCode: model.targetCode
trainType: model.type,
serviceNumber: '',
targetCode: ''
};
debugger;
/** 加载列车数据*/
this.loadInitData(this.map);
@ -318,27 +336,9 @@ export default {
}
});
},
serverNoChange(serviceNumber) {
const operate = {
type: MapDeviceType.Train.type,
val: `${serviceNumber}`,
operation: ''
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.serverNoChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.serverNoChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
trainNoChange(tripNumber) {
const operate = {
send: true,
type: MapDeviceType.Train.type,
val: `${tripNumber}`,
operation: ''
@ -349,28 +349,17 @@ export default {
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
},
targetCodeChange(targetCode) {
const operate = {
type: MapDeviceType.Train.type,
val: `${targetCode}`,
operation: ''
OperateHandler.backStep(1);
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
console.log(valid, response, 111);
if (valid && response.data) {
this.formModel = {
groupNumber: this.formModel.groupNumber,
tripNumber: tripNumber,
trainType: '01',
serviceNumber: response.data.serviceNumber,
targetCode: response.data.tripNumber
};
if (this.operation == OperationEvent.Train.addTrainId.menu.operation) {
operate.operation = OperationEvent.Train.addTrainId.targetCodeChange.operation;
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
operate.operation = OperationEvent.Train.editTrainId.targetCodeChange.operation;
}
this.$store.dispatch('training/next', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
});
@ -424,7 +413,7 @@ export default {
type: MapDeviceType.Train.type,
operation: OperationEvent.Train.editTrainId.menu.operation,
messages: [this.$t('tip.editTrainIdTip')],
val: this.formModel.tripNumber
val: `01::${this.formModel.tripNumber}`
};
this.loading = true;

View File

@ -1,16 +1,5 @@
<template>
<el-dialog
v-dialogDrag
class="fuzhou-01__systerm route-create"
:title="title"
:visible.sync="show"
width="580px"
label-position="top"
:before-close="doClose"
:z-index="2000"
:modal="false"
:close-on-click-modal="false"
>
<el-dialog v-dialogDrag class="fuzhou-01__systerm route-create" :title="title" :visible.sync="show" width="380px" label-position="top" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<div style="padding: 10px 20px; border: 1px solid lightgray;">
<el-form size="small" label-width="100px">
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
@ -50,7 +39,7 @@
<script>
import { mapGetters } from 'vuex';
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
import { getPublishTrainList } from '@/api/jmap/map';
// import { getPublishTrainList } from '@/api/jmap/map';
import NoticeInfo from './childDialog/childDialog/noticeInfo';
export default {
@ -104,18 +93,16 @@ export default {
},
methods: {
loadInitData(map) {
if (Object.keys(map || {}).length) {
getPublishTrainList(map.skinCode).then(response => {
this.trainList = response.data;
}).catch(() => {
if (map.trainList.length) {
this.trainList = map.trainList;
} else {
this.$messageBox(this.$t('error.getTrainListFailed'));
});
}
},
doShow(operate, selected) {
this.dialogShow = true;
this.selected = selected;
console.log(this.map, 111);
/** 加载列车数据*/
this.loadInitData(this.map);

View File

@ -139,6 +139,10 @@ export const OperationEvent = {
menu: {
operation: '000',
domId: '_Tips-Cancel-Menu'
},
clearMbm: {
operation: '00012',
domId: '_Tips-mbm_clear{TOP}'
}
},
// 关闭对话框
@ -1094,7 +1098,7 @@ export const OperationEvent = {
event: '2',
button: {
operation: '4020',
domId: '_Tips-Section-Fault-Mbm'
domId: '_Tips-Section-Fault-Mbm{TOP}'
},
menu: {
operation: '402',
@ -1868,7 +1872,7 @@ export const OperationEvent = {
},
// 修改列车识别号
editTrainId: {
event: '2',
event: { query: '9', confirm: '2' },
menu: {
operation: '702',
domId: '_Tips-Train-EditTrainId-Menu'

View File

@ -87,7 +87,7 @@ Vue.prototype.$convertSpecifiedField = function(dataDict, enumList, key, value,
});
});
}
},
};
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
if (FromList) {

View File

@ -6,8 +6,10 @@
// {id: "5", trainingType: "02", name: "信号机名称"}
// {id: "6", trainingType: "02", name: "信号机编号"}
// {id: "7", trainingType: "03", name: "道岔名称"}
// {id: "17", trainingType: "03", name: "道岔编码"}
// {id: "8", trainingType: "04", name: "物理区段名称"}
// {id: "9", trainingType: "04", name: "逻辑区段名称"}
// {id: "18", trainingType: "04", name: "逻辑区段编码"}
// {id: "10", trainingType: "05", name: "车站名称"}
// {id: "11", trainingType: "05", name: "站台行驶方向编号"}
// {id: "12", trainingType: "05", name: "站台行驶方向"}
@ -1296,6 +1298,21 @@ export const OperationList = {
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0201',
skinCode: '04',
trainingName: '办理进路({3} 进路)',
trainingRemark: '办理进路功能',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'mbm', orderNum: 1, operateCode: '3010', tip: '鼠标左键点击【排列进路】' },
{ deviceType: '04', orderNum: 2, operateCode: '3010', tip: '鼠标左键点击【{5}】', val: '{6}' },
{ deviceType: '04', orderNum: 3, operateCode: '3010', tip: '鼠标左键点击【{5}】', val: '{6}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1311,6 +1328,22 @@ export const OperationList = {
{ deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' }
]
},
// {
// maxDuration: 15,
// minDuration: 8,
// operateType: '0207',
// skinCode: '04',
// trainingName: '引导进路({3})',
// trainingRemark: '进路办理信号引导',
// trainingType: '02',
// productTypes: ['01'],
// stepVOList: [
// { deviceType: 'mbm', orderNum: 1, operateCode: '3080', tip: '鼠标左键点击【引导进路】' },
// { deviceType: '04', orderNum: 2, operateCode: '3080', tip: '鼠标左键点击【{5}】', val: '{6}' }, // 进路编号值不正确
// { deviceType: 'mbm', orderNum: 3, operateCode: '0011', tip: '输入密码123456点击【确定】按钮' },
// { deviceType: '04', orderNum: 4, operateCode: '3080', tip: '鼠标左键点击【{5}】', val: '{6}' }
// ]
// },
{
maxDuration: 15,
minDuration: 8,
@ -1325,6 +1358,20 @@ export const OperationList = {
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0202',
skinCode: '04',
trainingName: '总取消({3} 进路)',
trainingRemark: '总取消功能',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'mbm', orderNum: 1, operateCode: '3030', tip: '鼠标左键点击【总取消】' },
{ deviceType: '04', orderNum: 2, operateCode: '3030', tip: '鼠标左键点击【{5}】按钮', val: '{6}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1340,6 +1387,21 @@ export const OperationList = {
{ deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0215', // 新增数据字典code
skinCode: '04',
trainingName: '总人解({3})',
trainingRemark: '总人解',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'mbm', orderNum: 1, operateCode: '3050', tip: '鼠标左键点击【总人解】' },
{ deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456点击【确定】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '3050', tip: '鼠标左键点击【{5}】', val: '{6}' }
]
},
{
maxDuration: 8,
minDuration: 5,
@ -1369,6 +1431,20 @@ export const OperationList = {
{ deviceType: '04', orderNum: 3, operateCode: '3061', tip: '输入密码123456点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0203',
skinCode: '04',
trainingName: '信号封锁({5})',
trainingRemark: '信号封锁功能',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'mbm', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' },
{ deviceType: '04', orderNum: 1, operateCode: '2991', tip: '鼠标左键点击【{5}】', val: '{6}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1384,6 +1460,21 @@ export const OperationList = {
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: '输入密码123456点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0204',
skinCode: '04',
trainingName: '信号解封({5})',
trainingRemark: '信号解封功能',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'mbm', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' },
{ deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456点击【确认】按钮' },
{ deviceType: '04', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{5}】', val: '{6}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1399,6 +1490,20 @@ export const OperationList = {
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0208',
skinCode: '04',
trainingName: '人工控({5})',
trainingRemark: '人工控',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'mbm', orderNum: 1, operateCode: '3140', tip: '鼠标左键点击【人工控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3140', tip: '鼠标左键点击【{3}】', val: '{4}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1414,6 +1519,20 @@ export const OperationList = {
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0209',
skinCode: '04',
trainingName: '自动控({5})',
trainingRemark: '自动控',
trainingType: '02',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'mbm', orderNum: 1, operateCode: '3150', tip: '鼠标左键点击【自动控】' },
{ deviceType: '04', orderNum: 2, operateCode: '3150', tip: '鼠标左键点击【{3}】', val: '{4}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1432,7 +1551,7 @@ export const OperationList = {
{
maxDuration: 15,
minDuration: 8,
operateType: '0305', // 0312 新增定位字典
operateType: '0312', // 0312 新增定位字典
skinCode: '04',
trainingName: '单操到定位({7})',
trainingRemark: '单操到定位({15})',
@ -1446,7 +1565,21 @@ export const OperationList = {
{
maxDuration: 15,
minDuration: 8,
operateType: '0305', // 0313 新增定位字典
operateType: '0313',
skinCode: '04',
trainingName: '单操到定位({7})',
trainingRemark: '单操到定位({7})',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1010', tip: '鼠标左键菜单选择【道岔定操】' },
{ deviceType: '02', orderNum: 2, operateCode: '1010', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0313', // 0313 新增定位字典
skinCode: '04',
trainingName: '单操到反位({7})',
trainingRemark: '单操到反位({7})',
@ -1457,6 +1590,20 @@ export const OperationList = {
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0313',
skinCode: '04',
trainingName: '单操到反位({7})',
trainingRemark: '单操到反位({7})',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1020', tip: '鼠标左键菜单选择【道岔反操】' },
{ deviceType: '02', orderNum: 2, operateCode: '1020', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1479,10 +1626,10 @@ export const OperationList = {
trainingName: '道岔单锁({7})',
trainingRemark: '道岔单锁功能',
trainingType: '03',
productTypes: ['01'],
productTypes: ['01'], // 现地操作
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', val: '{8}' }
{ deviceType: '02', orderNum: 2, operateCode: '1030', tip: '鼠标左键点击【{{7}}】', val: '{17}' }
]
},
{
@ -1499,6 +1646,21 @@ export const OperationList = {
{ deviceType: '02', orderNum: 5, operateCode: '104', tip: '鼠标左键点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
skinCode: '04',
trainingName: '道岔解锁({7})',
trainingRemark: '道岔解锁功能',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '1040', tip: '鼠标左键菜单选择【道岔解锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123456点击【确认】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '1040', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1514,6 +1676,20 @@ export const OperationList = {
{ deviceType: '02', orderNum: 3, operateCode: '1051', tip: '输入密码123456点击【确定】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
skinCode: '04',
trainingName: '道岔封锁({7})',
trainingRemark: '道岔封锁功能',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '2991', tip: '鼠标左键菜单选择【封锁】' },
{ deviceType: '02', orderNum: 2, operateCode: '2991', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
]
},
{
maxDuration: 15,
minDuration: 8,
@ -1529,6 +1705,21 @@ export const OperationList = {
{ deviceType: '02', orderNum: 3, operateCode: '1062', tip: '输入密码123456点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0305',
skinCode: '04',
trainingName: '道岔解封({7})',
trainingRemark: '道岔解封功能',
trainingType: '03',
productTypes: ['01'],
stepVOList: [
{ deviceType: '02', orderNum: 1, operateCode: '2992', tip: '鼠标左键菜单选择【解封】' },
{ deviceType: '02', orderNum: 2, operateCode: '0011', tip: '输入密码123456点击【确认】按钮' },
{ deviceType: '02', orderNum: 3, operateCode: '2992', tip: '鼠标左键点击【{7}】按钮', val: '{17}' }
]
},
{
maxDuration: 20,
minDuration: 10,
@ -1560,6 +1751,22 @@ export const OperationList = {
{ deviceType: '03', orderNum: 3, operateCode: '4023', tip: '输入密码123456点击【确认】按钮' }
]
},
{
maxDuration: 15,
minDuration: 8,
operateType: '0401',
skinCode: '04',
trainingName: '区故解({9})',
trainingRemark: '故障解锁功能',
trainingType: '04',
productTypes: ['01'],
stepVOList: [
{ deviceType: 'mbm', orderNum: 1, operateCode: '4020', tip: '鼠标右键菜单选择【区故解】' },
{ deviceType: 'mbm', orderNum: 2, operateCode: '0011', tip: '输入密码123456点击【确认】按钮' },
{ deviceType: '03', orderNum: 3, operateCode: '4020', tip: '鼠标左键点击【{9}】', val: '{18}' },
{ deviceType: 'mbm', orderNum: 4, operateCode: '00012', tip: '鼠标左键点击【清除】' }
]
},
{
maxDuration: 15, // 自动生成实训失败
minDuration: 8,

View File

@ -407,7 +407,7 @@ function handleButtonFault(operates) {
return {
type: operate.type,
code: operate.code,
over: true,
// over: true,
operation: SectionOperation.fault.event
};
}

View File

@ -105,22 +105,19 @@ export default {
function handleButtonArrangementRoute(operates) {
if (operates.length === 2) {
const operate = operates[1];
if (operate.type === SignalType && operate.code &&
operate.model && operate.model._viewVal) {
if (operate.type == SignalType && operate.code) {
return {
type: operate.type,
code: operate.code,
operation: SignalOperation.arrangementRoute.event.query,
val: operate.model._viewVal
operation: SignalOperation.arrangementRoute.event.query
// val: operate.model._viewVal
};
}
return { error: true };
} else if (operates.length >= 3) {
const operateBeg = operates[1];
const operateEnd = operates[operates.length - 1];
if (operateEnd.type === SignalType && operateEnd.code &&
operateEnd.model && operateBeg.val === operateEnd.model._viewVal &&
operateEnd.tempData && operateEnd.tempData.length) {
const operateBeg = operates[1]; // 起始信号灯
const operateEnd = operates[operates.length - 1]; // 终端信号灯
if (operateEnd.type == SignalType && operateEnd.code && operateEnd.tempData && operateEnd.tempData.length) {
for (let i = 0; i < operateEnd.tempData.length; i++) {
const elem = operateEnd.tempData[i];
if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) {
@ -128,8 +125,8 @@ function handleButtonArrangementRoute(operates) {
type: operateEnd.type,
code: operateEnd.code,
over: true,
operation: SignalOperation.arrangementRoute.event.confirm,
val: elem.code
operation: SignalOperation.arrangementRoute.event.confirm
// val: elem.code
};
}
}
@ -139,6 +136,38 @@ function handleButtonArrangementRoute(operates) {
return null;
}
/**
* 处理右键菜单 排列进路 操作
* @param {*} operates
*/
function handleMenuArrangementRoute(operates) {
if (operates.length == 1) {
const operate = operates[0];
if (operate.type === SignalType && operate.code) {
return {
type: operate.type,
code: operate.code,
operation: SignalOperation.arrangementRoute.event.query
};
}
return { error: true };
} else if (operates.length >= 3) {
const operate = operates[operates.length - 1];
if (operate.type === SignalType && operates[0].code && (operates[operates.length - 2].val || operates[operates.length - 3].val)) {
return {
over: true,
type: operate.type,
code: operates[0].code,
operation: SignalOperation.arrangementRoute.event.confirm,
val: operates[operates.length - 2].val || operates[operates.length - 3].val
};
}
return { error: true };
}
return null;
}
/**
* 处理点击按钮 取消进路 操作
* @param {*} operates
@ -184,6 +213,7 @@ function handleButtonReopenSignal(operates) {
* @param {*} operates
*/
function handleButtonHumanTrainRoute(operates) {
debugger;
if (operates.length >= 2) {
const operate = operates[operates.length - 1];
if (operate.type === SignalType && operate.code) {
@ -245,38 +275,6 @@ function handleMenuStoppage(operates) {
return null;
}
/**
* 处理右键菜单 排列进路 操作
* @param {*} operates
*/
function handleMenuArrangementRoute(operates) {
if (operates.length == 1) {
const operate = operates[0];
if (operate.type === SignalType && operate.code) {
return {
type: operate.type,
code: operate.code,
operation: SignalOperation.arrangementRoute.event.query
};
}
return { error: true };
} else if (operates.length >= 3) {
const operate = operates[operates.length - 1];
if (operate.type === SignalType && operates[0].code && (operates[operates.length - 2].val || operates[operates.length - 3].val)) {
return {
over: true,
type: operate.type,
code: operates[0].code,
operation: SignalOperation.arrangementRoute.event.confirm,
val: operates[operates.length - 2].val || operates[operates.length - 3].val
};
}
return { error: true };
}
return null;
}
/**
* 处理右键菜单 取消进路 操作
* @param {*} operates
@ -661,16 +659,32 @@ function handleButtonSetAutoInterlock(operates) {
* @param {*} operates
*/
function handleButtonGuideRoute(operates) {
if (operates.length >= 2) {
if (operates.length == 2) {
const operate = operates[operates.length - 1];
if (operate.type === SignalType && operate.code) {
return {
type: operate.type,
code: operate.code,
operation: SignalOperation.guide.event.confirm
};
}
return { error: true };
} else if (operates.length >= 3) {
const operateBeg = operates[1];
const operateEnd = operates[operates.length - 1];
if (operateEnd.type === SignalType && operateEnd.code && operateEnd.tempData && operateEnd.tempData.length) {
for (let i = 0; i < operateEnd.tempData.length; i++) {
const elem = operateEnd.tempData[i];
if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) {
return {
type: operateEnd.type,
code: operateEnd.code,
over: true,
operation: SignalOperation.guide.event.confirm
};
}
}
}
return { error: true };
}
return null;

View File

@ -114,14 +114,25 @@ function handleMenuAddTrainId(operates) {
* @param {*} operates
*/
function handleMenuEditTrainId(operates) {
if (operates.length >= 1) {
if (operates.length == 2) {
const operate = operates[operates.length - 1];
if (operate.type === TrainType && operate.val) {
return {
type: operate.type,
code: operates[0].code,
operation: TrainOperation.editTrainId.event.query,
val: operate.val
};
}
return { error: true };
} else if (operates.length > 2) {
const operate = operates[operates.length - 1];
if (operate.type === TrainType && operate.val) {
return {
type: operate.type,
code: operates[0].code,
over: true,
operation: TrainOperation.editTrainId.event,
operation: TrainOperation.editTrainId.event.confirm,
val: operate.val
};
}

View File

@ -14,6 +14,10 @@ OperateHandler.prototype = {
/** 操作组 */
operates: [],
backStep: function(num) {
this.operates = this.operates.slice(0, num);
},
/** 清空操作组 */
cleanOperates: function () {
this.operates.splice(0, this.operates.length);

View File

@ -4,8 +4,8 @@ export function getBaseUrl() {
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://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.5:9000'; // 袁琪
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
} else {
BASE_API = process.env.VUE_APP_BASE_API;

View File

@ -83,7 +83,7 @@ import { loadMapData, loadMapDataById } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus';
import Vue from 'vue';
import { UrlConfig } from '@/router/index';
import {loadDraftScript} from '@/api/designPlatform'
import {loadDraftScript} from '@/api/designPlatform';
//
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
@ -141,8 +141,8 @@ export default {
'04': '02', // =>
'05': '' // => null
},
isDrive:this.prdType == '04',
isShowScheduling:this.prdType == '05'
isDrive: this.prdType == '04',
isShowScheduling: this.prdType == '05'
};
},
computed: {
@ -151,8 +151,7 @@ export default {
'canvasHeight'
]),
...mapGetters('map', [
'map',
'mapDeviceStatus'
'map'
]),
...mapGetters('training', [
'offsetStationCode'
@ -202,7 +201,7 @@ export default {
},
isPlan() {
return this.mode === 'plan';
},
}
// isDrive() {
// return this.prdType == '04';
// },
@ -226,7 +225,7 @@ export default {
}
},
'$store.state.training.prdType':function(val){
'$store.state.training.prdType': function(val) {
// this.prdType=val;
this.isDrive=(val == '04');
this.isShowScheduling=(val == '05');
@ -479,30 +478,30 @@ export default {
async runQuestLoadShow() {
this.$refs.addQuest.doShow();
},
async runAddRolesLoadShow(){
async runAddRolesLoadShow() {
// this.$refs.addQuest.doShow();
let row={id:this.$route.query.scriptId}
const row={id: this.$route.query.scriptId};
this.$refs.addQuest.handleLoad(1, row);
},
//
async selectQuest(row, id,mapLocation,roleName) {
async selectQuest(row, id, mapLocation, roleName) {
try {
let prdType="";
switch(roleName){
case 'Attendant':{
prdType="01";
let prdType='';
switch (roleName) {
case 'Attendant': {
prdType='01';
break;
}
case 'Dispatcher':{
prdType="02";
case 'Dispatcher': {
prdType='02';
break;
}
case 'Driver':{
prdType="04";
case 'Driver': {
prdType='04';
break;
}
case 'Repair':{
prdType="";
case 'Repair': {
prdType='';
break;
}
}
@ -510,7 +509,7 @@ export default {
const res = await loadDraftScript(row.id, id, this.group);
if (res && res.code == 200) {
this.questId = parseInt(row.id);
if(mapLocation){
if (mapLocation) {
const newMapLocation={'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
Vue.prototype.$jlmap.setOptions(newMapLocation);
}

View File

@ -19,16 +19,16 @@
@node-click="clickEvent"
>
<div slot-scope="{ node: nodeScop }">
<span v-if="nodeScop.data.type == 'skin'" class="el-icon-news"></span>
<span v-else-if="nodeScop.data.type == 'prd'" class="el-icon-tickets"></span>
<span v-if="nodeScop.data.type == 'skin'" class="el-icon-news" />
<span v-else-if="nodeScop.data.type == 'prd'" class="el-icon-tickets" />
<span
v-else-if="nodeScop.data.type == 'trainingType'"
class="el-icon-document"
></span>
/>
<span
v-else-if="nodeScop.data.type == 'training'"
class="el-icon-edit-outline"
></span>
/>
<span>&nbsp;{{ nodeScop.label }}</span>
</div>
</el-tree>

View File

@ -95,23 +95,23 @@ export default {
computed: {
title() {
if (this.node && this.node.data) {
if (this.node.data.type === 'skin') {
if (this.node.data.type === 'Skin') {
return this.$t('map.createProductCategories');
} else if (this.node.data.type === 'prd' ||
this.node.data.type === 'prd') {
} else if (this.node.data.type === 'Prd' ||
this.node.data.type === 'Prd') {
return this.$t('map.editTraining');
}
}
return this.$t('map.selectOperation');
},
isCreate() {
return this.node && this.node.data.type === 'skin';
return this.node && this.node.data.type === 'Skin';
},
isUpdate() {
return this.node && this.node.data.type === 'prd';
return this.node && this.node.data.type === 'Prd';
},
isDelete() {
return this.node && this.node.data.type === 'prd';
return this.node && this.node.data.type === 'Prd';
},
isShowTrainTypes() {
return this.addModel.prdType != '03' && this.addModel.prdType != '04';

View File

@ -17,10 +17,10 @@
@node-click="clickEvent"
>
<span slot-scope="{ node }">
<span v-if="node.data.type == 'skin'" class="el-icon-news"></span>
<span v-if="node.data.type == 'prd'" class="el-icon-tickets"></span>
<span v-if="node.data.type == 'trainingType'" class="el-icon-document"></span>
<span v-if="node.data.type == 'trainingType'" class="el-icon-edit"></span>
<span v-if="node.data.type == 'skin'" class="el-icon-news" />
<span v-if="node.data.type == 'prd'" class="el-icon-tickets" />
<span v-if="node.data.type == 'trainingType'" class="el-icon-document" />
<span v-if="node.data.type == 'trainingType'" class="el-icon-edit" />
<span>&nbsp;{{ node.label }}</span>
</span>
</el-tree>