From cf5e6331871fa583c56e30273fcaabbe73746164 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 20 Feb 2023 14:19:12 +0800 Subject: [PATCH 01/15] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/graph/Station/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jmapNew/shape/graph/Station/index.js b/src/jmapNew/shape/graph/Station/index.js index 17c0e364c..2035ad1ea 100644 --- a/src/jmapNew/shape/graph/Station/index.js +++ b/src/jmapNew/shape/graph/Station/index.js @@ -169,7 +169,7 @@ export default class Station extends Group { return item.includes('lineCode=16'); }); const pic = store.state.map.picture; - if ((queryCtc && model.createControlMode) || (pic == 'trafficTerminal' && queryCtcLineCode)) { + if ((queryCtc || (pic == 'trafficTerminal' && queryCtcLineCode)) && model.createControlMode) { this.createCtcControlMode(); } else if (this.style.Station.StationControl.special) { if (model.visible && model.createControlMode) { // model.createControlMode 控制模式 From a7616055dc19276ee817708a5e99810654db67a7 Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 20 Feb 2023 15:01:22 +0800 Subject: [PATCH 02/15] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=8E=E8=BD=A6?= =?UTF-8?q?=E5=8A=A1=E7=BB=88=E7=AB=AF=E5=88=87=E5=88=B0=E8=81=94=E9=94=81?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=90=8E=E6=97=A0=E6=B3=95=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=88=97=E8=BD=A6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue index f2d11aac5..e9be2e399 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButtonCtc.vue @@ -319,6 +319,7 @@ export default { } }, beforeDestroy() { + this.$store.dispatch('menuOperation/setButtonOperation', null); this.routeDataMap = null; this.routeButtonCodeList = []; }, From 7590552db25bbe5f0c375340670ad41653d52c55 Mon Sep 17 00:00:00 2001 From: fan Date: Mon, 20 Feb 2023 16:12:18 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E7=BA=BF=E8=B7=AF?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/trainingPlatform.js | 47 ++ src/router/index.js | 6 + .../publish/publishMap/editSubsystem.vue | 125 +++-- src/views/publish/publishMap/index.vue | 8 +- .../publishMap/mapFunctionTemplate/edit.vue | 427 ++++++++++++++++++ .../publishMap/mapFunctionTemplate/index.vue | 146 ++++++ src/views/publish/publishMap/subsystem.vue | 67 ++- src/views/publish/publishMap/systemSubset.vue | 2 +- src/views/system/projectManage/add.vue | 2 +- src/views/trainingPlatform/simulation.vue | 2 +- 10 files changed, 763 insertions(+), 69 deletions(-) create mode 100644 src/views/publish/publishMap/mapFunctionTemplate/edit.vue create mode 100644 src/views/publish/publishMap/mapFunctionTemplate/index.vue diff --git a/src/api/trainingPlatform.js b/src/api/trainingPlatform.js index 842b033cc..906be28c8 100644 --- a/src/api/trainingPlatform.js +++ b/src/api/trainingPlatform.js @@ -146,3 +146,50 @@ export function updateMapFunctionSubset(data) { data }); } +/** 根据模板生成地图功能 */ +export function generateMapFunctionByTemplate(data) { + return request({ + url: `/api/mapFunction/generate/from/template`, + method: 'post', + data + }); +} +/** 创建模板线路功能 */ +export function createTemplateMapFunction(data) { + return request({ + url: `/api/mapFunction/template`, + method: 'post', + data + }); +} +/** 修改模板线路功能 */ +export function updateTemplateMapFunction(data) { + return request({ + url: `/api/mapFunction/template/${data.id}`, + method: 'put', + data + }); +} +/** 删除模板线路功能 */ +export function deleteTemplateMapFunction(id) { + return request({ + url: `/api/mapFunction/template/${id}`, + method: 'delete' + }); +} +/** 查询模板线路功能列表 */ +export function queryTemplateMapFunctionList(params) { + return request({ + url: `/api/mapFunction/template/list`, + method: 'get', + params + }); +} +/** 分页查询模板线路功能列表 */ +export function queryTemplateMapFunPaged(params) { + return request({ + url: `/api/mapFunction/template/paged`, + method: 'get', + params + }); +} diff --git a/src/router/index.js b/src/router/index.js index c339ee95d..6c5003bda 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -126,6 +126,7 @@ const SimulationPlatform = () => import('@/views/trainingPlatform/simulation'); const PublishMap = () => import('@/views/publish/publishMap/index'); const SubsystemManage = () => import('@/views/publish/publishMap/subsystem'); +const MapFunTemManage = () => import('@/views/publish/publishMap/mapFunctionTemplate/index'); const SystemSubsetManage = () => import('@/views/publish/publishMap/systemSubset'); const IscsDataManage = () => import('@/views/publish/publishMap/iscsDataManage/index'); const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史 @@ -1875,6 +1876,11 @@ export const asyncRouter = [ component: SubsystemManage, hidden: true }, + { + path: 'mapFunTem', + component: MapFunTemManage, + hidden: true + }, { path: 'systemSubset', component: SystemSubsetManage, diff --git a/src/views/publish/publishMap/editSubsystem.vue b/src/views/publish/publishMap/editSubsystem.vue index d4af09ccc..21a75c081 100644 --- a/src/views/publish/publishMap/editSubsystem.vue +++ b/src/views/publish/publishMap/editSubsystem.vue @@ -37,16 +37,10 @@ -
- - - - + @@ -131,7 +125,7 @@ import { queryPaperList } from '@/api/management/exam'; import { getTrainingDetailNew } from '@/api/jmap/training'; import ChooseTraining from './chooseTraining'; import { ClientList, TrainingTypeList } from '@/scripts/ConstDic'; - +import { getUploadUrl } from '@/api/projectConfig'; export default { name: 'EditSubsystem', components: { @@ -143,6 +137,7 @@ export default { title: '', trainingName: '', mapSystemId: '', + loginProLogoImg: '', memberList: [], examList: [], lpfDataList: [], @@ -183,25 +178,12 @@ export default { }, memberMetroList: [], memberRailwayList: [], - memberEmergencyList: [], - bgUrlList: [ - { label: '运行图编制', value: '/logo/chartPreparation.png' }, - { label: '调度仿真', value: '/logo/dispatchingPlan.png' }, - { label: '考试', value: '/logo/exam.png' }, - { label: '综合演练', value: '/logo/joinRoom.png' }, - { label: '场景实训', value: '/logo/sceneTraining.png' }, - { label: '派班', value: '/logo/schedulingSimulation.png' }, - { label: '单操仿真', value: '/logo/singleTraining.png' }, - { label: '车站仿真', value: '/logo/stationSimulation.png' }, - { label: '车辆段', value: '/logo/trainDepot.png' }, - { label: '实训设计', value: '/logo/trainingDesign.png' }, - { label: '模拟驾驶', value: '/logo/simulatedDriving.png' } - ] + memberEmergencyList: [] }; }, computed: { - ossUrl() { - return this.$store.state.user.ossUrl; + computedLoginLogo() { + return this.loginProLogoImg ? this.$store.state.user.ossUrl + this.loginProLogoImg : ''; } }, async mounted() { @@ -259,6 +241,7 @@ export default { this.ruleForm.name = row.name; this.ruleForm.desc = row.desc || ''; this.ruleForm.bgUrl = row.bgUrl || ''; + this.loginProLogoImg = row.bgUrl || ''; this.ruleForm.type = row.paramVO.type; this.typeChange(this.ruleForm.type); this.frontTableData.forEach(item => { @@ -461,13 +444,99 @@ export default { this.trainingName = data.name; const training = this.endTableData.find(item => item.type === 'trainingChoose'); training.value = data.id; + }, + uploadLogo() { + const pic = document.getElementById('upload_file'); + if (!pic.files || !pic.files[0]) { + return; + } + const file = pic.files[0]; + const mineType = file.type; + const fileSize = file.size; + if (mineType != 'image/png' && mineType != 'image/jpeg') { + this.$message.error('仅支持png和jpeg格式的图片'); + return; + } + if (fileSize / (1024 * 1024) > 1) { + this.$message.error('图片应该小于1M'); + return; + } + const fileArray = file.name.split('.'); + const fileType = fileArray[fileArray.length - 1] || ''; + if (!fileType) { + return; + } + const params = { + directory:'funBg', + fileName:'favicon_' + this.ruleForm.templateName + '.' + fileType, + method:'PUT' + }; + const that = this; + getUploadUrl(params).then((response) => { + const url = response.data; + if (url) { + // var formData = new FormData(); + // formData.append('body', file); + const xhr = new XMLHttpRequest(); + xhr.open('PUT', url); + xhr.setRequestHeader('Content-Type', 'multipart/form-data'); + xhr.send(file); + xhr.onreadystatechange = function() { + if (xhr.readyState === 4 && xhr.status == 200) { + that.ruleForm.bgUrl = '/funBg/' + params.fileName; + that.loginProLogoImg = '/funBg/' + params.fileName + '?' + Math.random() * 1000; + } else if (xhr.status != 200) { + that.$message.error('上传失败,请稍后再试'); + } + }; + } + }); } } }; - diff --git a/src/views/publish/publishMap/index.vue b/src/views/publish/publishMap/index.vue index c8ea9f9f3..f17c6f5a3 100644 --- a/src/views/publish/publishMap/index.vue +++ b/src/views/publish/publishMap/index.vue @@ -66,7 +66,7 @@ export default { queryForm: { labelWidth: '80px', reset: true, - leftSpan: 17, + leftSpan: 15, queryObject: { name: { type: 'text', @@ -223,7 +223,8 @@ export default { { text: '地图排序', handler: this.mapSort }, { text: '导出', handler: this.localExport, show: () => { return this.$store.state.user.roles.includes(superAdmin); }}, { text: '导入', handler: this.localImport, fileType: 'file', show: () => { return this.$store.state.user.roles.includes(superAdmin); }}, - { text: '一键校验', handler: this.allCheck } + { text: '一键校验', handler: this.allCheck }, + { text: '线路功能模板', handler: this.templateLineFunctionShow } ] }, @@ -416,6 +417,9 @@ export default { this.$message.error('一键校验地图数据失败:' + e.message); }); }, + templateLineFunctionShow() { + this.$router.push({path:'/systemManagement/lineDataManage/mapFunTem'}); + }, localExport() { this.$refs['localMap'].doShow(); }, diff --git a/src/views/publish/publishMap/mapFunctionTemplate/edit.vue b/src/views/publish/publishMap/mapFunctionTemplate/edit.vue new file mode 100644 index 000000000..45d066c35 --- /dev/null +++ b/src/views/publish/publishMap/mapFunctionTemplate/edit.vue @@ -0,0 +1,427 @@ + + + + + diff --git a/src/views/publish/publishMap/mapFunctionTemplate/index.vue b/src/views/publish/publishMap/mapFunctionTemplate/index.vue new file mode 100644 index 000000000..4ee67bd99 --- /dev/null +++ b/src/views/publish/publishMap/mapFunctionTemplate/index.vue @@ -0,0 +1,146 @@ + + + + diff --git a/src/views/publish/publishMap/subsystem.vue b/src/views/publish/publishMap/subsystem.vue index 64bcfe080..1775c9341 100644 --- a/src/views/publish/publishMap/subsystem.vue +++ b/src/views/publish/publishMap/subsystem.vue @@ -10,13 +10,19 @@ center > - - - - - + + + + + + 取 消 @@ -27,7 +33,7 @@ - diff --git a/src/views/trainingPlatform/index.vue b/src/views/trainingPlatform/index.vue index c97f9b701..e78d57208 100644 --- a/src/views/trainingPlatform/index.vue +++ b/src/views/trainingPlatform/index.vue @@ -62,5 +62,6 @@ export default { left:0; top:0; height: 100%; + background: #00172E; } diff --git a/src/views/trainingPlatform/simulation.vue b/src/views/trainingPlatform/simulation.vue index 366f66ec4..991a246ee 100644 --- a/src/views/trainingPlatform/simulation.vue +++ b/src/views/trainingPlatform/simulation.vue @@ -1,7 +1,7 @@