This commit is contained in:
joylink_cuiweidong 2020-11-18 13:24:16 +08:00
commit 224ca3785d
27 changed files with 750 additions and 147 deletions

View File

@ -11,7 +11,6 @@ pipeline {
nodejs 'nodejs-10' nodejs 'nodejs-10'
} }
steps { steps {
sh 'npm update'
sh 'npm install' sh 'npm install'
sh 'npm run build' sh 'npm run build'
} }

View File

@ -11,7 +11,6 @@ pipeline {
nodejs 'nodejs-10' nodejs 'nodejs-10'
} }
steps { steps {
sh 'npm update'
sh 'npm install' sh 'npm install'
sh 'npm run test' sh 'npm run test'
} }

View File

@ -29,6 +29,7 @@
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"qrcode.vue": "^1.6.2", "qrcode.vue": "^1.6.2",
"qs": "^6.9.3", "qs": "^6.9.3",
"quill-image-extend-module": "^1.1.2",
"recordrtc": "^5.5.9", "recordrtc": "^5.5.9",
"script-loader": "^0.7.2", "script-loader": "^0.7.2",
"sessionstorage": "^0.1.0", "sessionstorage": "^0.1.0",

84
src/api/learn.js Normal file
View File

@ -0,0 +1,84 @@
import request from '@/utils/request';
// 根据postId帖子ID分页查询留言列表
export function queryMessagePagingByPostId(postId, params) {
return request({
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
});
}
// 回复帖子
export function answerPost(data) {
return request({
url: `/api/learn/message/create`,
method: 'post',
data: data
});
}
// 评论留言
export function commentLevelMessage(messageId, data) {
return request({
url: `/api/learn/${messageId}/comment`,
method: 'post',
data: data
});
}
// 评论 留言的评论
export function commentComents(messageId, commentId, data) {
return request({
url: `/api/learn/${messageId}/${commentId}/comment`,
method: 'post',
data: data
});
}
// 管理员删除留言
export function deleteMessageByAdmin(messageId) {
return request({
url: `/api/learn/${messageId}/deleteMessage/admin`,
method: 'delete'
});
}
// 用户自己删除留言
export function deleteMessageBySelf(messageId) {
return request({
url: `/api/learn/${messageId}/deleteMessage/user`,
method: 'delete'
});
}
// 查询留言的评论列表
export function queryMessageCommentList(messageId) {
return request({
url: `/api/learn/${messageId}/list`,
method: 'get'
});
}
// 删除评论回复管理员
export function deleteCommentByAdmin(commentId) {
return request({
url: `/api/learn/${commentId}/deleteComment/admin`,
method: 'delete'
});
}
// 删除评论回复用户
export function deleteCommentBySelf(commentId) {
return request({
url: `/api/learn/${commentId}/deleteComment/user`,
method: 'delete'
});
}
// 根据项目获取项目关联的帖子
export function getPostByProjectCode(projectCode) {
return request({
url: `/api/learn/${projectCode}/post`,
method: 'get'
});
}

BIN
src/assets/bg_board.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

BIN
src/assets/delete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

BIN
src/assets/like.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
src/assets/reply.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
src/assets/unlike.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -4,7 +4,8 @@
ref="editor" ref="editor"
v-model="content" v-model="content"
:options="options" :options="options"
:style="{height: height+'px', 'margin-bottom': '80px'}" style="background-color: #fff"
:style="{height: height+'px', 'margin-bottom': marginBottom+'px'}"
@change="onChange" @change="onChange"
@blur="onBlur" @blur="onBlur"
@focus="onFocus" @focus="onFocus"
@ -13,9 +14,10 @@
</template> </template>
<script> <script>
import { quillEditor } from 'vue-quill-editor'; import { quillEditor, Quill } from 'vue-quill-editor';
import 'quill/dist/quill.snow.css'; import 'quill/dist/quill.snow.css';
import { ImageExtend, QuillWatch} from 'quill-image-extend-module';
Quill.register('modules/ImageExtend', ImageExtend);
export default { export default {
components: { components: {
quillEditor quillEditor
@ -32,12 +34,69 @@ export default {
placeholder: { placeholder: {
type: String, type: String,
default: '' default: ''
},
marginBottom: {
type: Number,
default: 80
},
unloadImg: {
type: Boolean,
default: false
},
noHandleP: {
type: Boolean,
defalut: false
} }
}, },
data() { data() {
return { return {
content: '', content: ''
options: { };
},
computed: {
editor() {
return this.$refs.editor.quill;
},
options() {
const that = this;
return this.unloadImg ? {
modules: {
ImageExtend: {
loading: true,
name: 'file',
size: 3,
action: `https://test.joylink.club/jlfile/api/upload/PICTURE?appId=00001&appSecret=joylink00001`,
response: (res) => {
return `https://test.joylink.club/oss/joylink${res.data}`;
},
error: () => { that.$message.error('图片上传失败,请检查网络状态'); },
sizeError: () => { that.$message.error('图片上传失败图片大小限制3MB'); } //
},
toolbar: {
container: [
['bold', 'italic', 'underline', 'strike'],
[],
[],
[{'list': 'ordered'}, {'list': 'bullet'}],
[{'script': 'sub'}, {'script': 'super'}],
[{'indent': '-1'}, {'indent': '+1'}],
[{'direction': 'rtl'}],
[{'size': ['small', 'large', 'huge']}],
[{'color': [], 'background': []}],
[{'font': []}],
[{'align': []}],
['clean'],
['image']
],
handlers: {
'image': function () {
QuillWatch.emit(this.quill.id);
}
}
}
},
placeholder: '请输入'
} : {
modules: { modules: {
toolbar: [ toolbar: [
['bold', 'italic', 'underline', 'strike'], ['bold', 'italic', 'underline', 'strike'],
@ -54,12 +113,7 @@ export default {
['clean'] ['clean']
] ]
} }
} };
};
},
computed: {
editor() {
return this.$refs.editor.quill;
}, },
titleConfig () { titleConfig () {
return { return {
@ -91,11 +145,13 @@ export default {
watch: { watch: {
'value': function(val) { 'value': function(val) {
this.$nextTick(() => { this.$nextTick(() => {
if (val != this.$escapeHTML(this.content)) { if (val != this.$escapeHTML(this.content) && !this.noHandleP) {
this.editor.enable(false); this.editor.enable(false);
this.content = val; this.content = val;
this.editor.enable(true); this.editor.enable(true);
this.editor.blur(); this.editor.blur();
} else if (this.noHandleP) {
this.content = val;
} }
}); });
} }
@ -105,11 +161,18 @@ export default {
}, },
methods: { methods: {
onChange(e) { onChange(e) {
this.$emit('input', this.$escapeHTML(this.content)); if (!this.noHandleP) {
this.$emit('input', this.$escapeHTML(this.content));
} else {
this.$emit('input', this.content);
}
}, },
onBlur(e) { onBlur(e) {
}, },
onFocus(e) { onFocus(e) {
},
getFocus() {
this.$refs.editor.quill.focus();
} }
} }
}; };

View File

@ -56,6 +56,7 @@ export default {
threeDimensionalStation: 'Three-Dimensional Station', threeDimensionalStation: 'Three-Dimensional Station',
passengerflow: 'CCTV View', passengerflow: 'CCTV View',
trafficplantext:'Passer Planing', trafficplantext:'Passer Planing',
traffictraintext:'Trunk View',
maintainer: 'Maintainer View', maintainer: 'Maintainer View',
deviceView: 'DeviceView', deviceView: 'DeviceView',
taskOperateSuccess: 'Task Operate success', taskOperateSuccess: 'Task Operate success',

View File

@ -55,7 +55,8 @@ export default {
threeDimensionalView: '数字沙盘', threeDimensionalView: '数字沙盘',
threeDimensionalStation: '三维车站', threeDimensionalStation: '三维车站',
passengerflow: 'cctv视图', passengerflow: 'cctv视图',
trafficplantext:'客流规划', trafficplantext:'车站视角',
traffictraintext:'车厢视角',
maintainer: '设备故障视图', maintainer: '设备故障视图',
deviceView: '设备视图', deviceView: '设备视图',
taskOperateSuccess: '任务操作成功', taskOperateSuccess: '任务操作成功',

View File

@ -38,8 +38,8 @@ export function PasserRender(mapmode) {
freeViewRender.initRender(renderer,dom,scene,camerass); freeViewRender.initRender(renderer,dom,scene,camerass);
// //
scope.state = "4views"; scope.state = "freeview";
scope.nowrender = fourViewRender; scope.nowrender = freeViewRender;
} }
this.changeRenderMode = function(mode){ this.changeRenderMode = function(mode){

View File

@ -31,13 +31,14 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
const data = JSON.parse(Response.body); const data = JSON.parse(Response.body);
if(data.type != "TrainRun_3D"){ if(data.type == "TrainRun_3D"){
console.log(data); trafficTrain.runList = data.body;
// console.log(data);
} }
if(data.type == "BeAbout2Arrive_3D"){ if(data.type == "BeAbout2Arrive_3D"){
if(toptrain.nowcode == data.body.groupNumber){ if(toptrain.nowcode == data.body.groupNumber){
console.log(data); // console.log(data);
} }
} }
@ -68,8 +69,12 @@ export function TrainConnect(trafficTrain,deviceaction,toptrain,routegroup,passe
num:data.body[i].num, num:data.body[i].num,
doorCode:1, doorCode:1,
open:0, open:0,
text:"",
}; };
trafficTrain.trainList.push(train);
train.text = data.body[i].code+"(现有乘客"+data.body[i].num+"人)";
trafficTrain.trainList[train.code] = train;
} }
} }

View File

@ -83,6 +83,7 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
this.humanInSpeed = 0; this.humanInSpeed = 0;
this.humanOutSpeed = 0; this.humanOutSpeed = 0;
this.runList = [];
//定义相机 //定义相机
camerass = new THREE.PerspectiveCamera(70, dom.offsetWidth / dom.offsetHeight, 0.01, 1000); camerass = new THREE.PerspectiveCamera(70, dom.offsetWidth / dom.offsetHeight, 0.01, 1000);
camerass.position.set(0, 80, 40); camerass.position.set(0, 80, 40);
@ -293,6 +294,10 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
return scope.trainList; return scope.trainList;
} }
this.getRunList = function(){
return scope.runList;
}
let nowLeaveDoor = null; let nowLeaveDoor = null;
this.updatePasserMove = function(doorData){ this.updatePasserMove = function(doorData){
nowLeaveDoor = doorData.doorCode; nowLeaveDoor = doorData.doorCode;
@ -330,9 +335,9 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
passerTrain.toptrain.nowcode = newCode; passerTrain.toptrain.nowcode = newCode;
scope.nowTrainCode = newCode; scope.nowTrainCode = newCode;
// console.log(scope.trainList); // console.log(scope.trainList);
for(let i=0;i<scope.trainList.length;i++){ for(let k in scope.trainList){
if(scope.trainList[i].code == newCode){ if(scope.trainList[k].code == newCode){
let trainDataList = getnum(scope.trainList[i].num,6); let trainDataList = getnum(scope.trainList[k].num,6);
scope.nowTrunk.code = newCode; scope.nowTrunk.code = newCode;
scope.nowTrunk.numList = trainDataList; scope.nowTrunk.numList = trainDataList;
@ -351,8 +356,8 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
passerTrain.toptrain.action.down[an].play(); passerTrain.toptrain.action.down[an].play();
} }
if(scope.trainList[i].open != "0"){ if(scope.trainList[k].open != "0"){
if(scope.trainList[i].doorCode == "1"){ if(scope.trainList[k].doorCode == "1"){
for(let an=passerTrain.toptrain.action.top.length-1;an>=0;an--){ for(let an=passerTrain.toptrain.action.top.length-1;an>=0;an--){
passerTrain.toptrain.action.top[an].reset(); passerTrain.toptrain.action.top[an].reset();
passerTrain.toptrain.action.top[an].time = passerTrain.toptrain.action.top[an]._clip.duration; passerTrain.toptrain.action.top[an].time = passerTrain.toptrain.action.top[an]._clip.duration;
@ -370,7 +375,8 @@ export function Jl3dTrafficTrain(dom,skinCode,routegroup,viewMap) {
} }
updateTrainNum(trainDataList); updateTrainNum(trainDataList);
i = scope.trainList.length; break;
// i = scope.trainList.length;
} }
} }

View File

@ -2,10 +2,10 @@ import { createMartPoint, createSeriesModel, createMarkLineModels, hexColor, con
import store from '@/store/index_APP_TARGET'; import store from '@/store/index_APP_TARGET';
export default { export default {
/** 边缘高度*/ /** 边缘高度*/
EdgeHeight: 600, EdgeHeight: 600 / 3,
/** 间隔高度*/ /** 间隔高度*/
CoordMultiple: 1, CoordMultiple: 1 / 3,
/** 偏移时间*/ /** 偏移时间*/
TranslationTime: 60 * 60 * 2, TranslationTime: 60 * 60 * 2,
@ -131,7 +131,6 @@ export default {
if (index == 0 && train.stationTimeList[index].stationCode != train.stationTimeList[index + 1].stationCode || 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 == train.stationTimeList.length - 2 && train.stationTimeList[index].secondTime != train.stationTimeList[index + 1].secondTime ||
index > 0 && index < train.stationTimeList.length - 1) { index > 0 && index < train.stationTimeList.length - 1) {
// ${train.directionCode}
const aa = `${train.tripNumber}`; const aa = `${train.tripNumber}`;
opt.data.push([elem.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, elem, elem.right, false), elem.stationCode, aa]); 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]; lastPoint = train.stationTimeList[idx - 1];
nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1]; nextPoint = service.tripNumberDataList[j + 1].stationTimeList[1];
num = this.computedReentryNumber(train.tripNumber); num = this.computedReentryNumber(train.tripNumber);
// ${train.directionCode}
const aa = `${train.tripNumber}`; const aa = `${train.tripNumber}`;
opt.data.push([lastPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, lastPoint, train.right, true, num), lastPoint.stationCode, aa]); 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]); opt.data.push([nextPoint.secondTime, this.getCoordYByElem(stations, kmRangeCoordMap, nextPoint, train.right, true, num), nextPoint.stationCode, aa]);
@ -259,7 +257,7 @@ export default {
initializeYaxis(stations) { initializeYaxis(stations) {
return createMarkLineModels(stations, (elem) => { return createMarkLineModels(stations, (elem) => {
return this.EdgeHeight + elem.kmRange * this.CoordMultiple; return this.EdgeHeight + elem.kmRange * this.CoordMultiple;
}); }, {yAxisIndex:0});
}, },
/** 将后台数据转换为试图序列模型*/ /** 将后台数据转换为试图序列模型*/

View File

@ -447,3 +447,7 @@ export const ProjectList = [
{value: 'bjd', label: '北交大'}, {value: 'bjd', label: '北交大'},
{value: 'urtss', label: '陪标项目'} {value: 'urtss', label: '陪标项目'}
]; ];
export const ProjectPostIdMap = {
drts: 1,
bjd: 2
};

View File

@ -5,7 +5,7 @@ export function getBaseUrl() {
BASE_API = 'https://test.joylink.club/jlcloud'; BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪 // BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.8.129:9000'; // 旭强 // BASE_API = 'http://192.168.8.129:9000'; // 旭强
// BASE_API = 'http://192.168.8.109:9000'; // 张赛 // BASE_API = 'http://192.168.8.119:9000'; // 张赛
// BASE_API = 'http://192.168.8.110:9000'; // 杜康 // BASE_API = 'http://192.168.8.110:9000'; // 杜康
// BASE_API = 'http://b29z135112.zicp.vip'; // BASE_API = 'http://b29z135112.zicp.vip';
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康 // BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康

View File

@ -60,7 +60,7 @@ export function createSeriesModel(opt, lineStyle) {
} }
/** 创建标记横线*/ /** 创建标记横线*/
export function createMarkLineModels(stations, computedYaxis) { export function createMarkLineModels(stations, computedYaxis, opt = {}) {
const markLineModel = {}; const markLineModel = {};
if (stations && stations.length) { if (stations && stations.length) {
markLineModel.type = 'line'; markLineModel.type = 'line';
@ -71,6 +71,7 @@ export function createMarkLineModels(stations, computedYaxis) {
markLineModel.markLine.lineStyle = { color: '#B0C4DE', width: 0.5 }; markLineModel.markLine.lineStyle = { color: '#B0C4DE', width: 0.5 };
markLineModel.markLine.symbol = 'none'; markLineModel.markLine.symbol = 'none';
markLineModel.elements = []; markLineModel.elements = [];
Object.assign(markLineModel, opt);
stations.forEach((elem, index) => { stations.forEach((elem, index) => {
markLineModel.markLine.data.push( markLineModel.markLine.data.push(
{ {

View File

@ -16,11 +16,11 @@
<Station-Data> <Station-Data>
</Station-Data> </Station-Data>
<div class="menutop"> <!-- <div class="menutop">
<el-button-group> <el-button-group>
<el-button type="primary" @click="switchauto">列车车厢视角</el-button> <el-button type="primary" @click="switchauto">列车车厢视角</el-button>
</el-button-group> </el-button-group>
</div> </div> -->
<div class="menudown"> <div class="menudown">
<el-button-group> <el-button-group>
@ -108,19 +108,6 @@ export default {
} }
}, },
switchauto() {
const routeData = this.$router.resolve({
path:'/jlmap3d/traffictrain',
query:{
mapid:this.$route.query.mapid,
group:this.group,
project: this.project,
noPreLogout: true,
lineCode:this.lineCode
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
updatestationlist(list) { updatestationlist(list) {
// console.log(list); // console.log(list);
this.value = list[0].name; this.value = list[0].name;

View File

@ -7,7 +7,7 @@
<el-option <el-option
v-for="item in trainlist" v-for="item in trainlist"
:key="item.code" :key="item.code"
:label="item.code" :label="item.text"
:value="item.code" :value="item.code"
/> />
@ -24,7 +24,8 @@
<el-row class="tac"> <el-row class="tac">
<el-col :span="12"> <el-col :span="12">
<el-menu <el-menu
default-active="2" default-active="0"
:default-openeds="openeds"
class="el-menu-vertical-demo datatab" class="el-menu-vertical-demo datatab"
@ -116,6 +117,7 @@ export default {
isActive:0, isActive:0,
localStatic:JL3D_LOCAL_STATIC, localStatic:JL3D_LOCAL_STATIC,
openeds:['2','3','4','5','6','7'],
trunkAssetList:[ trunkAssetList:[
'/trafficplan/trunkhead.png', '/trafficplan/trunkhead.png',
'/trafficplan/trunkbody.png', '/trafficplan/trunkbody.png',
@ -154,13 +156,13 @@ export default {
if (this.loadingProjectList.includes(this.$route.query.project)) { if (this.loadingProjectList.includes(this.$route.query.project)) {
this.$store.dispatch('app/transitionAnimations'); this.$store.dispatch('app/transitionAnimations');
} }
document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project]; // document.querySelector("link[rel*='icon']").href = loginInfo[this.$route.query.project].linkIcon || ProjectIcon[this.$route.query.project];
}, },
mounted() { mounted() {
this.init(); this.init();
this.takelist = this.getnum(this.allPassers,6); this.takelist = this.getnum(this.allPassers,6);
console.log(this.takelist); // console.log(this.takelist);
if (this.$route.query.type == 'CCTV') { if (this.$route.query.type == 'CCTV') {
this.isCctv = false; this.isCctv = false;
} }
@ -177,7 +179,7 @@ export default {
this.jl3d = new Jl3dTrafficTrain(dom, this.$route.query.mapid, this.$route.query.group, 'normal'); this.jl3d = new Jl3dTrafficTrain(dom, this.$route.query.mapid, this.$route.query.group, 'normal');
}, },
assetSelect(index){ assetSelect(index){
console.log(index); // console.log(index);
this.isActive=index; this.isActive=index;
this.jl3d.switchcamera(index+''); this.jl3d.switchcamera(index+'');
}, },
@ -197,10 +199,22 @@ export default {
// this.jl3d.updateNowTrainCode(codeData); // this.jl3d.updateNowTrainCode(codeData);
// }, // },
updateTrainList(){ updateTrainList(){
this.trainlist = this.jl3d.getTrainList(); this.trainlist = [];
let newTrainList = this.jl3d.getTrainList();
let newRunList = this.jl3d.getRunList();
for(let i=0;i<newRunList.length;i++){
this.trainlist.push(newTrainList[newRunList[i].code]);
}
// console.log(this.trainlist); // console.log(this.trainlist);
// if(){
//
// }
// // console.log(this.trainlist);
}, },
updateTrainCode(selVal) { updateTrainCode(selVal) {
// console.log(selVal);
// this.jl3d.changeTrain(selVal); // this.jl3d.changeTrain(selVal);
this.isActive=0; this.isActive=0;
this.jl3d.updateNowTrainCode(selVal); this.jl3d.updateNowTrainCode(selVal);

View File

@ -0,0 +1,370 @@
<template>
<el-dialog
id="elDialog"
title="留言板"
:visible.sync="dialogVisible"
fullscreen
:show-close="false"
center
:before-close="handleClose"
>
<el-card class="box-card" style="width: 80%;margin-left: 10%;padding: 20px;margin-bottom: 20px;background-color: rgba(255,255,255,0)">
<div v-if="postCommentList.length">
<template v-for="(item,i) in postCommentList">
<div :key="i" style="border: 1px solid #C0C0C0;border-radius: 5px;margin-bottom: 20px;box-shadow: 2px 2px 3px #808080;padding: 10px 20px;background-color: #fff">
<div style="margin-bottom: 10px;display: flex;align-items: center;">
<img :src="avatarUrl(item)" class="head_portrait">
<div style="display: inline-block;margin-right: 20px;margin-left:10px;font-size: 18px;color: #000;">{{ item.creatorNickName }}</div>
<div style="display: inline-block;">{{ item.createTime }}</div>
</div>
<div style="margin-left: 60px;" v-html="$escapeHTML(`${item.content}`)" />
<div style="width: 100%;display:flex;align-items: center;justify-content: flex-end;">
<!--<img :src="lickIcon" style="width: 20px;height: auto;margin-right: 30px;">-->
<!--<img :src="unlikeIcon" style="width: 20px;height: auto;margin-right: 30px;">-->
<img :src="replyIcon" style="width: 16px;height: auto;margin-right: 30px;cursor: pointer;" @click="replyLeaveMessage(item.id, i)">
<img v-if="userId == item.creatorId || superAdmin" :src="deleteIcon" style="width: 16px;height: auto;cursor:pointer;" @click="deleteMessage(item.id)">
</div>
<div v-if="item.comments && item.comments.total > 0" style="background: #F5F5F5;margin-top: 10px; width: calc(100% - 120px);margin-left: 60px; border-radius: 5px;padding: 1px 10px 10px;">
<div v-if="moreMessageId == item.id">
<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: 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>
</div>
</template>
</div>
<div v-else>
<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: 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>
</div>
</template>
</div>
<div v-if="item.comments.total > 3 && moreMessageId != item.id" style="margin-top: 10px;">
<span class="view_more" @click="viewMoreComment(item)">{{ `${item.comments.total}条回复,点击查看更多>>` }}</span>
</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;">
<el-button type="danger" size="small" @click="commentMessage">回复</el-button>
<el-button size="small" @click="cancelComment">取消</el-button>
</div>
</div>
</div>
</template>
</div>
<div v-else style="text-align: center;width: 100%;height: 50px;line-height: 50px;font-size: 18px;color: #ccc;">
<span>暂无留言</span>
</div>
<div style="width: 100%;text-align: center;">
<el-pagination
:current-page.sync="pageNum"
:page-size="pageSize"
layout="total, prev, pager, next,jumper"
:total="total"
@current-change="handleCurrentChange"
/>
</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" />
<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>
<div v-show="imgShow" style="position: fixed;width: 100%;height: 100%;left: 0;top: 0;background: rgba(0,0,0,0.5);cursor: zoom-out;" @click="handelCloseImg">
<img id="targetImg" src="" style="position: fixed;top: 50%;left: 50%;transform: translate(-50%,-50%);min-width: 500px;max-height: 80%;height: auto;">
</div>
</el-dialog>
</template>
<script>
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 { ProjectCode } from '@/scripts/ProjectConfig';
export default {
name: 'MessageBoard',
data() {
return {
dialogVisible: false,
content: '',
postCommentList: [],
pageSize: 10,
pageNum: 0,
total: 0,
imgShow: false,
lickIcon: lick_icon,
unlikeIcon: unlike_icon,
replyIcon: reply_icon,
deleteIcon: delete_icon,
replyMessageId: '',
commentContent: '',
replyCommentId: '',
replyMessageIndex: '',
allCommentList: [],
moreMessageId: '',
replyUserName: '',
commentContentNoName: '',
postId: ''
};
},
computed: {
userId() {
return this.$store.state.user.id;
},
superAdmin() {
return this.$store.state.user.roles.includes(superAdmin);
},
projectCode() {
const project = getSessionStorage('project');
return ProjectCode[project];
}
},
created() {
const that = this;
window.handleZoomImg = function () {
that.imgShow = true;
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;
},
doShow() {
this.handleCurrentChange();
this.dialogVisible = true;
},
commitComment() {
const images = this.content.match(/<img/g);
if (images && images.length > 3) {
this.$message.error('留言内容使用图片应小于三张!');
return;
}
if (this.content.length > 1000) {
this.$message.error('留言内容超出最大长度!');
return;
}
if (!this.content) {
this.$message.error('留言内容不能为空!');
return;
}
answerPost({postId: this.postId, content: this.content}).then(resp => {
this.pageNum = 1;
this.handleCurrentChange();
this.content = '';
}).catch(error => {
this.$message.error('留言失败 ');
console.log(error);
});
},
handleCurrentChange() {
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;
this.postCommentList.push(item);
});
this.total = resp.data.total;
});
},
goSlide() {
const bottom = document.getElementById('boardBottom');
const element = document.getElementById('elDialog').childNodes[0];
element.scrollTop = bottom.offsetTop;
this.$refs.quillEditor.getFocus();
},
avatarUrl(val) {
if (val && val.creatorAvatarPath) {
return 'https://joylink.club/oss/joylink' + val.creatorAvatarPath;
} else {
return 'https://joylink.club/oss/wxmicro_assistant/userhead/defaultuser.png';
}
},
handleClear() {
this.content = '';
},
handelCloseImg() {
this.imgShow = false;
document.getElementById('targetImg').src = '';
},
replyLeaveMessage(messageId, messageIndex, commentId, userNickname) {
this.cancelComment();
this.replyMessageId = messageId;
this.replyCommentId = commentId;
this.replyMessageIndex = messageIndex;
if (commentId) {
this.replyUserName = '@' + userNickname + ' ';
this.commentContent = this.replyUserName + this.commentContentNoName;
}
this.$nextTick(()=>{
document.getElementById('answerInput' + messageId).focus();
});
},
cancelComment() {
this.replyMessageId = '';
this.commentContent = '';
this.replyCommentId = '';
this.replyMessageIndex = '';
this.replyUserName = '';
this.commentContentNoName = '';
},
commentMessage() {
if (this.replyCommentId) {
commentComents(this.replyMessageId, this.replyCommentId, {content:this.commentContentNoName}).then(resp => {
this.getCommentList(this.replyMessageId, this.replyMessageIndex);
this.cancelComment();
}).catch(error => {
this.$message.error('评论留言失败!');
console.error(error);
});
} else {
commentLevelMessage(this.replyMessageId, {content:this.commentContentNoName}).then(resp => {
this.getCommentList(this.replyMessageId, this.replyMessageIndex);
this.cancelComment();
}).catch(error => {
this.$message.error('评论留言失败!');
console.error(error);
});
}
},
getCommentList(messageId, messageIndex) {
queryMessageCommentList(messageId).then(resp => {
if (this.moreMessageId == messageId) {
this.allCommentList = resp.data;
}
if (resp.data.length > 3) {
this.postCommentList[messageIndex].comments.list = resp.data.slice(0, 3);
this.postCommentList[messageIndex].comments.total = resp.data.length;
} else {
this.postCommentList[messageIndex].comments.list = resp.data;
this.postCommentList[messageIndex].comments.total = resp.data.length;
}
}).catch(error => {
this.$message.error('更新回复失败!');
console.error(error);
});
},
computedCommentName(elem) {
if (elem.replyUserNickName) {
return `${elem.userNickname} 回复@ ${elem.replyUserNickName}`;
} else {
return elem.userNickname + '';
}
},
deleteMessage(messageId) {
if (this.superAdmin) {
deleteMessageByAdmin(messageId).then(resp => {
// this.$message.success('');
this.handleCurrentChange();
}).catch(error => {
this.$message.error('删除留言失败!');
console.error(error);
});
} else {
deleteMessageBySelf(messageId).then(resp => {
// this.$message.success('');
this.handleCurrentChange();
}).catch(error => {
this.$message.error('删除留言失败!');
console.error(error);
});
}
},
deleteComment(messageId, messageIndex, commentId) {
if (this.superAdmin) {
deleteCommentByAdmin(commentId).then(resp => {
this.getCommentList(messageId, messageIndex);
}).catch(error => {
this.$message.error('删除回复失败!');
console.error(error);
});
} else {
deleteCommentBySelf(commentId).then(resp => {
this.getCommentList(messageId, messageIndex);
}).catch(error => {
this.$message.error('删除回复失败!');
console.error(error);
});
}
},
viewMoreComment(data) {
queryMessageCommentList(data.id).then(resp => {
this.allCommentList = resp.data;
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;
}
}
}
};
</script>
<style scoped>
.dialog-footer{
margin: 0 auto;
display: flex;
justify-content: center;
}
.head_portrait{
width: 50px;
height: 50px;
border-radius: 25px;
}
.view_more {
cursor: pointer;
}
.view_more:hover {
cursor: pointer;
color: #409EFF;
}
.img-box{
width: 100px;
height: auto;
}
/deep/ .el-dialog.is-fullscreen{
background-image:url('../../../../assets/bg_board.jpg');
}
/deep/.ql-container{
height: 80%;
}
/deep/.el-dialog__title{
font-size: 30px;
color: #F00;
font-family: 'fangsong';
font-weight: bolder;
}
</style>

View File

@ -245,6 +245,22 @@ export default {
this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 } this.runPlanData, this.runSeries, { color: '#FF00DE', width: 2 }
); );
const series = [...this.staticSeries, ...this.runSeries, ... this.selectSeries]; 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}); this.myChart && this.myChart.setOption({series: series});
}, },
async loadChartPage() { async loadChartPage() {
@ -268,20 +284,6 @@ export default {
async loadInitData() { async loadInitData() {
this.myChart && this.myChart.showLoading(); this.myChart && this.myChart.showLoading();
const option = { const option = {
title: {
text: '',
left: 'center'
},
grid: {
top: '30px',
left: '120px',
right: '40px',
bottom: '65px',
containLabel: true,
backgroundColor: 'floralwhite'
},
toolbox: {
},
tooltip: { tooltip: {
axisPointer: { axisPointer: {
trigger: 'item', trigger: 'item',
@ -290,10 +292,14 @@ export default {
formatter: this.axisTooltip, formatter: this.axisTooltip,
borderWidth: 1 borderWidth: 1
}, },
grid: {
right: '40px',
left: '120px',
height: '85%'
},
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
boundaryGap: false,
data: [], data: [],
axisLine: { axisLine: {
onZero: false, onZero: false,
@ -318,54 +324,55 @@ export default {
} }
} }
], ],
yAxis: { yAxis: [
type: 'value',
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
},
min: 0,
max: 0
},
series: [],
dataZoom: [
{ {
type: 'inside' type: 'value',
}, yAxisIndex: 0,
{ splitLine: {
fiterMode: 'filter', show: false
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
}, },
bottom: '20px' axisTick: {
show: false
},
axisLine: {
onZero: false,
lineStyle: {
width: 2,
color: '#d14a61'
}
},
axisLabel: {
interval: 'auto',
formatter: this.yAxisLableFormat
},
axisPointer: {
xAxisIndex: 'all',
label: {
formatter: this.yAxisPointFormat,
backgroundColor: 'rgb(0,100,0,0.5)',
color: 'white'
}
}
} }
],
dataZoom: [{
type: 'inside'
},
{
fiterMode: 'filter',
handleIcon: 'M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4v1.3h1.3v-1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7V23h6.6V24.4z M13.3,19.6H6.7v-1.4h6.6V19.6z',
handleSize: '80%',
handleStyle: {
color: '#fff',
shadowBlur: 3,
shadowColor: 'rgba(0, 0, 0, 0.6)',
shadowOffsetX: 2,
shadowOffsetY: 2
},
bottom: '20px'
}],
series: [
] ]
}; };
await this.xAxisInit(option); await this.xAxisInit(option);
@ -394,6 +401,23 @@ export default {
option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime; option.dataZoom[0].startValue = option.dataZoom[1].startValue = startValue - offsetTime;
option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime; option.dataZoom[0].endValue = option.dataZoom[1].endValue = startValue + offsetTime;
option.series = [...this.staticSeries, ...this.runSeries, ...this.selectSeries]; 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)); this.myChart = echarts.init(document.getElementById(this.runPlanId));
if (this.myChart) { if (this.myChart) {
this.myChart.setOption(option); this.myChart.setOption(option);
@ -440,8 +464,20 @@ export default {
}, },
yAxisInit(option) { yAxisInit(option) {
if (Object.keys(this.PlanConvert).length) { if (Object.keys(this.PlanConvert).length) {
option.yAxis.min = this.PlanConvert.computedYaxisMinValue(this.stations); option.yAxis[0].min = this.PlanConvert.computedYaxisMinValue(this.stations);
option.yAxis.max = this.PlanConvert.computedYaxisMaxValue(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: option.yAxis[0].min - Math.floor(station.kmRange * this.PlanConvert.CoordMultiple + this.PlanConvert.EdgeHeight),
max: Math.floor(option.yAxis[0].max - station.kmRange * this.PlanConvert.CoordMultiple) - this.PlanConvert.EdgeHeight,
show: false,
yAxisIndex : index++
});
}
});
} }
}, },
axisTooltip(param) { axisTooltip(param) {

View File

@ -4,6 +4,10 @@
<div class="btn_hover" @click="menuClick">菜单</div> <div class="btn_hover" @click="menuClick">菜单</div>
<el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`"> <el-button-group ref="button_group_box" class="button_group_box" :style="`margin-left:-${btnWidth}px`">
<!-- 地图错误判断 --> <!-- 地图错误判断 -->
<template v-if="project === 'bjd'">
<el-button v-if="running" size="small" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
</template>
<!-- 设备视图 --> <!-- 设备视图 -->
<el-button v-if="jl3dmodelShow && !isContest && project !== 'bjd'" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button> <el-button v-if="jl3dmodelShow && !isContest && project !== 'bjd'" size="small" @click="jumpjlmap3dmodel">{{ jl3dmodel }}</el-button>
<!-- 三维视图/数字沙盘 --> <!-- 三维视图/数字沙盘 -->
@ -12,6 +16,8 @@
<el-button v-if="cctvShow && !isContest && project !== 'bjd'" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button> <el-button v-if="cctvShow && !isContest && project !== 'bjd'" size="small" @click="jumpjl3dpassflow">{{ jl3dpassflow }}</el-button>
<!-- 客流规划视图 --> <!-- 客流规划视图 -->
<el-button v-if="trafficplanShow && !isContest" size="small" @click="jumpjl3dtrafficplan">{{ jl3dtrafficplan }}</el-button> <el-button v-if="trafficplanShow && !isContest" size="small" @click="jumpjl3dtrafficplan">{{ jl3dtrafficplan }}</el-button>
<el-button v-if="trafficplanShow && !isContest" size="small" @click="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button>
<!-- 故障设备视图 --> <!-- 故障设备视图 -->
<el-button v-if="jlmap3dFaultShow" size="small" @click="jumpjlmap3dFault">故障设备</el-button> <el-button v-if="jlmap3dFaultShow" size="small" @click="jumpjlmap3dFault">故障设备</el-button>
<!-- 司机视角 --> <!-- 司机视角 -->
@ -23,12 +29,9 @@
<!-- <el-button v-if="isContest" size="small" @click=" fieldTeach">实操教学</el-button> --> <!-- <el-button v-if="isContest" size="small" @click=" fieldTeach">实操教学</el-button> -->
<!-- <el-button v-if="isContest" size="small" @click=" fieldExam">实操测验</el-button> --> <!-- <el-button v-if="isContest" size="small" @click=" fieldExam">实操测验</el-button> -->
<el-button v-if="isContest" size="small" @click="goTheoryQuiz">理论考试</el-button> <el-button v-if="isContest" size="small" @click="goTheoryQuiz">理论考试</el-button>
<el-button v-if="isContest" size="small" @click="contectUs">联系方式</el-button> <el-button v-if="project === 'bjd'" size="small" @click="distribute">权限分发</el-button>
<template v-if="project === 'bjd'"> <el-button v-if="isContest || project === 'bjd'" size="small" @click="messageBoardShow">留言板</el-button>
<el-button v-if="running" size="small" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button> <el-button v-if="isContest || project === 'bjd'" size="small" @click="contectUs">联系方式</el-button>
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
<el-button size="small" @click="distribute">权限分发</el-button>
</template>
</el-button-group> </el-button-group>
</div> </div>
<Jl3d-Device <Jl3d-Device
@ -42,6 +45,7 @@
<scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" /> <scheduling v-if="scheduleLoadShow" ref="scheduling" :group="group" />
<scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" /> <scheduling-view v-if="schedulePreviewShow" ref="schedulingView" :group="group" />
<qr-code ref="qrCode" /> <qr-code ref="qrCode" />
<message-board ref="messageBoard" />
<contect-us ref="contectUs" /> <contect-us ref="contectUs" />
</div> </div>
</template> </template>
@ -55,6 +59,7 @@ import SchedulingView from '@/views/newMap/displayNew/demon/schedulingView';
import { EventBus } from '@/scripts/event-bus'; import { EventBus } from '@/scripts/event-bus';
import DistributeDraft from '@/views/components/limits/distribute'; import DistributeDraft from '@/views/components/limits/distribute';
import QrCode from '@/components/QrCode'; import QrCode from '@/components/QrCode';
import MessageBoard from './demon/messageBoard';
import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs'; import ContectUs from '@/views/newMap/displayNew/dispatherContest/contectUs';
export default { export default {
name:'DemonMenu', name:'DemonMenu',
@ -65,7 +70,8 @@ export default {
SchedulingView, SchedulingView,
DistributeDraft, DistributeDraft,
QrCode, QrCode,
ContectUs ContectUs,
MessageBoard
}, },
props:{ props:{
isAllShow:{ isAllShow:{
@ -217,6 +223,19 @@ export default {
}); });
window.open(routeData.href, '_blank', 'noopener noreferrer'); window.open(routeData.href, '_blank', 'noopener noreferrer');
}, },
jumpjl3dtraffictrain() {
const routeData = this.$router.resolve({
path:'/jlmap3d/traffictrain',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true,
lineCode:this.lineCode
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
},
jumpjlmap3dFault() { jumpjlmap3dFault() {
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path:'/jlmap3d/maintainer', path:'/jlmap3d/maintainer',
@ -281,6 +300,9 @@ export default {
this.$refs.distribute.doShow({PermissionType:'03', mapId: this.$route.query.mapId, prdType: this.$route.query.prdType}); this.$refs.distribute.doShow({PermissionType:'03', mapId: this.$route.query.mapId, prdType: this.$route.query.prdType});
} }
}, },
messageBoardShow() {
this.$refs.messageBoard.doShow();
},
contectUs() { contectUs() {
this.$refs.contectUs.doShow(); this.$refs.contectUs.doShow();
} }

View File

@ -1,20 +1,18 @@
<template> <template>
<div> <div>
<el-dialog v-dialogDrag title="场景列表" :visible.sync="dialogVisible" width="920px" center> <el-dialog v-dialogDrag title="场景列表" :visible.sync="dialogVisible" width="920px" center>
<el-tabs v-model="activeName" type="card" style="height:500px"> <el-tabs v-model="activeName" type="card" style="height:650px">
<!-- style="height: 500px;" --> <!-- style="height: 500px;" -->
<el-tab-pane label="主场景列表" name="first"> <el-tab-pane label="主场景列表" name="first">
<el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="436" stripe :cell-style="{padding: '8px 0'}"> <el-table :data="mainSceneData" border :span-method="objectSpanMethod" height="600" stripe :cell-style="{padding: '8px 0'}">
<el-table-column type="index" width="50" label="序号" /> <el-table-column type="index" width="50" label="序号" />
<el-table-column prop="type" width="200" label="类别" /> <el-table-column prop="type" width="200" label="类别" />
<el-table-column prop="scene" width="350" label="场景" /> <el-table-column prop="scene" width="350" label="场景" />
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.result"> <div v-if="scope.row.result">
<template v-for="(each,index) in scope.row.result"> <template v-for="(each, index) in scope.row.result">
<el-tooltip :key="index" class="item" effect="dark" :content="'场景描述: '+ each.description + '\n' + '处置流程: ' +each.disposalProcesses" popper-class="tooltip-box" placement="top"> <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>
<el-button type="primary" size="small" style="margin-right: 8px;margin-left: 0;margin-bottom: 5px" @click="handleLoad(each)">{{ each.name }}</el-button>
</el-tooltip>
</template> </template>
</div> </div>
</template> </template>
@ -78,8 +76,8 @@ export default {
// {type: '', scene: '', result:[]}, // {type: '', scene: '', result:[]},
{type: '限速', scene: '列车限速', result:[]}, {type: '限速', scene: '列车限速', result:[]},
{type: '轨道故障', scene: '线路故障影响列车运行', result:[]}, {type: '轨道故障', scene: '线路故障影响列车运行', result:[]},
{type: '轨道故障', scene: '计轴故障', result:[]}, {type: '轨道故障', scene: '计轴故障', result:[]}
{type: '在区域控制器故障', scene: '线路故障多车降级', result:[]} // {type: '', scene: '线', result:[]}
] ]
// deputySceneData: [ // deputySceneData: [
// { scene: '' }, // { scene: '' },
@ -113,7 +111,7 @@ export default {
} else if (each.name == '场景10') { } else if (each.name == '场景10') {
this.mainSceneData[7].result.push({id:each.id, name:'场景10', description: each.description, disposalProcesses: each.disposalProcesses}); this.mainSceneData[7].result.push({id:each.id, name:'场景10', description: each.description, disposalProcesses: each.disposalProcesses});
} else if (each.name == '场景12') { } else if (each.name == '场景12') {
this.mainSceneData[10].result.push({id:each.id, name:'场景12', description: each.description, disposalProcesses: each.disposalProcesses}); this.mainSceneData[2].result.push({id:each.id, name:'场景12', description: each.description, disposalProcesses: each.disposalProcesses});
} }
}); });
} }

View File

@ -14,6 +14,7 @@
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button> <el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dpassflow">{{ $t('display.demon.passengerflow') }}</el-button>
<!-- 客流规划视图 --> <!-- 客流规划视图 -->
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dtrafficplan">{{ $t('display.demon.trafficplantext') }}</el-button> <el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dtrafficplan">{{ $t('display.demon.trafficplantext') }}</el-button>
<el-button v-if="isShowScheduling || isStationSupervisor" size="small" @click="jumpjl3dtraffictrain">{{ $t('display.demon.traffictraintext') }}</el-button>
<el-button v-if="(isShowScheduling || isStationSupervisor)&&project !== 'bjd'" size="small" @click="jumpjl3dfaultdevice">{{ $t('display.demon.maintainer') }}</el-button> <el-button v-if="(isShowScheduling || isStationSupervisor)&&project !== 'bjd'" size="small" @click="jumpjl3dfaultdevice">{{ $t('display.demon.maintainer') }}</el-button>
<!-- <el-button v-if="isAdmin" size="small" @click="otherVrView">VR第三人称视角</el-button> --> <!-- <el-button v-if="isAdmin" size="small" @click="otherVrView">VR第三人称视角</el-button> -->
@ -374,17 +375,30 @@ export default {
this.$emit('passflow'); this.$emit('passflow');
}, },
jumpjl3dtrafficplan() { jumpjl3dtrafficplan() {
const routeData = this.$router.resolve({ const routeData = this.$router.resolve({
path:'/jlmap3d/trafficplan', path:'/jlmap3d/trafficplan',
query:{ query:{
mapid:this.mapId, mapid:this.mapId,
group:this.group, group:this.group,
project: this.project, project: this.project,
noPreLogout: true, noPreLogout: true,
lineCode:this.lineCode lineCode:this.lineCode
} }
}); });
window.open(routeData.href, '_blank', 'noopener noreferrer'); window.open(routeData.href, '_blank', 'noopener noreferrer');
},
jumpjl3dtraffictrain() {
const routeData = this.$router.resolve({
path:'/jlmap3d/traffictrain',
query:{
mapid:this.mapId,
group:this.group,
project: this.project,
noPreLogout: true,
lineCode:this.lineCode
}
});
window.open(routeData.href, '_blank', 'noopener noreferrer');
}, },
jumpjl3dfaultdevice() { jumpjl3dfaultdevice() {
this.$emit('faultdevice'); this.$emit('faultdevice');

View File

@ -507,8 +507,8 @@ export default {
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
this.oldPoint = JSON.parse(JSON.stringify(model.points)); this.oldPoint = JSON.parse(JSON.stringify(model.points));
this.oldLeftSectionCode = model.leftSectionCode; this.oldLeftSectionCode = model.leftSectionCode;
this.oldRightSectionCode = model.rightSectionCode; this.oldRightSectionCode = model.rightSectionCode;
this.field = ''; this.field = '';
} else { } else {
this.$message('还有属性未填写,修改未生效!'); this.$message('还有属性未填写,修改未生效!');
} }