From 72d3a5f47596f010557c60a6fe6b04fefc4777f3 Mon Sep 17 00:00:00 2001 From: ival <610568032@qq.com> Date: Wed, 14 Aug 2019 15:19:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E8=B7=AF=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/QueryListPage/QueryListPage.vue | 5 +++-- .../mapedit/automaticoperate/detail.vue | 13 ++++++------- .../mapedit/automaticoperate/index.vue | 13 ++++++++++--- .../mapedit/automaticoperate/preview.vue | 4 +++- .../mapedit/automaticoperate/route.vue | 18 ++++++++++++++---- .../mapdraft/mapedit/pathoperate/detail.vue | 4 +++- .../map/mapdraft/mapedit/pathoperate/index.vue | 8 +++++--- .../mapedit/pathoperate/pathAccess.vue | 7 +++---- .../map/mapdraft/mapedit/pathoperate/route.vue | 12 +++++++++--- .../mapdraft/mapedit/routeoperate/detail.vue | 15 ++++++--------- .../mapdraft/mapedit/routeoperate/index.vue | 8 ++++++-- .../mapdraft/mapedit/routeoperate/preview.vue | 4 +++- .../mapdraft/mapedit/routeoperate/related.vue | 4 +++- .../mapdraft/mapedit/routeoperate/route.vue | 12 +++++++++--- .../mapdraft/mapedit/routingoperate/detail.vue | 4 +++- .../mapdraft/mapedit/routingoperate/index.vue | 8 ++++++-- .../mapedit/routingoperate/preview.vue | 4 +++- .../mapdraft/mapedit/routingoperate/route.vue | 12 +++++++++--- .../mapdraft/mapedit/switchoperate/detail.vue | 4 +++- .../mapdraft/mapedit/switchoperate/index.vue | 8 ++++++-- .../mapdraft/mapedit/switchoperate/route.vue | 12 +++++++++--- 21 files changed, 122 insertions(+), 57 deletions(-) diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index 02d099aa4..e316e2b29 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -47,10 +47,10 @@ + > @@ -400,6 +400,7 @@ export default { if (this.queryList.afterQuery && this.queryList.afterQuery instanceof Function) { this.queryList.afterQuery(response.data); } + const resultData = response.data; this.$set(this.queryList, 'data', resultData.list); this.$set(this.queryList, 'total', resultData.total); diff --git a/src/views/map/mapdraft/mapedit/automaticoperate/detail.vue b/src/views/map/mapdraft/mapedit/automaticoperate/detail.vue index 1b1ceabcf..c9b263c13 100644 --- a/src/views/map/mapdraft/mapedit/automaticoperate/detail.vue +++ b/src/views/map/mapdraft/mapedit/automaticoperate/detail.vue @@ -25,7 +25,10 @@ export default { }, props: { mapInfo: { - type: Object + type: Object, + default() { + return null; + } } }, data() { @@ -40,12 +43,8 @@ export default { labelWidth: '120px', queryObject: { signalCode: { - type: 'select', - label: this.$t('map.signal'), - config: { - data: [] - } - } + type: 'text', + label: this.$t('map.signal') } } }, queryList: { diff --git a/src/views/map/mapdraft/mapedit/automaticoperate/index.vue b/src/views/map/mapdraft/mapedit/automaticoperate/index.vue index 41916020e..af540b2db 100644 --- a/src/views/map/mapdraft/mapedit/automaticoperate/index.vue +++ b/src/views/map/mapdraft/mapedit/automaticoperate/index.vue @@ -41,13 +41,20 @@ export default { }, props: { mapInfo: { - type: Object + type: Object, + default() { + return null; + } }, selected: { - type: Object + type: Object, + default() { + return null; + } }, cardHeight: { - type: Number || String + type: Number || String, + required: true } }, data() { diff --git a/src/views/map/mapdraft/mapedit/automaticoperate/preview.vue b/src/views/map/mapdraft/mapedit/automaticoperate/preview.vue index 0d7447e49..39c28826a 100644 --- a/src/views/map/mapdraft/mapedit/automaticoperate/preview.vue +++ b/src/views/map/mapdraft/mapedit/automaticoperate/preview.vue @@ -34,7 +34,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { diff --git a/src/views/map/mapdraft/mapedit/automaticoperate/route.vue b/src/views/map/mapdraft/mapedit/automaticoperate/route.vue index 204e74a03..f9fb788bb 100644 --- a/src/views/map/mapdraft/mapedit/automaticoperate/route.vue +++ b/src/views/map/mapdraft/mapedit/automaticoperate/route.vue @@ -53,16 +53,26 @@ export default { name: 'RouteOperation', props: { selected: { - type: Object + type: Object, + default() { + return null; + } }, mapInfo: { - type: Object + type: Object, + default() { + return null; + } }, routeData: { - type: Object + type: Object, + default() { + return null; + } }, cardHeight: { - type: Number || String + type: Number || String, + required: true } }, data() { diff --git a/src/views/map/mapdraft/mapedit/pathoperate/detail.vue b/src/views/map/mapdraft/mapedit/pathoperate/detail.vue index b2377987b..dba31838e 100644 --- a/src/views/map/mapdraft/mapedit/pathoperate/detail.vue +++ b/src/views/map/mapdraft/mapedit/pathoperate/detail.vue @@ -23,7 +23,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { diff --git a/src/views/map/mapdraft/mapedit/pathoperate/index.vue b/src/views/map/mapdraft/mapedit/pathoperate/index.vue index 9a1e122fe..94ccb1b20 100644 --- a/src/views/map/mapdraft/mapedit/pathoperate/index.vue +++ b/src/views/map/mapdraft/mapedit/pathoperate/index.vue @@ -40,12 +40,14 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } }, selected: { type: Object, - default: function() { - return {}; + default() { + return null; } }, cardHeight: { diff --git a/src/views/map/mapdraft/mapedit/pathoperate/pathAccess.vue b/src/views/map/mapdraft/mapedit/pathoperate/pathAccess.vue index f866e04c4..736b438bd 100644 --- a/src/views/map/mapdraft/mapedit/pathoperate/pathAccess.vue +++ b/src/views/map/mapdraft/mapedit/pathoperate/pathAccess.vue @@ -22,7 +22,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { @@ -179,12 +181,9 @@ export default { if (data && data.list) { const that = this; const list = data.list; - const nameList = this.queryForm.queryObject.name.config.data = []; if (list) { list.map(elem => { - nameList.push({ label: elem.name, value: elem.name }); that.convertField(elem, that.mapList, 'id', 'name', ['mapId']); - that.convertField(elem, that.stationList, 'code', 'name', ['stationCode']); that.convertField(elem, that.signalList, 'code', 'uniqueName', ['startSignalCode', 'endSignalCode']); }); diff --git a/src/views/map/mapdraft/mapedit/pathoperate/route.vue b/src/views/map/mapdraft/mapedit/pathoperate/route.vue index b591e0594..fb6d47ccd 100644 --- a/src/views/map/mapdraft/mapedit/pathoperate/route.vue +++ b/src/views/map/mapdraft/mapedit/pathoperate/route.vue @@ -120,15 +120,21 @@ export default { props: { selected: { type: Object, - required: true + default() { + return null; + } }, mapInfo: { type: Object, - required: true + default() { + return null; + } }, routeData: { type: Object, - required: true + default() { + return null; + } }, cardHeight: { type: Number || String, diff --git a/src/views/map/mapdraft/mapedit/routeoperate/detail.vue b/src/views/map/mapdraft/mapedit/routeoperate/detail.vue index b35cc6d61..1d30c85c3 100644 --- a/src/views/map/mapdraft/mapedit/routeoperate/detail.vue +++ b/src/views/map/mapdraft/mapedit/routeoperate/detail.vue @@ -32,7 +32,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { @@ -50,11 +52,8 @@ export default { labelWidth: '120px', queryObject: { name: { - type: 'select', - label: '进路名称', - config: { - data: [] - } + type: 'text', + label: '进路名称' }, stationCode: { type: 'select', @@ -306,16 +305,14 @@ export default { if (data && data.list) { const that = this; const list = data.list; - const nameList = this.queryForm.queryObject.name.config.data = []; if (list) { list.map(elem => { - nameList.push({ label: elem.name, value: elem.name }); that.convertField(elem, that.RouteAutoTypeList, 'code', 'name', ['autoType']); that.convertField(elem, that.RouteNatureTypeList, 'code', 'name', ['natureType']); that.convertField(elem, that.SwitchLocateTypeList, 'code', 'name', ['overlapSwitchLocateType']); that.convertField(elem, that.mapList, 'id', 'name', ['mapId']); that.convertField(elem, that.switchList, 'code', 'name', ['routeOverlapSwitchList']); - that.convertField(elem, that.signalList, 'code', 'uniqueName', ['startSignalCode', 'endSignalCode']); + that.convertField(elem, that.signalList, 'code', 'name', ['startSignalCode', 'endSignalCode']); that.convertField(elem, that.stationList, 'code', 'name', ['stationCode']); that.convertField(elem, that.sectionList, 'code', 'name', ['nearSectionCode', 'autoTriggerSectionCode', 'turnBackSectionCode']); }); diff --git a/src/views/map/mapdraft/mapedit/routeoperate/index.vue b/src/views/map/mapdraft/mapedit/routeoperate/index.vue index eeead37b8..9e93d5865 100644 --- a/src/views/map/mapdraft/mapedit/routeoperate/index.vue +++ b/src/views/map/mapdraft/mapedit/routeoperate/index.vue @@ -43,11 +43,15 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } }, selected: { type: Object, - required: true + default() { + return null; + } }, cardHeight: { type: Number || String, diff --git a/src/views/map/mapdraft/mapedit/routeoperate/preview.vue b/src/views/map/mapdraft/mapedit/routeoperate/preview.vue index 2511d369c..0e5c4729d 100644 --- a/src/views/map/mapdraft/mapedit/routeoperate/preview.vue +++ b/src/views/map/mapdraft/mapedit/routeoperate/preview.vue @@ -35,7 +35,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { diff --git a/src/views/map/mapdraft/mapedit/routeoperate/related.vue b/src/views/map/mapdraft/mapedit/routeoperate/related.vue index 433ae93ff..bd9ec44b0 100644 --- a/src/views/map/mapdraft/mapedit/routeoperate/related.vue +++ b/src/views/map/mapdraft/mapedit/routeoperate/related.vue @@ -36,7 +36,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { diff --git a/src/views/map/mapdraft/mapedit/routeoperate/route.vue b/src/views/map/mapdraft/mapedit/routeoperate/route.vue index eb19a6a68..a59d827bd 100644 --- a/src/views/map/mapdraft/mapedit/routeoperate/route.vue +++ b/src/views/map/mapdraft/mapedit/routeoperate/route.vue @@ -341,15 +341,21 @@ export default { props: { selected: { type: Object, - required: true + default() { + return null; + } }, mapInfo: { type: Object, - required: true + default() { + return null; + } }, routeData: { type: Object, - required: true + default() { + return null; + } }, cardHeight: { type: Number || String, diff --git a/src/views/map/mapdraft/mapedit/routingoperate/detail.vue b/src/views/map/mapdraft/mapedit/routingoperate/detail.vue index ee3cc5ef1..7e4e490e4 100644 --- a/src/views/map/mapdraft/mapedit/routingoperate/detail.vue +++ b/src/views/map/mapdraft/mapedit/routingoperate/detail.vue @@ -26,7 +26,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { diff --git a/src/views/map/mapdraft/mapedit/routingoperate/index.vue b/src/views/map/mapdraft/mapedit/routingoperate/index.vue index d4b9b4cfa..090815636 100644 --- a/src/views/map/mapdraft/mapedit/routingoperate/index.vue +++ b/src/views/map/mapdraft/mapedit/routingoperate/index.vue @@ -42,11 +42,15 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } }, selected: { type: Object, - required: true + default() { + return null; + } }, cardHeight: { type: Number || String, diff --git a/src/views/map/mapdraft/mapedit/routingoperate/preview.vue b/src/views/map/mapdraft/mapedit/routingoperate/preview.vue index 2511d369c..0e5c4729d 100644 --- a/src/views/map/mapdraft/mapedit/routingoperate/preview.vue +++ b/src/views/map/mapdraft/mapedit/routingoperate/preview.vue @@ -35,7 +35,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { diff --git a/src/views/map/mapdraft/mapedit/routingoperate/route.vue b/src/views/map/mapdraft/mapedit/routingoperate/route.vue index 7fc953c6c..4e8ff0874 100644 --- a/src/views/map/mapdraft/mapedit/routingoperate/route.vue +++ b/src/views/map/mapdraft/mapedit/routingoperate/route.vue @@ -160,15 +160,21 @@ export default { props: { selected: { type: Object, - required: true + default() { + return null; + } }, mapInfo: { type: Object, - required: true + default() { + return null; + } }, routeData: { type: Object, - required: true + default() { + return null; + } }, cardHeight: { type: Number || String, diff --git a/src/views/map/mapdraft/mapedit/switchoperate/detail.vue b/src/views/map/mapdraft/mapedit/switchoperate/detail.vue index eeab06ac1..83d58bafe 100644 --- a/src/views/map/mapdraft/mapedit/switchoperate/detail.vue +++ b/src/views/map/mapdraft/mapedit/switchoperate/detail.vue @@ -21,7 +21,9 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } } }, data() { diff --git a/src/views/map/mapdraft/mapedit/switchoperate/index.vue b/src/views/map/mapdraft/mapedit/switchoperate/index.vue index 790494e49..0d226963b 100644 --- a/src/views/map/mapdraft/mapedit/switchoperate/index.vue +++ b/src/views/map/mapdraft/mapedit/switchoperate/index.vue @@ -40,11 +40,15 @@ export default { props: { mapInfo: { type: Object, - required: true + default() { + return null; + } }, selected: { type: Object, - required: true + default() { + return null; + } }, cardHeight: { type: Number || String, diff --git a/src/views/map/mapdraft/mapedit/switchoperate/route.vue b/src/views/map/mapdraft/mapedit/switchoperate/route.vue index 68e556ec7..93cb851c2 100644 --- a/src/views/map/mapdraft/mapedit/switchoperate/route.vue +++ b/src/views/map/mapdraft/mapedit/switchoperate/route.vue @@ -47,15 +47,21 @@ export default { props: { selected: { type: Object, - required: true + default() { + return null; + } }, mapInfo: { type: Object, - required: true + default() { + return null; + } }, routeData: { type: Object, - required: true + default() { + return null; + } }, cardHeight: { type: Number || String,