合并
This commit is contained in:
commit
75a6b2ee58
@ -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: '站台名称:',
|
||||
|
@ -12,10 +12,22 @@ import grayButtonPic from '@/assets/ibp_images/gray_button.png';
|
||||
import grayButtonPicOn from '@/assets/ibp_images/gray_button_on.png';
|
||||
|
||||
export default class button extends Group {
|
||||
constructor(device) {
|
||||
static colors = new Map([
|
||||
['red_on', [redButtonPicOn]],
|
||||
['red_off', [redButtonPic]],
|
||||
['green_on', [greenButtonPicOn]],
|
||||
['green_off', [greenButtonPic]],
|
||||
['blue_on', [blueButtonPicOn]],
|
||||
['blue_off', [blueButtonPic]],
|
||||
['yellow_on', [yellowButtonPicOn]],
|
||||
['yellow_off', [yellowButtonPic]],
|
||||
['gray_on', [grayButtonPicOn]],
|
||||
['gray_off', [grayButtonPic]]
|
||||
]);
|
||||
constructor(model) {
|
||||
super();
|
||||
this.model = device.model;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.model = model;
|
||||
this.zlevel = model.zlevel;
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
@ -33,63 +45,8 @@ export default class button extends Group {
|
||||
}
|
||||
|
||||
getImagePic() {
|
||||
switch (this.model.color) {
|
||||
case 'red': {
|
||||
switch (this.model.status) {
|
||||
case 'on': {
|
||||
return redButtonPicOn;
|
||||
}
|
||||
case 'off': {
|
||||
return redButtonPic;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'green': {
|
||||
switch (this.model.status) {
|
||||
case 'on': {
|
||||
return greenButtonPicOn;
|
||||
}
|
||||
case 'off': {
|
||||
return greenButtonPic;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'blue': {
|
||||
switch (this.model.status) {
|
||||
case 'on': {
|
||||
return blueButtonPicOn;
|
||||
}
|
||||
case 'off': {
|
||||
return blueButtonPic;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'yellow': {
|
||||
switch (this.model.status) {
|
||||
case 'on': {
|
||||
return yellowButtonPicOn;
|
||||
}
|
||||
case 'off': {
|
||||
return yellowButtonPic;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'gray': {
|
||||
switch (this.model.status) {
|
||||
case 'on': {
|
||||
return grayButtonPicOn;
|
||||
}
|
||||
case 'off': {
|
||||
return grayButtonPic;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
const color = button.colors.get(`${this.model.color}_${this.model.status}`);
|
||||
return color[0];
|
||||
}
|
||||
|
||||
// 设置按钮状态
|
||||
@ -116,7 +73,6 @@ export default class button extends Group {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onmousedown(e) {
|
||||
if (this.model.allowDrag) {
|
||||
var x = e.offsetX;
|
||||
@ -153,53 +109,13 @@ export default class button extends Group {
|
||||
}
|
||||
// 关闭
|
||||
close() {
|
||||
switch (this.model.color) {
|
||||
case 'red': {
|
||||
this.imageBg.setStyle({image: redButtonPic});
|
||||
break;
|
||||
}
|
||||
case 'green': {
|
||||
this.imageBg.setStyle({image: greenButtonPic});
|
||||
break;
|
||||
}
|
||||
case 'blue': {
|
||||
this.imageBg.setStyle({image: blueButtonPic});
|
||||
break;
|
||||
}
|
||||
case 'yellow': {
|
||||
this.imageBg.setStyle({image: yellowButtonPic});
|
||||
break;
|
||||
}
|
||||
case 'gray': {
|
||||
this.imageBg.setStyle({image: grayButtonPic});
|
||||
break;
|
||||
}
|
||||
}
|
||||
const color = button.colors.get(`${this.model.color}_off`);
|
||||
this.imageBg.setStyle({image: color[0]});
|
||||
}
|
||||
// 开放
|
||||
open() {
|
||||
switch (this.model.color) {
|
||||
case 'red': {
|
||||
this.imageBg.setStyle({image: redButtonPicOn});
|
||||
break;
|
||||
}
|
||||
case 'green': {
|
||||
this.imageBg.setStyle({image: greenButtonPicOn});
|
||||
break;
|
||||
}
|
||||
case 'blue': {
|
||||
this.imageBg.setStyle({image: blueButtonPicOn});
|
||||
break;
|
||||
}
|
||||
case 'yellow': {
|
||||
this.imageBg.setStyle({image: yellowButtonPicOn});
|
||||
break;
|
||||
}
|
||||
case 'gray': {
|
||||
this.imageBg.setStyle({image: grayButtonPicOn});
|
||||
break;
|
||||
}
|
||||
}
|
||||
const color = button.colors.get(`${this.model.color}_on`);
|
||||
this.imageBg.setStyle({image: color[0]});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -382,13 +382,13 @@ export const asyncRouter = [
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: 'ibp/edit',
|
||||
// component: IbpEdit,
|
||||
// meta: {
|
||||
// i18n: 'router.ibpDraw'
|
||||
// }
|
||||
// },
|
||||
{
|
||||
path: 'ibp/edit',
|
||||
component: IbpEdit,
|
||||
meta: {
|
||||
i18n: 'router.ibpDraw'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runPlan',
|
||||
redirect: '/map/runPlan/view/draft',
|
||||
|
@ -7,7 +7,7 @@
|
||||
</div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<!--<el-button @click="jumpIbp">IBP盘</el-button>-->
|
||||
<el-button @click="jumpIbp">IBP盘</el-button>
|
||||
<el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<template v-if="questId">
|
||||
<el-button type="danger" @click="handleQuitQuest">退出剧本</el-button>
|
||||
|
@ -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