This commit is contained in:
joylink_cuiweidong 2020-04-01 16:50:53 +08:00
commit bced2eb7d1
7 changed files with 353 additions and 316 deletions

View File

@ -85,3 +85,8 @@
"not ie <= 8" "not ie <= 8"
] ]
} }

View File

@ -3,7 +3,7 @@ export default {
designhomePage: '公共地图', designhomePage: '公共地图',
designUserPage: '个人地图', designUserPage: '个人地图',
newDesignUserPage: '新版地图', newDesignUserPage: '地图绘制',
mapManage: '地图管理', mapManage: '地图管理',
skinManage: '皮肤管理', skinManage: '皮肤管理',

View File

@ -369,7 +369,7 @@ export const asyncRouter = [
redirect: '/design/userlist/home', redirect: '/design/userlist/home',
component: Layout, component: Layout,
meta: { meta: {
roles: [admin, user] roles: [admin]
}, },
children: [ children: [
{ {
@ -855,7 +855,7 @@ export const asyncRouter = [
redirect: '/design/usermap/home', redirect: '/design/usermap/home',
component: Layout, component: Layout,
meta: { meta: {
roles: [admin] roles: [admin, user]
}, },
children: [ children: [
{ {

View File

@ -1,11 +1,9 @@
<template> <template>
<div class="jl3dpassflow"> <div class="jl3dpassflow">
<div id="jl3d" class="jl3ddraw"> <div id="jl3d" class="jl3ddraw" />
</div>
<div class="menutop"> <div class="menutop">
<el-button-group> <el-button-group>
<el-button type="primary" @click="switchrender">{{rendermode}}</el-button> <el-button type="primary" @click="switchrender">{{ rendermode }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<div class="menudown"> <div class="menudown">
@ -16,32 +14,34 @@
</div> </div>
</template> </template>
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
import { Jl3dpassflow } from '@/jlmap3d/jl3dpassflow/jl3dpassflow.js'; import { Jl3dpassflow } from '@/jlmap3d/jl3dpassflow/jl3dpassflow.js';
import { ProjectIcon } from '@/scripts/ConstDic';
export default {
export default { name: 'Passflow',
name: 'passflow',
components: { components: {
}, },
data() { data() {
return { return {
jl3d: null, jl3d: null,
rendermode:"监控视角", rendermode:'监控视角',
renderswitch:true, renderswitch:true
} };
},
watch: {
}, },
computed: { computed: {
code() { code() {
return this.$route.query.code; return this.$route.query.code;
} }
}, },
mounted() { watch: {
},
created() {
document.querySelector("link[rel*='icon']").href = ProjectIcon[this.$route.query.project];
},
mounted() {
this.init(); this.init();
}, },
@ -50,25 +50,25 @@
methods: { methods: {
init: function () { init: function () {
// let mapdata = this.$store.state.socket.device; // let mapdata = this.$store.state.socket.device;
let dom = document.getElementById('jl3d'); const dom = document.getElementById('jl3d');
this.jl3d = new Jl3dpassflow(dom); this.jl3d = new Jl3dpassflow(dom);
}, },
switchrender(){ switchrender() {
if(this.renderswitch == true){ if (this.renderswitch == true) {
this.rendermode = "退出监控"; this.rendermode = '退出监控';
this.renderswitch = false; this.renderswitch = false;
this.jl3d.switchrender(this.renderswitch); this.jl3d.switchrender(this.renderswitch);
}else{ } else {
this.rendermode = "监控视角"; this.rendermode = '监控视角';
this.renderswitch = true; this.renderswitch = true;
this.jl3d.switchrender(this.renderswitch); this.jl3d.switchrender(this.renderswitch);
} }
}, },
back(){ back() {
window.close(); window.close();
},
} }
} }
};
</script> </script>
<style scoped> <style scoped>
/* #jl3d { /* #jl3d {

View File

@ -6,15 +6,13 @@
<el-button-group> <el-button-group>
<!-- <el-button type="primary" @click="raystand">站台选择</el-button> <!-- <el-button type="primary" @click="raystand">站台选择</el-button>
<el-button type="primary" @click="raytrain">列车选择</el-button> --> <el-button type="primary" @click="raytrain">列车选择</el-button> -->
<el-button type="primary" @click="railmove">{{$t('jlmap3d.cameraRailMove')}}</el-button> <el-button type="primary" @click="railmove">{{ $t('jlmap3d.cameraRailMove') }}</el-button>
<!-- <el-button type="primary" @click="raysection">{{$t('jlmap3d.trackCheck')}}</el-button> <!-- <el-button type="primary" @click="raysection">{{$t('jlmap3d.trackCheck')}}</el-button>
<el-button type="primary" @click="rayswitch">{{$t('jlmap3d.turnoutCheck')}}</el-button> <el-button type="primary" @click="rayswitch">{{$t('jlmap3d.turnoutCheck')}}</el-button>
<el-button type="primary" @click="raysignal">{{$t('jlmap3d.signalCheck')}}</el-button> --> <el-button type="primary" @click="raysignal">{{$t('jlmap3d.signalCheck')}}</el-button> -->
<el-button type="primary" @click="back">{{$t('global.exit')}}</el-button> <el-button type="primary" @click="back">{{ $t('global.exit') }}</el-button>
</el-button-group> </el-button-group>
</div> </div>
<Jlmap3d-Menu :trainlist="trainlist" :stationlist="stationlist" @sstation="sstation" @strain="strain" /> <Jlmap3d-Menu :trainlist="trainlist" :stationlist="stationlist" @sstation="sstation" @strain="strain" />
@ -49,6 +47,7 @@ import { JLmap3d } from '@/jlmap3d/jl3dsimulation/jlmap3d.js';
import Jlmap3dMenu from '@/views/jlmap3d/simulation/show/menu'; import Jlmap3dMenu from '@/views/jlmap3d/simulation/show/menu';
import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu'; import Jlmap3dConfig from '@/views/jlmap3d/simulation/show/configmenu';
import { ProjectIcon } from '@/scripts/ConstDic';
// import Jlmap3dMsg from '@/views/jlmap3d/show/msg'; // import Jlmap3dMsg from '@/views/jlmap3d/show/msg';
@ -92,7 +91,9 @@ export default {
// this.$destroy(); // this.$destroy();
} }
}, },
created() {
document.querySelector("link[rel*='icon']").href = ProjectIcon[this.$route.query.project];
},
mounted() { mounted() {
window.updatemenulist = this.updatemenulist; window.updatemenulist = this.updatemenulist;
this.getParams(); this.getParams();
@ -100,16 +101,16 @@ export default {
// console.log(""); // console.log("");
}, },
methods: { methods: {
getParams:function(){ getParams:function() {
var routerParams = this.$route.query.group var routerParams = this.$route.query.group;
this.mapid = this.$route.query.mapid; this.mapid = this.$route.query.mapid;
this.group = this.$route.query.group; this.group = this.$route.query.group;
this.token = this.$route.query.token; this.token = this.$route.query.token;
this.init(this.mapid,this.group); this.init(this.mapid, this.group);
}, },
show: function (skinCode,group) { show: function (skinCode, group) {
if (this.jlmap3d == null) { if (this.jlmap3d == null) {
this.init(skinCode,group); this.init(skinCode, group);
} else { } else {
// this.jlmap3d.restart(); // this.jlmap3d.restart();
this.jlmap3d.eventon(); this.jlmap3d.eventon();
@ -117,19 +118,18 @@ export default {
} }
}, },
init: function (skinCode,group) { init: function (skinCode, group) {
const mapdata = this.$store.getters['map/map']; const mapdata = this.$store.getters['map/map'];
const dom = document.getElementById('app'); const dom = document.getElementById('app');
let project = this.$route.query.project; const project = this.$route.query.project;
// console.log(project); // console.log(project);
if (project) {
if(project){ this.jlmap3d = new JLmap3d(dom, mapdata, skinCode, this.$store, group, project);
} else {
this.jlmap3d = new JLmap3d(dom, mapdata, skinCode,this.$store,group,project); this.jlmap3d = new JLmap3d(dom, mapdata, skinCode, this.$store, group, '');
}else{
this.jlmap3d = new JLmap3d(dom, mapdata, skinCode,this.$store,group,"");
} }
this.jlmap3d.eventon(); this.jlmap3d.eventon();
}, },
@ -158,12 +158,12 @@ export default {
this.jlmap3d.showtrainmsg(showtype); this.jlmap3d.showtrainmsg(showtype);
}, },
updatemenulist(stationlist, trainlist) { updatemenulist(stationlist, trainlist) {
let stations = []; const stations = [];
for (let k in stationlist) { for (const k in stationlist) {
stations.push(stationlist[k]); stations.push(stationlist[k]);
} }
let trains = []; const trains = [];
for (let k in trainlist) { for (const k in trainlist) {
trains.push(trainlist[k]); trains.push(trainlist[k]);
} }
this.stationlist = stations; this.stationlist = stations;

View File

@ -190,6 +190,9 @@ export default {
}, },
isShowScheduling() { isShowScheduling() {
return this.$route.query.prdType == '05'; return this.$route.query.prdType == '05';
},
project() {
return getSessionStorage('project');
} }
}, },
watch: { watch: {
@ -508,7 +511,7 @@ export default {
mapid:this.mapId, mapid:this.mapId,
group:this.group, group:this.group,
token:getToken(), token:getToken(),
project:getSessionStorage('project') project: this.project
} }
}); });
window.open(routeData.href, '_blank', 'noopener noreferrer'); window.open(routeData.href, '_blank', 'noopener noreferrer');
@ -518,7 +521,8 @@ export default {
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path:'/jlmap3d/passengerflow', path:'/jlmap3d/passengerflow',
query:{ query:{
mapid:this.mapId mapid:this.mapId,
project: this.project
} }
}); });
window.open(routeData.href, '_blank', 'noopener noreferrer'); window.open(routeData.href, '_blank', 'noopener noreferrer');

View File

@ -20,6 +20,7 @@ import MapPublish from './publish';
import MapPublish3d from './publish3d'; import MapPublish3d from './publish3d';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { saveMap } from '@/api/jmap/mapdraft'; import { saveMap } from '@/api/jmap/mapdraft';
import { superAdmin, admin } from '@/router/index_APP_TARGET';
export default { export default {
name: 'MapOperateMenu', name: 'MapOperateMenu',
@ -46,32 +47,6 @@ export default {
}, },
data() { data() {
return { return {
menuMap: [
{
label: this.$t('map.updateObj'),
handler: this.updateObj
},
{
label: this.$t('map.updateObjAxis'),
handler: this.updateObjAxis
},
{
label: this.$t('map.saveAs'),
handler: this.saveAs
},
{
label: this.$t('map.deleteObj'),
handler: this.deleteObj
},
{
label: this.$t('map.jlmap3d'),
handler: this.jlmap3d
},
{
label: this.$t('map.publish3d'),
handler: this.publish3d
}
],
publishMapMenu: { publishMapMenu: {
label: this.$t('map.publish'), label: this.$t('map.publish'),
handler: this.publish handler: this.publish
@ -95,15 +70,68 @@ export default {
hasRelease() { hasRelease() {
return this.$store.state.user.roles.includes('04') || return this.$store.state.user.roles.includes('04') ||
this.$store.state.user.roles.includes('05'); this.$store.state.user.roles.includes('05');
},
menuMap() {
if (this.$store.state.user.roles.includes(superAdmin) || this.$store.state.user.roles.includes(admin)) {
return [
{
label: this.$t('map.updateObj'),
handler: this.updateObj
},
{
label: this.$t('map.updateObjAxis'),
handler: this.updateObjAxis
},
{
label: this.$t('map.saveAs'),
handler: this.saveAs
},
{
label: this.$t('map.deleteObj'),
handler: this.deleteObj
},
{
label: this.$t('map.jlmap3d'),
handler: this.jlmap3d
},
{
label: this.$t('map.publish3d'),
handler: this.publish3d
},
{
label: this.$t('map.publish'),
handler: this.publish
}
];
} else {
return [
{
label: this.$t('map.updateObj'),
handler: this.updateObj
},
{
label: this.$t('map.updateObjAxis'),
handler: this.updateObjAxis
},
{
label: this.$t('map.saveAs'),
handler: this.saveAs
},
{
label: this.$t('map.deleteObj'),
handler: this.deleteObj
}
];
}
} }
}, },
watch: { watch: {
'$store.state.menuOperation.menuCount': function (val) { '$store.state.menuOperation.menuCount': function (val) {
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Map)) { if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Map)) {
this.menu = [...this.menuMap]; this.menu = [...this.menuMap];
if (this.hasRelease) { // if (this.hasRelease) {
this.menu.push(this.publishMapMenu); // this.menu.push(this.publishMapMenu);
} // }
this.doShow(this.$store.state.menuOperation.menuPosition); this.doShow(this.$store.state.menuOperation.menuPosition);
} else if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) { } else if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Cancel)) {
this.initCancelMenu(); this.initCancelMenu();
@ -214,7 +242,7 @@ export default {
}).catch(() => { }).catch(() => {
}); });
}, },
publish3d(){ publish3d() {
this.doClose(); this.doClose();
this.doClose(); this.doClose();
if (this.$refs && this.$refs.publish3d) { if (this.$refs && this.$refs.publish3d) {