Merge branch 'test'
# Conflicts: # src/views/newMap/displayNew/demonMenu.vue
This commit is contained in:
commit
23bbc97985
@ -29,6 +29,7 @@
|
||||
"path-to-regexp": "2.4.0",
|
||||
"qrcode.vue": "^1.6.2",
|
||||
"qs": "^6.9.3",
|
||||
"quill-emoji": "^0.1.8",
|
||||
"quill-image-extend-module": "^1.1.2",
|
||||
"recordrtc": "^5.5.9",
|
||||
"script-loader": "^0.7.2",
|
||||
|
@ -243,3 +243,11 @@ export function generateAncillaryData(mapId) {
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
/** 查询历史客流量 */
|
||||
export function getPassengerHistoryList(group) {
|
||||
return request({
|
||||
url: `/api/passenger/${group}/history`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,17 @@
|
||||
import request from '@/utils/request';
|
||||
|
||||
// 分页查询帖子回复
|
||||
export function queryPostPaging(postId, params) {
|
||||
// 根据postId帖子ID分页查询留言列表
|
||||
export function queryMessagePagingByPostId(postId, params) {
|
||||
return request({
|
||||
url: `/api/learn/${postId}/message/query/paged`,
|
||||
url: `/api/learn/${postId}/message/pagedQuery/postId`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
}
|
||||
// 根据项目分页查询留言列表
|
||||
export function queryMessagePagingByProjectCode(projectCode, params) {
|
||||
return request({
|
||||
url: `/api/learn/${projectCode}/message/pagedQuery/project`,
|
||||
method: 'get',
|
||||
params: params
|
||||
});
|
||||
@ -67,3 +75,10 @@ export function deleteCommentBySelf(commentId) {
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
// 根据项目获取项目关联的帖子
|
||||
export function getPostByProjectCode(projectCode) {
|
||||
return request({
|
||||
url: `/api/learn/${projectCode}/post`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div :class="className">
|
||||
<quill-editor
|
||||
ref="editor"
|
||||
v-model="content"
|
||||
@ -16,8 +16,11 @@
|
||||
<script>
|
||||
import { quillEditor, Quill } from 'vue-quill-editor';
|
||||
import 'quill/dist/quill.snow.css';
|
||||
import QuillEmoji from 'quill-emoji';
|
||||
import 'quill-emoji/dist/quill-emoji.css';
|
||||
import { ImageExtend, QuillWatch} from 'quill-image-extend-module';
|
||||
Quill.register('modules/ImageExtend', ImageExtend);
|
||||
Quill.register('modules/quillEmoji', QuillEmoji);
|
||||
export default {
|
||||
components: {
|
||||
quillEditor
|
||||
@ -39,13 +42,17 @@ export default {
|
||||
type: Number,
|
||||
default: 80
|
||||
},
|
||||
unloadImg: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
noHandleP: {
|
||||
type: Boolean,
|
||||
defalut: false
|
||||
},
|
||||
editorType: {
|
||||
type: String,
|
||||
default: 'default'
|
||||
},
|
||||
className: {
|
||||
type: String,
|
||||
default: 'commonClass'
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -59,7 +66,10 @@ export default {
|
||||
},
|
||||
options() {
|
||||
const that = this;
|
||||
return this.unloadImg ? {
|
||||
let optionValue = {};
|
||||
switch (this.editorType) {
|
||||
case 'imgEmoji':
|
||||
optionValue = {
|
||||
modules: {
|
||||
ImageExtend: {
|
||||
loading: true,
|
||||
@ -72,6 +82,8 @@ export default {
|
||||
error: () => { that.$message.error('图片上传失败,请检查网络状态'); },
|
||||
sizeError: () => { that.$message.error('图片上传失败,图片大小限制3MB'); } // 图片超过大小的回调
|
||||
},
|
||||
'emoji-toolbar': true,
|
||||
'emoji-shortname': true,
|
||||
toolbar: {
|
||||
container: [
|
||||
['bold', 'italic', 'underline', 'strike'],
|
||||
@ -86,7 +98,7 @@ export default {
|
||||
[{'font': []}],
|
||||
[{'align': []}],
|
||||
['clean'],
|
||||
['image']
|
||||
['image', 'emoji']
|
||||
],
|
||||
handlers: {
|
||||
'image': function () {
|
||||
@ -96,7 +108,22 @@ export default {
|
||||
}
|
||||
},
|
||||
placeholder: '请输入'
|
||||
} : {
|
||||
};
|
||||
break;
|
||||
case 'onlyEmoji':
|
||||
optionValue = {
|
||||
modules: {
|
||||
'emoji-toolbar': true,
|
||||
'emoji-shortname': true,
|
||||
toolbar: {
|
||||
container: [['emoji']]
|
||||
}
|
||||
},
|
||||
placeholder: this.placeholder
|
||||
};
|
||||
break;
|
||||
case 'default':
|
||||
optionValue = {
|
||||
modules: {
|
||||
toolbar: [
|
||||
['bold', 'italic', 'underline', 'strike'],
|
||||
@ -114,6 +141,9 @@ export default {
|
||||
]
|
||||
}
|
||||
};
|
||||
break;
|
||||
}
|
||||
return optionValue;
|
||||
},
|
||||
titleConfig () {
|
||||
return {
|
||||
@ -173,7 +203,29 @@ export default {
|
||||
},
|
||||
getFocus() {
|
||||
this.$refs.editor.quill.focus();
|
||||
},
|
||||
getText() {
|
||||
return this.$refs.editor.quill.getText();
|
||||
},
|
||||
setContents(val) {
|
||||
this.$refs.editor.quill.setContents(val);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.answer_input{
|
||||
/deep/ .ql-toolbar.ql-snow{
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-top: 1px solid #c0c0c0;
|
||||
height: 0;
|
||||
text-align: left;
|
||||
.ql-emoji{
|
||||
position: relative;
|
||||
left: -30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
@ -143,7 +143,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
scene.add(controls3.getObject());
|
||||
|
||||
let cameracctv = new THREE.PerspectiveCamera(50, dom.clientWidth/dom.clientHeight, 0.1, 50);
|
||||
cameracctv.position.set( -3, 0,1.5 );
|
||||
cameracctv.position.set( -3, 0,4.5 );
|
||||
|
||||
cameracctv.rotation.y = -Math.PI/2;
|
||||
cameracctv.rotation.x = Math.PI/2;
|
||||
@ -220,7 +220,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
if (drivingcode) {
|
||||
controls3.getObject().position.x = trainlisttest.list[drivingcode].matrixWorld.elements[12]-27;
|
||||
controls3.getObject().position.y=5;
|
||||
controls3.getObject().position.z = trainlisttest.list[drivingcode].children[0].matrixWorld.elements[14];
|
||||
controls3.getObject().position.z = trainlisttest.list[drivingcode].children[0].matrixWorld.elements[14]+5;
|
||||
}
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
trainlisttest.group.children[0].children[0].add(controls3.getObject());
|
||||
controls3.getObject().position.x = 10;
|
||||
controls3.getObject().position.y = 0;
|
||||
controls3.getObject().position.z = 1.5;
|
||||
controls3.getObject().position.z = 4.5;
|
||||
controls3.getObject().rotation.x = Math.PI/2;
|
||||
controls3.getObject().rotation.y = -Math.PI/2;
|
||||
};
|
||||
@ -284,7 +284,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
trainlisttest.group.children[0].children[0].add(controls3.getObject());
|
||||
controls3.getObject().position.x = 10;
|
||||
controls3.getObject().position.y = 0;
|
||||
controls3.getObject().position.z = 1.5;
|
||||
controls3.getObject().position.z = 4.5;
|
||||
controls3.getObject().rotation.x = Math.PI/2;
|
||||
controls3.getObject().rotation.y = -Math.PI/2;
|
||||
};
|
||||
@ -385,7 +385,7 @@ export function JLmapDriving(dom,data,mapId,storemod,translation,routegroup,proj
|
||||
rails = loadrails;
|
||||
|
||||
console.log(trainlisttest.group.children[0]);
|
||||
trainlisttest.group.children[0].getObjectByName("c3").add(cameracctv);
|
||||
trainlisttest.group.children[0].getObjectByName("C3").add(cameracctv);
|
||||
}
|
||||
|
||||
this.eventon = function() {
|
||||
|
@ -165,7 +165,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
|
||||
trainlisttest.list[code].children[0].position.z = parseFloat(-point.z);
|
||||
|
||||
for (let tl=1; tl<6; tl++) {
|
||||
for (let tl=1; tl<trainlisttest.list[code].children.length; tl++) {
|
||||
trainlisttest.list[code].children[tl].rotalist = [];
|
||||
trainlisttest.list[code].children[tl].position.z = trainlisttest.list[code].children[0].position.z;
|
||||
}
|
||||
@ -205,7 +205,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
trainlisttest.list[code].position.x = point.x;
|
||||
trainlisttest.list[code].children[0].rotalist = [];
|
||||
trainlisttest.list[code].children[0].position.z = parseFloat(point.z);
|
||||
for (let tl=1; tl<6; tl++) {
|
||||
for (let tl=1; tl<trainlisttest.list[code].children.length; tl++) {
|
||||
trainlisttest.list[code].children[tl].rotalist = [];
|
||||
trainlisttest.list[code].children[tl].position.z = trainlisttest.list[code].children[0].position.z;
|
||||
}
|
||||
@ -253,7 +253,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
trainlisttest.list[code].position.x = point.x;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
|
||||
// for (let tl=0; tl<6; tl++) {
|
||||
// for (let tl=0; tl<trainlisttest.list[code].children.length; tl++) {
|
||||
// trainlisttest.list[code].children[tl].position.z = parseFloat(point.z);
|
||||
// }
|
||||
|
||||
@ -293,8 +293,8 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
let offsety = parseFloat(point.y) - parseFloat(trainlisttest.list[code].children[0].position.y);
|
||||
trainlisttest.list[code].children[0].position.y += offsety;
|
||||
}
|
||||
if(trainlisttest.list[code].children[1].rotalist.length > 0 || trainlisttest.list[code].children[2].rotalist.length > 0 || trainlisttest.list[code].children[3].rotalist.length > 0 || trainlisttest.list[code].children[4].rotalist.length > 0|| trainlisttest.list[code].children[5].rotalist.length > 0){
|
||||
for(let rs = 1;rs<6;rs++){
|
||||
// if(trainlisttest.list[code].children[1].rotalist.length > 0 || trainlisttest.list[code].children[2].rotalist.length > 0 || trainlisttest.list[code].children[3].rotalist.length > 0 || trainlisttest.list[code].children[4].rotalist.length > 0|| trainlisttest.list[code].children[5].rotalist.length > 0){
|
||||
for(let rs = 1;rs<trainlisttest.list[code].children.length;rs++){
|
||||
//console.log(rs);
|
||||
if(trainlisttest.list[code].children[rs].rotalist[0]){
|
||||
let offsetz = parseFloat(trainlisttest.list[code].children[rs].rotalist[0].posr.z) - parseFloat(trainlisttest.list[code].children[rs].matrixWorld.elements[14]);
|
||||
@ -309,7 +309,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
// console.log(trainlisttest.list[code].children[rs].matrixWorld.elements[12]);
|
||||
// console.log(trainlisttest.list[code].children[rs].rotalist[0].posr.x);
|
||||
// }
|
||||
if(rs != 5){
|
||||
if(rs != (trainlisttest.list[code].children.length-1)){
|
||||
let asd = trainlisttest.list[code].children[rs].rotalist[0];
|
||||
trainlisttest.list[code].children[rs+1].rotalist.push(asd);
|
||||
|
||||
@ -326,7 +326,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
//console.log(trainlisttest.list[code].children[rs].rotalist.length);
|
||||
}
|
||||
}
|
||||
}
|
||||
// }
|
||||
|
||||
|
||||
|
||||
@ -344,7 +344,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
trainlisttest.list[code].position.x = point.x;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
|
||||
// for (let tl=0; tl<6; tl++) {
|
||||
// for (let tl=0; tl<trainlisttest.list[code].children.length; tl++) {
|
||||
// trainlisttest.list[code].children[tl].position.z = parseFloat(-point.z);
|
||||
// }
|
||||
|
||||
@ -384,9 +384,9 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
// trainlisttest.list[code].position.z = point.z;
|
||||
|
||||
}
|
||||
if(trainlisttest.list[code].children[1].rotalist.length > 0 || trainlisttest.list[code].children[2].rotalist.length > 0 || trainlisttest.list[code].children[3].rotalist.length > 0 || trainlisttest.list[code].children[4].rotalist.length > 0|| trainlisttest.list[code].children[5].rotalist.length > 0){
|
||||
// if(trainlisttest.list[code].children[1].rotalist.length > 0 || trainlisttest.list[code].children[2].rotalist.length > 0 || trainlisttest.list[code].children[3].rotalist.length > 0 || trainlisttest.list[code].children[4].rotalist.length > 0|| trainlisttest.list[code].children[5].rotalist.length > 0){
|
||||
|
||||
for(let rs = 1;rs<6;rs++){
|
||||
for(let rs = 1;rs<trainlisttest.list[code].children.length;rs++){
|
||||
//console.log(rs);
|
||||
if(trainlisttest.list[code].children[rs].rotalist[0]){
|
||||
|
||||
@ -398,7 +398,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
for(let xh=0;xh<trainlisttest.list[code].children[rs].rotalist.length;xh++){
|
||||
if((trainlisttest.list[code].children[rs].matrixWorld.elements[12])<=trainlisttest.list[code].children[rs].rotalist[0].posr.x){
|
||||
|
||||
if(rs != 5){
|
||||
if(rs != (trainlisttest.list[code].children.length-1)){
|
||||
let asd = trainlisttest.list[code].children[rs].rotalist[0];
|
||||
trainlisttest.list[code].children[rs+1].rotalist.push(asd);
|
||||
}
|
||||
@ -418,7 +418,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
|
||||
}
|
||||
// console.log(trainlisttest.list[code].rotalist);
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
@ -440,7 +440,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
trainlisttest.list[code].position.x = point.x;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
for (let tl=0; tl<trainlisttest.list[code].children.length; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = parseFloat(point.z);
|
||||
}
|
||||
|
||||
@ -467,7 +467,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
trainlisttest.list[code].position.x = point.x;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
for (let tl=0; tl<trainlisttest.list[code].children.length; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = parseFloat(-point.z);
|
||||
}
|
||||
|
||||
@ -765,6 +765,7 @@ export function Jlmap3dSubscribeNew(jlmap3d,routegroup,jsonwebwork) {
|
||||
}
|
||||
function standupdate(data) {
|
||||
code = data.code;
|
||||
|
||||
if ( actions[code]) {
|
||||
if (data.open == '1') {
|
||||
actions[code].status = '1';
|
||||
|
@ -71,11 +71,9 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
|
||||
open:0,
|
||||
text:"",
|
||||
};
|
||||
if(data.body[i].num == "0"){
|
||||
train.text = data.body[i].code+"(无人)";
|
||||
}else{
|
||||
|
||||
train.text = data.body[i].code+"(现有乘客"+data.body[i].num+"人)";
|
||||
}
|
||||
|
||||
trafficTrain.trainList[train.code] = train;
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ var Staticmodel = [
|
||||
name: "列车",
|
||||
deviceType: "cctvTrain",
|
||||
type: "cctvTrain",
|
||||
url: "/cbtc/static/trafficplan/train.FBX"
|
||||
url: "/cbtc/static/trafficplan/normaltrain.FBX"
|
||||
},{
|
||||
id: "8",
|
||||
name: "区段",
|
||||
|
@ -239,7 +239,7 @@ export function AssetLoader(){
|
||||
|
||||
|
||||
let modeldata = JSON.parse(data);
|
||||
console.log(modeldata);
|
||||
|
||||
for(let j=0;j<modeldata.assets.length;j++){
|
||||
let had = false;
|
||||
for(let i=0;i<scope.modellist.length;i++){
|
||||
@ -265,10 +265,12 @@ export function AssetLoader(){
|
||||
|
||||
this.assetPromiseOver = function (scene){
|
||||
let initlist = [];
|
||||
|
||||
for(let i=0;i<scope.modellist.length;i++){
|
||||
initlist.push(fbxPromiseOver(scope.modellist[i]));
|
||||
|
||||
}
|
||||
|
||||
return new Promise(function(resolve, reject){
|
||||
|
||||
|
||||
@ -329,7 +331,6 @@ export function AssetLoader(){
|
||||
let autoswitchs = new AssetModel(autoswitch);
|
||||
scope.modellist.push(autoswitchs);
|
||||
|
||||
console.log(signal);
|
||||
fbxpromise(signal)
|
||||
.then(function(data){
|
||||
////console.log(data);
|
||||
@ -587,11 +588,12 @@ export function AssetLoader(){
|
||||
//object.traverse(function (node) {//获取其中对象
|
||||
// node.frustumCulled = true;
|
||||
//});
|
||||
|
||||
if(asset.deviceType == "train"){
|
||||
|
||||
let realtrain = new THREE.Group();
|
||||
for(let j=6;j>0;j--){
|
||||
let name = "c"+j;
|
||||
let name = "C"+j;
|
||||
for(let i=0;i<object.children.length;i++){
|
||||
if(object.children[i].name == name){
|
||||
|
||||
@ -664,11 +666,12 @@ export function AssetLoader(){
|
||||
//object.traverse(function (node) {//获取其中对象
|
||||
// node.frustumCulled = true;
|
||||
//});
|
||||
|
||||
if(asset.type == "train"){
|
||||
console.log(scope.trainoffset);
|
||||
let realtrain = new THREE.Group();
|
||||
for(let j=6;j>0;j--){
|
||||
let name = "c"+j;
|
||||
let j = object.children.length;
|
||||
for(j;j>0;j--){
|
||||
let name = "C"+j;
|
||||
for(let i=0;i<object.children.length;i++){
|
||||
if(object.children[i].name == name){
|
||||
|
||||
|
@ -172,42 +172,41 @@ export function StationStandListN() {
|
||||
}
|
||||
|
||||
} );
|
||||
selectmesh3.traverse( function ( child ) {
|
||||
// selectmesh3.traverse( function ( child ) {
|
||||
//
|
||||
// if ( child.isMesh ) {
|
||||
// child.renderOrder = 9;
|
||||
// }
|
||||
//
|
||||
// } );
|
||||
//新车门动画获取待定
|
||||
let allClear = 0;
|
||||
for(let j=0;j<standsdata.length;j++){
|
||||
|
||||
if ( child.isMesh ) {
|
||||
child.renderOrder = 9;
|
||||
allClear = 0;
|
||||
for(let i=0;i<psddata.length;i++){
|
||||
|
||||
for(let n=0;n<standsdata[j].stands.length;n++){
|
||||
if(psddata[i].standCode == standsdata[j].stands[n].code){
|
||||
allClear++;
|
||||
standsdata[j].stands[n].position = psddata[i].position;
|
||||
}
|
||||
}
|
||||
|
||||
} );
|
||||
//新车门动画获取待定
|
||||
// let allClear = 0;
|
||||
// for(let j=0;j<standsdata.length;j++){
|
||||
//
|
||||
// allClear = 0;
|
||||
// for(let i=0;i<psddata.length;i++){
|
||||
//
|
||||
// for(let n=0;n<standsdata[j].stands.length;n++){
|
||||
// if(psddata[i].standCode == standsdata[j].stands[n].code){
|
||||
// allClear++;
|
||||
// standsdata[j].stands[n].position = psddata[i].position;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if(allClear == standsdata[j].stands.length){
|
||||
// standsdata[j].stands.sort(compare);
|
||||
// i = psddata.length;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
if(allClear == standsdata[j].stands.length){
|
||||
standsdata[j].stands.sort(compare);
|
||||
i = psddata.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
//
|
||||
// console.log(standsdata);
|
||||
// console.log(psddata);
|
||||
for(let i=0;i<standsdata.length;i++){
|
||||
let newstationstand = new StationStandModel(standsdata[i]);
|
||||
// console.log(standsdata[i]);
|
||||
if(standsdata[i].code != "Station96090"){
|
||||
console.log("3");
|
||||
|
||||
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.type = "station";
|
||||
@ -221,12 +220,22 @@ export function StationStandListN() {
|
||||
// newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
// newstationstand.direction2.screenDoorOpenStatus = "01";
|
||||
let newstationmesh = null;
|
||||
let newclip =null;
|
||||
|
||||
if(standsdata[i].stands.length<=2){
|
||||
if(standsdata[i].inside == undefined){
|
||||
newstationmesh = selectmesh1.clone(true);
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
}else if(standsdata[i].inside == true){
|
||||
newstationmesh = selectmesh1.clone(true);
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
}else{
|
||||
newstationmesh = selectmesh2.clone(true);
|
||||
newclip = selectmesh2.animations[ 0 ];
|
||||
}
|
||||
}else{
|
||||
newstationmesh = selectmesh3.clone(true);
|
||||
newclip = selectmesh3.animations[ 0 ];
|
||||
}
|
||||
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
@ -244,71 +253,93 @@ export function StationStandListN() {
|
||||
//
|
||||
scope.list[standsdata[i].code] = newstationstand;
|
||||
//
|
||||
let newclip =null;
|
||||
if(standsdata[i].inside == true){
|
||||
newclip = selectmesh1.animations[ 0 ];
|
||||
}else{
|
||||
newclip = selectmesh2.animations[ 0 ];
|
||||
}
|
||||
for(let j=0;j<standsdata[i].stands.length;j++){
|
||||
let num = j+1;
|
||||
|
||||
for(let j=0;j<newstationmesh.children.length;j++){
|
||||
|
||||
if(newstationmesh.children[j].name == "top"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
let addAnimaMesh = newstationmesh.getObjectByName('door'+num);
|
||||
|
||||
if(addAnimaMesh){
|
||||
newstationmesh.getObjectByName('door'+num).animations = [];
|
||||
newstationmesh.getObjectByName('door'+num).animations.push(newclip.clone());
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.getObjectByName('door'+num) );
|
||||
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
for(let m=0;m<newstationstand.stands.length;m++){
|
||||
|
||||
if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == false){
|
||||
|
||||
if(psddata[n].standCode == standsdata[i].stands[j].code){
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
action:mixer.clipAction( newstationmesh.getObjectByName('door'+num).animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
|
||||
n = psddata.length;
|
||||
m = newstationstand.stands.length;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if(newstationmesh.children[j].name == "down"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
for(let m=0;m<newstationstand.stands.length;m++){
|
||||
|
||||
if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == true){
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
m = newstationstand.stands.length;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// for(let j=0;j<newstationmesh.children.length;j++){
|
||||
//
|
||||
// if(newstationmesh.children[j].name == "top"){
|
||||
// newstationmesh.children[j].animations = [];
|
||||
// newstationmesh.children[j].animations.push(newclip.clone());
|
||||
//
|
||||
// let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
//
|
||||
//
|
||||
// for(let n=0;n<psddata.length;n++){
|
||||
// for(let m=0;m<newstationstand.stands.length;m++){
|
||||
//
|
||||
// if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == false){
|
||||
//
|
||||
// let key = psddata[n].code;
|
||||
// actionss[key] = {
|
||||
// status:"01",
|
||||
// action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
// };
|
||||
// actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
// actionss[key].action.clampWhenFinished = true;
|
||||
// //actionss[key].play();
|
||||
// mixers.push(mixer);
|
||||
// n = psddata.length;
|
||||
// m = newstationstand.stands.length;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// if(newstationmesh.children[j].name == "down"){
|
||||
// newstationmesh.children[j].animations = [];
|
||||
// newstationmesh.children[j].animations.push(newclip.clone());
|
||||
//
|
||||
// let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
// for(let n=0;n<psddata.length;n++){
|
||||
// for(let m=0;m<newstationstand.stands.length;m++){
|
||||
//
|
||||
// if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == true){
|
||||
// let key = psddata[n].code;
|
||||
// actionss[key] = {
|
||||
// status:"01",
|
||||
// action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
// };
|
||||
// actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
// actionss[key].action.clampWhenFinished = true;
|
||||
// //actionss[key].play();
|
||||
// mixers.push(mixer);
|
||||
// n = psddata.length;
|
||||
// m = newstationstand.stands.length;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
if(mode){
|
||||
if(mode == "02"){
|
||||
@ -328,116 +359,7 @@ export function StationStandListN() {
|
||||
textt.dispose();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
newstationstand.code = standsdata[i].code;
|
||||
newstationstand.name = standsdata[i].name;
|
||||
newstationstand.type = "station";
|
||||
newstationstand.num = i;
|
||||
newstationstand.stand = [];
|
||||
// newstationstand.direction1.code = standsdata[i].direction1.code;
|
||||
// newstationstand.direction1.name = standsdata[i].direction1.name;
|
||||
// newstationstand.direction1.screenDoorOpenStatus = "01";
|
||||
//
|
||||
// newstationstand.direction2.code = standsdata[i].direction2.code;
|
||||
// newstationstand.direction2.name = standsdata[i].direction2.name;
|
||||
// newstationstand.direction2.screenDoorOpenStatus = "01";
|
||||
let newstationmesh = null;
|
||||
newstationmesh = selectmesh3.clone(true);
|
||||
newstationmesh.code = standsdata[i].code;
|
||||
newstationmesh.name = standsdata[i].code;
|
||||
newstationmesh.position.x = standsdata[i].position.x;
|
||||
newstationmesh.position.y = standsdata[i].position.y;
|
||||
newstationmesh.position.z = standsdata[i].position.z;
|
||||
// newstationmesh.rotation.x = standsdata[i].rotation._x;
|
||||
// newstationmesh.rotation.y = standsdata[i].rotation._y;
|
||||
// newstationmesh.rotation.z = standsdata[i].rotation._z;
|
||||
newstationstand.mesh = newstationmesh;
|
||||
scope.group.add(newstationmesh);
|
||||
//
|
||||
scope.list[standsdata[i].code] = newstationstand;
|
||||
//
|
||||
let newclip =null;
|
||||
newclip = selectmesh3.animations[ 0 ];
|
||||
for(let j=0;j<newstationmesh.children.length;j++){
|
||||
|
||||
if(newstationmesh.children[j].name == "top"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
for(let m=0;m<newstationstand.stands.length;m++){
|
||||
console.log("====================");
|
||||
console.log(newstationstand.stands[m]);
|
||||
console.log(psddata[n]);
|
||||
if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == false){
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
m = newstationstand.stands.length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if(newstationmesh.children[j].name == "down"){
|
||||
newstationmesh.children[j].animations = [];
|
||||
newstationmesh.children[j].animations.push(newclip.clone());
|
||||
|
||||
let mixer = new THREE.AnimationMixer( newstationmesh.children[j] );
|
||||
for(let n=0;n<psddata.length;n++){
|
||||
for(let m=0;m<newstationstand.stands.length;m++){
|
||||
console.log("====================");
|
||||
console.log(newstationstand.stands[m]);
|
||||
console.log(psddata[n]);
|
||||
if(psddata[n].standCode == newstationstand.stands[m].code && newstationstand.stands[m].right == true){
|
||||
let key = psddata[n].code;
|
||||
actionss[key] = {
|
||||
status:"01",
|
||||
action:mixer.clipAction( newstationmesh.children[j].animations[0])
|
||||
};
|
||||
actionss[key].action.setLoop(THREE.LoopOnce);
|
||||
actionss[key].action.clampWhenFinished = true;
|
||||
//actionss[key].play();
|
||||
mixers.push(mixer);
|
||||
n = psddata.length;
|
||||
m = newstationstand.stands.length;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(mode){
|
||||
if(mode == "02"){
|
||||
let textgeometry = new THREE.PlaneBufferGeometry( 65, 90, 1 );
|
||||
let textt = new THREE.CanvasTexture(getTextCanvas(standsdata[i]));
|
||||
let textmaterial = new THREE.MeshBasicMaterial( { side: THREE.DoubleSide,map:textt ,transparent: true} );
|
||||
let textplane = new THREE.Mesh( textgeometry, textmaterial );
|
||||
textplane.name = standsdata[i].code;
|
||||
textplane.position.y = 70;
|
||||
textplane.rotation.x = Math.PI/2;
|
||||
textplane.position.z = 50;
|
||||
scope.textlist.push(textplane);
|
||||
newstationmesh.add(textplane);
|
||||
textgeometry.dispose();
|
||||
textmaterial.dispose();
|
||||
textt.dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// scene.add(scope.textlist);
|
||||
|
@ -77,13 +77,13 @@ export function TrainListN() {
|
||||
//
|
||||
// fclip = new THREE.AnimationClip("four",2,ntracks2);
|
||||
|
||||
ntracks2 = assetloader.modellist[n].animations.slice(6,14);
|
||||
// ntracks2 = assetloader.modellist[n].animations.slice(6,14);
|
||||
//
|
||||
// fclip = new THREE.AnimationClip("four",2,ntracks2);
|
||||
//
|
||||
// ntracks1 = assetloader.modellist[n].animations.slice(0,6);
|
||||
|
||||
fclip = new THREE.AnimationClip("four",2,ntracks2);
|
||||
|
||||
ntracks1 = assetloader.modellist[n].animations.slice(0,6);
|
||||
|
||||
tclip = new THREE.AnimationClip("three",2,ntracks1);
|
||||
tclip = new THREE.AnimationClip("three",2,assetloader.modellist[n].animations);
|
||||
|
||||
n = 0;
|
||||
}
|
||||
@ -97,8 +97,6 @@ export function TrainListN() {
|
||||
newmesh.mixer = [];
|
||||
|
||||
for(let j=0;j<newmesh.children.length;j++){
|
||||
|
||||
if(newmesh.children[j].name == "c1" || newmesh.children[j].name == "c6"){
|
||||
// console.log("===================");
|
||||
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
|
||||
|
||||
@ -135,37 +133,7 @@ export function TrainListN() {
|
||||
mixers.push(mixer);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
|
||||
if(newmesh.children[j].children[n].name == "top"){
|
||||
newmesh.children[j].children[n].animations = [];
|
||||
newmesh.children[j].children[n].animations.push(fclip.clone());
|
||||
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
|
||||
newmesh.mixer.push(mixer);
|
||||
newmesh.mixerpush = false;
|
||||
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
|
||||
//action.play();
|
||||
action.setLoop(THREE.LoopOnce);
|
||||
action.clampWhenFinished = true;
|
||||
actionss["traindoor"].top.push(action);
|
||||
mixers.push(mixer);
|
||||
}
|
||||
|
||||
if(newmesh.children[j].children[n].name == "down"){
|
||||
newmesh.children[j].children[n].animations = [];
|
||||
newmesh.children[j].children[n].animations.push(fclip.clone());
|
||||
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
|
||||
newmesh.mixer.push(mixer);
|
||||
newmesh.mixerpush = false;
|
||||
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
|
||||
//action.play();
|
||||
action.setLoop(THREE.LoopOnce);
|
||||
action.clampWhenFinished = true;
|
||||
actionss["traindoor"].down.push(action);
|
||||
mixers.push(mixer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
newmesh.children[j].axis = new THREE.Vector3();
|
||||
newmesh.children[j].up = new THREE.Vector3(1, 0, 0);
|
||||
@ -208,8 +176,7 @@ export function TrainListN() {
|
||||
for(let n=assetloader.modellist.length-1;n>=0;n--){
|
||||
if(assetloader.modellist[n].type == "train"){
|
||||
|
||||
selectmesh = assetloader.modellist[n].mesh
|
||||
|
||||
selectmesh = assetloader.modellist[n].mesh;
|
||||
// ntracks1 = assetloader.modellist[n].animations.slice(16,27);
|
||||
//
|
||||
// tclip = new THREE.AnimationClip("three",2,ntracks1);
|
||||
@ -218,13 +185,12 @@ export function TrainListN() {
|
||||
//
|
||||
// fclip = new THREE.AnimationClip("four",2,ntracks2);
|
||||
|
||||
ntracks2 = assetloader.modellist[n].animations.slice(6,14);
|
||||
|
||||
fclip = new THREE.AnimationClip("four",2,ntracks2);
|
||||
|
||||
ntracks1 = assetloader.modellist[n].animations.slice(0,6);
|
||||
|
||||
tclip = new THREE.AnimationClip("three",2,ntracks1);
|
||||
// ntracks2 = assetloader.modellist[n].animations.slice(6,14);
|
||||
//
|
||||
// fclip = new THREE.AnimationClip("four",2,ntracks2);
|
||||
//
|
||||
// ntracks1 = assetloader.modellist[n].animations.slice(0,6);
|
||||
tclip = new THREE.AnimationClip("three",2,assetloader.modellist[n].animations);
|
||||
n = 0;
|
||||
}
|
||||
}
|
||||
@ -252,7 +218,6 @@ export function TrainListN() {
|
||||
// console.log(data[i]);
|
||||
for(let j=0;j<newmesh.children.length;j++){
|
||||
|
||||
if(newmesh.children[j].name == "c1" || newmesh.children[j].name == "c6"){
|
||||
// console.log("===================");
|
||||
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
|
||||
|
||||
@ -288,37 +253,7 @@ export function TrainListN() {
|
||||
actionss[data[i].groupNumber].down.push(action);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
for(let n=0,lenn = newmesh.children[j].children.length;n<lenn;n++){
|
||||
if(newmesh.children[j].children[n].name == "top"){
|
||||
newmesh.children[j].children[n].animations = [];
|
||||
newmesh.children[j].children[n].animations.push(fclip.clone());
|
||||
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
|
||||
newmesh.mixer.push(mixer);
|
||||
newmesh.mixerpush = false;
|
||||
// mixers.push(mixer);
|
||||
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
|
||||
//action.play();
|
||||
action.setLoop(THREE.LoopOnce);
|
||||
action.clampWhenFinished = true;
|
||||
actionss[data[i].groupNumber].top.push(action);
|
||||
}
|
||||
|
||||
if(newmesh.children[j].children[n].name == "down"){
|
||||
newmesh.children[j].children[n].animations = [];
|
||||
newmesh.children[j].children[n].animations.push(fclip.clone());
|
||||
let mixer = new THREE.AnimationMixer( newmesh.children[j].children[n] );
|
||||
newmesh.mixer.push(mixer);
|
||||
newmesh.mixerpush = false;
|
||||
// mixers.push(mixer);
|
||||
let action = mixer.clipAction( newmesh.children[j].children[n].animations[ 0 ] );
|
||||
//action.play();
|
||||
action.setLoop(THREE.LoopOnce);
|
||||
action.clampWhenFinished = true;
|
||||
actionss[data[i].groupNumber].down.push(action);
|
||||
}
|
||||
}
|
||||
}
|
||||
//newmesh.children[j].name = data[i].code;
|
||||
newmesh.children[j].groupNumber = data[i].groupNumber;
|
||||
newmesh.children[j].axis = new THREE.Vector3();
|
||||
@ -331,6 +266,7 @@ export function TrainListN() {
|
||||
newmesh.children[j].rotalist = [];
|
||||
// console.log(newmesh);
|
||||
}
|
||||
|
||||
//
|
||||
// // newmesh.children[4].add(newmesh.children[5]);
|
||||
// // newmesh.children[3].add(newmesh.children[4]);
|
||||
|
@ -6,7 +6,7 @@ export default {
|
||||
MinTime: 0,
|
||||
|
||||
/** 最大时间*/
|
||||
MaxTime: 3600*24-1,
|
||||
MaxTime: 3600 * 24 - 1,
|
||||
|
||||
/** 边缘高度*/
|
||||
EdgeHeight: 600,
|
||||
@ -23,8 +23,8 @@ export default {
|
||||
const closerKmRange = model.closerKmRange;
|
||||
const startTime = model.startTime;
|
||||
const endTime = model.endTime;
|
||||
const point1 = [ startTime, this.getCoordinateYByKmRange(fartherKmRange)];
|
||||
const point2 = [ endTime, this.getCoordinateYByKmRange(closerKmRange)]
|
||||
const point1 = [startTime, this.getCoordinateYByKmRange(fartherKmRange)];
|
||||
const point2 = [endTime, this.getCoordinateYByKmRange(closerKmRange)];
|
||||
const position1 = chart.convertToPixel('grid', point1);
|
||||
const position2 = chart.convertToPixel('grid', point2);
|
||||
const position = position1;
|
||||
@ -38,7 +38,7 @@ export default {
|
||||
point2,
|
||||
width,
|
||||
height
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
/** 将后台数据解析成图形*/
|
||||
@ -51,7 +51,7 @@ export default {
|
||||
if (typeof model.startTime == 'string') model.startTime = toTimeStamp(model.startTime);
|
||||
if (typeof model.endTime == 'string') model.endTime = toTimeStamp(model.endTime);
|
||||
graphs.push(createRectArea(this.calcAreaArgsByModel(chart, model)));
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
return graphs;
|
||||
@ -63,7 +63,7 @@ export default {
|
||||
if (planData &&
|
||||
planData.serviceList &&
|
||||
planData.serviceList.length) {
|
||||
planData.serviceList.forEach((service,i) => {
|
||||
planData.serviceList.forEach((service, i) => {
|
||||
if (service.tripList &&
|
||||
service.tripList.length) {
|
||||
|
||||
@ -76,14 +76,14 @@ export default {
|
||||
data: []
|
||||
};
|
||||
|
||||
service.tripList.forEach((trip,j) => {
|
||||
service.tripList.forEach((trip, j) => {
|
||||
var lastPoint = null;
|
||||
var nextPoint = null;
|
||||
var pointData = {
|
||||
name: `${service.serviceNo}-${trip.tripNo}`,
|
||||
color: '#000',
|
||||
direction: trip.direction,
|
||||
coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByStationId(stations, trip.stationTimeList[0].stationId)],
|
||||
coord: [trip.stationTimeList[0].departureTime, this.getCoordinateYByStationId(stations, trip.stationTimeList[0].stationId)]
|
||||
};
|
||||
|
||||
opt.markPoint.data.push(createMartPoint(pointData));
|
||||
@ -113,7 +113,7 @@ export default {
|
||||
if (service.tripList[j + 1] &&
|
||||
service.tripList[j + 1].stationTimeList) {
|
||||
|
||||
lastPoint = trip.stationTimeList[trip.stationTimeList.length-1];
|
||||
lastPoint = trip.stationTimeList[trip.stationTimeList.length - 1];
|
||||
nextPoint = service.tripList[j + 1].stationTimeList[0];
|
||||
|
||||
opt.data.push({
|
||||
@ -125,7 +125,7 @@ export default {
|
||||
silent: true
|
||||
}],
|
||||
symbol: 'none',
|
||||
symbolSize: 1,
|
||||
symbolSize: 1
|
||||
});
|
||||
opt.data.push({
|
||||
value: [nextPoint.departureTime, this.getCoordinateYByStationId(stations, lastPoint.stationId, true, trip.direction), {
|
||||
@ -136,7 +136,7 @@ export default {
|
||||
silent: true
|
||||
}],
|
||||
symbol: 'none',
|
||||
symbolSize: 1,
|
||||
symbolSize: 1
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -147,11 +147,11 @@ export default {
|
||||
);
|
||||
models.push(model);
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
return models;
|
||||
},
|
||||
},
|
||||
|
||||
/** 更新数据并解析成折线*/
|
||||
updateDataToModels(chart, planData, stations, series) {
|
||||
@ -205,16 +205,16 @@ export default {
|
||||
|
||||
/** 通过y坐标获取车站公里表*/
|
||||
getKmRangeByCoordinateY(y) {
|
||||
return parseInt(y/this.CoordMultiple);
|
||||
return parseInt(y / this.CoordMultiple);
|
||||
},
|
||||
|
||||
/** 通过公里表获取坐标值*/
|
||||
getCoordinateYByKmRange(k) {
|
||||
return k * this.CoordMultiple
|
||||
return k * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 通过站信息获取y坐标*/
|
||||
getCoordinateYByStationId(stations, stationId, isSpecial=false, direction='01') {
|
||||
getCoordinateYByStationId(stations, stationId, isSpecial = false, direction = '01') {
|
||||
var value = 0;
|
||||
var station = stations.find(it => { return it.id == stationId; });
|
||||
if (station) {
|
||||
@ -226,11 +226,11 @@ export default {
|
||||
|
||||
/** 通过y坐标获取站信息 */
|
||||
getStationByCoordinateY(stations, y) {
|
||||
for(var i = stations.length-1; i >= 0; i--) {
|
||||
for (var i = stations.length - 1; i >= 0; i--) {
|
||||
const station = stations[i];
|
||||
const edge = this.EdgeHeight/2;
|
||||
const preKm = i == 0? edge*2: Math.abs(station.kmRange-stations[i-1].kmRange)/2;
|
||||
const nxtKm = i == stations.length-1? edge: Math.abs(station.kmRange-stations[i+1].kmRange)/2;
|
||||
const edge = this.EdgeHeight / 2;
|
||||
const preKm = i == 0 ? edge * 2 : Math.abs(station.kmRange - stations[i - 1].kmRange) / 2;
|
||||
const nxtKm = i == stations.length - 1 ? edge : Math.abs(station.kmRange - stations[i + 1].kmRange) / 2;
|
||||
const min = edge + station.kmRange - preKm;
|
||||
const max = edge + station.kmRange + nxtKm;
|
||||
if (y >= min && y <= max) {
|
||||
@ -240,7 +240,7 @@ export default {
|
||||
return null;
|
||||
},
|
||||
|
||||
/**限制区域范围 */
|
||||
/** 限制区域范围 */
|
||||
limitAreaTime(model) {
|
||||
if (model) {
|
||||
model.startTime = model.startTime < this.MinTime
|
||||
@ -263,9 +263,9 @@ export default {
|
||||
const closerKmRange = model.closerKmRange;
|
||||
const fartherKmRange = model.fartherKmRange;
|
||||
const length = stations.length;
|
||||
const first = stations[0]||{};
|
||||
const last = stations[length-1]||{};
|
||||
const minRange = first.kmRange-this.EdgeHeight;
|
||||
const first = stations[0] || {};
|
||||
const last = stations[length - 1] || {};
|
||||
const minRange = first.kmRange - this.EdgeHeight;
|
||||
const maxRange = last.kmRange;
|
||||
const tolerant = 0;
|
||||
|
||||
|
@ -261,12 +261,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -261,12 +261,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -236,12 +236,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -246,6 +246,10 @@ export default {
|
||||
return series;
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 初始化Y轴*/
|
||||
initializeYaxis(stations) {
|
||||
return createMarkLineModels(stations, (elem) => {
|
||||
@ -257,8 +261,8 @@ export default {
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2,10 +2,10 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, pre
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
export default {
|
||||
/** 边缘高度*/
|
||||
EdgeHeight: 3,
|
||||
EdgeHeight: 180,
|
||||
|
||||
/** 间隔高度*/
|
||||
CoordMultiple: 3,
|
||||
CoordMultiple: 180,
|
||||
|
||||
/** 偏移时间*/
|
||||
TranslationTime: 60 * 60 * 2,
|
||||
@ -430,17 +430,6 @@ export default {
|
||||
return series;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + index * this.CoordMultiple;
|
||||
});
|
||||
}
|
||||
|
||||
return map;
|
||||
},
|
||||
/** 初始化Y轴*/
|
||||
initializeYaxis(stations) {
|
||||
return createMarkLineModels(stations, (elem, index) => {
|
||||
@ -448,6 +437,22 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + index * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
return map;
|
||||
},
|
||||
|
||||
/** 计算y轴最小值*/
|
||||
computedYaxisMinValue() {
|
||||
return 0;
|
||||
|
@ -311,12 +311,16 @@ export default {
|
||||
return series;
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + index * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + index * this.CoordMultiple;
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -280,12 +280,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -263,12 +263,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2,10 +2,10 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, con
|
||||
import store from '@/store/index_APP_TARGET';
|
||||
export default {
|
||||
/** 边缘高度*/
|
||||
EdgeHeight: 600,
|
||||
EdgeHeight: 600 / 3,
|
||||
|
||||
/** 间隔高度*/
|
||||
CoordMultiple: 1,
|
||||
CoordMultiple: 1 / 3,
|
||||
|
||||
/** 偏移时间*/
|
||||
TranslationTime: 60 * 60 * 2,
|
||||
@ -131,7 +131,6 @@ export default {
|
||||
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode ||
|
||||
index == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
|
||||
index > 0 && index < train.stationTimeList.length - 1) {
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.right, false), elem.stationCode, aa]);
|
||||
}
|
||||
@ -142,7 +141,6 @@ export default {
|
||||
lastPoint = train.stationTimeList[idx - 1];
|
||||
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
|
||||
num = this.computedReentryNumber(train.tripNumber);
|
||||
// ${train.directionCode}
|
||||
const aa = `${train.tripNumber}`;
|
||||
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.right, true, num), lastPoint.stationCode, aa]);
|
||||
opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.right, true, num), nextPoint.stationCode, aa]);
|
||||
@ -259,15 +257,19 @@ export default {
|
||||
initializeYaxis(stations) {
|
||||
return createMarkLineModels(stations, (elem) => {
|
||||
return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
});
|
||||
}, {yAxisIndex:0});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -271,12 +271,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -326,12 +326,16 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
getYaxisValueByStation(station, index) {
|
||||
return this.EdgeHeight + station.kmRange * this.CoordMultiple;
|
||||
},
|
||||
|
||||
/** 将后台数据转换为试图序列模型*/
|
||||
convertStationsToMap(stations) {
|
||||
var map = {};
|
||||
if (stations && stations.length) {
|
||||
stations.forEach((elem) => {
|
||||
map[`${elem.kmRange}`] = this.EdgeHeight + elem.kmRange * this.CoordMultiple;
|
||||
stations.forEach((elem, index) => {
|
||||
map[`${elem.kmRange}`] = this.getYaxisValueByStation(elem, index);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@ const Jlmap3dOtherVR = () => import('@/views/jlmap3d/maintainer/jl3dothervr');
|
||||
|
||||
const DisplayNew = () => import('@/views/newMap/displayNew/index');
|
||||
const DesignDisplayNew = () => import('@/views/newMap/displayNew/scriptDisplay/scriptPreview/index');
|
||||
const PracticeDisplay = () => import('@/views/newMap/displayNew/practiceDisplay');
|
||||
|
||||
const JointTrainingNew = () => import('@/views/newMap/jointTrainingNew/index');
|
||||
|
||||
@ -397,6 +398,12 @@ export const publicAsyncRoute = [
|
||||
path: '/design/runPlan/testRunplan',
|
||||
component: TestRunplan,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
// 北京交大使用 客流视图
|
||||
path: '/practiceDisplay',
|
||||
component: PracticeDisplay,
|
||||
hidden: true
|
||||
}
|
||||
];
|
||||
// 城市轨道项目
|
||||
|
@ -150,11 +150,10 @@ export const SimulationType = {
|
||||
MAINTAINER: '通号'
|
||||
};
|
||||
export const UrlConfig = {
|
||||
display: '/display',
|
||||
displayNew: '/displayNew',
|
||||
scriptDisplay: '/scriptDisplay',
|
||||
scriptDisplayNew:'/scriptDisplayNew',
|
||||
practiceDisplayNew:'/practiceDisplayNew',
|
||||
passengerDisplay:'/passengerDisplay',
|
||||
examRuleDraft: '/examRule/draft',
|
||||
examRuleManage: '/examRule/manage',
|
||||
examDetail: '/exam',
|
||||
|
@ -447,7 +447,3 @@ export const ProjectList = [
|
||||
{value: 'bjd', label: '北交大'},
|
||||
{value: 'urtss', label: '陪标项目'}
|
||||
];
|
||||
export const ProjectPostIdMap = {
|
||||
drts: 1,
|
||||
bjd: 2
|
||||
};
|
||||
|
@ -141,6 +141,9 @@ function handle(state, data) {
|
||||
case 'Simulation_Alarm':
|
||||
state.simulationAlarmInfo = msg;
|
||||
break;
|
||||
case 'STATION_PFI_NUM':
|
||||
state.stationPfiNum = msg;
|
||||
break;
|
||||
case 'Simulation_Scenes_Reload':
|
||||
if (msg) {
|
||||
store.dispatch('training/start');
|
||||
@ -282,6 +285,7 @@ const socket = {
|
||||
roomInvite: {},
|
||||
simulationTimeSync: '', // 仿真时间
|
||||
simulationIbpStatus: null,
|
||||
stationPfiNum: null, // 客流消息列表
|
||||
competitionPracticeFinish:0, // 竞赛场景结束标识
|
||||
simulationAlarmInfo: []// 仿真报警信息
|
||||
},
|
||||
@ -292,6 +296,10 @@ const socket = {
|
||||
state.jointRoomInfo = jointRoomInfo;
|
||||
},
|
||||
|
||||
setStationPfiNum: (state, stationPfiNum) => {
|
||||
state.stationPfiNum = stationPfiNum;
|
||||
},
|
||||
|
||||
setChatContent: (state, chatContent) => {
|
||||
state.chatContent = chatContent;
|
||||
},
|
||||
@ -355,6 +363,10 @@ const socket = {
|
||||
commit('setJointRoomInfo', {});
|
||||
},
|
||||
|
||||
setStationPfiNum: ({ commit }) => {
|
||||
commit('setStationPfiNum', null);
|
||||
},
|
||||
|
||||
setEquipmentStatus: ({ commit }) => {
|
||||
commit('setEquipmentStatus', []);
|
||||
},
|
||||
|
@ -60,7 +60,7 @@ export function createSeriesModel(opt, lineStyle) {
|
||||
}
|
||||
|
||||
/** 创建标记横线*/
|
||||
export function createMarkLineModels(stations, computedYaxis) {
|
||||
export function createMarkLineModels(stations, computedYaxis, opt = {}) {
|
||||
const markLineModel = {};
|
||||
if (stations && stations.length) {
|
||||
markLineModel.type = 'line';
|
||||
@ -71,6 +71,7 @@ export function createMarkLineModels(stations, computedYaxis) {
|
||||
markLineModel.markLine.lineStyle = { color: '#B0C4DE', width: 0.5 };
|
||||
markLineModel.markLine.symbol = 'none';
|
||||
markLineModel.elements = [];
|
||||
Object.assign(markLineModel, opt);
|
||||
stations.forEach((elem, index) => {
|
||||
markLineModel.markLine.data.push(
|
||||
{
|
||||
|
@ -3,22 +3,15 @@
|
||||
<div class="menuTrainListBtn" @click="clickBtn">
|
||||
<div v-if="userRole == 'DISPATCHER'">
|
||||
<div id="teleName" />
|
||||
<p style="margin: 0;">调</p>
|
||||
<p style="margin: 0;">度</p>
|
||||
<p style="margin: 0;">电</p>
|
||||
<p style="margin: 0;">话</p>
|
||||
<div class="teleNameIn">调度电话</div>
|
||||
</div>
|
||||
<div v-if="userRole != 'AUDIENCE' && userRole != 'DISPATCHER'">
|
||||
<div id="teleName" />
|
||||
<p style="margin: 0;">电</p>
|
||||
<p style="margin: 0;">话</p>
|
||||
<div class="teleNameIn">电话</div>
|
||||
</div>
|
||||
<div v-if="userRole == 'AUDIENCE'">
|
||||
<div class="teleNameIn">通话记录</div>
|
||||
</div>
|
||||
<template v-if="userRole == 'AUDIENCE'">
|
||||
<p style="margin: 0;">通</p>
|
||||
<p style="margin: 0;">话</p>
|
||||
<p style="margin: 0;">记</p>
|
||||
<p style="margin: 0;">录</p>
|
||||
</template>
|
||||
</div>
|
||||
<div class="chat-box-main">
|
||||
<!-- v-if="!conversitionId && userRole !== 'AUDIENCE' && !commonConversation" -->
|
||||
@ -123,9 +116,9 @@
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="chat-box-content chat-box-content_audience">
|
||||
<!-- :project="project" -->
|
||||
<chat-content
|
||||
ref="chatContent"
|
||||
:project="project"
|
||||
:is-answering="IsAnswering"
|
||||
:conversition-id="conversitionId"
|
||||
:conversition-member-list="conversitionMemberList"
|
||||
@ -1398,4 +1391,8 @@ export default {
|
||||
50%{opacity:0;}
|
||||
100% {opacity: 1;}
|
||||
}
|
||||
.teleNameIn{
|
||||
width: 16px;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
</style>
|
||||
|
@ -29,7 +29,7 @@
|
||||
<template v-for="(elem,j) in allCommentList">
|
||||
<div :key="j" style="font-size: 14px;margin-top: 10px;">
|
||||
<span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>
|
||||
<span style="margin-right: 15px;">{{ elem.content }}</span>
|
||||
<span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />
|
||||
<span style="margin-right: 10px;">{{ elem.commentTime }}</span>
|
||||
<span style="color:#409EFF;cursor: pointer;margin-right: 10px;" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>
|
||||
<span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>
|
||||
@ -40,7 +40,7 @@
|
||||
<template v-for="(elem,j) in item.comments.list">
|
||||
<div :key="j" style="font-size: 14px;margin-top: 18px;">
|
||||
<span style="margin-right: 5px;">{{ computedCommentName(elem) }}</span>
|
||||
<span style="margin-right: 15px;">{{ elem.content }}</span>
|
||||
<span style="margin-right: 15px;" v-html="$escapeHTML(`${elem.content}`)" />
|
||||
<span style="margin-right: 10px;">{{ elem.commentTime }}</span>
|
||||
<span style="color:#409EFF;cursor: pointer;margin-right: 10px;" @click="replyLeaveMessage(item.id, i,elem.id, elem.userNickname)">回复</span>
|
||||
<span v-if="userId == elem.userId || superAdmin" style="color:#409EFF;cursor: pointer;" type="text" @click="deleteComment(item.id, i, elem.id)">删除</span>
|
||||
@ -52,8 +52,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="replyMessageId == item.id" style="width: 80%;margin-left: 10%;text-align: center;">
|
||||
<el-input :id="'answerInput' + item.id" v-model="commentContent" type="textarea" placeholder="请输入内容" maxlength="300" style="margin-top: 10px;" :autosize="{ minRows: 2, maxRows: 4}" show-word-limit @input="changeCommentContent" />
|
||||
<div style="margin-top: 10px;">
|
||||
<quill-editor
|
||||
:ref="'answerInput' + item.id"
|
||||
v-model="commentContent"
|
||||
style="width: 80%;margin-left: 10%;margin-top: 10px;"
|
||||
class-name="answer_input"
|
||||
:margin-bottom="20"
|
||||
editor-type="onlyEmoji"
|
||||
:no-handle-p="true"
|
||||
:height="100"
|
||||
:placeholder="replyUserName"
|
||||
/>
|
||||
<div>
|
||||
<el-button type="danger" size="small" @click="commentMessage">回复</el-button>
|
||||
<el-button size="small" @click="cancelComment">取消</el-button>
|
||||
</div>
|
||||
@ -74,11 +84,10 @@
|
||||
/>
|
||||
</div>
|
||||
</el-card>
|
||||
<quill-editor ref="quillEditor" v-model="content" style="width: 80%;margin-left: 10%;" placeholder="请输入内容" :margin-bottom="20" :unload-img="true" :no-handle-p="true" />
|
||||
<quill-editor ref="quillEditor" v-model="content" style="width: 80%;margin-left: 10%;" :margin-bottom="20" editor-type="imgEmoji" :no-handle-p="true" />
|
||||
<span id="boardBottom" class="dialog-footer">
|
||||
<el-button @click="handleClear">清空</el-button>
|
||||
<el-button type="danger" @click="commitComment">留言</el-button>
|
||||
<!--<el-button type="danger" @click="dialogVisible = false">返回</el-button>-->
|
||||
</span>
|
||||
<el-button size="mini" type="danger" style="position: fixed; right: 100px;top: 80px;width: 90px;" @click="goSlide">我要留言</el-button>
|
||||
<el-button size="mini" style="position: fixed; right: 100px;top: 120px;width: 90px;" @click="dialogVisible = false">退出留言板</el-button>
|
||||
@ -89,14 +98,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { answerPost, queryPostPaging, deleteMessageByAdmin, deleteMessageBySelf, commentLevelMessage, commentComents, queryMessageCommentList, deleteCommentByAdmin, deleteCommentBySelf } from '@/api/learn';
|
||||
import { answerPost, queryMessagePagingByProjectCode, deleteMessageByAdmin, deleteMessageBySelf, commentLevelMessage, commentComents,
|
||||
queryMessageCommentList, deleteCommentByAdmin, deleteCommentBySelf, getPostByProjectCode } from '@/api/learn';
|
||||
import lick_icon from '@/assets/like.png';
|
||||
import unlike_icon from '@/assets/unlike.png';
|
||||
import reply_icon from '@/assets/reply.png';
|
||||
import delete_icon from '@/assets/delete.png';
|
||||
import { superAdmin } from '@/router/index_APP_TARGET';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
import { ProjectPostIdMap } from '@/scripts/ProjectConfig';
|
||||
import { ProjectCode } from '@/scripts/ProjectConfig';
|
||||
export default {
|
||||
name: 'MessageBoard',
|
||||
data() {
|
||||
@ -119,7 +129,7 @@ export default {
|
||||
allCommentList: [],
|
||||
moreMessageId: '',
|
||||
replyUserName: '',
|
||||
commentContentNoName: ''
|
||||
postId: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -129,9 +139,9 @@ export default {
|
||||
superAdmin() {
|
||||
return this.$store.state.user.roles.includes(superAdmin);
|
||||
},
|
||||
postId() {
|
||||
projectCode() {
|
||||
const project = getSessionStorage('project');
|
||||
return ProjectPostIdMap[project];
|
||||
return ProjectCode[project];
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -141,6 +151,13 @@ export default {
|
||||
document.getElementById('targetImg').src = event.target.currentSrc;
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
if (this.projectCode === 'DRTS' || this.projectCode === 'BJD') {
|
||||
getPostByProjectCode(this.projectCode).then(resp => {
|
||||
this.postId = resp.data.id;
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
@ -151,20 +168,21 @@ export default {
|
||||
},
|
||||
commitComment() {
|
||||
const images = this.content.match(/<img/g);
|
||||
const answerContent = this.handleEmojiContent(this.content);
|
||||
if (images && images.length > 3) {
|
||||
this.$message.error('留言内容使用图片应小于三张!');
|
||||
return;
|
||||
}
|
||||
if (this.content.length > 1000) {
|
||||
if (answerContent.length > 1000) {
|
||||
this.$message.error('留言内容超出最大长度!');
|
||||
return;
|
||||
}
|
||||
if (!this.content) {
|
||||
if (!answerContent) {
|
||||
this.$message.error('留言内容不能为空!');
|
||||
return;
|
||||
}
|
||||
answerPost({postId: this.postId, content: this.content}).then(resp => {
|
||||
this.pageNum = Math.ceil(resp.data / this.pageSize);
|
||||
answerPost({postId: this.postId, content: answerContent}).then(resp => {
|
||||
this.pageNum = 1;
|
||||
this.handleCurrentChange();
|
||||
this.content = '';
|
||||
}).catch(error => {
|
||||
@ -173,16 +191,28 @@ export default {
|
||||
});
|
||||
},
|
||||
handleCurrentChange() {
|
||||
queryPostPaging(this.postId, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => {
|
||||
queryMessagePagingByProjectCode(this.projectCode, {pageSize: this.pageSize, pageNum: this.pageNum}).then(resp => {
|
||||
this.postCommentList = [];
|
||||
(resp.data.list || []).forEach(item => {
|
||||
const value = item.content.replace(/<img/g, '<img style="width: 100px;height: auto;cursor: zoom-in;" onclick="handleZoomImg()"');
|
||||
item.content = value;
|
||||
item.content = this.replaceEmoji(item.content);
|
||||
item.comments && item.comments.list && item.comments.list.forEach(elem => {
|
||||
elem.content = this.replaceEmoji(elem.content);
|
||||
});
|
||||
this.postCommentList.push(item);
|
||||
});
|
||||
this.total = resp.data.total;
|
||||
});
|
||||
},
|
||||
replaceEmoji(content) {
|
||||
let value = content.replace(/<img/g, '<img style="width: 100px;height: auto;cursor: zoom-in;" onclick="handleZoomImg()"');
|
||||
const list = value.match(/<<<([^>]*)>>>/g);
|
||||
(list || []).forEach(elem => {
|
||||
const targetValue = elem.substring(3, elem.length - 3);
|
||||
value = value.replace(elem, `<span class="ql-emojiblot" data-name="${targetValue}"><span contenteditable="false"><span class="ap ap-${targetValue}">ss</span></span></span>`);
|
||||
});
|
||||
console.log(content, list, list);
|
||||
return value;
|
||||
},
|
||||
goSlide() {
|
||||
const bottom = document.getElementById('boardBottom');
|
||||
const element = document.getElementById('elDialog').childNodes[0];
|
||||
@ -211,10 +241,10 @@ export default {
|
||||
this.replyMessageIndex = messageIndex;
|
||||
if (commentId) {
|
||||
this.replyUserName = '@' + userNickname + ' ';
|
||||
this.commentContent = this.replyUserName + this.commentContentNoName;
|
||||
this.commentContent = '';
|
||||
}
|
||||
this.$nextTick(()=>{
|
||||
document.getElementById('answerInput' + messageId).focus();
|
||||
this.$refs['answerInput' + messageId][0].getFocus();
|
||||
});
|
||||
},
|
||||
cancelComment() {
|
||||
@ -223,38 +253,47 @@ export default {
|
||||
this.replyCommentId = '';
|
||||
this.replyMessageIndex = '';
|
||||
this.replyUserName = '';
|
||||
this.commentContentNoName = '';
|
||||
},
|
||||
commentMessage() {
|
||||
const contentValue = this.handleEmojiContent(this.commentContent);
|
||||
if (contentValue.length > 300) {
|
||||
this.$message.error('回复内容超出最大长度!');
|
||||
return;
|
||||
}
|
||||
if (this.replyCommentId) {
|
||||
commentComents(this.replyMessageId, this.replyCommentId, {content:this.commentContentNoName}).then(resp => {
|
||||
commentComents(this.replyMessageId, this.replyCommentId, {content:contentValue}).then(resp => {
|
||||
this.getCommentList(this.replyMessageId, this.replyMessageIndex);
|
||||
this.cancelComment();
|
||||
}).catch(error => {
|
||||
this.$message.error('评论留言失败!');
|
||||
this.$message.error('评论回复失败!');
|
||||
console.error(error);
|
||||
});
|
||||
} else {
|
||||
commentLevelMessage(this.replyMessageId, {content:this.commentContentNoName}).then(resp => {
|
||||
commentLevelMessage(this.replyMessageId, {content:contentValue}).then(resp => {
|
||||
this.getCommentList(this.replyMessageId, this.replyMessageIndex);
|
||||
this.cancelComment();
|
||||
}).catch(error => {
|
||||
this.$message.error('评论留言失败!');
|
||||
this.$message.error('评论回复失败!');
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
getCommentList(messageId, messageIndex) {
|
||||
queryMessageCommentList(messageId).then(resp => {
|
||||
const replaceValue = [];
|
||||
resp.data && resp.data.forEach(item => {
|
||||
item.content = this.replaceEmoji(item.content);
|
||||
replaceValue.push(item);
|
||||
});
|
||||
if (this.moreMessageId == messageId) {
|
||||
this.allCommentList = resp.data;
|
||||
this.allCommentList = replaceValue;
|
||||
}
|
||||
if (resp.data.length > 3) {
|
||||
this.postCommentList[messageIndex].comments.list = resp.data.slice(0, 3);
|
||||
this.postCommentList[messageIndex].comments.total = resp.data.length;
|
||||
if (replaceValue.length > 3) {
|
||||
this.postCommentList[messageIndex].comments.list = replaceValue.slice(0, 3);
|
||||
this.postCommentList[messageIndex].comments.total = replaceValue.length;
|
||||
} else {
|
||||
this.postCommentList[messageIndex].comments.list = resp.data;
|
||||
this.postCommentList[messageIndex].comments.total = resp.data.length;
|
||||
this.postCommentList[messageIndex].comments.list = replaceValue;
|
||||
this.postCommentList[messageIndex].comments.total = replaceValue.length;
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$message.error('更新回复失败!');
|
||||
@ -306,20 +345,24 @@ export default {
|
||||
},
|
||||
viewMoreComment(data) {
|
||||
queryMessageCommentList(data.id).then(resp => {
|
||||
this.allCommentList = resp.data;
|
||||
this.allCommentList = [];
|
||||
resp.data && resp.data.forEach(item => {
|
||||
item.content = this.replaceEmoji(item.content);
|
||||
this.allCommentList.push(item);
|
||||
});
|
||||
this.moreMessageId = data.id;
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
changeCommentContent(val) {
|
||||
if (this.replyUserName && val.startsWith(this.replyUserName)) {
|
||||
this.commentContentNoName = val.slice(this.replyUserName.length);
|
||||
} else if (this.replyUserName) {
|
||||
this.commentContent = this.replyUserName + this.commentContentNoName;
|
||||
} else {
|
||||
this.commentContentNoName = this.commentContent;
|
||||
}
|
||||
handleEmojiContent(content) {
|
||||
const list = content.match(/<span class="ql-emojiblot" data-name="(\S*)"><span contenteditable="false"><span class="ap ap-(\S*)<\/span><\/span><\/span>/g);
|
||||
(list || []).forEach(item => {
|
||||
let targetValue = item.split(' ')[2];
|
||||
targetValue = targetValue.substring(11, targetValue.length - 8);
|
||||
content = content.replace(item, '<<<' + targetValue + '>>>');
|
||||
});
|
||||
return content;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div id="PlanSchedule" :style="{top: top+'px', height: height+'px'}">
|
||||
<el-button size="small" style="position: fixed; top: 5px;right: 5px;" type="primary" plain @click="quit">退出</el-button>
|
||||
<el-button size="small" style="position: fixed; top: 5px;right: 5px;" type="primary" plain @click="handlePfiNum">{{ pfiNumFlag ? '隐藏客流量' : '显示客流量' }}</el-button>
|
||||
<div class="left">
|
||||
<div :id="runPlanId" />
|
||||
</div>
|
||||
@ -31,6 +32,7 @@ import echarts from 'echarts';
|
||||
import {toTimeStamp, formatDuring} from '@/utils/date';
|
||||
import { deepAssign } from '@/utils/index';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
// getPassengerHistoryList // 客流量历史数据请求
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import { getEveryDayRunPlanNew } from '@/api/simulation';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
@ -88,7 +90,9 @@ export default {
|
||||
staticSeries: [],
|
||||
runSeries: [],
|
||||
selectSeries: [],
|
||||
runPlanData: {}
|
||||
runPlanData: {},
|
||||
pfiNumFlag: true,
|
||||
pfiNumList: [] // 客流量列表
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -137,6 +141,12 @@ export default {
|
||||
this.updateRunPlanData(val);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.stationPfiNum': function (data) {
|
||||
if (data) {
|
||||
this.updateRunPlanData(data, true);
|
||||
this.$store.dispatch('socket/setStationPfiNum');
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationOver':function(val) {
|
||||
this.quit();
|
||||
}
|
||||
@ -216,12 +226,13 @@ export default {
|
||||
},
|
||||
async analyticalServiceNumber(data) {
|
||||
this.serviceNumberConfig.data = Object.keys(data || {})
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||
// .sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||
.sort((a, b) => { return parseInt(data[a].serviceNumber) - parseInt(data[b].serviceNumber); })
|
||||
.map(serviceNumber => { return { serviceNumber }; });
|
||||
},
|
||||
async analyticalTripNumber(data) {
|
||||
this.tripNumberConfig.data = Object.keys(data || {})
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||
.sort((a, b) => { return data[a].tripNumber - data[b].tripNumber; })
|
||||
.map(tripNumber => { return { tripNumber }; });
|
||||
},
|
||||
async setPosition() {
|
||||
@ -242,9 +253,10 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
updateRunPlanData(data) {
|
||||
updateRunPlanData(data, pfiNum = false) {
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const initialPlanData = this.$store.state.runPlan.initialPlanData;
|
||||
if (!pfiNum) {
|
||||
data.forEach(item => {
|
||||
if (item && initialPlanData[item.serviceNumber]) {
|
||||
Object.keys(initialPlanData[item.serviceNumber].trainMap).forEach(ele => {
|
||||
@ -255,12 +267,74 @@ export default {
|
||||
item.secondTime = item.second;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (pfiNum) { // 客流量时时渲染
|
||||
// const option = this.myChart.getOption();
|
||||
// let series = option.series;
|
||||
// this.handleStationNum(data);
|
||||
// if (this.pfiNumFlag) {
|
||||
// series = [...series, ...this.pfiNumList];
|
||||
// this.myChart && this.myChart.setOption({series: series});
|
||||
// }
|
||||
} else {
|
||||
this.kmRangeCoordMap = this.PlanConvert.convertStationsToMap(stations);
|
||||
this.runSeries = this.PlanConvert.updateDataToModels(data, stations, this.kmRangeCoordMap,
|
||||
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
|
||||
);
|
||||
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries];
|
||||
this.myChart && this.myChart.setOption({series: series});
|
||||
}
|
||||
},
|
||||
handleStationNum(data) {
|
||||
const timeDate = (data.systemTime).split(' ')[0];
|
||||
const time = ((+new Date(data.systemTime) - (+new Date(`${timeDate} 00:00:00`))) / 1000) - this.PlanConvert.TranslationTime;
|
||||
let index = 1;
|
||||
this.stations.forEach((station, ii) => {
|
||||
if (station.visible) {
|
||||
const stationObj = data.data.find(ele => ele.stationCode == station.code);
|
||||
const judge = this.pfiNumList.find(ele => ele.code == station.code);
|
||||
if (!judge) {
|
||||
this.pfiNumList.push({
|
||||
name: '客流量',
|
||||
type: 'bar',
|
||||
code: station.code,
|
||||
barGap: '-100%',
|
||||
yAxisIndex: index++,
|
||||
barWidth: '3000%',
|
||||
itemStyle: {
|
||||
color: '#3BAAF7'
|
||||
},
|
||||
z: 10,
|
||||
data: [[time, stationObj.passengerQuantity]]
|
||||
});
|
||||
} else {
|
||||
judge.data.push([time, stationObj.passengerQuantity]);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
handlePfiNum() {
|
||||
const option = this.myChart.getOption();
|
||||
const series = option.series;
|
||||
if (this.pfiNumFlag) {
|
||||
series.forEach(item => {
|
||||
if (item.type == 'bar') {
|
||||
item.itemStyle = {
|
||||
color: 'rgba(0,0,0,0)'
|
||||
};
|
||||
}
|
||||
});
|
||||
} else {
|
||||
series.forEach(item => {
|
||||
if (item.type == 'bar') {
|
||||
item.itemStyle = {
|
||||
color: '#3BAAF7'
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
this.myChart && this.myChart.setOption({series: series});
|
||||
this.pfiNumFlag = !this.pfiNumFlag;
|
||||
},
|
||||
async loadChartPage() {
|
||||
try {
|
||||
@ -275,7 +349,19 @@ export default {
|
||||
this.seriesMap[item.name] = item;
|
||||
});
|
||||
await this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||
// 客流量历史数据渲染
|
||||
// const res = await getPassengerHistoryList(this.$route.query.group);
|
||||
// if (res.code == 200) {
|
||||
// res.data.forEach(item => {
|
||||
// this.handleStationNum(item);
|
||||
// });
|
||||
// }
|
||||
// const option = this.myChart.getOption();
|
||||
// const series = option.series;
|
||||
// series = [...series, ...this.pfiNumList];
|
||||
// this.myChart && this.myChart.setOption({series: series});
|
||||
} catch (error) {
|
||||
console.log(error, '====');
|
||||
this.$messageBox(`加载运行图数据失败`);
|
||||
}
|
||||
},
|
||||
@ -283,20 +369,6 @@ export default {
|
||||
async loadInitData() {
|
||||
this.myChart && this.myChart.showLoading();
|
||||
const option = {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'center'
|
||||
},
|
||||
grid: {
|
||||
top: '30px',
|
||||
left: '120px',
|
||||
right: '40px',
|
||||
bottom: '65px',
|
||||
containLabel: true,
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
toolbox: {
|
||||
},
|
||||
tooltip: {
|
||||
axisPointer: {
|
||||
trigger: 'item',
|
||||
@ -305,10 +377,16 @@ export default {
|
||||
formatter: this.axisTooltip,
|
||||
borderWidth: 1
|
||||
},
|
||||
grid: [
|
||||
{
|
||||
right: '40px',
|
||||
left: '120px',
|
||||
height: '85%'
|
||||
}
|
||||
],
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
@ -333,7 +411,8 @@ export default {
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: {
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
@ -359,13 +438,10 @@ export default {
|
||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
min: 0,
|
||||
max: 0
|
||||
},
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
}
|
||||
}
|
||||
],
|
||||
dataZoom: [{
|
||||
type: 'inside'
|
||||
},
|
||||
{
|
||||
@ -380,8 +456,8 @@ export default {
|
||||
shadowOffsetY: 2
|
||||
},
|
||||
bottom: '20px'
|
||||
}
|
||||
]
|
||||
}],
|
||||
series: []
|
||||
};
|
||||
await this.xAxisInit(option);
|
||||
await this.yAxisInit(option);
|
||||
@ -452,11 +528,30 @@ export default {
|
||||
},
|
||||
yAxisInit(option) {
|
||||
if (Object.keys(this.PlanConvert).length) {
|
||||
option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||
option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||
option.yAxis[0].min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||
option.yAxis[0].max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||
let index = 1;
|
||||
this.stations.forEach((station, ii) => {
|
||||
if (station.visible) {
|
||||
option.yAxis.push({
|
||||
type: 'value',
|
||||
min: Math.floor(option.yAxis[0].min - this.PlanConvert.getYaxisValueByStation(station, ii)),
|
||||
max: Math.floor(option.yAxis[0].max - this.PlanConvert.getYaxisValueByStation(station, ii)),
|
||||
show: false,
|
||||
yAxisIndex : index++
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
axisTooltip(param) {
|
||||
if (param.seriesType == 'bar') {
|
||||
return [
|
||||
`Point Data <hr size=1 style=" margin: 3px 0">`,
|
||||
`车站客流量: ${param.data[1]} 人 <br>`,
|
||||
`当前时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)}<br>`
|
||||
].join('');
|
||||
} else {
|
||||
const station = (this.$store.getters['map/getDeviceByCode'](param.data[2])) || { name: '', kmRange: '' };
|
||||
return [
|
||||
`Point Data <hr size=1 style=" margin: 3px 0">`,
|
||||
@ -464,6 +559,8 @@ export default {
|
||||
`车站公里标: ${station.kmRange} km <br>`,
|
||||
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||
].join('');
|
||||
}
|
||||
|
||||
},
|
||||
renderTripNumber(params) {
|
||||
const tripNumber = params.tripNumber; // 车次号
|
||||
|
@ -206,7 +206,7 @@ export default {
|
||||
},
|
||||
async analyticalTripNumber(data) {
|
||||
this.tripNumberConfig.data = Object.keys(data || {})
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||
.sort((a, b) => { return data[a].tripNumber - data[b].tripNumber; })
|
||||
.map(tripNumber => { return { tripNumber }; });
|
||||
},
|
||||
async setPosition() {
|
||||
@ -245,6 +245,22 @@ export default {
|
||||
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
|
||||
);
|
||||
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries];
|
||||
// let index = 0;
|
||||
// this.stations.forEach((station, ii) => {
|
||||
// if (station.visible) {
|
||||
// index++;
|
||||
// series.push({
|
||||
// type: 'bar',
|
||||
// barGap: '-100%',
|
||||
// yAxisIndex: index,
|
||||
// barWidth: '3000%',
|
||||
// itemStyle: {
|
||||
// color: 'red'
|
||||
// },
|
||||
// data: [[29030, 50], [29060, 60], [29090, 20], [29120, 60], [29150, 80], [29180, 160], [29210, 50], [29240, 80], [29270, 30]]
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
this.myChart && this.myChart.setOption({series: series});
|
||||
},
|
||||
async loadChartPage() {
|
||||
@ -268,20 +284,6 @@ export default {
|
||||
async loadInitData() {
|
||||
this.myChart && this.myChart.showLoading();
|
||||
const option = {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'center'
|
||||
},
|
||||
grid: {
|
||||
top: '30px',
|
||||
left: '120px',
|
||||
right: '40px',
|
||||
bottom: '65px',
|
||||
containLabel: true,
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
toolbox: {
|
||||
},
|
||||
tooltip: {
|
||||
axisPointer: {
|
||||
trigger: 'item',
|
||||
@ -290,10 +292,14 @@ export default {
|
||||
formatter: this.axisTooltip,
|
||||
borderWidth: 1
|
||||
},
|
||||
grid: {
|
||||
right: '40px',
|
||||
left: '120px',
|
||||
height: '85%'
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
@ -318,8 +324,10 @@ export default {
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: {
|
||||
yAxis: [
|
||||
{
|
||||
type: 'value',
|
||||
yAxisIndex: 0,
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
@ -344,13 +352,10 @@ export default {
|
||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
min: 0,
|
||||
max: 0
|
||||
},
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
}
|
||||
}
|
||||
],
|
||||
dataZoom: [{
|
||||
type: 'inside'
|
||||
},
|
||||
{
|
||||
@ -365,7 +370,9 @@ export default {
|
||||
shadowOffsetY: 2
|
||||
},
|
||||
bottom: '20px'
|
||||
}
|
||||
}],
|
||||
series: [
|
||||
|
||||
]
|
||||
};
|
||||
await this.xAxisInit(option);
|
||||
@ -394,6 +401,23 @@ export default {
|
||||
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
|
||||
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
|
||||
option.series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries];
|
||||
// let index = 0;
|
||||
// this.stations.forEach((station, ii) => {
|
||||
// if (station.visible) {
|
||||
// index++;
|
||||
// option.series.push({
|
||||
// type: 'bar',
|
||||
// barGap: '-100%',
|
||||
// yAxisIndex: index,
|
||||
// barWidth: '3000%',
|
||||
// itemStyle: {
|
||||
// color: 'red'
|
||||
// },
|
||||
// data: [[29030, 50], [29060, 60], [29090, 20], [29120, 60], [29150, 80], [29180, 160], [29210, 50], [29240, 80], [29270, 30]]
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||
if (this.myChart) {
|
||||
this.myChart.setOption(option);
|
||||
@ -440,8 +464,20 @@ export default {
|
||||
},
|
||||
yAxisInit(option) {
|
||||
if (Object.keys(this.PlanConvert).length) {
|
||||
option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||
option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||
option.yAxis[0].min = this.PlanConvert.computedYaxisMinValue(this.stations);
|
||||
option.yAxis[0].max = this.PlanConvert.computedYaxisMaxValue(this.stations);
|
||||
// let index = 1;
|
||||
// this.stations.forEach((station, ii) => {
|
||||
// if (station.visible) {
|
||||
// option.yAxis.push({
|
||||
// type: 'value',
|
||||
// min: Math.floor(option.yAxis[0].min - this.PlanConvert.getYaxisValueByStation(station, ii)),
|
||||
// max: Math.floor(option.yAxis[0].max - this.PlanConvert.getYaxisValueByStation(station, ii)),
|
||||
// show: false,
|
||||
// yAxisIndex : index++
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
}
|
||||
},
|
||||
axisTooltip(param) {
|
||||
|
@ -32,6 +32,7 @@
|
||||
<el-button v-if="project === 'bjd'" size="small" @click="distribute">权限分发</el-button>
|
||||
<el-button v-if="isContest || project === 'bjd'" size="small" @click="messageBoardShow">留言板</el-button>
|
||||
<el-button v-if="isContest || project === 'bjd'" size="small" @click="contectUs">联系方式</el-button>
|
||||
<el-button v-if="project === 'bjd'" size="small" @click="passengersView">客流视图</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<Jl3d-Device
|
||||
@ -135,7 +136,8 @@ export default {
|
||||
jl3dtraffictrain:this.$t('display.demon.traffictraintext'),
|
||||
jl3dpassflow:this.$t('display.demon.passengerflow'),
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView'),
|
||||
jl3dmodel: this.$t('display.demon.deviceView')
|
||||
jl3dmodel: this.$t('display.demon.deviceView'),
|
||||
openWindow:null
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@ -247,8 +249,7 @@ export default {
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
this.openWindow = window.open(routeData.href);
|
||||
|
||||
window.open(routeData.href);
|
||||
},
|
||||
jumpjlmap3dDriver() {
|
||||
this.drivingShow = true;
|
||||
@ -284,6 +285,24 @@ export default {
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
passengersView() {
|
||||
if (this.openWindow) {
|
||||
this.openWindow.close();
|
||||
}
|
||||
const routeData = this.$router.resolve({
|
||||
path:'/practiceDisplay',
|
||||
query:{
|
||||
mapId:this.$route.query.mapId,
|
||||
group:this.$route.query.group,
|
||||
lineCode: this.$route.query.lineCode,
|
||||
project: this.$route.query.project,
|
||||
noPreLogout: true
|
||||
// initTime: this.$store.state.training.initTime
|
||||
}
|
||||
});
|
||||
// this.openWindow = window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
this.openWindow = window.open(routeData.href);
|
||||
},
|
||||
loadRunPlan() {
|
||||
this.$emit('runPlanLoadShow');
|
||||
},
|
||||
|
@ -11,8 +11,8 @@
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.result">
|
||||
<template v-for="(each,index) in scope.row.result">
|
||||
<el-button type="primary" size="small" style="margin-right: 8px;margin-left: 0;margin-bottom: 5px" @click="handleLoad(each)">{{ each.name }}</el-button>
|
||||
<template v-for="(each, index) in scope.row.result">
|
||||
<el-button :key="index" type="primary" size="small" style="margin-right: 8px;margin-left: 0;margin-bottom: 5px" @click="handleLoad(each)">{{ each.name }}</el-button>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -59,7 +59,7 @@ import DemonChat from './demonChat';
|
||||
import { Notification } from 'element-ui';
|
||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import {getSimulationInfoNew } from '@/api/simulation';
|
||||
import {getSimulationInfoNew, clearSimulation } from '@/api/simulation';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { getCountTime } from '@/utils/index';
|
||||
import { TrainingMode } from '@/scripts/ConstDic';
|
||||
@ -343,12 +343,16 @@ export default {
|
||||
},
|
||||
async back() {
|
||||
this.isGoback = true;
|
||||
if (this.projectDevice) {
|
||||
if (this.projectDevice || this.project === 'bjd') {
|
||||
clearSimulation(this.group).then(res=>{
|
||||
this.$store.dispatch('training/over').then(() => {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
// this.$store.dispatch('training/reset');
|
||||
// this.$store.dispatch('map/mapClear');
|
||||
location.reload();
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', '');
|
||||
history.go(-1);
|
||||
|
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
<fault-choose ref="faultChoose" :group="group" :offset="offset" />
|
||||
<run-plan-Load ref="runPlanLoad" :group="group" />
|
||||
<run-plan-view ref="runPlanView" :group="group" />
|
||||
<run-plan-view v-if="project!== 'bjd'" ref="runPlanView" :group="group" />
|
||||
<!-- 加载剧本列表弹窗 -->
|
||||
<add-quest ref="addQuest" @selectQuest="selectQuest" />
|
||||
<run-plan-edit v-if="isScheduling && isDepot" ref="runPlanEdit" />
|
||||
|
153
src/views/newMap/displayNew/practiceDisplay.vue
Normal file
153
src/views/newMap/displayNew/practiceDisplay.vue
Normal file
@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div class="map-view" :style="{width: canvasWidth+'px',height:'100%',position:'absolute',overflow:'hidden'}">
|
||||
<div v-show="maskOpen" class="mask" :style="{'width': maskWidth}" />
|
||||
<jlmap-visual ref="jlmapVisual" />
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button type="small" @click="back">{{ $t('scriptRecord.scriptBack') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<menu-system-time ref="menuSystemTime" :offset="15" :group="group" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import JlmapVisual from '@/views/newMap/jlmapNew/index';
|
||||
import { Notification } from 'element-ui';
|
||||
import { loadNewMapDataByGroup } from '@/utils/loaddata';
|
||||
import { clearSimulation, getSimulationInfoNew } from '@/api/simulation';
|
||||
import { creatSubscribe, clearSubscribe, displayTopic} from '@/utils/stomp';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { mapGetters } from 'vuex';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
export default {
|
||||
name:'PracticeDisplay',
|
||||
components: {
|
||||
JlmapVisual,
|
||||
MenuSystemTime
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
maskOpen: false,
|
||||
maskWidth: '100%',
|
||||
group:''
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
...mapGetters([
|
||||
'canvasWidth'
|
||||
]),
|
||||
// group() {
|
||||
// return this.$route.query.group;
|
||||
// },
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
'$store.state.map.mapViewLoadedCount':function() {
|
||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
||||
// this.$jlmap.off('zoom');
|
||||
if (this.group) {
|
||||
this.subscribe();
|
||||
}
|
||||
},
|
||||
'$store.state.app.windowSizeCount': function() { // 窗口缩放
|
||||
this.setWindowSize();
|
||||
},
|
||||
'$store.state.socket.equipmentStatus': function (val) {
|
||||
if (val.length && this.$route.query.group) {
|
||||
this.statusMessage(val);
|
||||
}
|
||||
},
|
||||
'$store.state.socket.simulationStart': function(val) {
|
||||
this.$store.dispatch('training/simulationStart').then(() => {
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
});
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.$store.dispatch('map/mapClear');
|
||||
if (this.group) {
|
||||
clearSimulation(this.group);
|
||||
this.clearSubscribe();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.group = this.$route.query.group;
|
||||
this.setWindowSize();
|
||||
this.initLoadData();
|
||||
},
|
||||
methods:{
|
||||
async initLoadData() { // 加载地图数据
|
||||
if (this.group) {
|
||||
this.loadSimulationInfo();
|
||||
await loadNewMapDataByGroup(this.group);
|
||||
}
|
||||
},
|
||||
// 缩放设置
|
||||
setWindowSize() {
|
||||
const width = this.width;
|
||||
const height = this.height;
|
||||
this.$store.dispatch('config/resize', { width, height });
|
||||
},
|
||||
async back() {
|
||||
// if (this.group) {
|
||||
// await clearSimulation(this.group);
|
||||
// this.clearSubscribe();
|
||||
// }
|
||||
// this.$store.dispatch('map/setShowCentralizedStationCode', '');
|
||||
// history.go(-1);
|
||||
// await this.$store.dispatch('map/mapClear');
|
||||
// if (this.group) {
|
||||
// await clearSimulation(this.group);
|
||||
// this.clearSubscribe();
|
||||
// }
|
||||
window.close();
|
||||
// Notification.closeAll();
|
||||
},
|
||||
async statusMessage(list) {
|
||||
await this.$store.dispatch('training/updateMapState', list);
|
||||
await this.$store.dispatch('socket/setEquipmentStatus');
|
||||
},
|
||||
async subscribe() {
|
||||
this.clearSubscribe();
|
||||
const header = { group: this.group || '', 'X-Token': getToken() };
|
||||
creatSubscribe(`${displayTopic}\/${this.$route.query.group}`, header);
|
||||
|
||||
await this.$store.dispatch('training/setHasSubscribed');
|
||||
},
|
||||
clearSubscribe() {
|
||||
clearSubscribe(`${displayTopic}\/${this.group}`);
|
||||
},
|
||||
async loadSimulationInfo() {
|
||||
const resp = await getSimulationInfoNew(this.group);
|
||||
if (resp && resp.code == 200 && resp.data) {
|
||||
if (!resp.data.dataError) {
|
||||
this.$store.dispatch('scriptRecord/updateSimulationPause', resp.data.pause); // 是否暂停判断
|
||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().toLocaleDateString()} ${timeFormat(resp.data.systemTime)}`));
|
||||
this.$store.dispatch('training/countTime');
|
||||
this.planRunning = resp.data.planRunning;
|
||||
if (resp.data.planRunning) {
|
||||
this.$store.commit('training/start');
|
||||
}
|
||||
} else {
|
||||
this.$messageBox('此地图数据正在维护中,无法运行!');
|
||||
}
|
||||
this.dataError = resp.data.dataError;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.display-draft {
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 15px;
|
||||
bottom: 15px;
|
||||
}
|
||||
</style>
|
@ -306,9 +306,10 @@ export default {
|
||||
handlePreview(row) {
|
||||
previewRunPlan(row.id).then(resp => {
|
||||
const query = {
|
||||
prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id, from:''
|
||||
prdType: '01', group: resp.data, mapId: row.mapId, planId: row.id
|
||||
};
|
||||
this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||
// this.$router.push({ path: `${UrlConfig.display}/plan`, query: query });
|
||||
this.$router.push({ path: UrlConfig.design.testRunPlan, query: query });
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('tip.createSimulationFaild') + this.$t('global.colon') + error.message);
|
||||
|
@ -16,9 +16,9 @@
|
||||
:plan-convert="PlanConvert"
|
||||
:load-run-plan-id="loadRunPlanId"
|
||||
:load-run-plan-name="loadRunPlanName"
|
||||
:max-height="height"
|
||||
:max-width="width"
|
||||
/>
|
||||
<!-- :max-height="height" -->
|
||||
<!-- :max-width="width" -->
|
||||
<status-bar ref="statusBar" :load-run-plan-id="loadRunPlanId" @dispatchDialog="dispatchDialog" @showTrain="showTrain" />
|
||||
|
||||
<!-- <open-run-plan ref="openRunPlan" :skin-code="skinCode" @dispatchDialog="dispatchDialog" /> -->
|
||||
@ -32,8 +32,8 @@
|
||||
@dispatchOperate="dispatchOperate"
|
||||
@refresh="refresh"
|
||||
/>
|
||||
<edit-smooth-run-time ref="editSmoothRunTime" @dispatchDialog="dispatchDialog" />
|
||||
<add-smooth-run-time ref="addSmoothRunTime" @dispatchDialog="dispatchDialog" />
|
||||
<!-- <edit-smooth-run-time ref="editSmoothRunTime" @dispatchDialog="dispatchDialog" /> -->
|
||||
<!-- <add-smooth-run-time ref="addSmoothRunTime" @dispatchDialog="dispatchDialog" /> -->
|
||||
<duplicate-train ref="duplicateTrain" @dispatchDialog="dispatchDialog" @dispatchOperate="dispatchOperate" @refresh="refresh" />
|
||||
<modifying-routing ref="modifyingRouting" @dispatchDialog="dispatchDialog" />
|
||||
<modifying-begin-time ref="modifyingBeginTime" />
|
||||
@ -69,8 +69,8 @@ import ModifyingTask from './menus/modifyingTask';
|
||||
import ModifyingRouting from './menus/modifyingRouting';
|
||||
import ModifyingBeginTime from './menus/modifyingBeginTime';
|
||||
import EditStationBetweenTime from './menus/editStationBetweenTime';
|
||||
import AddSmoothRunTime from './menus/addSmoothRunTime';
|
||||
import EditSmoothRunTime from './menus/editSmoothRunTime';
|
||||
// import AddSmoothRunTime from './menus/addSmoothRunTime';
|
||||
// import EditSmoothRunTime from './menus/editSmoothRunTime';
|
||||
import ModifyingStationIntervalTime from './menus/modifyingStationIntervalTime';
|
||||
import PopulatingGenericData from './menus/populatingGenericData';
|
||||
import CreateEmptyPlan from './menus/createEmptyPlan';
|
||||
@ -99,8 +99,8 @@ export default {
|
||||
ModifyingRouting,
|
||||
ModifyingBeginTime,
|
||||
EditStationBetweenTime,
|
||||
AddSmoothRunTime,
|
||||
EditSmoothRunTime,
|
||||
// AddSmoothRunTime,
|
||||
// EditSmoothRunTime,
|
||||
ModifyingStationIntervalTime,
|
||||
CreateEmptyPlan,
|
||||
EditPlanName
|
||||
@ -117,12 +117,6 @@ export default {
|
||||
computed: {
|
||||
lineCode() {
|
||||
return this.$route.query.lineCode || '02';
|
||||
},
|
||||
width() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -164,11 +164,11 @@ export default {
|
||||
title: '填充通用数据',
|
||||
click: this.populatingGenericData
|
||||
// disabledCallback: () => { return !this.$route.query.planId },
|
||||
},
|
||||
{
|
||||
title: '创建运行图',
|
||||
click: this.newRunPlan
|
||||
}
|
||||
// {
|
||||
// title: '创建运行图',
|
||||
// click: this.newRunPlan
|
||||
// }
|
||||
]
|
||||
},
|
||||
{
|
||||
@ -429,9 +429,9 @@ export default {
|
||||
populatingGenericData() {
|
||||
this.$emit('dispatchDialog', { name: 'populatingGenericData', params: {} });
|
||||
},
|
||||
newRunPlan() {
|
||||
this.$emit('dispatchDialog', { name: 'createEmptyPlan', params: {}});
|
||||
},
|
||||
// newRunPlan() {
|
||||
// this.$emit('dispatchDialog', { name: 'createEmptyPlan', params: {}});
|
||||
// },
|
||||
// 自动生成
|
||||
handleAutoGenerate() {
|
||||
this.$emit('dispatchDialog', { name: 'editSmoothRunTime', params: {} });
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="PlanSchedule">
|
||||
<div id="PlanSchedule" v-loading="runplanLoading">
|
||||
<div class="left">
|
||||
<div :id="runPlanId" />
|
||||
</div>
|
||||
@ -8,15 +8,15 @@
|
||||
ref="serviceTable"
|
||||
class="data_table_box"
|
||||
:config="serviceNumberConfig"
|
||||
@touch="scheduleTouch"
|
||||
/>
|
||||
<!-- @touch="scheduleTouch" -->
|
||||
<data-table
|
||||
ref="tripTable"
|
||||
style="margin-top: 3px;"
|
||||
class="data_table_box"
|
||||
:config="tripNumberConfig"
|
||||
@touch="trainNumTouch"
|
||||
/>
|
||||
<!-- @touch="trainNumTouch" -->
|
||||
</div>
|
||||
<modify-service ref="modifyService" />
|
||||
</div>
|
||||
@ -45,14 +45,6 @@ export default {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
maxWidth: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
maxHeight: {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
loadRunPlanId: {
|
||||
type: String,
|
||||
default() {
|
||||
@ -74,6 +66,7 @@ export default {
|
||||
runPlanId: 'plan-tool',
|
||||
myChart: null,
|
||||
showTrain: false,
|
||||
runplanLoading:false,
|
||||
serviceNumberConfig: {
|
||||
data: [],
|
||||
title: this.$t('planMonitor.serviceNumber'),
|
||||
@ -106,8 +99,8 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
realData: {},
|
||||
kmRangeCoordMap: {},
|
||||
// realData: {},
|
||||
// kmRangeCoordMap: {},
|
||||
option: {
|
||||
title: { // 标题
|
||||
text: '',
|
||||
@ -227,8 +220,8 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
absoluteTime: 2 * 3600,
|
||||
indexKmRangeMap: {},
|
||||
// absoluteTime: 2 * 3600,
|
||||
// indexKmRangeMap: {},
|
||||
stationsObj: {}
|
||||
};
|
||||
},
|
||||
@ -238,33 +231,39 @@ export default {
|
||||
]),
|
||||
planId() {
|
||||
return this.$route.query.planId;
|
||||
},
|
||||
maxWidth() {
|
||||
return this.$store.state.app.width;
|
||||
},
|
||||
maxHeight() {
|
||||
return this.$store.state.app.height;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
maxWidth() {
|
||||
this.setPosition();
|
||||
},
|
||||
maxHeight() {
|
||||
this.setPosition();
|
||||
},
|
||||
'$store.state.runPlan.planSizeCount': function () {
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
},
|
||||
'$store.state.runPlan.refreshCount': function() {
|
||||
this.loadChartPage();
|
||||
},
|
||||
$route() {
|
||||
this.$nextTick(() => {
|
||||
this.loadChartPage();
|
||||
});
|
||||
},
|
||||
// $route() {
|
||||
// this.$nextTick(() => {
|
||||
// this.loadChartPage();
|
||||
// });
|
||||
// },
|
||||
loadRunPlanId() {
|
||||
this.loadChartPage();
|
||||
},
|
||||
'maxWidth':function () {
|
||||
this.setPosition();
|
||||
},
|
||||
'maxHeight':function () {
|
||||
this.setPosition();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.setPosition();
|
||||
this.loadChartPage();
|
||||
// this.loadChartPage();
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.destroy();
|
||||
@ -363,13 +362,12 @@ export default {
|
||||
},
|
||||
async analyticalTripNumber(data) {
|
||||
this.tripNumberConfig.data = Object.keys(data || {})
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||
.sort((a, b) => { return data[a].tripNumber - data[b].tripNumber; })
|
||||
.map(tripNumber => { return { tripNumber }; });
|
||||
},
|
||||
async setPosition() {
|
||||
this.$nextTick(() => {
|
||||
let top = 3;
|
||||
const width = this.maxWidth;
|
||||
let height = this.maxHeight;
|
||||
|
||||
const titleBar = document.getElementById('PlanTitleBar');
|
||||
@ -394,8 +392,7 @@ export default {
|
||||
}
|
||||
|
||||
height = height - top;
|
||||
this.$store.dispatch('runPlan/resize', { width, height });
|
||||
|
||||
this.$store.dispatch('runPlan/resize', { width:this.maxWidth, height });
|
||||
if (this.top != top) {
|
||||
this.top = top;
|
||||
}
|
||||
@ -418,13 +415,12 @@ export default {
|
||||
}
|
||||
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
this.loadInitChart().then(() => {
|
||||
if (this.$route.query.mapId) {
|
||||
if (/^\/plan\/usertool/.test(this.$route.fullPath)) {
|
||||
this.myChart && this.myChart.showLoading();
|
||||
this.runplanLoading = true;
|
||||
getMapDetail(this.$route.query.mapId).then(response => {
|
||||
const res = response.data;
|
||||
this.$store.dispatch('map/setMapData', response.data).then(()=>{
|
||||
// this.$store.dispatch('map/setMapData', response.data).then(()=>{
|
||||
const stationList = res.stationList.sort((a, b)=>{ return a.kmRange - b.kmRange; });
|
||||
this.$store.dispatch('runPlan/setStations', stationList).then(() => {
|
||||
this.loadInitData();
|
||||
@ -433,31 +429,31 @@ export default {
|
||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||
this.loadChartData();
|
||||
this.myChart && this.myChart.hideLoading();
|
||||
this.runplanLoading = false;
|
||||
});
|
||||
}).catch(() => {
|
||||
this.myChart && this.myChart.hideLoading();
|
||||
this.runplanLoading = false;
|
||||
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
// });
|
||||
});
|
||||
} else {
|
||||
loadMapDataById(this.$route.query.mapId);
|
||||
this.runplanLoading = true;
|
||||
// loadMapDataById(this.$route.query.mapId);
|
||||
getStationList(this.$route.query.mapId).then(resp => {
|
||||
this.$store.dispatch('runPlan/setStations', resp.data).then(() => {
|
||||
this.loadInitData();
|
||||
if (this.planId || this.loadRunPlanId) {
|
||||
this.myChart && this.myChart.showLoading();
|
||||
queryRunPlan(this.planId || this.loadRunPlanId).then(rest => {
|
||||
this.$store.dispatch('runPlan/setPlanData', rest.data).then(() => {
|
||||
this.analyticalServiceNumber(this.$store.state.runPlan.editData);
|
||||
this.loadChartData();
|
||||
this.myChart && this.myChart.hideLoading();
|
||||
this.runplanLoading = false;
|
||||
});
|
||||
}).catch(() => {
|
||||
this.myChart && this.myChart.hideLoading();
|
||||
this.runplanLoading = false;
|
||||
this.$messageBox(this.$t('error.obtainOperationGraphFailed'));
|
||||
});
|
||||
|
||||
@ -509,13 +505,13 @@ export default {
|
||||
// });
|
||||
}
|
||||
});
|
||||
});
|
||||
} catch (error) {
|
||||
this.$messageBox(this.$t('error.loadingOperationGraphFailed'));
|
||||
}
|
||||
},
|
||||
async loadChartData() {
|
||||
try {
|
||||
// let option={};
|
||||
const stations = this.$store.state.runPlan.stations;
|
||||
const planData = this.$store.state.runPlan.planData;
|
||||
this.stationsObj = {};
|
||||
@ -526,9 +522,9 @@ export default {
|
||||
this.viewDisabled = true;
|
||||
|
||||
this.option.series = [];
|
||||
this.kmRangeCoordMap = this.planConvert.convertStationsToMap(stations);
|
||||
const kmRangeCoordMap = this.planConvert.convertStationsToMap(stations);
|
||||
this.pushModels(this.option.series, [this.planConvert.initializeYaxis(this.stations)]);
|
||||
this.pushModels(this.option.series, this.planConvert.convertDataToModels(planData, stations, this.kmRangeCoordMap, { width: 0.5, color: '#000' }));
|
||||
this.pushModels(this.option.series, this.planConvert.convertDataToModels(planData, stations, kmRangeCoordMap, { width: 0.5, color: '#000' }));
|
||||
await this.loadInitChart();
|
||||
|
||||
this.viewDisabled = false;
|
||||
@ -540,7 +536,7 @@ export default {
|
||||
async loadInitData() {
|
||||
await this.xAxisInit();
|
||||
await this.yAxisInit();
|
||||
await this.loadInitChart();
|
||||
// await this.loadInitChart();
|
||||
},
|
||||
pushModels(series, models) {
|
||||
if (models && models.length) {
|
||||
@ -575,6 +571,8 @@ export default {
|
||||
this.option.title.text = this.mapName;
|
||||
}
|
||||
this.myChart = echarts.init(document.getElementById(this.runPlanId));
|
||||
// debugger;
|
||||
// this.option;
|
||||
this.myChart.setOption(this.option);
|
||||
this.reSize({ width: this.$store.state.runPlan.width, height: this.$store.state.runPlan.height });
|
||||
resolve(true);
|
||||
@ -704,13 +702,13 @@ export default {
|
||||
this.myChart.dispose();
|
||||
this.myChart = null;
|
||||
}
|
||||
},
|
||||
scheduleTouch() {
|
||||
|
||||
},
|
||||
trainNumTouch() {
|
||||
|
||||
}
|
||||
// scheduleTouch() {
|
||||
|
||||
// },
|
||||
// trainNumTouch() {
|
||||
|
||||
// }
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -24,10 +24,12 @@
|
||||
</div>
|
||||
<stations :list="stationList" @select="onSelectStation">
|
||||
<template slot-scope="{data}">
|
||||
<div class="line">公里标:{{data.kmRange}}m</div>
|
||||
<div class="line">中转站:{{data.transferable? '是': '否'}}</div>
|
||||
<div class="line">上行容量:{{data.upReception}}</div>
|
||||
<div class="line">下行容量:{{data.downReception}}</div>
|
||||
<article style="font-style:italic;">
|
||||
<p class="line">公里标:{{data.kmRange}}m</p>
|
||||
<p class="line">中转站:{{data.transferable? '是': '否'}}</p>
|
||||
<p class="line">上行容量:{{data.upReception}}</p>
|
||||
<p class="line">下行容量:{{data.downReception}}</p>
|
||||
</article>
|
||||
</template>
|
||||
</stations>
|
||||
</el-card>
|
||||
|
@ -15,6 +15,85 @@ import * as utils from '../../utils'
|
||||
import echarts from 'echarts';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
const option = {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'center',
|
||||
top: '10px'
|
||||
},
|
||||
grid: {
|
||||
top: '60px',
|
||||
left: '160px',
|
||||
right: '100px',
|
||||
bottom: '60px',
|
||||
containLabel: true,
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: (value, index) => { return timeFormat(value); },
|
||||
textStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
inside: true,
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show:true,
|
||||
inside:true,
|
||||
formatter: (value, index) => { return '' }
|
||||
},
|
||||
minInterval: 0.1,
|
||||
maxInterval: 1,
|
||||
min: 0,
|
||||
max: 0
|
||||
}],
|
||||
graphic: [{
|
||||
id: 'shape',
|
||||
elements: []
|
||||
}],
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
show: false,
|
||||
fiterMode: 'filter',
|
||||
handleSize: '80%',
|
||||
handleStyle: {
|
||||
color: '#fff',
|
||||
shadowBlur: 3,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||
shadowOffsetX: 2,
|
||||
shadowOffsetY: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
props: {
|
||||
planUtil: {
|
||||
@ -45,88 +124,6 @@ export default {
|
||||
show: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
option() {
|
||||
return {
|
||||
title: {
|
||||
text: this.title,
|
||||
left: 'center',
|
||||
top: '10px'
|
||||
},
|
||||
grid: {
|
||||
top: '60px',
|
||||
left: '160px',
|
||||
right: '100px',
|
||||
bottom: '60px',
|
||||
containLabel: true,
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: (value, index) => { return timeFormat(value); },
|
||||
textStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
inside: true,
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show:true,
|
||||
inside:true,
|
||||
formatter: (value, index) => { return '' }
|
||||
},
|
||||
minInterval: 0.1,
|
||||
maxInterval: 1,
|
||||
min: 0,
|
||||
max: 0
|
||||
},
|
||||
graphic: [{
|
||||
id: 'shape',
|
||||
elements: []
|
||||
}],
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
show: false,
|
||||
fiterMode: 'filter',
|
||||
handleSize: '80%',
|
||||
handleStyle: {
|
||||
color: '#fff',
|
||||
shadowBlur: 3,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||
shadowOffsetX: 2,
|
||||
shadowOffsetY: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadInitChart() {
|
||||
return new Promise((resolve, reject) => {
|
||||
@ -136,7 +133,7 @@ export default {
|
||||
}
|
||||
|
||||
this.myChart = echarts.init(document.getElementById(this.canvasId));
|
||||
this.myChart.setOption(this.option, true);
|
||||
this.myChart.setOption(option, true);
|
||||
this.reSize({ width: this.width, height: this.height });
|
||||
resolve(true);
|
||||
} catch (error) {
|
||||
@ -148,10 +145,12 @@ export default {
|
||||
try {
|
||||
if (this.myChart) {
|
||||
this.stations = stations;
|
||||
this.xAxisInit(stations);
|
||||
this.yAxisInit(stations);
|
||||
|
||||
this.myChart.setOption(this.option, true);
|
||||
option.title.text = this.title;
|
||||
this.xAxisInit(stations, option);
|
||||
this.yAxisInit(stations, option);
|
||||
|
||||
this.myChart.setOption(option, true);
|
||||
}
|
||||
} catch (error) {
|
||||
this.$message.info(error.message);
|
||||
@ -176,8 +175,7 @@ export default {
|
||||
this.$messageBox(error.message);
|
||||
}
|
||||
},
|
||||
xAxisInit(stations) {
|
||||
const option = this.option;
|
||||
xAxisInit(stations, option) {
|
||||
const startValue = this.planUtil.MinTime + this.planUtil.TranslationTime;
|
||||
const endValue = this.planUtil.MaxTime + this.planUtil.TranslationTime;
|
||||
const list = [];
|
||||
@ -190,13 +188,12 @@ export default {
|
||||
option.dataZoom[0].startValue = this.planUtil.MinTime + this.planUtil.TranslationTime;
|
||||
option.dataZoom[0].endValue = this.planUtil.MaxTime + this.planUtil.TranslationTime;
|
||||
},
|
||||
yAxisInit(stations) {
|
||||
const option = this.option;
|
||||
yAxisInit(stations, option) {
|
||||
if (Object.keys(this.planUtil).length) {
|
||||
this.pushModels(option.series, [this.planUtil.initializeYaxis(stations)]);
|
||||
|
||||
option.yAxis.min = this.planUtil.computedYaxisMinValue(stations);
|
||||
option.yAxis.max = this.planUtil.computedYaxisMaxValue(stations);
|
||||
option.yAxis[0].min = this.planUtil.computedYaxisMinValue(stations);
|
||||
option.yAxis[0].max = this.planUtil.computedYaxisMaxValue(stations);
|
||||
}
|
||||
},
|
||||
reSize({width, height}) {
|
||||
|
@ -16,6 +16,120 @@ import echarts from 'echarts';
|
||||
import Monitor from './monitor.js';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
|
||||
const option = {
|
||||
title: {
|
||||
text: '',
|
||||
left: 'center',
|
||||
top: '10px'
|
||||
},
|
||||
grid: {
|
||||
top: '60px',
|
||||
left: '160px',
|
||||
right: '100px',
|
||||
bottom: '80px',
|
||||
containLabel: true,
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
toolbox: {
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
snap: true,
|
||||
axis: 'x'
|
||||
},
|
||||
formatter: null,
|
||||
borderWidth: 1,
|
||||
position: function (pt) {
|
||||
const data = pt[0] + 10;
|
||||
return [data, '20%'];
|
||||
}
|
||||
},
|
||||
xAxis: [{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: null,
|
||||
textStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
},
|
||||
axisPointer: {
|
||||
label: {
|
||||
formatter: null,
|
||||
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
}],
|
||||
yAxis: [{
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
inside: true,
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show: true,
|
||||
inside: true,
|
||||
formatter: null
|
||||
},
|
||||
axisPointer: {
|
||||
label: {
|
||||
formatter: null,
|
||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
minInterval: 0.1,
|
||||
maxInterval: 1,
|
||||
min: 0,
|
||||
max: 0
|
||||
}],
|
||||
graphic: [{
|
||||
id: 'shape',
|
||||
elements: []
|
||||
}],
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
zoomOnMouseWheel : true,
|
||||
moveOnMouseMove : 'ctrl',
|
||||
},
|
||||
{
|
||||
fiterMode: 'filter',
|
||||
handleSize: '80%',
|
||||
handleStyle: {
|
||||
color: '#fff',
|
||||
shadowBlur: 3,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||
shadowOffsetX: 2,
|
||||
shadowOffsetY: 2
|
||||
},
|
||||
rangeMode: 'percent',
|
||||
labelFormatter: value => { return timeFormat(value); },
|
||||
bottom: '20px'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
export default {
|
||||
mixins: [Monitor],
|
||||
props: {
|
||||
@ -51,125 +165,6 @@ export default {
|
||||
planData: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
option() {
|
||||
return {
|
||||
title: {
|
||||
text: this.title,
|
||||
left: 'center',
|
||||
top: '10px'
|
||||
},
|
||||
grid: {
|
||||
top: '60px',
|
||||
left: '160px',
|
||||
right: '100px',
|
||||
bottom: '80px',
|
||||
containLabel: true,
|
||||
backgroundColor: 'floralwhite'
|
||||
},
|
||||
toolbox: {
|
||||
},
|
||||
tooltip: {
|
||||
trigger: 'item',
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
snap: true,
|
||||
axis: 'x'
|
||||
},
|
||||
formatter: this.axisTooltip,
|
||||
borderWidth: 1,
|
||||
position: function (pt) {
|
||||
const data = pt[0] + 10;
|
||||
return [data, '20%'];
|
||||
}
|
||||
},
|
||||
xAxis: [
|
||||
{
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: [],
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
formatter: this.xAxisLabelFormat,
|
||||
textStyle: {
|
||||
color: '#333'
|
||||
}
|
||||
},
|
||||
axisPointer: {
|
||||
label: {
|
||||
formatter: this.xAxisPointFormat,
|
||||
backgroundColor: 'rgb(255,0,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
axisTick: {
|
||||
inside: true,
|
||||
show: false
|
||||
},
|
||||
axisLine: {
|
||||
onZero: false,
|
||||
lineStyle: {
|
||||
width: 1
|
||||
}
|
||||
},
|
||||
axisLabel: {
|
||||
show:true,
|
||||
inside:true,
|
||||
formatter: this.yAxisLabelFormat
|
||||
},
|
||||
axisPointer: {
|
||||
label: {
|
||||
formatter: this.yAxisPointFormat,
|
||||
backgroundColor: 'rgb(0,100,0,0.5)',
|
||||
color: 'white'
|
||||
}
|
||||
},
|
||||
minInterval: 0.1,
|
||||
maxInterval: 1,
|
||||
min: 0,
|
||||
max: 0
|
||||
},
|
||||
graphic: [{
|
||||
id: 'shape',
|
||||
elements: []
|
||||
}],
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
type: 'inside',
|
||||
zoomOnMouseWheel : true,
|
||||
moveOnMouseMove : 'ctrl',
|
||||
},
|
||||
{
|
||||
fiterMode: 'filter',
|
||||
handleSize: '80%',
|
||||
handleStyle: {
|
||||
color: '#fff',
|
||||
shadowBlur: 3,
|
||||
shadowColor: 'rgba(0, 0, 0, 0.6)',
|
||||
shadowOffsetX: 2,
|
||||
shadowOffsetY: 2
|
||||
},
|
||||
rangeMode: 'percent',
|
||||
labelFormatter: this.dataZoomFormat,
|
||||
bottom: '20px'
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
width() {
|
||||
this.reSize({width: this.width, height: this.height})
|
||||
@ -197,9 +192,6 @@ export default {
|
||||
yAxisLabelFormat(value, index) {
|
||||
return '';
|
||||
},
|
||||
dataZoomFormat(value) {
|
||||
return timeFormat(value);
|
||||
},
|
||||
axisTooltip(param) {
|
||||
let data = '';
|
||||
|
||||
@ -228,8 +220,15 @@ export default {
|
||||
this.myChart.clear();
|
||||
}
|
||||
|
||||
option.title.text = this.title;
|
||||
option.tooltip.formatter = this.axisTooltip;
|
||||
option.xAxis[0].axisLabel.formatter = this.xAxisLabelFormat;
|
||||
option.xAxis[0].axisPointer.formatter = this.xAxisPointFormat;
|
||||
option.yAxis[0].axisLabel.formatter = this.yAxisLabelFormat;
|
||||
option.yAxis[0].axisPointer.formatter = this.yAxisPointFormat;
|
||||
|
||||
this.myChart = echarts.init(document.getElementById(this.canvasId));
|
||||
this.myChart.setOption(this.option, true);
|
||||
this.myChart.setOption(option, true);
|
||||
this.reSize({ width: this.width, height: this.height });
|
||||
resolve(true);
|
||||
} catch (error) {
|
||||
@ -240,13 +239,14 @@ export default {
|
||||
loadChartPage(stations) {
|
||||
try {
|
||||
if (this.myChart) {
|
||||
this.stations = stations;
|
||||
|
||||
this.myChart.showLoading();
|
||||
|
||||
this.stations = stations;
|
||||
this.xAxisInit(stations);
|
||||
this.yAxisInit(stations);
|
||||
this.xAxisInit(stations, option);
|
||||
this.yAxisInit(stations, option);
|
||||
|
||||
this.myChart.setOption(this.option, true);
|
||||
this.myChart.setOption(option, true);
|
||||
this.myChart.hideLoading();
|
||||
}
|
||||
} catch (error) {
|
||||
@ -307,8 +307,7 @@ export default {
|
||||
this.$messageBox(error.message);
|
||||
}
|
||||
},
|
||||
xAxisInit(stations) {
|
||||
const option = this.option;
|
||||
xAxisInit(stations, option) {
|
||||
const startValue = this.planUtil.MinTime + this.planUtil.TranslationTime;
|
||||
const endValue = this.planUtil.MaxTime + this.planUtil.TranslationTime;
|
||||
const list = [];
|
||||
@ -326,13 +325,12 @@ export default {
|
||||
option.dataZoom[0].endValue = option.dataZoom[1].endValue = endValue;
|
||||
}
|
||||
},
|
||||
yAxisInit(stations) {
|
||||
const option = this.option;
|
||||
yAxisInit(stations, option) {
|
||||
if (Object.keys(this.planUtil).length) {
|
||||
this.pushModels(option.series, [this.planUtil.initializeYaxis(stations)]);
|
||||
|
||||
option.yAxis.min = this.planUtil.computedYaxisMinValue(stations);
|
||||
option.yAxis.max = this.planUtil.computedYaxisMaxValue(stations);
|
||||
option.yAxis[0].min = this.planUtil.computedYaxisMinValue(stations);
|
||||
option.yAxis[0].max = this.planUtil.computedYaxisMaxValue(stations);
|
||||
}
|
||||
},
|
||||
reSize({width, height}) {
|
||||
|
@ -120,7 +120,7 @@ export default {
|
||||
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
||||
},
|
||||
beforeDestroy() {
|
||||
this.destroy();
|
||||
this.destroy(true);
|
||||
},
|
||||
methods: {
|
||||
serviceNumberChange(row) {
|
||||
@ -146,7 +146,7 @@ export default {
|
||||
},
|
||||
async analyticalTripNumber(data) {
|
||||
this.tripNumberConfig.data = Object.keys(data || {})
|
||||
.sort((a, b) => { return data[a].oldIndex - data[b].oldIndex; })
|
||||
.sort((a, b) => { return data[a].tripNumber - data[b].tripNumber; })
|
||||
.map(tripNumber => { return { tripNumber }; });
|
||||
},
|
||||
async setPosition() {
|
||||
@ -334,7 +334,7 @@ export default {
|
||||
loadInitChart(series, option) {
|
||||
return new Promise((resolve, reject) => {
|
||||
try {
|
||||
this.destroy();
|
||||
this.destroy(false);
|
||||
let startValue = 3600 + this.PlanConvert.TranslationTime;
|
||||
const offsetTime = 3600;
|
||||
const initTime = toTimeStamp(formatDuring(this.$store.state.training.initTime));
|
||||
@ -467,7 +467,8 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
destroy() {
|
||||
destroy(isQuit) {
|
||||
if (isQuit) { this.PlanConvert = null; }
|
||||
if (this.myChart && this.myChart.isDisposed) {
|
||||
this.myChart.dispose();
|
||||
this.myChart = null;
|
||||
|
BIN
static/trafficplan/normaltrain.FBX
Normal file
BIN
static/trafficplan/normaltrain.FBX
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user