Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
bced2eb7d1
175
package.json
175
package.json
@ -1,87 +1,92 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-admin-template",
|
"name": "vue-admin-template",
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
|
"description": "A vue admin template with Element UI & axios & iconfont & permission control & lint",
|
||||||
"author": "Pan <panfree23@gmail.com>",
|
"author": "Pan <panfree23@gmail.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vue-cli-service serve --open",
|
"dev": "vue-cli-service serve --open",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"test": "vue-cli-service build --mode staging",
|
"test": "vue-cli-service build --mode staging",
|
||||||
"local": "vue-cli-service build --mode native",
|
"local": "vue-cli-service build --mode native",
|
||||||
"preview": "node build/index.js --preview",
|
"preview": "node build/index.js --preview",
|
||||||
"lint": "eslint --ext .js,.vue src",
|
"lint": "eslint --ext .js,.vue src",
|
||||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||||
"test:ci": "npm run lint && npm run test:unit",
|
"test:ci": "npm run lint && npm run test:unit",
|
||||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
|
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "0.18.0",
|
"axios": "0.18.0",
|
||||||
"echarts": "^4.7.0",
|
"echarts": "^4.7.0",
|
||||||
"element-ui": "^2.12.0",
|
"element-ui": "^2.12.0",
|
||||||
"file-saver": "^1.3.3",
|
"file-saver": "^1.3.3",
|
||||||
"js-cookie": "2.2.0",
|
"js-cookie": "2.2.0",
|
||||||
"js-md5": "^0.7.3",
|
"js-md5": "^0.7.3",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"normalize.css": "7.0.0",
|
"normalize.css": "7.0.0",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
"path-to-regexp": "2.4.0",
|
"path-to-regexp": "2.4.0",
|
||||||
"qrcode.vue": "^1.6.2",
|
"qrcode.vue": "^1.6.2",
|
||||||
"script-loader": "^0.7.2",
|
"script-loader": "^0.7.2",
|
||||||
"sessionstorage": "^0.1.0",
|
"sessionstorage": "^0.1.0",
|
||||||
"sockjs-client": "^1.4.0",
|
"sockjs-client": "^1.4.0",
|
||||||
"stompjs": "^2.3.3",
|
"stompjs": "^2.3.3",
|
||||||
"storejs": "^1.0.25",
|
"storejs": "^1.0.25",
|
||||||
"three": "^0.107.0",
|
"three": "^0.107.0",
|
||||||
"vue": "^2.6.10",
|
"vue": "^2.6.10",
|
||||||
"vue-i18n": "^8.12.0",
|
"vue-i18n": "^8.12.0",
|
||||||
"vue-router": "^3.1.6",
|
"vue-router": "^3.1.6",
|
||||||
"vuedraggable": "^2.23.2",
|
"vuedraggable": "^2.23.2",
|
||||||
"vuex": "^3.1.0",
|
"vuex": "^3.1.0",
|
||||||
"xlsx": "^0.14.2",
|
"xlsx": "^0.14.2",
|
||||||
"zrender": "^4.0.4"
|
"zrender": "^4.0.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.0.0",
|
"@babel/core": "7.0.0",
|
||||||
"@babel/register": "7.0.0",
|
"@babel/register": "7.0.0",
|
||||||
"@vue/cli-plugin-babel": "3.6.0",
|
"@vue/cli-plugin-babel": "3.6.0",
|
||||||
"@vue/cli-plugin-eslint": "3.6.0",
|
"@vue/cli-plugin-eslint": "3.6.0",
|
||||||
"@vue/cli-plugin-unit-jest": "3.6.3",
|
"@vue/cli-plugin-unit-jest": "3.6.3",
|
||||||
"@vue/cli-service": "3.6.0",
|
"@vue/cli-service": "3.6.0",
|
||||||
"@vue/test-utils": "1.0.0-beta.29",
|
"@vue/test-utils": "1.0.0-beta.29",
|
||||||
"autoprefixer": "^9.5.1",
|
"autoprefixer": "^9.5.1",
|
||||||
"babel-core": "7.0.0-bridge.0",
|
"babel-core": "7.0.0-bridge.0",
|
||||||
"babel-eslint": "10.0.1",
|
"babel-eslint": "10.0.1",
|
||||||
"babel-jest": "23.6.0",
|
"babel-jest": "23.6.0",
|
||||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||||
"babel-preset-env": "1.6.1",
|
"babel-preset-env": "1.6.1",
|
||||||
"babel-preset-stage-2": "6.24.1",
|
"babel-preset-stage-2": "6.24.1",
|
||||||
"chalk": "2.4.2",
|
"chalk": "2.4.2",
|
||||||
"compression-webpack-plugin": "^3.1.0",
|
"compression-webpack-plugin": "^3.1.0",
|
||||||
"connect": "3.6.6",
|
"connect": "3.6.6",
|
||||||
"copy-webpack-plugin": "^4.5.2",
|
"copy-webpack-plugin": "^4.5.2",
|
||||||
"eslint": "5.15.3",
|
"eslint": "5.15.3",
|
||||||
"eslint-plugin-vue": "5.2.2",
|
"eslint-plugin-vue": "5.2.2",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^3.0.1",
|
||||||
"html-webpack-plugin": "3.2.0",
|
"html-webpack-plugin": "3.2.0",
|
||||||
"mockjs": "1.0.1-beta3",
|
"mockjs": "1.0.1-beta3",
|
||||||
"node-sass": "^4.9.0",
|
"node-sass": "^4.9.0",
|
||||||
"runjs": "^4.3.2",
|
"runjs": "^4.3.2",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"script-ext-html-webpack-plugin": "2.1.3",
|
"script-ext-html-webpack-plugin": "2.1.3",
|
||||||
"script-loader": "^0.7.2",
|
"script-loader": "^0.7.2",
|
||||||
"serve-static": "^1.13.2",
|
"serve-static": "^1.13.2",
|
||||||
"svg-sprite-loader": "4.1.3",
|
"svg-sprite-loader": "4.1.3",
|
||||||
"svgo": "1.2.2",
|
"svgo": "1.2.2",
|
||||||
"vue-template-compiler": "2.6.11"
|
"vue-template-compiler": "2.6.11"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.9",
|
"node": ">=8.9",
|
||||||
"npm": ">= 3.0.0"
|
"npm": ">= 3.0.0"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 1%",
|
"> 1%",
|
||||||
"last 2 versions",
|
"last 2 versions",
|
||||||
"not ie <= 8"
|
"not ie <= 8"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ export default {
|
|||||||
|
|
||||||
designhomePage: '公共地图',
|
designhomePage: '公共地图',
|
||||||
designUserPage: '个人地图',
|
designUserPage: '个人地图',
|
||||||
newDesignUserPage: '新版地图',
|
newDesignUserPage: '地图绘制',
|
||||||
|
|
||||||
mapManage: '地图管理',
|
mapManage: '地图管理',
|
||||||
skinManage: '皮肤管理',
|
skinManage: '皮肤管理',
|
||||||
|
@ -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: [
|
||||||
{
|
{
|
||||||
|
@ -1,74 +1,74 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="jl3dpassflow">
|
<div class="jl3dpassflow">
|
||||||
<div id="jl3d" class="jl3ddraw">
|
<div id="jl3d" class="jl3ddraw" />
|
||||||
|
<div class="menutop">
|
||||||
</div>
|
<el-button-group>
|
||||||
<div class="menutop">
|
<el-button type="primary" @click="switchrender">{{ rendermode }}</el-button>
|
||||||
<el-button-group>
|
</el-button-group>
|
||||||
<el-button type="primary" @click="switchrender">{{rendermode}}</el-button>
|
</div>
|
||||||
</el-button-group>
|
<div class="menudown">
|
||||||
</div>
|
<el-button-group>
|
||||||
<div class="menudown">
|
<el-button type="primary" @click="back">退出</el-button>
|
||||||
<el-button-group>
|
</el-button-group>
|
||||||
<el-button type="primary" @click="back">退出</el-button>
|
</div>
|
||||||
</el-button-group>
|
</div>
|
||||||
</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 {
|
||||||
|
name: 'Passflow',
|
||||||
|
components: {
|
||||||
|
|
||||||
export default {
|
},
|
||||||
name: 'passflow',
|
data() {
|
||||||
components: {
|
return {
|
||||||
|
jl3d: null,
|
||||||
|
rendermode:'监控视角',
|
||||||
|
renderswitch:true
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
code() {
|
||||||
|
return this.$route.query.code;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
created() {
|
||||||
return {
|
document.querySelector("link[rel*='icon']").href = ProjectIcon[this.$route.query.project];
|
||||||
jl3d: null,
|
},
|
||||||
rendermode:"监控视角",
|
mounted() {
|
||||||
renderswitch:true,
|
this.init();
|
||||||
}
|
},
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
|
|
||||||
},
|
beforeDestroy() {
|
||||||
computed: {
|
},
|
||||||
code() {
|
methods: {
|
||||||
return this.$route.query.code;
|
init: function () {
|
||||||
}
|
// let mapdata = this.$store.state.socket.device;
|
||||||
},
|
const dom = document.getElementById('jl3d');
|
||||||
mounted() {
|
this.jl3d = new Jl3dpassflow(dom);
|
||||||
|
},
|
||||||
this.init();
|
switchrender() {
|
||||||
},
|
if (this.renderswitch == true) {
|
||||||
|
this.rendermode = '退出监控';
|
||||||
beforeDestroy() {
|
this.renderswitch = false;
|
||||||
},
|
this.jl3d.switchrender(this.renderswitch);
|
||||||
methods: {
|
} else {
|
||||||
init: function () {
|
this.rendermode = '监控视角';
|
||||||
// let mapdata = this.$store.state.socket.device;
|
this.renderswitch = true;
|
||||||
let dom = document.getElementById('jl3d');
|
this.jl3d.switchrender(this.renderswitch);
|
||||||
this.jl3d = new Jl3dpassflow(dom);
|
}
|
||||||
},
|
},
|
||||||
switchrender(){
|
back() {
|
||||||
if(this.renderswitch == true){
|
window.close();
|
||||||
this.rendermode = "退出监控";
|
}
|
||||||
this.renderswitch = false;
|
}
|
||||||
this.jl3d.switchrender(this.renderswitch);
|
};
|
||||||
}else{
|
|
||||||
this.rendermode = "监控视角";
|
|
||||||
this.renderswitch = true;
|
|
||||||
this.jl3d.switchrender(this.renderswitch);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
back(){
|
|
||||||
window.close();
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* #jl3d {
|
/* #jl3d {
|
||||||
|
@ -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,148 +47,150 @@ 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';
|
||||||
|
|
||||||
var train;
|
var train;
|
||||||
export default {
|
export default {
|
||||||
name: 'Jl3dSimulation',
|
name: 'Jl3dSimulation',
|
||||||
components: {
|
components: {
|
||||||
Jlmap3dMenu,
|
Jlmap3dMenu,
|
||||||
Jlmap3dConfig
|
Jlmap3dConfig
|
||||||
// Jlmap3dMsg
|
// Jlmap3dMsg
|
||||||
// ShowProperty
|
// ShowProperty
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
trainlist: null,
|
trainlist: null,
|
||||||
stationlist: null,
|
stationlist: null,
|
||||||
msgdata: null,
|
msgdata: null,
|
||||||
|
|
||||||
training: {
|
training: {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
},
|
},
|
||||||
|
|
||||||
mapdata: null,
|
mapdata: null,
|
||||||
jlmap3d: null,
|
jlmap3d: null,
|
||||||
selectmodel: null,
|
selectmodel: null,
|
||||||
mapid:null,
|
mapid:null,
|
||||||
group:null,
|
group:null,
|
||||||
token:null
|
token:null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
// console.log("destroy");
|
// console.log("destroy");
|
||||||
if (this.jlmap3d) {
|
if (this.jlmap3d) {
|
||||||
this.jlmap3d.webwork.postMessage('off');
|
this.jlmap3d.webwork.postMessage('off');
|
||||||
this.jlmap3d.webwork.terminate();
|
this.jlmap3d.webwork.terminate();
|
||||||
this.jlmap3d.jsonwebwork.terminate();
|
this.jlmap3d.jsonwebwork.terminate();
|
||||||
this.jlmap3d.dispose();
|
this.jlmap3d.dispose();
|
||||||
this.jlmap3d = null;
|
this.jlmap3d = null;
|
||||||
// this.$destroy();
|
// this.$destroy();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
mounted() {
|
document.querySelector("link[rel*='icon']").href = ProjectIcon[this.$route.query.project];
|
||||||
window.updatemenulist = this.updatemenulist;
|
},
|
||||||
this.getParams();
|
mounted() {
|
||||||
|
window.updatemenulist = this.updatemenulist;
|
||||||
|
this.getParams();
|
||||||
|
|
||||||
// console.log("");
|
// console.log("");
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getParams:function(){
|
|
||||||
var routerParams = this.$route.query.group
|
|
||||||
this.mapid = this.$route.query.mapid;
|
|
||||||
this.group = this.$route.query.group;
|
|
||||||
this.token = this.$route.query.token;
|
|
||||||
this.init(this.mapid,this.group);
|
|
||||||
},
|
},
|
||||||
show: function (skinCode,group) {
|
methods: {
|
||||||
if (this.jlmap3d == null) {
|
getParams:function() {
|
||||||
this.init(skinCode,group);
|
var routerParams = this.$route.query.group;
|
||||||
} else {
|
this.mapid = this.$route.query.mapid;
|
||||||
// this.jlmap3d.restart();
|
this.group = this.$route.query.group;
|
||||||
this.jlmap3d.eventon();
|
this.token = this.$route.query.token;
|
||||||
this.jlmap3d.animateon();
|
this.init(this.mapid, this.group);
|
||||||
|
},
|
||||||
|
show: function (skinCode, group) {
|
||||||
|
if (this.jlmap3d == null) {
|
||||||
|
this.init(skinCode, group);
|
||||||
|
} else {
|
||||||
|
// this.jlmap3d.restart();
|
||||||
|
this.jlmap3d.eventon();
|
||||||
|
this.jlmap3d.animateon();
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
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.eventon();
|
||||||
|
},
|
||||||
|
raystand() {
|
||||||
|
this.jlmap3d.rayswitch('stand');
|
||||||
|
},
|
||||||
|
raytrain() {
|
||||||
|
this.jlmap3d.rayswitch('train');
|
||||||
|
},
|
||||||
|
raysection() {
|
||||||
|
this.jlmap3d.rayswitch('section');
|
||||||
|
},
|
||||||
|
raysignal() {
|
||||||
|
this.jlmap3d.rayswitch('signal');
|
||||||
|
},
|
||||||
|
rayswitch() {
|
||||||
|
this.jlmap3d.rayswitch('switch');
|
||||||
|
},
|
||||||
|
railmove() {
|
||||||
|
this.jlmap3d.camerarailmove();
|
||||||
|
},
|
||||||
|
showstationmsg(showtype) {
|
||||||
|
this.jlmap3d.showstationmsg(showtype);
|
||||||
|
},
|
||||||
|
showtrainmsg(showtype) {
|
||||||
|
this.jlmap3d.showtrainmsg(showtype);
|
||||||
|
},
|
||||||
|
updatemenulist(stationlist, trainlist) {
|
||||||
|
const stations = [];
|
||||||
|
for (const k in stationlist) {
|
||||||
|
stations.push(stationlist[k]);
|
||||||
|
}
|
||||||
|
const trains = [];
|
||||||
|
for (const k in trainlist) {
|
||||||
|
trains.push(trainlist[k]);
|
||||||
|
}
|
||||||
|
this.stationlist = stations;
|
||||||
|
this.trainlist = trains;
|
||||||
|
// console.log(this.stationlist);
|
||||||
|
},
|
||||||
|
|
||||||
this.jlmap3d = new JLmap3d(dom, mapdata, skinCode,this.$store,group,"");
|
sstation(changedata) {
|
||||||
}
|
this.jlmap3d.updatecamera(changedata.mesh, 'station');
|
||||||
this.jlmap3d.eventon();
|
},
|
||||||
},
|
strain(changedata) {
|
||||||
raystand() {
|
|
||||||
this.jlmap3d.rayswitch('stand');
|
|
||||||
},
|
|
||||||
raytrain() {
|
|
||||||
this.jlmap3d.rayswitch('train');
|
|
||||||
},
|
|
||||||
raysection() {
|
|
||||||
this.jlmap3d.rayswitch('section');
|
|
||||||
},
|
|
||||||
raysignal() {
|
|
||||||
this.jlmap3d.rayswitch('signal');
|
|
||||||
},
|
|
||||||
rayswitch() {
|
|
||||||
this.jlmap3d.rayswitch('switch');
|
|
||||||
},
|
|
||||||
railmove() {
|
|
||||||
this.jlmap3d.camerarailmove();
|
|
||||||
},
|
|
||||||
showstationmsg(showtype) {
|
|
||||||
this.jlmap3d.showstationmsg(showtype);
|
|
||||||
},
|
|
||||||
showtrainmsg(showtype) {
|
|
||||||
this.jlmap3d.showtrainmsg(showtype);
|
|
||||||
},
|
|
||||||
updatemenulist(stationlist, trainlist) {
|
|
||||||
let stations = [];
|
|
||||||
for (let k in stationlist) {
|
|
||||||
stations.push(stationlist[k]);
|
|
||||||
}
|
|
||||||
let trains = [];
|
|
||||||
for (let k in trainlist) {
|
|
||||||
trains.push(trainlist[k]);
|
|
||||||
}
|
|
||||||
this.stationlist = stations;
|
|
||||||
this.trainlist = trains;
|
|
||||||
// console.log(this.stationlist);
|
|
||||||
},
|
|
||||||
|
|
||||||
sstation(changedata) {
|
if (changedata.dispose == false) {
|
||||||
this.jlmap3d.updatecamera(changedata.mesh, 'station');
|
this.jlmap3d.updatecamera(changedata, 'train');
|
||||||
},
|
}
|
||||||
strain(changedata) {
|
|
||||||
|
|
||||||
if (changedata.dispose == false) {
|
},
|
||||||
this.jlmap3d.updatecamera(changedata, 'train');
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
back() {
|
||||||
|
window.close();
|
||||||
|
// this.$emit('showpanel');
|
||||||
|
// this.jlmap3d.eventoff();
|
||||||
|
// this.jlmap3d.animateoff();
|
||||||
|
// this.jlmap3d = null;
|
||||||
|
}
|
||||||
|
|
||||||
back() {
|
}
|
||||||
window.close();
|
|
||||||
// this.$emit('showpanel');
|
|
||||||
// this.jlmap3d.eventoff();
|
|
||||||
// this.jlmap3d.animateoff();
|
|
||||||
// this.jlmap3d = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -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');
|
||||||
|
@ -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,12 +242,12 @@ 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) {
|
||||||
this.$refs.publish3d.show();
|
this.$refs.publish3d.show();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
jlmap3d() {
|
jlmap3d() {
|
||||||
this.$emit('jlmap3d');
|
this.$emit('jlmap3d');
|
||||||
|
Loading…
Reference in New Issue
Block a user