diff --git a/src/api/jmap/mapdraft.js b/src/api/jmap/mapdraft.js index cb80f5429..ba9d7f8bc 100644 --- a/src/api/jmap/mapdraft.js +++ b/src/api/jmap/mapdraft.js @@ -536,4 +536,42 @@ export function getFlankProtectionList(mapId, params) { params }); } - +/** 创建车站区段停站时间 */ +export function createStationParkTime(data) { + return request({ + url: `/api/mapBuild/stationParkTime`, + method: 'post', + data + }); +} +/** 删除车站区段停站时间 */ +export function deleteStationParkTime(stationParkTimeId) { + return request({ + url: `/api/mapBuild/stationParkTime/${stationParkTimeId}`, + method: 'delete' + }); +} +/** 获取车站区段停站时间 */ +export function getStationParkTime(stationParkTimeId, params) { + return request({ + url: `/api/mapBuild/stationParkTime/${stationParkTimeId}`, + method: 'get', + params + }); +} +/** 更新车站区段停站时间 */ +export function updateStationParkTime(data) { + return request({ + url: `/api/mapBuild/stationParkTime/${data.id}`, + method: 'get', + data + }); +} +/** 分页获取车站区段停站时间 */ +export function getStationParkTimeList(mapId, params) { + return request({ + url: `/api/mapBuild/${mapId}/stationParkTime`, + method: 'get', + params + }); +} diff --git a/src/i18n/langs/en/tip.js b/src/i18n/langs/en/tip.js index 91c39c666..230297945 100644 --- a/src/i18n/langs/en/tip.js +++ b/src/i18n/langs/en/tip.js @@ -234,5 +234,9 @@ export default { mapSortSuccessfully: 'Map sort successfully!', mapSortFailed: 'Map sort failed', enterTrainingRoomFailed: 'Failed to enter the comprehensive drill, please consult the administrator is still in the room!', - failedToAddNewRoom: 'Failed to add new room' + failedToAddNewRoom: 'Failed to add new room', + dwellTimeSuccessful: 'Create dwell time successful!', + dwellTimeFailed: 'Failed to create dwell time!', + updateDwellTimeSuccessful: 'Update dwell time successful!', + updateDwellTimeFailed: 'Failed to update dwell time!' }; diff --git a/src/i18n/langs/zh/tip.js b/src/i18n/langs/zh/tip.js index 373531735..e74f6f5a1 100644 --- a/src/i18n/langs/zh/tip.js +++ b/src/i18n/langs/zh/tip.js @@ -234,5 +234,9 @@ export default { mapSortSuccessfully: '地图排序成功!', mapSortFailed: '地图排序失败!', enterTrainingRoomFailed: '进入综合演练失败,请咨询管理员是否还在房间内!', - failedToAddNewRoom: '加入新房间失败' + failedToAddNewRoom: '加入新房间失败', + dwellTimeSuccessful: '创建停站时间成功!', + dwellTimeFailed: '创建停站时间失败!', + updateDwellTimeSuccessful: '更新停站时间成功!', + updateDwellTimeFailed: '更新停站时间失败!' }; diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index e9046878d..568f6a628 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -2,11 +2,11 @@ export function getBaseUrl() { let BASE_API; if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; - BASE_API = 'https://test.joylink.club/jlcloud'; + // BASE_API = 'https://test.joylink.club/jlcloud'; // BASE_API = 'http://192.168.3.5:9000'; // 袁琪 // BASE_API = 'http://192.168.3.6:9000'; // 旭强 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 - // BASE_API = 'http://192.168.3.82:9000'; // 杜康 + BASE_API = 'http://192.168.3.82:9000'; // 杜康 // BASE_API = 'http://192.168.3.41:9000'; // 张赛 // BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 diff --git a/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/detail.vue b/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/detail.vue new file mode 100644 index 000000000..75e1092b2 --- /dev/null +++ b/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/detail.vue @@ -0,0 +1,201 @@ + + + + diff --git a/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/dwellTime.vue b/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/dwellTime.vue new file mode 100644 index 000000000..050ab75c5 --- /dev/null +++ b/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/dwellTime.vue @@ -0,0 +1,259 @@ + + + diff --git a/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/index.vue b/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/index.vue new file mode 100644 index 000000000..f83cbd2e2 --- /dev/null +++ b/src/views/newMap/newMapdraft/dataRelation/dwellTimeOperate/index.vue @@ -0,0 +1,87 @@ + + diff --git a/src/views/newMap/newMapdraft/dataRelation/index.vue b/src/views/newMap/newMapdraft/dataRelation/index.vue index 5eb8a5a9a..852c0a480 100644 --- a/src/views/newMap/newMapdraft/dataRelation/index.vue +++ b/src/views/newMap/newMapdraft/dataRelation/index.vue @@ -69,6 +69,14 @@ @setCenter="setCenter" /> + + + @@ -84,6 +92,7 @@ import RunLevelOperate from './runLeveloperate/index'; import SignalOperate from './signaloperate/index'; import TurnedOperate from './turnedoperate/index'; import FlankProtectOperate from './flankProtectOperate/index'; +import DwellTimeOperate from './dwellTimeOperate/index'; export default { name: 'DataRelation', @@ -95,7 +104,8 @@ export default { FlankProtectOperate, // PathOperate, SignalOperate, - TurnedOperate + TurnedOperate, + DwellTimeOperate }, props: { selected: { @@ -120,7 +130,8 @@ export default { signal: 'signalOperate', runLevel: 'runLevelOperate', turned: 'turnedOperate', - flankProtect: 'flankProtectOperate' + flankProtect: 'flankProtectOperate', + dwellTime: 'dwellTimeOperate' } }; }, diff --git a/src/views/newMap/newMapdraft/dataRelation/routingoperate/detail.vue b/src/views/newMap/newMapdraft/dataRelation/routingoperate/detail.vue index 123415514..046f0df75 100644 --- a/src/views/newMap/newMapdraft/dataRelation/routingoperate/detail.vue +++ b/src/views/newMap/newMapdraft/dataRelation/routingoperate/detail.vue @@ -87,10 +87,10 @@ export default { }, { title: this.$t('map.routingDirection'), - prop: 'directionCode', + prop: 'right', type: 'tag', - columnValue: (row) => { return this.$ConstSelect.translate(row.directionCode, 'DirectionCodeList'); }, - tagType: (row) => { if (row.directionCode === '0') { return 'primary'; } else { return 'success'; } } + columnValue: (row) => { if (row.right) { return '右行'; } else { return '左行'; } }, + tagType: (row) => { if (row.right) { return 'primary'; } else { return 'success'; } } }, { title: this.$t('map.destination'), @@ -98,17 +98,14 @@ export default { }, { title: this.$t('map.remarks'), - prop: 'remarks' + prop: 'description' }, { - type: 'button', title: this.$t('map.sectionData'), - buttons: [ - { - name: this.$t('map.preview'), - handleClick: this.sectionDetail - } - ] + prop: 'parkSectionCodeList', + type: 'tagMore', + columnValue: (row) => { return this.handlerParkSectionCodeList(row.parkSectionCodeList); }, + tagType: 'primary' }, { type: 'button', @@ -159,6 +156,15 @@ export default { doClose() { this.show = false; }, + handlerParkSectionCodeList(parkSectionCodeList) { + const nameList = []; + this.sectionList.forEach(item => { + if (parkSectionCodeList.includes(item.code)) { + nameList.push(item.name); + } + }); + return nameList; + }, formatName(code) { let name = ''; const device = this.$store.getters['map/getDeviceByCode'](code); @@ -223,10 +229,10 @@ export default { const fieldList = { id: row.id, mapId: this.$route.params.mapId, - title: '区段列表', + title: '', name: row.name, model: { - field: 'routingSectionList', + field: 'parkSectionCodeList', items: [ { prop: 'stationCode', label: this.$t('map.stationCodeClomn'), type: 'text' }, { diff --git a/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue b/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue index af8b650c9..370562b2c 100644 --- a/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue +++ b/src/views/newMap/newMapdraft/dataRelation/routingoperate/route.vue @@ -66,7 +66,7 @@ - + - - + + - -
- - - - {{ $t('map.activate') }} -
-
- - - - {{ $t('map.activate') }} - - {{ $t('map.add') }} - -
- - - - - - - - - - - + + + + + {{ $t('map.activate') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('map.save') }} @@ -188,19 +199,19 @@ export default { sectionCode: '', isSave: true, loading: false, - DirectionCodeList: this.$ConstSelect.DirectionCodeList, + DirectionCodeList: [{label: '右行', value: true}, {label: '左行', value: false}], addModel: { name: '', mapId: '', code: '', - directionCode: '', + right: true, destinationCode: '', startStationCode: '', startSectionCode: '', endStationCode: '', endSectionCode: '', - remarks: '', - routingSectionList: [] + description: '', + parkSectionCodeList: [] }, editShow: false, rules: { @@ -293,7 +304,7 @@ export default { this.addModel.endSectionCode = selected.code; this.addModel.destinationCode = selected.destinationCode || ''; } else if (selected._type.toUpperCase() === 'Section'.toUpperCase() && this.field.toUpperCase() == 'routingSection'.toUpperCase()) { - this.sectionCode = selected.code; + this.addModel.parkSectionCodeList.push(selected.code); } else if (selected._type.toUpperCase() === 'Station'.toUpperCase() && this.field.toUpperCase() == 'routingStation'.toUpperCase()) { this.stationCode = selected.code; } @@ -313,9 +324,9 @@ export default { list.splice(index, 1); }, buildModel(code) { - this.addModel.routingSectionList.forEach((elem, index) => { - elem['orderNum'] = index + 1; - }); + // this.addModel.routingSectionList.forEach((elem, index) => { + // elem['orderNum'] = index + 1; + // }); const model = Object.assign({}, this.addModel); model['mapId'] = this.mapInfo.id; @@ -360,7 +371,7 @@ export default { delete this.addModel.id; this.$refs.form.resetFields(); this.addModel.mapId = this.mapInfo.id; - this.addModel.routingSectionList = []; + this.addModel.parkSectionCodeList = []; this.addModel.code = ''; this.stationCode = ''; this.sectionCode = '';