This commit is contained in:
joylink_cuiweidong 2020-05-11 13:59:15 +08:00
commit 7ef7aa7768
4 changed files with 635 additions and 579 deletions

View File

@ -58,12 +58,6 @@ export default class ELines extends Group {
zlevel: this.zlevel,
progressive: model.progressive,
z: this.z,
// shape: {
// x1: model.points[i].x,
// y1: model.points[i].y,
// x2: model.points[i + 1].x,
// y2: model.points[i + 1].y
// },
shape: {
points: points
},

View File

@ -1,10 +1,37 @@
<template>
<div>
LCD屏控制
<div class="lcdControl_title">LCD控制屏</div>
<div>
<div>特定区域</div>
<div>全线</div>
</div>
<div>
<div>
<el-radio v-model="radio1" label="1" border>备选项1</el-radio>
<el-radio v-model="radio1" label="2" border>备选项2</el-radio>
</div>
<div>确定</div>
</div>
<div />
</div>
</template>
<script>
export default {
data() {
return {
columns: ['车站', '选择'],
stationList: ['会展中心站', '世纪大道站', '交通大学站', '市图书馆站', '中心医院站', '未来路站', '火车站', '人民广场站', '体育中心站']
};
}
};
</script>
<style lang="scss" scoped>
.lcdControl_title{
width: 100%;
text-align: center;
font-size: 26px;
margin-top: 30px;
color: #56E5DE;
}
</style>

View File

@ -1,95 +1,106 @@
<template>
<div style="height: 100%;">
<el-scrollbar wrap-class="scrollbar-wrapper">
<el-form ref="oprt" :model="form" label-width="200px" size="mini">
<el-form-item :label="$t('map.leftStopPointOffsetFromStart')" prop="leftDistance">
<el-input-number v-model="form.leftDistance" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.rightStopPointOffsetFromTerminal')" prop="rightDistance">
<el-input-number v-model="form.rightDistance" :min="0" />
</el-form-item>
<el-form-item>
<el-collapse v-model="activeName" accordion style="margin-left: 20px">
<el-collapse-item title="左右停车点偏移" name="1">
<el-form ref="oprt" :model="form" label-width="200px" size="mini">
<el-form-item :label="$t('map.leftStopPointOffsetFromStart')" prop="leftDistance">
<el-input-number v-model="form.leftDistance" :min="0" />
</el-form-item>
<el-form-item :label="$t('map.rightStopPointOffsetFromTerminal')" prop="rightDistance">
<el-input-number v-model="form.rightDistance" :min="0" />
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" size="small" @click="batchSettings">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-collapse-item>
<el-collapse-item title="区段名称位置" name="2">
<el-form ref="formModel" :model="formModel" label-width="200px" size="mini" :rules="formRules">
<el-form-item label="区段编码:" prop="modelList">
<el-select v-model="formModel.modelList" filterable multiple>
<el-option
v-for="item in sectionList"
:key="item.code"
:label="item.name + '(' + item.code + ')'"
:value="item.code"
/>
</el-select>
<el-button
:type="field === 'sectionTypeCode' ? 'danger' : 'primary'"
size="small"
@click="hover('sectionTypeCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="区段名称位置:" prop="trainPosType">
<el-select
v-model="formModel.trainPosType"
placeholder="请选择"
:clearable="true"
>
<el-option
v-for="option in positionTypes"
:key="option.type"
:label="option.name"
:value="option.type"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" size="small" @click="setPositionType">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-collapse-item>
<el-collapse-item title="线路类型" name="3">
<el-form ref="roadModel" :model="roadModel" label-width="200px" size="mini" :rules="roadRules">
<el-form-item label="起止区段:" prop="sectionCode">
<el-select v-model="roadModel.sectionCode" filterable>
<el-option
v-for="item in sectionList"
:key="item.code"
:label="item.name + '(' + item.code + ')'"
:value="item.code"
/>
</el-select>
<el-button
:type="field === 'sectionRoadCode' ? 'danger' : 'primary'"
size="small"
@click="hover('sectionRoadCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="线路类型">
<el-select v-model="roadModel.roadType">
<el-option
v-for="item in sectionRoadTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" size="small" @click="setRoadType">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
</el-collapse-item>
<el-collapse-item title="关联站台区段所属车站" name="4">
<el-button-group>
<el-button type="primary" size="big" @click="batchSettings">{{ $t('global.set') }}</el-button>
<el-button style="margin-left: 150px" type="primary" size="small" @click="setBelongStation">设置</el-button>
</el-button-group>
</el-form-item>
</el-form>
<hr style="width: 100%">
<el-form ref="formModel" :model="formModel" label-width="200px" size="mini" :rules="formRules">
<el-form-item label="区段编码:" prop="modelList">
<el-select v-model="formModel.modelList" filterable multiple>
<el-option
v-for="item in sectionList"
:key="item.code"
:label="item.name + '(' + item.code + ')'"
:value="item.code"
/>
</el-select>
<el-button
:type="field === 'sectionTypeCode' ? 'danger' : 'primary'"
size="small"
@click="hover('sectionTypeCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="区段名称位置:" prop="trainPosType">
<el-select
v-model="formModel.trainPosType"
placeholder="请选择"
:clearable="true"
>
<el-option
v-for="option in positionTypes"
:key="option.type"
:label="option.name"
:value="option.type"
/>
</el-select>
</el-form-item>
<el-form-item>
</el-collapse-item>
<el-collapse-item title="逻辑区段始终点偏移" name="5">
<el-button-group>
<el-button type="primary" size="big" @click="setPositionType">{{ $t('global.set') }}</el-button>
<el-button style="margin-left: 150px" type="primary" size="small" @click="setLogicOffset">设置</el-button>
</el-button-group>
</el-form-item>
</el-form>
<hr style="width: 100%">
<el-form ref="roadModel" :model="roadModel" label-width="200px" size="mini" :rules="roadRules">
<el-form-item label="起止区段:" prop="sectionCode">
<el-select v-model="roadModel.sectionCode" filterable>
<el-option
v-for="item in sectionList"
:key="item.code"
:label="item.name + '(' + item.code + ')'"
:value="item.code"
/>
</el-select>
<el-button
:type="field === 'sectionRoadCode' ? 'danger' : 'primary'"
size="small"
@click="hover('sectionRoadCode')"
>{{ $t('map.activate') }}</el-button>
</el-form-item>
<el-form-item label="线路类型">
<el-select v-model="roadModel.roadType">
<el-option
v-for="item in sectionRoadTypeList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button type="primary" size="big" @click="setRoadType">{{ $t('global.set') }}</el-button>
</el-button-group>
</el-form-item>
</el-form>
<hr style="width: 100%">
<el-button-group>
<el-button style="margin-left: 150px" type="primary" size="big" @click="setBelongStation">批量设置关联站台区段所属车站</el-button>
</el-button-group>
</el-scrollbar>
</div>
</el-collapse-item>
</el-collapse>
</el-scrollbar></div>
</template>
<script>
@ -108,6 +119,7 @@ export default {
},
data() {
return {
activeName: '',
form: {
leftDistance: 0,
rightDistance: 0
@ -192,7 +204,7 @@ export default {
models.push(model);
});
this.$emit('updateMapModel', models, 'five');
this.$refs.formModel && this.$refs.formModel.resetFields(); //
this.$refs.formModel && this.$refs.formModel.resetFields(); //
}
});
},
@ -252,8 +264,8 @@ export default {
}
}
this.$emit('updateMapModel', models, 'five');
this.$message.success('数据构建成功!');
this.$refs.roadModel && this.$refs.roadModel.resetFields(); //
this.$message.success('数据构建成功!');
this.$refs.roadModel && this.$refs.roadModel.resetFields(); //
});
},
setBelongStation() {
@ -265,7 +277,31 @@ export default {
models.push(model);
});
this.$emit('updateMapModel', models, 'five');
this.$message.success('数据构建成功!');
this.$message.success('数据构建成功!');
},
setLogicOffset() {
const models = [];
this.sectionList.forEach(section => {
let startPoint = section.points[0];
let startOffset = 0;
if (section.logicSectionCodeList) {
section.logicSectionCodeList.forEach(sectionCode => {
const logicSection = this.$store.getters['map/getDeviceByCode'](sectionCode);
if (logicSection.points[0].x === startPoint.x && logicSection.points[0].y === startPoint.y) {
const model = deepAssign({}, logicSection);
model.logicSectionStartOffset = startOffset;
model.logicSectionEndOffset = section.lengthFact - startOffset;
models.push(model);
startOffset += logicSection.lengthFact;
startPoint = logicSection.points[logicSection.points.length - 1];
} else {
console.log('error', logicSection, section );
}
});
}
});
this.$emit('updateMapModel', models, 'five');
this.$message.success('数据构建成功!');
}
}
};

File diff suppressed because it is too large Load Diff