From 02aa4a5b653f20ea7cf36b595effa4a1ea5c8815 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Tue, 27 Aug 2019 15:02:55 +0800
Subject: [PATCH] =?UTF-8?q?desc:=20=E9=81=93=E5=B2=94=E5=88=9B=E5=BB=BA?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=E8=A1=A5=E5=85=85=EF=BC=8C=E4=BF=AE=E6=94=B9?=
=?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=90=8D=E7=A7=B0=EF=BC=8C=E6=8F=8F=E8=BF=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/i18n/langs/zh/map.js | 4 +--
.../map/mapdraft/mapedit/mapoperate/link.vue | 24 ++++++++++++----
.../mapdraft/mapedit/mapoperate/signal.vue | 22 +++++++--------
.../mapdraft/mapedit/mapoperate/station.vue | 2 +-
.../mapedit/mapoperate/stationcontrol.vue | 2 +-
.../mapdraft/mapedit/mapoperate/switch.vue | 28 +++++++++++++++----
src/views/map/mapdraft/mapmanage/edit.vue | 26 ++++++++---------
src/views/map/mapdraft/mapmanage/maplist.vue | 2 +-
.../map/mapdraft/mapmanage/operateMenu.vue | 18 ++++++------
src/views/map/mapdraft/mapmanage/publish.vue | 9 ++++++
src/views/map/mapdraft/mapmanage/saveAs.vue | 6 ++++
11 files changed, 95 insertions(+), 48 deletions(-)
diff --git a/src/i18n/langs/zh/map.js b/src/i18n/langs/zh/map.js
index d831c3238..7478e0c0e 100644
--- a/src/i18n/langs/zh/map.js
+++ b/src/i18n/langs/zh/map.js
@@ -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: '站台名称:',
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/link.vue b/src/views/map/mapdraft/mapedit/mapoperate/link.vue
index 5ce68e9bc..11e43b69e 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/link.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/link.vue
@@ -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' }
]
};
// 清空表单验证提示信息
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/signal.vue b/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
index cb0208c70..1fd3d4dd5 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/signal.vue
@@ -24,16 +24,6 @@
/>
-
-
-
-
-
+
+
+
+
+
{ return elem.type === '01'; });
+ list = this.sectionList.filter(elem => { return elem.type === '01' && !elem.isSwitchSection; });
}
return list;
},
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/station.vue b/src/views/map/mapdraft/mapedit/mapoperate/station.vue
index 2fc09c171..c6676f736 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/station.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/station.vue
@@ -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;
},
diff --git a/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue b/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
index 0763e761d..09d9d1c02 100644
--- a/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
+++ b/src/views/map/mapdraft/mapedit/mapoperate/stationcontrol.vue
@@ -15,7 +15,7 @@
-
+
-
@@ -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 => {
diff --git a/src/views/map/mapdraft/mapmanage/maplist.vue b/src/views/map/mapdraft/mapmanage/maplist.vue
index 0844ab9d2..71bebaafe 100644
--- a/src/views/map/mapdraft/mapmanage/maplist.vue
+++ b/src/views/map/mapdraft/mapmanage/maplist.vue
@@ -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);
});
diff --git a/src/views/map/mapdraft/mapmanage/operateMenu.vue b/src/views/map/mapdraft/mapmanage/operateMenu.vue
index 3febcb5a6..c1aadc2f9 100644
--- a/src/views/map/mapdraft/mapmanage/operateMenu.vue
+++ b/src/views/map/mapdraft/mapmanage/operateMenu.vue
@@ -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);
});
diff --git a/src/views/map/mapdraft/mapmanage/publish.vue b/src/views/map/mapdraft/mapmanage/publish.vue
index 5fb276909..1337de939 100644
--- a/src/views/map/mapdraft/mapmanage/publish.vue
+++ b/src/views/map/mapdraft/mapmanage/publish.vue
@@ -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' }
+ ]
}
};
},
diff --git a/src/views/map/mapdraft/mapmanage/saveAs.vue b/src/views/map/mapdraft/mapmanage/saveAs.vue
index 28ebee662..dd353826b 100644
--- a/src/views/map/mapdraft/mapmanage/saveAs.vue
+++ b/src/views/map/mapdraft/mapmanage/saveAs.vue
@@ -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' }
+ ]
}
};
},