西安二号线添加是否灭灯显示(CTC级)

This commit is contained in:
fan 2020-05-14 16:45:48 +08:00
parent eceaf463f8
commit abec4b2b4c
4 changed files with 35 additions and 8 deletions

View File

@ -2,9 +2,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
// BASE_API = 'http://192.168.3.41:9000'; // 张赛

View File

@ -22,7 +22,7 @@ export function creatSubscribe(topic, header) {
function callback(Response) {
if (store) {
var data = JSON.parse(Response.body);
// console.log(Response.body);
console.log(Response.body);
store.dispatch('socket/setStomp', data);
} else {
callback(Response);

View File

@ -201,7 +201,8 @@ export default {
guideShow: false,
stationCode: this.addModel.stationCode,
callOn: true,
turnBack: false
turnBack: false,
ctc: true
};
this.sectionList.forEach(elem => {

View File

@ -17,6 +17,9 @@
<create-signal ref="createSignal" :field="field" @signalSectionCode="signalSectionCode" @updateMapModel="updateMapModel" />
</el-tab-pane>
<el-tab-pane class="view-control" label="批量操作" name="three" :lazy="lazy">
<!--<el-collapse v-model="collapseActive" accordion style="margin-left: 20px">-->
<!--</el-collapse>-->
<el-form ref="mark" label-width="130px" :model="addModel" size="mini">
<el-form-item label="左右偏移值" prop="number">
<el-input v-model="addModel.number" style="width: 178px;" />
@ -72,6 +75,15 @@
<div class="flex_box" style="margin-top: 20px">
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setSignalCallOn">批量设置引导信号</el-button>
</div>
<hr style="width: 100%">
<el-form ref="ctcForm" label-width="160px" :model="ctcModel" size="mini">
<el-form-item label="是否灭灯显示(CTC级):" prop="number">
<el-checkbox v-model="ctcModel.ctc" />
</el-form-item>
</el-form>
<div class="flex_box">
<el-button type="primary" style="margin-right: 10px;" size="small" @click="setCtcShow">设置灭灯显示</el-button>
</div>
<div style="height: calc(100% - 90px);">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-card v-if="questionList.length" class="box-card">
@ -106,6 +118,7 @@ export default {
data() {
return {
activeName: 'first',
collapseActive: '',
lazy: true,
SignalDirectionList: [
{ code: false, name: '向左' },
@ -153,7 +166,8 @@ export default {
guidePosition: { x: 0, y: 0 },
interlockStationCode: '',
callOn: true,
turnBack: false
turnBack: false,
ctc: true //
},
addModel: {
number: 2
@ -164,6 +178,9 @@ export default {
ciModel: {
stationList: [],
ciStation: []
},
ctcModel: {
ctc: true
}
};
},
@ -245,7 +262,8 @@ export default {
{ prop: 'guidePosition.y', firstLevel: 'guidePosition', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
] },
{ prop: 'callOn', label: '是否引导信号:', type: 'checkbox'},
{ prop: 'turnBack', label: '是否折返进路始端:', type: 'checkbox', isHidden: this.editModel.virtual}
{ prop: 'turnBack', label: '是否折返进路始端:', type: 'checkbox', isHidden: this.editModel.virtual},
{ prop: 'ctc', label: '是否灭灯显示(CTC级)', type: 'checkbox'}
]
},
map: {
@ -421,10 +439,8 @@ export default {
},
virtualChange(val) {
if (val) {
this.editModel.callOn = false;
this.editModel.turnBack = false;
} else {
this.editModel.callOn = true;
this.editModel.turnBack = false;
}
},
@ -462,6 +478,16 @@ export default {
this.$emit('updateMapModel', models);
this.$message.success('数据构建成功!');
},
setCtcShow() {
const models = [];
this.signalList.forEach(item => {
const signalModel = deepAssign({}, item); //
signalModel.ctc = this.ctcModel.ctc;
models.push(signalModel);
});
this.$emit('updateMapModel', models);
this.$message.success('数据构建成功!');
},
//
findSection(signal) {
// 01 02