Merge branch 'dev' of https://git.cloud.tencent.com/joylink/jl-nclient into dev
This commit is contained in:
commit
6d665acbb5
@ -107,11 +107,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
if (this.operate && this.operate.operateCode) {
|
return this.dialogShow ? getDomIdByOperation(this.operate.operateNext) : '';
|
||||||
return this.dialogShow ? getDomIdByOperation(this.operate.operateCode) : '';
|
|
||||||
} else {
|
|
||||||
return this.dialogShow ? OperationEvent.Command.close.confirm.domId : '';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -135,29 +131,10 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
commit() {
|
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) {
|
if (this.passwordCheck === this.correctPassword) {
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$emit('checkOver', this.operate);
|
||||||
this.loading = false;
|
|
||||||
|
|
||||||
if (valid) {
|
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
|
||||||
this.$emit('checkOver');
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.inputClear();
|
this.inputClear();
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false;
|
|
||||||
this.$refs.noticeInfo && this.$refs.noticeInfo.doShow(operate);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
this.showMistake = true;
|
this.showMistake = true;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-control ref="confirmControl" />
|
<confirm-control ref="confirmControl" />
|
||||||
<password-box ref="password" @checkOver="doClose" />
|
<password-box ref="password" @checkOver="passWordCommit" />
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -79,10 +79,6 @@ export default {
|
|||||||
return '信号封锁';
|
return '信号封锁';
|
||||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
return '信号解封';
|
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) {
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
return '信号关灯';
|
return '信号关灯';
|
||||||
}
|
}
|
||||||
@ -138,17 +134,26 @@ export default {
|
|||||||
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
} else if (this.operation == OperationEvent.Signal.unlock.menu.operation) {
|
||||||
/** 信号解封*/
|
/** 信号解封*/
|
||||||
this.unlock();
|
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) {
|
} else if (this.operation == OperationEvent.Signal.signalClose.menu.operation) {
|
||||||
/** 信号关灯*/
|
/** 信号关灯*/
|
||||||
this.signalClose();
|
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() {
|
cancelTrainRoute() {
|
||||||
if (this.$store.state.training.prdType == '01') {
|
if (this.$store.state.training.prdType == '01') {
|
||||||
@ -174,7 +179,6 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -194,7 +198,6 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -204,7 +207,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.humanTrainRoute.menu.operation,
|
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 }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -213,7 +216,6 @@ export default {
|
|||||||
this.$refs.password.doShow(operate);
|
this.$refs.password.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -233,7 +235,6 @@ export default {
|
|||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
@ -243,7 +244,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.lock.menu.operation,
|
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 }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -259,7 +260,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.unlock.menu.operation,
|
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 }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -270,51 +271,6 @@ export default {
|
|||||||
}).catch(() => {
|
}).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() {
|
signalClose() {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -149,6 +149,25 @@ export default {
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
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() {
|
doClose() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
@ -179,7 +198,7 @@ export default {
|
|||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Signal.type,
|
type: MapDeviceType.Signal.type,
|
||||||
operation: OperationEvent.Signal.guide.menu.operation,
|
operation: OperationEvent.Signal.guide.menu.operation,
|
||||||
operateCode: OperationEvent.Signal.guide.confirm.operation
|
operateNext: OperationEvent.Signal.guide.confirm.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -129,6 +129,22 @@ export default {
|
|||||||
this.fault();
|
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() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -192,10 +208,9 @@ export default {
|
|||||||
// 区故解
|
// 区故解
|
||||||
fault() {
|
fault() {
|
||||||
const operate = {
|
const operate = {
|
||||||
// send: true,
|
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.fault.menu.operation,
|
operation: OperationEvent.Section.fault.menu.operation,
|
||||||
operateCode: OperationEvent.Section.fault.confirm.operation
|
operateNext: OperationEvent.Section.fault.confirm.operation
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo" />
|
<notice-info ref="noticeInfo" />
|
||||||
<password-box ref="passwordBox" @checkOver="doClose" />
|
<password-box ref="passwordBox" @checkOver="passWordCommit" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -153,6 +153,22 @@ export default {
|
|||||||
this.openPasswordBox(this.operation, OperationEvent.Switch.fault.confirm.operation);
|
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() {
|
lock() {
|
||||||
const operate = {
|
const operate = {
|
||||||
@ -311,11 +327,11 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 打开密码输入框
|
// 打开密码输入框
|
||||||
openPasswordBox(operation, code) {
|
openPasswordBox(operation, operateNext) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Switch.type,
|
type: MapDeviceType.Switch.type,
|
||||||
operation: operation,
|
operation: operation,
|
||||||
operateCode: code
|
operateNext: operateNext
|
||||||
};
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
|
@ -1,25 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm route-create" :title="title" :visible.sync="show" width="580px"
|
<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">
|
||||||
label-position="top" :before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false"
|
|
||||||
v-dialogDrag>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item label="列车:" prop="trainCode">
|
<el-form-item label="列车:" prop="trainCode">
|
||||||
<el-select v-model="trainCode" filterable placeholder="列车">
|
<el-select v-model="trainCode" filterable placeholder="列车">
|
||||||
<el-option v-for="item in trainList" :key="item.code" :label="item.groupNumber"
|
<el-option
|
||||||
:value="item.code"></el-option>
|
v-for="item in trainList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.groupNumber"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-form-item label="列车方向:" prop="direction">
|
||||||
<el-select v-model="direction" filterable placeholder="列车方向">
|
<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 v-for="no in directionList" :key="no.value" :label="no.label" :value="no.value" />
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
<!-- <div style="font-size: 12px;">(上行路线车次号选择偶数,下行路线车次号选择基数)</div> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -31,18 +26,18 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RouteCreate',
|
name: 'RouteCreate',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
@ -67,7 +62,7 @@
|
|||||||
tripNumber: '',
|
tripNumber: '',
|
||||||
direction: '',
|
direction: '',
|
||||||
selected: null
|
selected: null
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -89,22 +84,22 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
if (Object.keys(map || {}).length) {
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
getPublishTrainList(map.skinCode).then(response => {
|
||||||
this.trainList = response.data;
|
this.trainList = response.data;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(`获取列车列表失败`);
|
this.$messageBox(`获取列车列表失败`);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
console.log(this.map);
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.loadInitData(this.map);
|
this.loadInitData(this.map);
|
||||||
|
|
||||||
@ -121,38 +116,38 @@
|
|||||||
mouseCancelState(this.selected);
|
mouseCancelState(this.selected);
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Section.newtrain.menu.operation,
|
operation: OperationEvent.Section.newtrain.menu.operation,
|
||||||
val: '' + this.direction + '::' + this.trainCode
|
val: '' + this.direction + '::' + this.trainCode
|
||||||
}
|
};
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Section.type,
|
type: MapDeviceType.Section.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,38 +1,33 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="chengdou-03__systerm stand-stop-time" :title="title" :visible.sync="show" width="480px"
|
<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">
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
|
||||||
<div class="el-dialog-div">
|
<div class="el-dialog-div">
|
||||||
<el-form size="small" label-width="80px" :model="addModel" :rules="rules" ref="form" label-position="left">
|
<el-form ref="form" size="small" label-width="80px" :model="addModel" :rules="rules" label-position="left">
|
||||||
<el-row>
|
<el-form-item>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item prop="stationName">
|
<el-form-item prop="stationName">
|
||||||
<span slot="label">车站</span>
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item prop="trainWindowCode">
|
<el-form-item prop="trainWindowCode">
|
||||||
<span slot="label">车次窗</span>
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-form-item>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
<el-form-item label="旧车组号" prop="oldGroupNumber">
|
||||||
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
<el-select v-model="addModel.oldGroupNumber" filterable disabled>
|
||||||
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber"
|
<el-option v-for="train in trainList" :key="train.oldGroupNumber" :label="train.oldGroupNumber" :value="train.oldGroupNumber" />
|
||||||
:value="train.oldGroupNumber">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="11" :offset="1">
|
<el-col :span="11" :offset="1">
|
||||||
<el-form-item label="新车组号" prop="newGroupNumber">
|
<el-form-item label="新车组号" prop="newGroupNumber">
|
||||||
<el-select v-model="addModel.newGroupNumber">
|
<el-select v-model="addModel.newGroupNumber">
|
||||||
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber"
|
<el-option v-for="train in trainList" :key="train.newGroupNumber" :label="train.newGroupNumber" :value="train.newGroupNumber" />
|
||||||
:value="train.newGroupNumber">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -51,12 +46,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { mouseCancelState } from '../utils/menuItemStatus';
|
import { mouseCancelState } from '../utils/menuItemStatus';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainEditNumber',
|
name: 'TrainEditNumber',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -66,20 +61,20 @@
|
|||||||
trainList: [],
|
trainList: [],
|
||||||
selected: null,
|
selected: null,
|
||||||
addModel: {
|
addModel: {
|
||||||
stationName:'',
|
stationName: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
oldGroupNumber:'',
|
oldGroupNumber: '',
|
||||||
newGroupNumber:'',
|
newGroupNumber: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
newGroupNumber: [
|
newGroupNumber: [
|
||||||
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
{ required: true, message: '请输入新车组号', trigger: 'blur'}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
loading: false,
|
loading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
@ -95,34 +90,34 @@
|
|||||||
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Train.editTrainNo.menu.domId : '';
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '修改车组号'
|
return '修改车组号';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (map) {
|
if (map) {
|
||||||
getPublishTrainList(map.skinCode).then(resp => {
|
getPublishTrainList(map.skinCode).then(resp => {
|
||||||
this.trainList = resp.data;
|
this.trainList = resp.data;
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(`获取列车车组号失败`);
|
this.$messageBox(`获取列车车组号失败`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
//如果不是断点激活,则需要对初始值进行初始化
|
// 如果不是断点激活,则需要对初始值进行初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.addModel ={
|
this.addModel ={
|
||||||
stationName:'',
|
stationName: '',
|
||||||
trainWindowCode: '',
|
trainWindowCode: '',
|
||||||
oldGroupNumber:'',
|
oldGroupNumber: '',
|
||||||
newGroupNumber:'',
|
newGroupNumber: ''
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
@ -139,11 +134,11 @@
|
|||||||
commit() {
|
commit() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.editTrainNo.menu.operation,
|
operation: OperationEvent.Train.editTrainNo.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -151,30 +146,29 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
// this.$refs.noticeInfo.doShow(operate);
|
});
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => { this.doClose(); });
|
}).catch(() => { this.doClose(); });
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.chengdou-03__systerm .el-dialog .base-label {
|
.chengdou-03__systerm .el-dialog .base-label {
|
||||||
|
@ -97,13 +97,13 @@
|
|||||||
<center><b>工</b><b>控</b></center>
|
<center><b>工</b><b>控</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</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">
|
<span style="color: black">
|
||||||
<center><b>清</b></center>
|
<center><b>清</b></center>
|
||||||
<center><b>除</b></center>
|
<center><b>除</b></center>
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<password-box ref="password" @checkOver="doClose" />
|
<password-box ref="password" @checkOver="passWordCommit" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -146,6 +146,9 @@ export default {
|
|||||||
MixinCommand() {
|
MixinCommand() {
|
||||||
return OperationEvent.MixinCommand;
|
return OperationEvent.MixinCommand;
|
||||||
},
|
},
|
||||||
|
Command() {
|
||||||
|
return OperationEvent.Command;
|
||||||
|
},
|
||||||
isShowBtn() {
|
isShowBtn() {
|
||||||
return this.$store.state.training.prdType == '01';
|
return this.$store.state.training.prdType == '01';
|
||||||
}
|
}
|
||||||
@ -165,8 +168,19 @@ export default {
|
|||||||
this.resetPosition();
|
this.resetPosition();
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
resetPosition() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@ -199,31 +213,50 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
buttonDown(operation) {
|
buttonDown(operation) {
|
||||||
if (operation != 'mbm_clear') {
|
if (operation != this.Command.cancel.clearMbm.operation) {
|
||||||
const operate = {
|
const operate = {
|
||||||
type: 'mbm',
|
type: 'mbm',
|
||||||
operation: operation
|
operation: operation
|
||||||
};
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
this.operation = operation;
|
||||||
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
this.$store.dispatch('menuOperation/setButtonOperation', operation); // 按钮菜单是否被按下
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
if (operation == this.Signal.humanTrainRoute.button.operation) { // 总人解操作 显示密码窗
|
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.$refs.password.doShow(operate);
|
||||||
}
|
}
|
||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} 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/setButtonOperation', null);
|
||||||
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
|
OperateHandler.cleanOperates(); // 清空操作组
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
selectedChange() {
|
selectedChange() {
|
||||||
// 按钮按下时
|
// 按钮按下时
|
||||||
if (this.$store.state.menuOperation.buttonOperation) {
|
if (this.$store.state.menuOperation.buttonOperation) {
|
||||||
const model = this.$store.state.menuOperation.selected;
|
const model = this.$store.state.menuOperation.selected; // 选择设备
|
||||||
if (model._type) {
|
if (model._type) {
|
||||||
const deviceType = MapDeviceType[model._type];
|
const deviceType = MapDeviceType[model._type];
|
||||||
const modelData = deepAssign({}, model);
|
const modelData = deepAssign({}, model);
|
||||||
@ -240,7 +273,12 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (response) {
|
if (response) {
|
||||||
this.tempData = response.data;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,15 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<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">
|
||||||
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 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-form-item :label="this.$t('menu.groupNumber')+this.$t('global.colon')" prop="groupNumber">
|
||||||
<el-select
|
<el-select
|
||||||
@ -32,46 +22,59 @@
|
|||||||
:id="domIdTrainType"
|
:id="domIdTrainType"
|
||||||
v-model="formModel.trainType"
|
v-model="formModel.trainType"
|
||||||
style="margin-left: 15px;"
|
style="margin-left: 15px;"
|
||||||
:disabled="trainTypeIsDisabled"
|
|
||||||
@change="trainTypeChange"
|
@change="trainTypeChange"
|
||||||
>
|
>
|
||||||
<el-radio :label="'01'">{{$t('menu.planTrain')}}</el-radio>
|
<el-radio :label="'01'">{{ $t('menu.planTrain') }}</el-radio>
|
||||||
<el-radio :label="'02'">{{$t('menu.headCodeTrain')}}</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="'03'" style="margin-top:5px;">{{ $t('menu.artificialTrain') }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="serviceNumber">
|
<el-form-item v-if="formModel.trainType == '01'" prop="serviceNumber">
|
||||||
<span slot="label">{{$t('menu.serviceNumber')}}</span>
|
<span slot="label">{{ $t('menu.serviceNumber') }}</span>
|
||||||
<el-input
|
<el-input
|
||||||
:id="domIdServerNo"
|
:id="domIdServerNo"
|
||||||
v-model="formModel.serviceNumber"
|
v-model="formModel.serviceNumber"
|
||||||
:disabled="serverNoIsDisabled"
|
:disabled="serverNoIsDisabled"
|
||||||
@change="serverNoChange"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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
|
<el-input
|
||||||
:id="domIdTrainNo"
|
:id="domIdTrainNo"
|
||||||
v-model="formModel.tripNumber"
|
v-model="formModel.tripNumber"
|
||||||
:disabled="trainNoIsDisabled"
|
:disabled="trainNoIsDisabled"
|
||||||
@change="trainNoChange"
|
maxlength="4"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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
|
<el-input
|
||||||
:id="domIdTargetCode"
|
:id="domIdTargetCode"
|
||||||
v-model="formModel.targetCode"
|
v-model="formModel.targetCode"
|
||||||
:disabled="targetCodeIsDisabled"
|
:disabled="targetCodeIsDisabled"
|
||||||
@change="targetCodeChange"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</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-form>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
<el-col :span="10" :offset="2">
|
<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>
|
||||||
<el-col :span="8" :offset="4">
|
<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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<confirm-train ref="confirmTrain" />
|
<confirm-train ref="confirmTrain" />
|
||||||
@ -85,6 +88,7 @@ import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
|||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import OperateHandler from '@/scripts/plugin/trainingOperateHandler';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainControl',
|
name: 'TrainControl',
|
||||||
@ -134,10 +138,10 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
serverNoIsDisabled() {
|
serverNoIsDisabled() {
|
||||||
return false;
|
return true;
|
||||||
},
|
},
|
||||||
targetCodeIsDisabled() {
|
targetCodeIsDisabled() {
|
||||||
return false;
|
return true;
|
||||||
},
|
},
|
||||||
trainNumberIsDisabled() {
|
trainNumberIsDisabled() {
|
||||||
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
@ -145,12 +149,12 @@ export default {
|
|||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
trainTypeIsDisabled() {
|
// trainTypeIsDisabled() {
|
||||||
if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
// if (this.operation != OperationEvent.Train.addTrainId.menu.operation) {
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
return '';
|
// return '';
|
||||||
},
|
// },
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
},
|
},
|
||||||
@ -236,6 +240,19 @@ export default {
|
|||||||
return this.$t('menu.menuTrain.editTrainId');
|
return this.$t('menu.menuTrain.editTrainId');
|
||||||
}
|
}
|
||||||
return '';
|
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() {
|
mounted() {
|
||||||
@ -262,10 +279,11 @@ export default {
|
|||||||
this.formModel = {
|
this.formModel = {
|
||||||
groupNumber: model.groupNumber,
|
groupNumber: model.groupNumber,
|
||||||
tripNumber: model.tripNumber,
|
tripNumber: model.tripNumber,
|
||||||
trainType: '01',
|
trainType: model.type,
|
||||||
serviceNumber: model.serviceNumber,
|
serviceNumber: '',
|
||||||
targetCode: model.targetCode
|
targetCode: ''
|
||||||
};
|
};
|
||||||
|
debugger;
|
||||||
|
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.loadInitData(this.map);
|
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) {
|
trainNoChange(tripNumber) {
|
||||||
const operate = {
|
const operate = {
|
||||||
|
send: true,
|
||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
val: `${tripNumber}`,
|
val: `${tripNumber}`,
|
||||||
operation: ''
|
operation: ''
|
||||||
@ -349,28 +349,17 @@ export default {
|
|||||||
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
} else if (this.operation == OperationEvent.Train.editTrainId.menu.operation) {
|
||||||
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
operate.operation = OperationEvent.Train.editTrainId.trainNoChange.operation;
|
||||||
}
|
}
|
||||||
|
OperateHandler.backStep(1);
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
console.log(valid, response, 111);
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
if (valid && response.data) {
|
||||||
}
|
this.formModel = {
|
||||||
});
|
groupNumber: this.formModel.groupNumber,
|
||||||
},
|
tripNumber: tripNumber,
|
||||||
targetCodeChange(targetCode) {
|
trainType: '01',
|
||||||
const operate = {
|
serviceNumber: response.data.serviceNumber,
|
||||||
type: MapDeviceType.Train.type,
|
targetCode: response.data.tripNumber
|
||||||
val: `${targetCode}`,
|
|
||||||
operation: ''
|
|
||||||
};
|
};
|
||||||
|
|
||||||
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 });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -424,7 +413,7 @@ export default {
|
|||||||
type: MapDeviceType.Train.type,
|
type: MapDeviceType.Train.type,
|
||||||
operation: OperationEvent.Train.editTrainId.menu.operation,
|
operation: OperationEvent.Train.editTrainId.menu.operation,
|
||||||
messages: [this.$t('tip.editTrainIdTip')],
|
messages: [this.$t('tip.editTrainIdTip')],
|
||||||
val: this.formModel.tripNumber
|
val: `01::${this.formModel.tripNumber}`
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog
|
<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">
|
||||||
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"
|
|
||||||
>
|
|
||||||
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
<div style="padding: 10px 20px; border: 1px solid lightgray;">
|
||||||
<el-form size="small" label-width="100px">
|
<el-form size="small" label-width="100px">
|
||||||
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
|
<el-form-item :label="this.$t('menu.train')+this.$t('global.colon')" prop="trainCode">
|
||||||
@ -50,7 +39,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
// import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -104,18 +93,16 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(map) {
|
loadInitData(map) {
|
||||||
if (Object.keys(map || {}).length) {
|
if (map.trainList.length) {
|
||||||
getPublishTrainList(map.skinCode).then(response => {
|
this.trainList = map.trainList;
|
||||||
this.trainList = response.data;
|
} else {
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox(this.$t('error.getTrainListFailed'));
|
this.$messageBox(this.$t('error.getTrainListFailed'));
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
|
console.log(this.map, 111);
|
||||||
/** 加载列车数据*/
|
/** 加载列车数据*/
|
||||||
this.loadInitData(this.map);
|
this.loadInitData(this.map);
|
||||||
|
|
||||||
|
@ -139,6 +139,10 @@ export const OperationEvent = {
|
|||||||
menu: {
|
menu: {
|
||||||
operation: '000',
|
operation: '000',
|
||||||
domId: '_Tips-Cancel-Menu'
|
domId: '_Tips-Cancel-Menu'
|
||||||
|
},
|
||||||
|
clearMbm: {
|
||||||
|
operation: '00012',
|
||||||
|
domId: '_Tips-mbm_clear{TOP}'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 关闭对话框
|
// 关闭对话框
|
||||||
@ -1094,7 +1098,7 @@ export const OperationEvent = {
|
|||||||
event: '2',
|
event: '2',
|
||||||
button: {
|
button: {
|
||||||
operation: '4020',
|
operation: '4020',
|
||||||
domId: '_Tips-Section-Fault-Mbm'
|
domId: '_Tips-Section-Fault-Mbm{TOP}'
|
||||||
},
|
},
|
||||||
menu: {
|
menu: {
|
||||||
operation: '402',
|
operation: '402',
|
||||||
@ -1868,7 +1872,7 @@ export const OperationEvent = {
|
|||||||
},
|
},
|
||||||
// 修改列车识别号
|
// 修改列车识别号
|
||||||
editTrainId: {
|
editTrainId: {
|
||||||
event: '2',
|
event: { query: '9', confirm: '2' },
|
||||||
menu: {
|
menu: {
|
||||||
operation: '702',
|
operation: '702',
|
||||||
domId: '_Tips-Train-EditTrainId-Menu'
|
domId: '_Tips-Train-EditTrainId-Menu'
|
||||||
|
@ -87,7 +87,7 @@ Vue.prototype.$convertSpecifiedField = function(dataDict, enumList, key, value,
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
};
|
||||||
|
|
||||||
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
|
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
|
||||||
if (FromList) {
|
if (FromList) {
|
||||||
|
@ -6,8 +6,10 @@
|
|||||||
// {id: "5", trainingType: "02", name: "信号机名称"}
|
// {id: "5", trainingType: "02", name: "信号机名称"}
|
||||||
// {id: "6", trainingType: "02", name: "信号机编号"}
|
// {id: "6", trainingType: "02", name: "信号机编号"}
|
||||||
// {id: "7", trainingType: "03", name: "道岔名称"}
|
// {id: "7", trainingType: "03", name: "道岔名称"}
|
||||||
|
// {id: "17", trainingType: "03", name: "道岔编码"}
|
||||||
// {id: "8", trainingType: "04", name: "物理区段名称"}
|
// {id: "8", trainingType: "04", name: "物理区段名称"}
|
||||||
// {id: "9", trainingType: "04", name: "逻辑区段名称"}
|
// {id: "9", trainingType: "04", name: "逻辑区段名称"}
|
||||||
|
// {id: "18", trainingType: "04", name: "逻辑区段编码"}
|
||||||
// {id: "10", trainingType: "05", name: "车站名称"}
|
// {id: "10", trainingType: "05", name: "车站名称"}
|
||||||
// {id: "11", trainingType: "05", name: "站台行驶方向编号"}
|
// {id: "11", trainingType: "05", name: "站台行驶方向编号"}
|
||||||
// {id: "12", trainingType: "05", name: "站台行驶方向"}
|
// {id: "12", trainingType: "05", name: "站台行驶方向"}
|
||||||
@ -1296,6 +1298,21 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '301', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1311,6 +1328,22 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '308', tip: '鼠标左键点击【确认】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1325,6 +1358,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 2, operateCode: '303', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1340,6 +1387,21 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '3051', tip: '输入密码123456,点击【确定】按钮' }
|
{ 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,
|
maxDuration: 8,
|
||||||
minDuration: 5,
|
minDuration: 5,
|
||||||
@ -1369,6 +1431,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '3061', tip: '输入密码123456,点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1384,6 +1460,21 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '3072', tip: '输入密码123456,点击【确认】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1399,6 +1490,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '314', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1414,6 +1519,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '04', orderNum: 3, operateCode: '315', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1432,7 +1551,7 @@ export const OperationList = {
|
|||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
operateType: '0305', // 0312 新增定位字典
|
operateType: '0312', // 0312 新增定位字典
|
||||||
skinCode: '04',
|
skinCode: '04',
|
||||||
trainingName: '单操到定位({7})',
|
trainingName: '单操到定位({7})',
|
||||||
trainingRemark: '单操到定位({15})',
|
trainingRemark: '单操到定位({15})',
|
||||||
@ -1446,7 +1565,21 @@ export const OperationList = {
|
|||||||
{
|
{
|
||||||
maxDuration: 15,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
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',
|
skinCode: '04',
|
||||||
trainingName: '单操到反位({7})',
|
trainingName: '单操到反位({7})',
|
||||||
trainingRemark: '单操到反位({7})',
|
trainingRemark: '单操到反位({7})',
|
||||||
@ -1457,6 +1590,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '02', orderNum: 2, operateCode: '102', tip: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1479,10 +1626,10 @@ export const OperationList = {
|
|||||||
trainingName: '道岔单锁({7})',
|
trainingName: '道岔单锁({7})',
|
||||||
trainingRemark: '道岔单锁功能',
|
trainingRemark: '道岔单锁功能',
|
||||||
trainingType: '03',
|
trainingType: '03',
|
||||||
productTypes: ['01'],
|
productTypes: ['01'], // 现地操作
|
||||||
stepVOList: [
|
stepVOList: [
|
||||||
{ deviceType: '02', orderNum: 1, operateCode: '1030', tip: '鼠标左键菜单选择【道岔单锁】' },
|
{ 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: '鼠标左键点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1514,6 +1676,20 @@ export const OperationList = {
|
|||||||
{ deviceType: '02', orderNum: 3, operateCode: '1051', tip: '输入密码123456,点击【确定】按钮' }
|
{ 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,
|
maxDuration: 15,
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
@ -1529,6 +1705,21 @@ export const OperationList = {
|
|||||||
{ deviceType: '02', orderNum: 3, operateCode: '1062', tip: '输入密码123456,点击【确认】按钮' }
|
{ 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,
|
maxDuration: 20,
|
||||||
minDuration: 10,
|
minDuration: 10,
|
||||||
@ -1560,6 +1751,22 @@ export const OperationList = {
|
|||||||
{ deviceType: '03', orderNum: 3, operateCode: '4023', tip: '输入密码123456,点击【确认】按钮' }
|
{ 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, // 自动生成实训失败
|
maxDuration: 15, // 自动生成实训失败
|
||||||
minDuration: 8,
|
minDuration: 8,
|
||||||
|
@ -407,7 +407,7 @@ function handleButtonFault(operates) {
|
|||||||
return {
|
return {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
code: operate.code,
|
code: operate.code,
|
||||||
over: true,
|
// over: true,
|
||||||
operation: SectionOperation.fault.event
|
operation: SectionOperation.fault.event
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -105,22 +105,19 @@ export default {
|
|||||||
function handleButtonArrangementRoute(operates) {
|
function handleButtonArrangementRoute(operates) {
|
||||||
if (operates.length === 2) {
|
if (operates.length === 2) {
|
||||||
const operate = operates[1];
|
const operate = operates[1];
|
||||||
if (operate.type === SignalType && operate.code &&
|
if (operate.type == SignalType && operate.code) {
|
||||||
operate.model && operate.model._viewVal) {
|
|
||||||
return {
|
return {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
code: operate.code,
|
code: operate.code,
|
||||||
operation: SignalOperation.arrangementRoute.event.query,
|
operation: SignalOperation.arrangementRoute.event.query
|
||||||
val: operate.model._viewVal
|
// val: operate.model._viewVal
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return { error: true };
|
return { error: true };
|
||||||
} else if (operates.length >= 3) {
|
} else if (operates.length >= 3) {
|
||||||
const operateBeg = operates[1];
|
const operateBeg = operates[1]; // 起始信号灯
|
||||||
const operateEnd = operates[operates.length - 1];
|
const operateEnd = operates[operates.length - 1]; // 终端信号灯
|
||||||
if (operateEnd.type === SignalType && operateEnd.code &&
|
if (operateEnd.type == SignalType && operateEnd.code && operateEnd.tempData && operateEnd.tempData.length) {
|
||||||
operateEnd.model && operateBeg.val === operateEnd.model._viewVal &&
|
|
||||||
operateEnd.tempData && operateEnd.tempData.length) {
|
|
||||||
for (let i = 0; i < operateEnd.tempData.length; i++) {
|
for (let i = 0; i < operateEnd.tempData.length; i++) {
|
||||||
const elem = operateEnd.tempData[i];
|
const elem = operateEnd.tempData[i];
|
||||||
if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) {
|
if (elem.startSignalCode === operateBeg.code && elem.endSignalCode == operateEnd.code) {
|
||||||
@ -128,8 +125,8 @@ function handleButtonArrangementRoute(operates) {
|
|||||||
type: operateEnd.type,
|
type: operateEnd.type,
|
||||||
code: operateEnd.code,
|
code: operateEnd.code,
|
||||||
over: true,
|
over: true,
|
||||||
operation: SignalOperation.arrangementRoute.event.confirm,
|
operation: SignalOperation.arrangementRoute.event.confirm
|
||||||
val: elem.code
|
// val: elem.code
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,6 +136,38 @@ function handleButtonArrangementRoute(operates) {
|
|||||||
return null;
|
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
|
* @param {*} operates
|
||||||
@ -184,6 +213,7 @@ function handleButtonReopenSignal(operates) {
|
|||||||
* @param {*} operates
|
* @param {*} operates
|
||||||
*/
|
*/
|
||||||
function handleButtonHumanTrainRoute(operates) {
|
function handleButtonHumanTrainRoute(operates) {
|
||||||
|
debugger;
|
||||||
if (operates.length >= 2) {
|
if (operates.length >= 2) {
|
||||||
const operate = operates[operates.length - 1];
|
const operate = operates[operates.length - 1];
|
||||||
if (operate.type === SignalType && operate.code) {
|
if (operate.type === SignalType && operate.code) {
|
||||||
@ -245,38 +275,6 @@ function handleMenuStoppage(operates) {
|
|||||||
return null;
|
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
|
* @param {*} operates
|
||||||
@ -661,16 +659,32 @@ function handleButtonSetAutoInterlock(operates) {
|
|||||||
* @param {*} operates
|
* @param {*} operates
|
||||||
*/
|
*/
|
||||||
function handleButtonGuideRoute(operates) {
|
function handleButtonGuideRoute(operates) {
|
||||||
if (operates.length >= 2) {
|
if (operates.length == 2) {
|
||||||
const operate = operates[operates.length - 1];
|
const operate = operates[operates.length - 1];
|
||||||
if (operate.type === SignalType && operate.code) {
|
if (operate.type === SignalType && operate.code) {
|
||||||
return {
|
return {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
code: operate.code,
|
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,
|
over: true,
|
||||||
operation: SignalOperation.guide.event.confirm
|
operation: SignalOperation.guide.event.confirm
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return { error: true };
|
return { error: true };
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -114,14 +114,25 @@ function handleMenuAddTrainId(operates) {
|
|||||||
* @param {*} operates
|
* @param {*} operates
|
||||||
*/
|
*/
|
||||||
function handleMenuEditTrainId(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];
|
const operate = operates[operates.length - 1];
|
||||||
if (operate.type === TrainType && operate.val) {
|
if (operate.type === TrainType && operate.val) {
|
||||||
return {
|
return {
|
||||||
type: operate.type,
|
type: operate.type,
|
||||||
code: operates[0].code,
|
code: operates[0].code,
|
||||||
over: true,
|
over: true,
|
||||||
operation: TrainOperation.editTrainId.event,
|
operation: TrainOperation.editTrainId.event.confirm,
|
||||||
val: operate.val
|
val: operate.val
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,10 @@ OperateHandler.prototype = {
|
|||||||
/** 操作组 */
|
/** 操作组 */
|
||||||
operates: [],
|
operates: [],
|
||||||
|
|
||||||
|
backStep: function(num) {
|
||||||
|
this.operates = this.operates.slice(0, num);
|
||||||
|
},
|
||||||
|
|
||||||
/** 清空操作组 */
|
/** 清空操作组 */
|
||||||
cleanOperates: function () {
|
cleanOperates: function () {
|
||||||
this.operates.splice(0, this.operates.length);
|
this.operates.splice(0, this.operates.length);
|
||||||
|
@ -4,8 +4,8 @@ export function getBaseUrl() {
|
|||||||
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'; // 王兴杰
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
|
@ -83,7 +83,7 @@ import { loadMapData, loadMapDataById } from '@/utils/loaddata';
|
|||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import {loadDraftScript} from '@/api/designPlatform'
|
import {loadDraftScript} from '@/api/designPlatform';
|
||||||
|
|
||||||
// 三维
|
// 三维
|
||||||
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
import Jl3dSimulation from '@/views/jlmap3d/simulation/jl3dsimulation';
|
||||||
@ -141,8 +141,8 @@ export default {
|
|||||||
'04': '02', // 司机 => 行调
|
'04': '02', // 司机 => 行调
|
||||||
'05': '' // 派班 => null
|
'05': '' // 派班 => null
|
||||||
},
|
},
|
||||||
isDrive:this.prdType == '04',
|
isDrive: this.prdType == '04',
|
||||||
isShowScheduling:this.prdType == '05'
|
isShowScheduling: this.prdType == '05'
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -151,8 +151,7 @@ export default {
|
|||||||
'canvasHeight'
|
'canvasHeight'
|
||||||
]),
|
]),
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'map',
|
'map'
|
||||||
'mapDeviceStatus'
|
|
||||||
]),
|
]),
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
'offsetStationCode'
|
'offsetStationCode'
|
||||||
@ -202,7 +201,7 @@ export default {
|
|||||||
},
|
},
|
||||||
isPlan() {
|
isPlan() {
|
||||||
return this.mode === 'plan';
|
return this.mode === 'plan';
|
||||||
},
|
}
|
||||||
// isDrive() {
|
// isDrive() {
|
||||||
// return this.prdType == '04';
|
// 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.prdType=val;
|
||||||
this.isDrive=(val == '04');
|
this.isDrive=(val == '04');
|
||||||
this.isShowScheduling=(val == '05');
|
this.isShowScheduling=(val == '05');
|
||||||
@ -479,30 +478,30 @@ export default {
|
|||||||
async runQuestLoadShow() {
|
async runQuestLoadShow() {
|
||||||
this.$refs.addQuest.doShow();
|
this.$refs.addQuest.doShow();
|
||||||
},
|
},
|
||||||
async runAddRolesLoadShow(){
|
async runAddRolesLoadShow() {
|
||||||
// this.$refs.addQuest.doShow();
|
// this.$refs.addQuest.doShow();
|
||||||
let row={id:this.$route.query.scriptId}
|
const row={id: this.$route.query.scriptId};
|
||||||
this.$refs.addQuest.handleLoad(1, row);
|
this.$refs.addQuest.handleLoad(1, row);
|
||||||
},
|
},
|
||||||
// 选择脚本
|
// 选择脚本
|
||||||
async selectQuest(row, id,mapLocation,roleName) {
|
async selectQuest(row, id, mapLocation, roleName) {
|
||||||
try {
|
try {
|
||||||
let prdType="";
|
let prdType='';
|
||||||
switch(roleName){
|
switch (roleName) {
|
||||||
case 'Attendant':{
|
case 'Attendant': {
|
||||||
prdType="01";
|
prdType='01';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'Dispatcher':{
|
case 'Dispatcher': {
|
||||||
prdType="02";
|
prdType='02';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'Driver':{
|
case 'Driver': {
|
||||||
prdType="04";
|
prdType='04';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'Repair':{
|
case 'Repair': {
|
||||||
prdType="";
|
prdType='';
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -510,7 +509,7 @@ export default {
|
|||||||
const res = await loadDraftScript(row.id, id, this.group);
|
const res = await loadDraftScript(row.id, id, this.group);
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.questId = parseInt(row.id);
|
this.questId = parseInt(row.id);
|
||||||
if(mapLocation){
|
if (mapLocation) {
|
||||||
const newMapLocation={'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
const newMapLocation={'offsetX': mapLocation.x, 'offsetY': mapLocation.y, 'scaleRate': mapLocation.scale};
|
||||||
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
Vue.prototype.$jlmap.setOptions(newMapLocation);
|
||||||
}
|
}
|
||||||
|
@ -19,16 +19,16 @@
|
|||||||
@node-click="clickEvent"
|
@node-click="clickEvent"
|
||||||
>
|
>
|
||||||
<div slot-scope="{ node: nodeScop }">
|
<div slot-scope="{ node: nodeScop }">
|
||||||
<span v-if="nodeScop.data.type == 'skin'" class="el-icon-news"></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>
|
<span v-else-if="nodeScop.data.type == 'prd'" class="el-icon-tickets" />
|
||||||
<span
|
<span
|
||||||
v-else-if="nodeScop.data.type == 'trainingType'"
|
v-else-if="nodeScop.data.type == 'trainingType'"
|
||||||
class="el-icon-document"
|
class="el-icon-document"
|
||||||
></span>
|
/>
|
||||||
<span
|
<span
|
||||||
v-else-if="nodeScop.data.type == 'training'"
|
v-else-if="nodeScop.data.type == 'training'"
|
||||||
class="el-icon-edit-outline"
|
class="el-icon-edit-outline"
|
||||||
></span>
|
/>
|
||||||
<span> {{ nodeScop.label }}</span>
|
<span> {{ nodeScop.label }}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
@ -95,23 +95,23 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
if (this.node && this.node.data) {
|
if (this.node && this.node.data) {
|
||||||
if (this.node.data.type === 'skin') {
|
if (this.node.data.type === 'Skin') {
|
||||||
return this.$t('map.createProductCategories');
|
return this.$t('map.createProductCategories');
|
||||||
} else if (this.node.data.type === 'prd' ||
|
} else if (this.node.data.type === 'Prd' ||
|
||||||
this.node.data.type === 'prd') {
|
this.node.data.type === 'Prd') {
|
||||||
return this.$t('map.editTraining');
|
return this.$t('map.editTraining');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.$t('map.selectOperation');
|
return this.$t('map.selectOperation');
|
||||||
},
|
},
|
||||||
isCreate() {
|
isCreate() {
|
||||||
return this.node && this.node.data.type === 'skin';
|
return this.node && this.node.data.type === 'Skin';
|
||||||
},
|
},
|
||||||
isUpdate() {
|
isUpdate() {
|
||||||
return this.node && this.node.data.type === 'prd';
|
return this.node && this.node.data.type === 'Prd';
|
||||||
},
|
},
|
||||||
isDelete() {
|
isDelete() {
|
||||||
return this.node && this.node.data.type === 'prd';
|
return this.node && this.node.data.type === 'Prd';
|
||||||
},
|
},
|
||||||
isShowTrainTypes() {
|
isShowTrainTypes() {
|
||||||
return this.addModel.prdType != '03' && this.addModel.prdType != '04';
|
return this.addModel.prdType != '03' && this.addModel.prdType != '04';
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
@node-click="clickEvent"
|
@node-click="clickEvent"
|
||||||
>
|
>
|
||||||
<span slot-scope="{ node }">
|
<span slot-scope="{ node }">
|
||||||
<span v-if="node.data.type == 'skin'" class="el-icon-news"></span>
|
<span v-if="node.data.type == 'skin'" class="el-icon-news" />
|
||||||
<span v-if="node.data.type == 'prd'" class="el-icon-tickets"></span>
|
<span v-if="node.data.type == 'prd'" class="el-icon-tickets" />
|
||||||
<span v-if="node.data.type == 'trainingType'" class="el-icon-document"></span>
|
<span v-if="node.data.type == 'trainingType'" class="el-icon-document" />
|
||||||
<span v-if="node.data.type == 'trainingType'" class="el-icon-edit"></span>
|
<span v-if="node.data.type == 'trainingType'" class="el-icon-edit" />
|
||||||
<span> {{ node.label }}</span>
|
<span> {{ node.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
|
Loading…
Reference in New Issue
Block a user