desc: 道岔创建字段补充,修改字段名称,描述
This commit is contained in:
parent
e34d3abff4
commit
02aa4a5b65
@ -254,7 +254,7 @@ export default {
|
||||
isCurve: '是否曲线:',
|
||||
physicalSegmentName: '物理区段名称:',
|
||||
|
||||
directionType: '形式方向:',
|
||||
directionType: '行驶方向:',
|
||||
leftOrRight: '左右位置:',
|
||||
positionType: '上下位置:',
|
||||
|
||||
@ -312,7 +312,7 @@ export default {
|
||||
zzkContent: '站中控内容:',
|
||||
stationControlZok: '中控',
|
||||
|
||||
stationstandName: '选择车站名称:',
|
||||
stationstandName: '所属车站:',
|
||||
stationstandDirection: '站台方向:',
|
||||
stationstandHasDoor: '是否显示屏蔽门:',
|
||||
stationstandNameColon: '站台名称:',
|
||||
|
@ -171,14 +171,13 @@ export default {
|
||||
{ prop: 'code', label: this.$t('map.linkCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkList, change: true, deviceChange: this.deviceChange },
|
||||
{ prop: 'name', label: this.$t('map.linkName'), type: 'input' },
|
||||
{ prop: 'lp', label: this.$t('map.linkLp'), type: 'coordinate', width: '119px', children: [
|
||||
{ prop: 'lp.x', firstLevel: 'lp', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: false },
|
||||
{ prop: 'lp.y', firstLevel: 'lp', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: false }
|
||||
{ prop: 'lp.x', firstLevel: 'lp', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
|
||||
{ prop: 'lp.y', firstLevel: 'lp', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
|
||||
] },
|
||||
{ prop: 'rp', label: this.$t('map.linkRp'), type: 'coordinate', width: '119px', children: [
|
||||
{ prop: 'rp.x', firstLevel: 'rp', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px', disabled: false },
|
||||
{ prop: 'rp.y', firstLevel: 'rp', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px', disabled: false }
|
||||
{ prop: 'rp.x', firstLevel: 'rp', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px', disabled: false },
|
||||
{ prop: 'rp.y', firstLevel: 'rp', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px', disabled: false }
|
||||
] },
|
||||
{ prop: 'color', label: this.$t('map.linkColor'), type: 'color' },
|
||||
{ prop: 'leftFdCode', label: this.$t('map.linkLeftFdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkLists },
|
||||
{ prop: 'leftSdCode', label: this.$t('map.linkLeftSdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkLists },
|
||||
{ prop: 'rightFdCode', label: this.$t('map.linkRightFdCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.linkLists },
|
||||
@ -202,6 +201,21 @@ export default {
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.linkSelectName'), trigger: 'blur' }
|
||||
],
|
||||
'lp.x': [
|
||||
{ required: true, message: this.$t('rules.linkSelectName'), trigger: 'blur' }
|
||||
],
|
||||
'lp.y': [
|
||||
{ required: true, message: this.$t('rules.linkSelectName'), trigger: 'blur' }
|
||||
],
|
||||
'rp.x': [
|
||||
{ required: true, message: this.$t('rules.linkSelectName'), trigger: 'blur' }
|
||||
],
|
||||
'rp.y': [
|
||||
{ required: true, message: this.$t('rules.linkSelectName'), trigger: 'blur' }
|
||||
],
|
||||
lengthFact: [
|
||||
{ required: true, message: this.$t('rules.linkSelectName'), trigger: 'blur' }
|
||||
]
|
||||
};
|
||||
// 清空表单验证提示信息
|
||||
|
@ -24,16 +24,6 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.directionType')" prop="directionType">
|
||||
<el-select v-model="addModel.directionType" filterable>
|
||||
<el-option
|
||||
v-for="item in SignalDirectionTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.leftOrRight')" prop="leftOrRight">
|
||||
<el-select v-model="addModel.leftOrRight" filterable>
|
||||
<el-option
|
||||
@ -44,6 +34,16 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.directionType')" prop="directionType">
|
||||
<el-select v-model="addModel.directionType" filterable>
|
||||
<el-option
|
||||
v-for="item in SignalDirectionTypeList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('map.positionType')" prop="positionType">
|
||||
<el-select v-model="addModel.positionType" filterable>
|
||||
<el-option
|
||||
@ -202,7 +202,7 @@ export default {
|
||||
PhysicalSectionList() {
|
||||
let list = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01'; });
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01' && !elem.isSwitchSection; });
|
||||
}
|
||||
return list;
|
||||
},
|
||||
|
@ -171,7 +171,7 @@ export default {
|
||||
PhysicalSectionList() {
|
||||
let list = [];
|
||||
if (this.sectionList && this.sectionList.length) {
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01'; });
|
||||
list = this.sectionList.filter(elem => { return elem.type === '01' && !elem.isSwitchSection; });
|
||||
}
|
||||
return list;
|
||||
},
|
||||
|
@ -15,7 +15,7 @@
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: cardHeight +'px' }">
|
||||
<el-form ref="make" :model="addModel" label-width="120px" size="mini" :rules="makeRules">
|
||||
<el-form-item :label="$t('map.stationName')" prop="stationCode">
|
||||
<el-form-item :label="$t('map.stationstandName')" prop="stationCode">
|
||||
<el-select v-model="addModel.stationCode" filterable>
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
|
@ -125,10 +125,10 @@ export default {
|
||||
name: this.$t('map.mapData'),
|
||||
item: [
|
||||
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
|
||||
{ prop: 'turnTime', label: this.$t('map.turnTime'), type: 'number', min: 0, max: 1000, placeholder: 's' },
|
||||
{ prop: 'sectionACode', label: this.$t('map.sectionACode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList },
|
||||
{ prop: 'sectionBCode', label: this.$t('map.sectionBCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList },
|
||||
{ prop: 'sectionCCode', label: this.$t('map.sectionCCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList }
|
||||
{ prop: 'turnTime', label: this.$t('map.turnTime'), type: 'number', min: 0, max: 1000, placeholder: 's' }
|
||||
// { prop: 'sectionACode', label: this.$t('map.sectionACode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList },
|
||||
// { prop: 'sectionBCode', label: this.$t('map.sectionBCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList },
|
||||
// { prop: 'sectionCCode', label: this.$t('map.sectionCCode'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.sectionList }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -229,6 +229,8 @@ export default {
|
||||
if (node) {
|
||||
const lFdSection = this.findSectionDataByLinkCodeAndPoint(link.leftFdCode, section.points[0]);
|
||||
const lSdSection = this.findSectionDataByLinkCodeAndPoint(link.leftSdCode, section.points[0]);
|
||||
|
||||
// const cnodeSection = mapDevice[mapDevice[elem.code].sectionACode];
|
||||
if (lFdSection && lSdSection) {
|
||||
const model = {
|
||||
_type: 'Switch',
|
||||
@ -249,6 +251,14 @@ export default {
|
||||
rp: {
|
||||
x: lSdSection.points[lSdSection.points.length - 2].x,
|
||||
y: lSdSection.points[lSdSection.points.length - 2].y
|
||||
},
|
||||
intersection: {
|
||||
x: section.points[0].x,
|
||||
y: section.points[0].y
|
||||
},
|
||||
skew: {
|
||||
x: lSdSection.points[lSdSection.points.length - 2].x,
|
||||
y: lSdSection.points[lSdSection.points.length - 2].y
|
||||
}
|
||||
};
|
||||
|
||||
@ -287,6 +297,14 @@ export default {
|
||||
rp: {
|
||||
x: rSdSection.points[1].x,
|
||||
y: rSdSection.points[1].y
|
||||
},
|
||||
intersection: {
|
||||
x: section.points[section.points.length - 1].x,
|
||||
y: section.points[section.points.length - 1].y
|
||||
},
|
||||
skew: {
|
||||
x: rSdSection.points[1].x,
|
||||
y: rSdSection.points[1].y
|
||||
}
|
||||
};
|
||||
|
||||
@ -351,7 +369,7 @@ export default {
|
||||
const selected = this.$store.getters['map/getDeviceByCode'](this.editModel.code);
|
||||
if (selected && selected._type.toUpperCase() === 'Switch'.toUpperCase()) {
|
||||
const _that = this;
|
||||
this.$confirm(this.$t('tip.confirmBatchGeneration'), this.$t('tip.hint'), {
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
|
@ -24,11 +24,6 @@
|
||||
<el-form-item :label="$t('map.mapName')" prop="name">
|
||||
<el-input v-model="editModel.name" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('map.selectCity')" prop="cityCode">
|
||||
<el-select v-model="editModel.cityCode" :placeholder="$t('map.pleaseSelect')" size="mini">
|
||||
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code" />
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</template>
|
||||
<template v-else>
|
||||
@ -116,9 +111,6 @@ export default {
|
||||
],
|
||||
skinCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectAssociatedSkin'), trigger: 'change' }
|
||||
],
|
||||
cityCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseSelectAssociatedCity'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
},
|
||||
@ -152,13 +144,19 @@ export default {
|
||||
this.initLoadData();
|
||||
},
|
||||
methods: {
|
||||
show() {
|
||||
show(type) {
|
||||
const dataZoom = this.$store.state.map.dataZoom;
|
||||
if (dataZoom && dataZoom.offsetX) {
|
||||
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX);
|
||||
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY);
|
||||
this.updtModel.scaling = dataZoom.scaleRate;
|
||||
if (type == 'editCode') {
|
||||
this.editModel.skinCode = this.editModel.skinCode ? this.editModel.skinCode : '';
|
||||
this.editModel.name = this.editModel.name ? this.editModel.name : '';
|
||||
} else if (type == 'editPoint') {
|
||||
if (dataZoom && dataZoom.offsetX) {
|
||||
this.updtModel.origin.x = Number.parseInt(dataZoom.offsetX);
|
||||
this.updtModel.origin.y = Number.parseInt(dataZoom.offsetY);
|
||||
this.updtModel.scaling = dataZoom.scaleRate;
|
||||
}
|
||||
}
|
||||
|
||||
this.dialogShow = true;
|
||||
},
|
||||
close() {
|
||||
@ -176,7 +174,7 @@ export default {
|
||||
save() {
|
||||
this.loading = true;
|
||||
if (this.basicInfo) {
|
||||
this.editModel.id = this.$route.params.mapId;
|
||||
// this.editModel.id = this.$route.params.mapId;
|
||||
this.$refs['edit'].validate((valid) => {
|
||||
if (valid) {
|
||||
updateMap(this.editModel).then(response => {
|
||||
|
@ -117,6 +117,7 @@ export default {
|
||||
y: e.clientY
|
||||
};
|
||||
this.editModel = obj;
|
||||
this.editModel.skinCode = node.parent.data.id;
|
||||
this.$store.dispatch('menuOperation/setPopMenu', { position: this.point, menu: menu });
|
||||
}
|
||||
},
|
||||
@ -299,7 +300,6 @@ export default {
|
||||
import('@/utils/Export2Excel').then(excel => {
|
||||
self.queryExportData(resultData).then(data => {
|
||||
excel.export_json_excel(data, resultData.name);
|
||||
|
||||
}).catch(error => {
|
||||
self.$message.error('导出执行异常:' + error.message);
|
||||
});
|
||||
|
@ -114,13 +114,13 @@ export default {
|
||||
updateObj() {
|
||||
this.doClose();
|
||||
if (this.$refs && this.$refs.edit) {
|
||||
this.$refs.edit.show();
|
||||
this.$refs.edit.show('editCode');
|
||||
}
|
||||
},
|
||||
updateObjAxis() {
|
||||
this.doClose();
|
||||
if (this.$refs && this.$refs.axisEdit) {
|
||||
this.$refs.axisEdit.show();
|
||||
this.$refs.axisEdit.show('editPoint');
|
||||
}
|
||||
},
|
||||
saveAs() {
|
||||
@ -144,12 +144,14 @@ export default {
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteMap(this.editModel.id).then(response => {
|
||||
this.$store.dispatch('map/mapClear').then(() => {
|
||||
_that.refresh();
|
||||
_that.$emit('editMap', null);
|
||||
_that.$message.success(this.$t('map.successfullyDelete'));
|
||||
_that.$router.push({ path: `${UrlConfig.map.draft}/0/draft` });
|
||||
});
|
||||
if (this.editModel.id == this.$route.params.mapId) {
|
||||
this.$store.dispatch('map/mapClear').then(() => {
|
||||
_that.$emit('editMap', null);
|
||||
_that.$router.push({ path: `${UrlConfig.map.draft}/0/draft` });
|
||||
});
|
||||
}
|
||||
_that.refresh();
|
||||
_that.$message.success(this.$t('map.successfullyDelete'));
|
||||
}).catch(error => {
|
||||
_that.$message.error(this.$t('map.failDelete') + error.message);
|
||||
});
|
||||
|
@ -6,6 +6,7 @@
|
||||
label-position="right"
|
||||
:model="editModel"
|
||||
label-width="120px"
|
||||
:rules="editRules"
|
||||
size="mini"
|
||||
@submit.native.prevent
|
||||
>
|
||||
@ -45,6 +46,14 @@ export default {
|
||||
id: '',
|
||||
name: '',
|
||||
cityCode: '000000'
|
||||
},
|
||||
editRules: {
|
||||
cityCode: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
|
@ -6,6 +6,7 @@
|
||||
label-position="right"
|
||||
:model="editModel"
|
||||
label-width="100px"
|
||||
:rules="editRules"
|
||||
size="mini"
|
||||
@submit.native.prevent
|
||||
>
|
||||
@ -39,6 +40,11 @@ export default {
|
||||
editModel: {
|
||||
id: '',
|
||||
name: ''
|
||||
},
|
||||
editRules: {
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user