Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
4f0f85c60c
@ -1,13 +1,15 @@
|
||||
<template>
|
||||
<div class="chatBox" :class="{'active': drawer}" :style="{'bottom':bottom+'px'}">
|
||||
<div class="menuTrainListBtn" @click="clickBtn">
|
||||
<div v-if="userRole == 'DISPATCHER'" id="teleName">
|
||||
<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>
|
||||
<div v-if="userRole != 'AUDIENCE' && userRole != 'DISPATCHER'" id="teleName">
|
||||
<div v-if="userRole != 'AUDIENCE' && userRole != 'DISPATCHER'">
|
||||
<div id="teleName" />
|
||||
<p style="margin: 0;">电</p>
|
||||
<p style="margin: 0;">话</p>
|
||||
</div>
|
||||
@ -798,6 +800,9 @@ export default {
|
||||
this.quitLoading = true;
|
||||
this.userString = '';
|
||||
overSimulationConversition(this.group, this.conversitionId).then(resp => {
|
||||
if (this.recordSending) {
|
||||
this.cancleRecording();
|
||||
}
|
||||
this.connectSuccess = false;
|
||||
this.conversitionMemberList = [];
|
||||
this.messageList = [];
|
||||
@ -1229,6 +1234,17 @@ export default {
|
||||
-webkit-animation: isInviting infinite 1s; /* Safari 和 Chrome */
|
||||
-o-animation: isInviting infinite 1s; /* Opera */
|
||||
}
|
||||
#teleName{
|
||||
background: #6BBE16;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
border-radius: 0px 5px 5px 0px;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
.isInviting::before{
|
||||
|
@ -106,33 +106,23 @@ export default {
|
||||
},
|
||||
onZrMouseOver(e) {
|
||||
this.pixelExecCb(e, args => {
|
||||
if (this.model.choice == 'Plan') {
|
||||
this.doSetSelected(args);
|
||||
}
|
||||
|
||||
if (this.model.choice == 'Construction') {
|
||||
if (this.model.action == 'Translate') {
|
||||
this.doSetTarget(args);
|
||||
if (this.model.action == 'Translate') {
|
||||
this.doSetAreaTranslate(args);
|
||||
} else if (this.model.action == 'Edit') {
|
||||
this.doSetTarget(args);
|
||||
this.doSetAreaHorns(args);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onZrMouseDown(e) {
|
||||
this.dragging = false;
|
||||
this.pixelExecCb(e, args => {
|
||||
if (this.model.choice == 'Plan') {
|
||||
if (this.model.action == 'Add') {
|
||||
this.doCreateMark(args);
|
||||
} else if (this.model.action == 'Translate') {
|
||||
this.doSetSelected(args);
|
||||
this.doCreateDrag(args);
|
||||
} else if (this.model.action == 'Edit') {
|
||||
this.doSetSelected(args);
|
||||
}
|
||||
|
||||
} else if (this.model.choice == 'Construction') {
|
||||
if (this.model.action == 'Add') {
|
||||
this.doCreateArea(args);
|
||||
@ -153,8 +143,6 @@ export default {
|
||||
},
|
||||
onZrMouseUp(e) {
|
||||
this.pixelExecCb(e, args => {
|
||||
if (this.dragging) {
|
||||
this.dragging = false;
|
||||
if(this.model.choice == 'Plan') {
|
||||
if (this.model.action == 'Translate') {
|
||||
this.doTranslate(args);
|
||||
@ -166,7 +154,6 @@ export default {
|
||||
this.doTranslate(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onZrMouseOut(e) {
|
||||
@ -174,7 +161,10 @@ export default {
|
||||
onMouseOver(e) {
|
||||
this.pixelExecCb(e, args => {
|
||||
if (this.model.choice == 'Plan') {
|
||||
this.doSetSelected(args);
|
||||
if (this.model.action == 'Translate') {
|
||||
this.doSetDrag(args);
|
||||
this.doCreateDrag(args);
|
||||
setTimeout(_ => { this.onShapeMouseOver(e); }, 200);
|
||||
}
|
||||
}
|
||||
@ -183,6 +173,7 @@ export default {
|
||||
onMouseDown(e) {
|
||||
this.pixelExecCb(e, args => {
|
||||
if (this.model.choice == 'Plan') {
|
||||
this.doSetSelected(args);
|
||||
if (this.model.action == 'Edit') {
|
||||
this.doPopDialog(args);
|
||||
}
|
||||
@ -196,7 +187,7 @@ export default {
|
||||
if (this.model.choice == 'Plan') {
|
||||
this.doSetSelected(args);
|
||||
if (this.model.action == 'Translate') {
|
||||
this.doCreateDrag(args)
|
||||
this.doCreateDrag(args);
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -218,7 +209,9 @@ export default {
|
||||
this.doSeriesDragging(args);
|
||||
}
|
||||
}
|
||||
} else if (this.target) {
|
||||
}
|
||||
|
||||
if (this.target) {
|
||||
if (this.model.choice == 'Construction') {
|
||||
if (this.model.action == 'Translate') {
|
||||
this.doAreaDragging(args);
|
||||
@ -254,6 +247,17 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
doClearDrag({e}) {
|
||||
if (this.selected &&
|
||||
e.componentType == "series" &&
|
||||
e.componentSubType == "line" &&
|
||||
e.seriesName.includes('service')) {
|
||||
const option = this.myChart.getOption();
|
||||
const filters = option.graphic[0].elements.filter(el => { return el.subType != 'drag'});
|
||||
option.graphic[0].elements = filters;
|
||||
this.myChart.setOption(option, {notMerge: true});
|
||||
}
|
||||
},
|
||||
doCreateMark({e, pointInGrid, pointInPixel, yObj}) {
|
||||
const option = this.myChart.getOption();
|
||||
const graphic = option.graphic;
|
||||
@ -322,7 +326,8 @@ export default {
|
||||
_y: pointInGrid[1]
|
||||
})
|
||||
|
||||
if (this.target && this.target.name != e.target.name) {
|
||||
if (this.target &&
|
||||
this.target.model.areaNo != e.target.model.areaNo) {
|
||||
this.setTargetReset();
|
||||
}
|
||||
|
||||
@ -467,6 +472,7 @@ export default {
|
||||
|
||||
const option = this.myChart.getOption();
|
||||
const model = option.series[this.selected.seriesIndex]
|
||||
|
||||
model.data.forEach(el => {
|
||||
if (el instanceof Array) {
|
||||
el[0] += this.selected.dx;
|
||||
@ -586,23 +592,10 @@ export default {
|
||||
}
|
||||
},
|
||||
doTranslate({e}) {
|
||||
if (this.dragging) {
|
||||
this.dragging = false;
|
||||
this.$emit('translate');
|
||||
},
|
||||
calcHornList(elemList, graph) {
|
||||
const p = graph.position;
|
||||
const w = graph.shape.width;
|
||||
const h = graph.shape.height;
|
||||
const point1 = [p[0], p[1]];
|
||||
const point2 = [p[0]+w, p[1]];
|
||||
const point3 = [p[0]+w, p[1]+h];
|
||||
const point4 = [p[0], p[1]+h];
|
||||
|
||||
elemList.push(utils.buildHornDataObj(point1, this.myChart.convertFromPixel('grid', point1), this, 'horn-1'));
|
||||
elemList.push(utils.buildHornDataObj(point2, this.myChart.convertFromPixel('grid', point2), this, 'horn-2'));
|
||||
elemList.push(utils.buildHornDataObj(point3, this.myChart.convertFromPixel('grid', point3), this, 'horn-3'));
|
||||
elemList.push(utils.buildHornDataObj(point4, this.myChart.convertFromPixel('grid', point4), this, 'horn-4'));
|
||||
|
||||
return elemList;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as utils from './utils'
|
||||
import echarts from 'echarts';
|
||||
import Monitor from './monitor.js';
|
||||
import { timeFormat } from '@/utils/date';
|
||||
@ -264,17 +265,20 @@ export default {
|
||||
this.pushModels(option.series, this.planUtil.parseDataToSeries(this.myChart, planData, this.stations));
|
||||
this.pushModels(option.graphic[0].elements, this.planUtil.parseDataToGraph(this.myChart, planData, this.stations));
|
||||
if (this.model.choice == 'Construction') {
|
||||
const target = this.target;
|
||||
const elemList = option.graphic[0].elements.filter(el => { return el.subType == 'area'});
|
||||
elemList.forEach(el => {
|
||||
el.draggable = false;
|
||||
el.ondrag = echarts.util.curry(this.onShapeDragging);
|
||||
if (this.model.action == 'Translate' && this.target) {
|
||||
el.draggable = this.target && this.target.areaNo == el.model.areaNo;
|
||||
if (this.model.action == 'Translate' &&
|
||||
target &&
|
||||
target.model.areaNo == el.model.areaNo) {
|
||||
el.draggable = true;
|
||||
}
|
||||
})
|
||||
|
||||
if (this.model.action == 'Edit' && this.target) {
|
||||
const model = this.target.model;
|
||||
if (this.model.action == 'Edit' && target) {
|
||||
const model = target.model;
|
||||
const elemList = option.graphic[0].elements.filter(el => { return !['drag'].includes(el.subType) });
|
||||
const graph = option.graphic[0].elements.find(el => { return ['area'].includes(el.subType) && el.model.areaNo == model.areaNo; });
|
||||
option.graphic[0].elements = this.calcHornList(elemList, graph);
|
||||
@ -390,7 +394,9 @@ export default {
|
||||
const option = this.myChart.getOption();
|
||||
const model = this.target.model;
|
||||
const graph = option.graphic[0].elements.find(el => { return ['area'].includes(el.subType) && el.model.areaNo == model.areaNo; });
|
||||
if (graph) {
|
||||
graph.style.fill = 'rgb(255,0,0, 0.6)';
|
||||
}
|
||||
this.myChart.setOption({graphic: option.graphic});
|
||||
}
|
||||
},
|
||||
@ -399,7 +405,9 @@ export default {
|
||||
const option = this.myChart.getOption();
|
||||
const model = this.target.model;
|
||||
const graph = option.graphic[0].elements.find(el => { return ['area'].includes(el.subType) && el.model.areaNo == model.areaNo; });
|
||||
if (graph) {
|
||||
graph.style.fill = 'rgb(255,0,0, 0.3)';
|
||||
}
|
||||
this.myChart.setOption({graphic: option.graphic});
|
||||
}
|
||||
},
|
||||
@ -427,6 +435,22 @@ export default {
|
||||
const elements = option.graphic[0].elements;
|
||||
option.graphic[0].elements = elements.filter(el => { return !labels.includes(el.subType)});
|
||||
this.myChart.setOption(option, {notMerge: true});
|
||||
},
|
||||
calcHornList(elemList, graph) {
|
||||
const p = graph.position;
|
||||
const w = graph.shape.width;
|
||||
const h = graph.shape.height;
|
||||
const point1 = [p[0], p[1]];
|
||||
const point2 = [p[0]+w, p[1]];
|
||||
const point3 = [p[0]+w, p[1]+h];
|
||||
const point4 = [p[0], p[1]+h];
|
||||
|
||||
elemList.push(utils.buildHornDataObj(point1, this.myChart.convertFromPixel('grid', point1), this, 'horn-1'));
|
||||
elemList.push(utils.buildHornDataObj(point2, this.myChart.convertFromPixel('grid', point2), this, 'horn-2'));
|
||||
elemList.push(utils.buildHornDataObj(point3, this.myChart.convertFromPixel('grid', point3), this, 'horn-3'));
|
||||
elemList.push(utils.buildHornDataObj(point4, this.myChart.convertFromPixel('grid', point4), this, 'horn-4'));
|
||||
|
||||
return elemList;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -20,15 +20,13 @@ export function buildHornDataObj(position, point, that, name='') {
|
||||
shape: {
|
||||
cx: 0,
|
||||
cy: 0,
|
||||
r: 8
|
||||
r: 6
|
||||
},
|
||||
style: {
|
||||
fill: 'rgba(0,0,0,0.3)'
|
||||
},
|
||||
draggable: 'true',
|
||||
onmouseover: echarts.util.curry(that.onShapeMouseOver),
|
||||
ondrag: echarts.util.curry(that.onShapeDragging),
|
||||
onmouseout: echarts.util.curry(that.onShapeMouseOut),
|
||||
z: 100
|
||||
}
|
||||
}
|
||||
|
@ -187,7 +187,17 @@ export default {
|
||||
this.quickChangeMember = {list:quickChangeMember};
|
||||
const memberdata = this.quickChangeMember.list.find(mem=>{ return mem.id == newRole.id; });
|
||||
if (!memberdata) {
|
||||
newRole.userId = this.$store.state.user.id; this.quickChangeMember.list.push(newRole);
|
||||
newRole.userId = this.$store.state.user.id;
|
||||
const roleTypeEnumMap = {
|
||||
'STATION_SUPERVISOR':'行值',
|
||||
'DISPATCHER':'行调',
|
||||
'DRIVER':'司机',
|
||||
'MAINTAINER':'通号',
|
||||
'DEPOT_DISPATCHER':'车辆段调度',
|
||||
'PARENT_DEPARTMENT':'上级部门'
|
||||
};
|
||||
newRole.type = roleTypeEnumMap[newRole.type];
|
||||
this.quickChangeMember.list.push(newRole);
|
||||
}
|
||||
},
|
||||
addMember() {
|
||||
|
Loading…
Reference in New Issue
Block a user