修改区段创建
This commit is contained in:
parent
252b0c4cc6
commit
2640a5546f
@ -41,19 +41,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="createModel.type == '01'" class="coordinate">
|
<el-form-item v-if="createModel.type == '01'" label="距离长度:" prop="length">
|
||||||
<span class="title" style="width: 120px">{{ this.$t('map.endingPoint') }}</span>
|
<el-input-number v-model="createModel.length" />
|
||||||
<div class="listWidth">
|
|
||||||
<el-form-item label="x" prop="endPoint.x" label-width="25px">
|
|
||||||
<el-input-number v-model="createModel.endPoint.x" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
|
||||||
<div class="listWidth">
|
|
||||||
<el-form-item label="y" prop="endPoint.y" label-width="25px">
|
|
||||||
<el-input-number v-model="createModel.endPoint.y" />
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<el-form-item v-if="createModel.type == '02'" :label="$t('map.leftAssociatedSection')" prop="leftSectionCode">
|
<el-form-item v-if="createModel.type == '02'" :label="$t('map.leftAssociatedSection')" prop="leftSectionCode">
|
||||||
<el-select v-model="createModel.leftSectionCode" filterable>
|
<el-select v-model="createModel.leftSectionCode" filterable>
|
||||||
<el-option
|
<el-option
|
||||||
@ -330,7 +320,7 @@ export default {
|
|||||||
createModel: {
|
createModel: {
|
||||||
type: '01',
|
type: '01',
|
||||||
startPoint: { x: 0, y: 0 },
|
startPoint: { x: 0, y: 0 },
|
||||||
endPoint: { x: 0, y: 0 },
|
length: 0,
|
||||||
leftSectionCode: '',
|
leftSectionCode: '',
|
||||||
rightSectionCode: ''
|
rightSectionCode: ''
|
||||||
},
|
},
|
||||||
@ -341,11 +331,8 @@ export default {
|
|||||||
'startPoint.y': [
|
'startPoint.y': [
|
||||||
{ required: true, message: this.$t('rules.destinationCodePointY'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.destinationCodePointY'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
'endPoint.x': [
|
'length': [
|
||||||
{ required: true, message: this.$t('rules.destinationCodePointX'), trigger: 'blur' }
|
{ required: true, message: '请填写距离值', trigger: 'blur' }
|
||||||
],
|
|
||||||
'endPoint.y': [
|
|
||||||
{ required: true, message: this.$t('rules.destinationCodePointY'), trigger: 'blur' }
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
typeOptions: [{
|
typeOptions: [{
|
||||||
@ -822,7 +809,7 @@ export default {
|
|||||||
this.editModel.points.splice(index, 1);
|
this.editModel.points.splice(index, 1);
|
||||||
this.logicSectionNums.splice(index, 1);
|
this.logicSectionNums.splice(index, 1);
|
||||||
},
|
},
|
||||||
// 一键生成区段
|
// 创建区段
|
||||||
create() {
|
create() {
|
||||||
const uid = getUID('Section');
|
const uid = getUID('Section');
|
||||||
const model = {
|
const model = {
|
||||||
@ -868,7 +855,7 @@ export default {
|
|||||||
if (this.createModel.type == '01') {
|
if (this.createModel.type == '01') {
|
||||||
model.points = [
|
model.points = [
|
||||||
{ x: this.createModel.startPoint.x, y: this.createModel.startPoint.y },
|
{ x: this.createModel.startPoint.x, y: this.createModel.startPoint.y },
|
||||||
{ x: this.createModel.endPoint.x, y: this.createModel.endPoint.y }
|
{ x: this.createModel.startPoint.x + this.createModel.length, y: this.createModel.startPoint.y }
|
||||||
];
|
];
|
||||||
} else if (this.createModel.type == '02') {
|
} else if (this.createModel.type == '02') {
|
||||||
const startModel = this.$store.getters['map/getDeviceByCode'](this.createModel.leftSectionCode);
|
const startModel = this.$store.getters['map/getDeviceByCode'](this.createModel.leftSectionCode);
|
||||||
|
Loading…
Reference in New Issue
Block a user