diff --git a/src/api/designPlatform.js b/src/api/designPlatform.js index 6ba67a595..47f74bb02 100644 --- a/src/api/designPlatform.js +++ b/src/api/designPlatform.js @@ -100,6 +100,13 @@ export function publishRunPlan(planId, data) { data: data }); } +/** 发布运行图(所有权限用户) */ +export function publishRunPlanAllUser(planId, runPlanName) { + return request({ + url: `/api/review/${planId}/directPublishRunPlan?runPlanName=${runPlanName}`, + method: 'post' + }); +} /** 普通用户申请或撤销运行图发布 */ export function releaseOrCancelRunPlan(planId, status) { return request({ diff --git a/src/api/jmap/map.js b/src/api/jmap/map.js index 297c46794..0ded2d724 100644 --- a/src/api/jmap/map.js +++ b/src/api/jmap/map.js @@ -66,10 +66,20 @@ export function getPublishMapExport(mapId) { } /** 发布地图数据导出*/ -export function getPublishMapExportNew(mapId, list) { +export function getPublishMapExportNew(mapId, params) { return request({ - url: `/api/map/${mapId}/export/new?configs=${list}`, - method: 'get' + url: `/api/map/${mapId}/export/new`, + method: 'get', + params + }); +} + +/** 发布地图数据导出*/ +export function getPublishMapImportNew(mapId, data) { + return request({ + url: `/api/map/${mapId}/import/new`, + method: 'put', + data }); } diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index 081468607..6b3c86b4c 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -134,16 +134,32 @@ > @@ -530,3 +546,24 @@ export default { }; + + diff --git a/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevicevr.js b/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevicevr.js index b40dc5c17..6fcfa9fd7 100644 --- a/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevicevr.js +++ b/src/jlmap3d/jl3dmaintainer/Jl3dfaultdevicevr.js @@ -231,8 +231,7 @@ export function Jl3dfaultdeviceVR(dom,group,token,skinCode) { vrwebworker.postMessage(connectmsg); vrwebworker.onmessage = function (event) { - console.log(event.data.type); - console.log(event.data); + if(event.data.type == "Device_Fault_Set_3D"){ let newfault = { code:event.data.body.code, @@ -409,7 +408,6 @@ export function Jl3dfaultdeviceVR(dom,group,token,skinCode) { if(scope.stationtexture["stationlist"]){ vrPlane.setStationPlane(stationList,scope.stationtexture); - console.log(scope.nowStationModel.getObjectByName("zhantailiebiao")); scope.nowStationModel.getObjectByName("zhantailiebiao").material.map =scope.stationtexture["stationlist"]; scope.nowStationModel.getObjectByName("zhantailiebiao").material.map.needsUpdate = true; if(scope.nowStationModel.getObjectByName("menkuangyanse")){ @@ -420,7 +418,7 @@ export function Jl3dfaultdeviceVR(dom,group,token,skinCode) { scope.nowStationModel.getObjectByName("zhantaiming").material.map.needsUpdate = true; } - trainControl.inittrain(scope.scene,scope.modelmanager.train.mesh,mixers); + trainControl.inittrain(scope.scene,scope.modelmanager.train.mesh,scope.modelmanager.train.animations,mixers); scope.scene.add(scope.modelmanager.otherDevice.mesh); scope.scene.add( vrPlane.group ); vrwebworker.postMessage("connect"); @@ -443,7 +441,6 @@ export function Jl3dfaultdeviceVR(dom,group,token,skinCode) { let intersects = raycaster.intersectObjects( vrPlane.group.children,true); if(intersects[0]){ - console.log(intersects[0]); var object = intersects[0].object; if(object.name == "buttonHome"){ @@ -744,9 +741,9 @@ export function Jl3dfaultdeviceVR(dom,group,token,skinCode) { var intersections = getIntersections( controller ); // console.log(intersections); if ( intersections.length > 0 ) { - console.log(intersections); + // console.log(intersections); var intersection = intersections[ 0 ]; - console.log(intersection); + // console.log(intersection); var object = intersection.object; // object.matrix.premultiply( tempMatrix ); @@ -809,7 +806,6 @@ export function Jl3dfaultdeviceVR(dom,group,token,skinCode) { } function squeezeStart(){ - console.log("squeez"); scope.modelmanager.otherDevice.action.play(); if(vrPlaneStatus){ vrPlaneStatus = false; @@ -1029,7 +1025,7 @@ export function Jl3dfaultdeviceVR(dom,group,token,skinCode) { } scope.nowstation = stationList[0]; - console.log(scope.nowstation); + } diff --git a/src/jlmap3d/jl3dmaintainer/utils/trainControl.js b/src/jlmap3d/jl3dmaintainer/utils/trainControl.js index 3f489813f..72b455dc6 100644 --- a/src/jlmap3d/jl3dmaintainer/utils/trainControl.js +++ b/src/jlmap3d/jl3dmaintainer/utils/trainControl.js @@ -3,14 +3,14 @@ export function TrainControl(){ this.toptrain = null; this.downtrain = null; - this.inittrain = function(scene,object,mixers){ + this.inittrain = function(scene,object,animations,mixers){ let ntracks1,ntracks2,tclip,fclip; - console.log(object); - ntracks1 = object.animations.slice(16,27); + + ntracks1 = animations.slice(16,27); tclip = new THREE.AnimationClip("three",2,ntracks1); - ntracks2 = object.animations.slice(0,15); + ntracks2 = animations.slice(0,15); fclip = new THREE.AnimationClip("four",2,ntracks2); @@ -45,16 +45,17 @@ export function TrainControl(){ inittrainanimation(scope.downtrain,tclip,fclip,mixers); - scope.toptrain.position.z = -20; - scope.toptrain.position.y = -20000; + scope.toptrain.position.z = 8.8; + // scope.toptrain.position.y = -20000; scope.toptrain.rotation.y = Math.PI; - scope.downtrain.position.z = 40; - scope.downtrain.position.y = -20000; + scope.downtrain.position.z = -8.3; + // scope.downtrain.position.y = -20000; scene.add(scope.toptrain); scene.add(scope.downtrain); } function inittrainanimation(train,tclip,fclip,mixers){ + for(let j=0;j0 && model.code != "train"){ + // model.mesh = object; + if(model.code == "train"){ + let realtrain = new THREE.Group(); + for(let j=6;j>0;j--){ + let name = "c"+j; + for(let i=0;i0 && model.code != "train"){ + // + // + // //model.action.play(); + // } + resolve(model.locateType); } ); diff --git a/src/jmapNew/config/skinCode/bejing_01.js b/src/jmapNew/config/skinCode/bejing_01.js index 3460ed5fe..81f00db34 100644 --- a/src/jmapNew/config/skinCode/bejing_01.js +++ b/src/jmapNew/config/skinCode/bejing_01.js @@ -278,6 +278,11 @@ class SkinCode extends defaultStyle { extendLength: 10 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: false + }; + this[deviceType.StationStand] = { common: { // 通用属性 textFontSize: 8, // 站台默认字体大小 diff --git a/src/jmapNew/config/skinCode/chengdu_01.js b/src/jmapNew/config/skinCode/chengdu_01.js index b0c6170a4..bab2618aa 100644 --- a/src/jmapNew/config/skinCode/chengdu_01.js +++ b/src/jmapNew/config/skinCode/chengdu_01.js @@ -387,6 +387,11 @@ class SkinCode extends defaultStyle { extendLength: 10 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: false + }; + this[deviceType.Switch] = { text: { show: true, // 道岔名称显示 diff --git a/src/jmapNew/config/skinCode/chengdu_03.js b/src/jmapNew/config/skinCode/chengdu_03.js index b93295509..d48d4fc76 100644 --- a/src/jmapNew/config/skinCode/chengdu_03.js +++ b/src/jmapNew/config/skinCode/chengdu_03.js @@ -207,6 +207,10 @@ class SkinCode extends defaultStyle { extendLength: 10 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: false + }; this[deviceType.StationStand] = { common: { // 通用属性 textFontSize: 10, // 站台默认字体大小 diff --git a/src/jmapNew/config/skinCode/foshan_01.js b/src/jmapNew/config/skinCode/foshan_01.js index c730067dd..d66a46cea 100644 --- a/src/jmapNew/config/skinCode/foshan_01.js +++ b/src/jmapNew/config/skinCode/foshan_01.js @@ -408,6 +408,11 @@ class SkinCode extends defaultStyle { extendLength: 10 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: false + }; + this[deviceType.Switch] = { text: { show: true, // 道岔名称显示 diff --git a/src/jmapNew/config/skinCode/fuzhou_01.js b/src/jmapNew/config/skinCode/fuzhou_01.js index 54902db0b..28b7b5af0 100644 --- a/src/jmapNew/config/skinCode/fuzhou_01.js +++ b/src/jmapNew/config/skinCode/fuzhou_01.js @@ -441,6 +441,11 @@ class SkinCode extends defaultStyle { extendLength: 8 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: false + }; + this[deviceType.LcControl] = { text: { fontSize: 10, // 灯字体大小 diff --git a/src/jmapNew/config/skinCode/haerbin_01.js b/src/jmapNew/config/skinCode/haerbin_01.js index d03db930f..d60c8bbfb 100644 --- a/src/jmapNew/config/skinCode/haerbin_01.js +++ b/src/jmapNew/config/skinCode/haerbin_01.js @@ -420,6 +420,10 @@ class SkinCode extends defaultStyle { strokeColor: 'red', // 线条颜色 extendLength: 10 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: true + }; this[deviceType.Switch] = { text: { diff --git a/src/jmapNew/config/skinCode/ningbo_01.js b/src/jmapNew/config/skinCode/ningbo_01.js index 8e96144cb..957d9ec70 100644 --- a/src/jmapNew/config/skinCode/ningbo_01.js +++ b/src/jmapNew/config/skinCode/ningbo_01.js @@ -458,6 +458,11 @@ class SkinCode extends defaultStyle { extendLength: 10 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: false + }; + this[deviceType.StationDelayUnlock] = { text: { distance: 3, // 延迟解锁和设备之间的距离 diff --git a/src/jmapNew/config/skinCode/xian_01.js b/src/jmapNew/config/skinCode/xian_01.js index 78dfb0f09..a73e99729 100644 --- a/src/jmapNew/config/skinCode/xian_01.js +++ b/src/jmapNew/config/skinCode/xian_01.js @@ -411,6 +411,11 @@ class SkinCode extends defaultStyle { extendLength: 10 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: false + }; + this[deviceType.Switch] = { text: { show: true, // 道岔名称显示 diff --git a/src/jmapNew/config/skinCode/xian_02.js b/src/jmapNew/config/skinCode/xian_02.js index 0ec7ca768..66a50acbb 100644 --- a/src/jmapNew/config/skinCode/xian_02.js +++ b/src/jmapNew/config/skinCode/xian_02.js @@ -534,6 +534,11 @@ class SkinCode extends defaultStyle { extendLength: 10 // 延伸长度 }; + // 延续保护计时 + this[deviceType.OverAp] = { + show: false + }; + this[deviceType.AutomaticRoute] = { // 是否显示 displayCondition: '03', // 显示条件 prdType diff --git a/src/jmapNew/constant/stateTransition.js b/src/jmapNew/constant/stateTransition.js index bae1325bc..0a4c620a7 100644 --- a/src/jmapNew/constant/stateTransition.js +++ b/src/jmapNew/constant/stateTransition.js @@ -103,6 +103,12 @@ class Status { fault: device.fault /** 非故障*/ }; } + handleOverAp(device) { + this.statusObj = { + remainTime: device.remainTime + }; + } + handleZcControl(device) { this.statusObj = { }; } diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index d382d57ae..ebdd2812e 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -444,6 +444,7 @@ class Jlmap { overlapRoute['points'] = { x: model.points[model.points.length - 1].x, y: model.points[model.points.length - 1].y }; } overlapRoute['offsetRight'] = overlapRoute.pathList[0].right; + overlapRoute['sectionName'] = model.name; this.$painter.update(overlapRoute); } else if (elem.deviceType === 'CYCLE') { store.dispatch('map/updateAutoReentryState', elem); diff --git a/src/jmapNew/mouseController.js b/src/jmapNew/mouseController.js index eb18bcbd7..e7b560c44 100644 --- a/src/jmapNew/mouseController.js +++ b/src/jmapNew/mouseController.js @@ -164,6 +164,7 @@ class MouseController extends Eventful { click(e) { var em = this.checkEvent(e); + // console.log(e, em, '===='); this.trigger(this.events.Selected, em); } diff --git a/src/jmapNew/shape/OverAp/index.js b/src/jmapNew/shape/OverAp/index.js index 8b9450980..2dc3ef13b 100644 --- a/src/jmapNew/shape/OverAp/index.js +++ b/src/jmapNew/shape/OverAp/index.js @@ -43,13 +43,13 @@ export default class OverAp extends Group { setState(model) { this.text && this.text.hide(); - if (model.remainTime) { + if (model.remainTime && this.style.OverAp.show) { // 目前哈尔滨线路显示 + // console.log(model, model.remainTime, model.sectionName, '====='); this.text && this.text.show(); let offset = 40; if (!model.offsetRight) { offset = -40; } - // console.log(model.offsetRight, 'model'); this.text && this.text.attr({ style: { text: model.remainTime, diff --git a/src/jmapNew/shape/Section/index.js b/src/jmapNew/shape/Section/index.js index 026e85992..f40fd15e0 100644 --- a/src/jmapNew/shape/Section/index.js +++ b/src/jmapNew/shape/Section/index.js @@ -795,7 +795,6 @@ export default class Section extends Group { showRemainTime(number) { // 区段延时保护倒计时显示 this.releaseName && this.releaseName.show(); // this.releaseName && this.releaseName.setStyle({ text: number }); - console.log(number, this.model.name, '===='); let pointX = this.model.points[0].x + 45; let pointY = this.model.points[0].y; if (!this.model.timeRight) { @@ -884,9 +883,12 @@ export default class Section extends Group { getBoundingRect() { if (this.section) { - return this.section.getBoundingRect(); + // if (this.model.code == 'T197' || this.model.code == 'T189') { + // console.log(this.section.getBoundingRect().clone(), this.model, this.model.name); + // } + return this.section.getBoundingRect().clone(); } else if (this.name) { - return this.name.getBoundingRect(); + return this.name.getBoundingRect().clone(); } } diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/setFault.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/setFault.vue deleted file mode 100644 index 93b1e6f44..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/setFault.vue +++ /dev/null @@ -1,129 +0,0 @@ - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue index 89bed56d2..79d43388a 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/standDetail.vue @@ -17,12 +17,10 @@ :default-expand-all="true" style="background: #f0f0f0;" > -
+
{{ data.name }}
-
+
{{ data.name }}
{{ data.value }}
@@ -108,11 +106,6 @@ export default { }, { children: [ - // { - // name: '上行站台', - // value: '', - // level: 2 - // }, { name: '站台', value: '', @@ -179,19 +172,15 @@ export default { // 车站扣车 this.treeData[1].children[1].value = selected.stationHoldTrain ? '已设置' : '未设置'; // 停站时间 - this.treeData[0].children[2].value = selected.parkingTime == 0 ? '自动' : `${selected.parkingTime} 秒`; + this.treeData[0].children[2].value = selected.parkingTime >= 0 ? `${selected.parkingTime} 秒` : '自动'; // 跳停 this.treeData[0].children[3].value = selected.allSkip || selected.assignSkip ? '已设置' : '未设置'; - // if (selected.direction == '01') { - // 待添加 - // } + if (!stationStand || !station) { this.treeData[2].children[0].value = `自动`; } else { this.treeData[2].children[0].value = selected.runLevelTime > 0 ? `至${station.name}${stationStand.name}:人工` : `至${station.name}${stationStand.name}:自动`; } - // 待添加 - // this.tempData.push({ item: '下行折返策略', status: this.strategyMap[selected.reentryStrategy] ? this.strategyMap[selected.reentryStrategy] : '默认' }); }, doShow(operate, selected) { this.selected = selected; diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue index 6cbd3cbc2..f79a2eb45 100644 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue +++ b/src/jmapNew/theme/ningbo_01/menus/dialog/stationControl.vue @@ -15,8 +15,8 @@ diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainDeletePlan.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainDeletePlan.vue deleted file mode 100644 index 22ffb19e1..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainDeletePlan.vue +++ /dev/null @@ -1,169 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainEdit.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainEdit.vue deleted file mode 100644 index cb2aa2985..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainEdit.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainFlag.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainFlag.vue deleted file mode 100644 index 39b3b619a..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainFlag.vue +++ /dev/null @@ -1,160 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/dialog/trainMoveEvently.vue b/src/jmapNew/theme/ningbo_01/menus/dialog/trainMoveEvently.vue deleted file mode 100644 index ed0996eb8..000000000 --- a/src/jmapNew/theme/ningbo_01/menus/dialog/trainMoveEvently.vue +++ /dev/null @@ -1,189 +0,0 @@ - - - - diff --git a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue index 240ede036..40451b18d 100644 --- a/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue +++ b/src/jmapNew/theme/ningbo_01/menus/menuTrain.vue @@ -5,10 +5,7 @@ - - - diff --git a/src/jmapNew/theme/xian_01/menus/dialog/routeDetail.vue b/src/jmapNew/theme/xian_01/menus/dialog/routeDetail.vue deleted file mode 100644 index 2fbf044f9..000000000 --- a/src/jmapNew/theme/xian_01/menus/dialog/routeDetail.vue +++ /dev/null @@ -1,162 +0,0 @@ - - - diff --git a/src/jmapNew/theme/xian_01/menus/dialog/routeHandControl.vue b/src/jmapNew/theme/xian_01/menus/dialog/routeHandControl.vue deleted file mode 100644 index e071c991b..000000000 --- a/src/jmapNew/theme/xian_01/menus/dialog/routeHandControl.vue +++ /dev/null @@ -1,335 +0,0 @@ - - - diff --git a/src/jmapNew/theme/xian_01/menus/menuSignal.vue b/src/jmapNew/theme/xian_01/menus/menuSignal.vue index f03920d7c..6fe2436e0 100644 --- a/src/jmapNew/theme/xian_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/xian_01/menus/menuSignal.vue @@ -1,14 +1,14 @@ @@ -52,7 +52,6 @@ export default { data() { return { menu: [], - systemName:'xian-01__systerm', menuNormal: { Local: [ { diff --git a/src/router/index_HEB.js b/src/router/index_HEB.js index 4d9385951..5a5c06ecb 100644 --- a/src/router/index_HEB.js +++ b/src/router/index_HEB.js @@ -276,6 +276,36 @@ export const publicAsyncRoute = [ hidden: true } ] + }, + { + path: '/device/teachDetail', + component: TeachDetail, + hidden: true + }, + { + path: '/device/course', + component: ExamCourseDetail, + hidden: true + }, + { + path: '/device/examRule/manage', + component: PublishExamRule, + hidden: true + }, + { + path: '/device/examRule/draft/:mode/:ruleId/:lessonId', + component: PublishExamRuleDraft, + hidden: true + }, + { // 试卷详情 + path: '/device/exam/:examId', + component: ExamDetail, + hidden: true + }, + { // 考试结果 + path: '/device/result/:userExamId', + component: ExamResult, + hidden: true } ]; export const asyncRouter = [ diff --git a/src/store/modules/runplan.js b/src/store/modules/runplan.js index d32a0f323..dac6639d2 100644 --- a/src/store/modules/runplan.js +++ b/src/store/modules/runplan.js @@ -20,6 +20,9 @@ const runPlan = { stations: (state) => { return state.stations || []; }, + draftStations: (state) => { + return state.draftStations || []; + }, convertPlanData: (state) => () => { const data = { serviceNumberDataList: [] }; const serviceNumberList = Object.keys(state.editData).sort((a, b) => { diff --git a/src/utils/baseUrl.js b/src/utils/baseUrl.js index e69529481..778caeb7b 100644 --- a/src/utils/baseUrl.js +++ b/src/utils/baseUrl.js @@ -3,7 +3,7 @@ export function getBaseUrl() { if (process.env.NODE_ENV === 'development') { // BASE_API = 'https://joylink.club/jlcloud'; BASE_API = 'https://test.joylink.club/jlcloud'; - // BASE_API = 'http://192.168.3.5:9000'; // 袁.el-button+.el-button琪 + // 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'; // 杜康 diff --git a/src/views/newMap/jointTrainingNew/menuDemon.vue b/src/views/newMap/jointTrainingNew/menuDemon.vue index bdbb55ab2..bcf3d3edf 100644 --- a/src/views/newMap/jointTrainingNew/menuDemon.vue +++ b/src/views/newMap/jointTrainingNew/menuDemon.vue @@ -457,6 +457,8 @@ export default { } }); window.open(routeData.href, '_blank', 'noopener noreferrer'); + } else { + this.$message.error('暂无教学系统数据!'); } }).catch(() => { this.$message.error('获取课程ID失败!'); @@ -487,21 +489,13 @@ export default { } }); window.open(routeData.href, '_blank', 'noopener noreferrer'); + } else { + this.$message.error('暂无考试系统数据!'); } }).catch(() => { this.$message.error('获取课程ID失败!'); }); } - }, - handleRunPlan() { - const routeData = this.$router.resolve({ - path:`/device/runPlan/${this.mapId}`, - query:{ - lineCode:this.lineCode, - noPreLogout: true - } - }); - window.open(routeData.href, '_blank', 'noopener noreferrer'); } } }; diff --git a/src/views/newMap/newDesignUser/mapmanage/publish.vue b/src/views/newMap/newDesignUser/mapmanage/publish.vue index 4c1432b64..487903c83 100644 --- a/src/views/newMap/newDesignUser/mapmanage/publish.vue +++ b/src/views/newMap/newDesignUser/mapmanage/publish.vue @@ -78,7 +78,6 @@ export default { this.$refs.form.validate((valid) => { if (valid) { this.loading = true; - delete this.editModel.children; this.verifyMapName(); } }); @@ -93,12 +92,13 @@ export default { } } catch (error) { console.log(error); + this.loading = false; } }, confirmPublish() { - this.$confirm(this.$t('map.verifyMapName'), this.$t('tip.hint'), { - confirmButtonText: this.$t('tip.confirm'), - cancelButtonText: this.$t('tip.cancel'), + this.$confirm('地图名称重复,您确认发布此地图将会覆盖公共地图?', '提示', { + confirmButtonText: '确 定', + cancelButtonText: '取 消', type: 'warning' }).then(() => { this.publishMap(); diff --git a/src/views/planMonitor/editTool/menuBar.vue b/src/views/planMonitor/editTool/menuBar.vue index bfb58a507..909c1546f 100644 --- a/src/views/planMonitor/editTool/menuBar.vue +++ b/src/views/planMonitor/editTool/menuBar.vue @@ -347,19 +347,7 @@ export default { return menus; }, initMenu() { - const menuLoading = []; - const menuDelete = []; - const menuPublish = []; - this.runPlanList.forEach(item => { - menuLoading.push({title: item.name, planId:item.id, planName: item.name, click: this.loadingRunPlan}); - menuDelete.push({title: item.name, planId:item.id, planName: item.name, click: this.deleteRunPlanOperate}); - menuPublish.push({title: item.name, planId:item.id, planName: item.name, click: this.publishRunPlan}); - }); - if (this.runPlanList.length) { - this.menus = this.menuConvert([...this.menuBase, {title: '加载', children: menuLoading}, {title: '删除', children: menuDelete}, {title: '发布', children:menuPublish}]); - } else { - this.menus = this.menuConvert(this.menuBase); - } + this.menus = this.menuConvert(this.menuBase); this.clickEvent(); this.closeMenu(); }, @@ -387,7 +375,6 @@ export default { }, hookClick(item, event) { this.closeMenu(); - // launchFullscreen(); if (!item.disabled) { setTimeout(() => { if (item && typeof item.click == 'function') { @@ -590,7 +577,9 @@ export default { }).catch(() => { this.$messageBox(this.$t('tip.deleteOperationGraphFailed')); }); - }).catch(() => { }); + }).catch(() => { + this.$message.error('删除运行图失败!'); + }); }, publishRunPlan(param) { this.$confirm(this.$t('tip.publishRunPlanTips'), this.$t('tip.hint'), { diff --git a/src/views/planMonitor/newEditTool/index.vue b/src/views/planMonitor/newEditTool/index.vue index dd509bfb2..7dee97105 100644 --- a/src/views/planMonitor/newEditTool/index.vue +++ b/src/views/planMonitor/newEditTool/index.vue @@ -5,10 +5,11 @@ :plan-convert="PlanConvert" :run-plan-list="runPlanList" :load-run-plan-id="loadRunPlanId" + :load-run-plan-name="loadRunPlanName" @doClose="doClose" @dispatchDialog="dispatchDialog" @loadingRunPlan="loadingRunPlan" - @checkIsLoadRunPlan="checkIsLoadRunPlan" + @refresh="refreshRunPlanList" @modifyRunPlanName="modifyRunPlanName" /> { this.runPlanList = resp.data || []; - if (firstLoad && this.runPlanList.length) { - this.loadRunPlanId = this.runPlanList[0].id; - this.loadRunPlanName = this.runPlanList[0].name; + if (planId && this.runPlanList.length) { + this.runPlanList.forEach(item => { + if (item.id === planId) { + this.loadRunPlanId = item.id; + this.loadRunPlanName = item.name; + } + }); + } else { + this.loadRunPlanId = ''; + this.loadRunPlanName = ''; } }).catch(() => { this.$message.error('获取草稿运行图列表失败'); @@ -197,9 +205,6 @@ export default { this.loadRunPlanId = param.planId; this.loadRunPlanName = param.planName; }, - checkIsLoadRunPlan(planId) { - this.refreshRunPlanList(planId === this.loadRunPlanId); - }, modifyRunPlanName() { if (this.loadRunPlanId && this.loadRunPlanName) { this.$refs.editPlan.doShow({id: this.loadRunPlanId, name: this.loadRunPlanName}); diff --git a/src/views/planMonitor/newEditTool/menuBar.vue b/src/views/planMonitor/newEditTool/menuBar.vue index 1ea1f356f..e032d44ec 100644 --- a/src/views/planMonitor/newEditTool/menuBar.vue +++ b/src/views/planMonitor/newEditTool/menuBar.vue @@ -37,9 +37,11 @@ -