Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test11
This commit is contained in:
commit
528fda2c15
@ -130,7 +130,7 @@ export const DeviceMenu = {
|
|||||||
IscsSystem: '108',
|
IscsSystem: '108',
|
||||||
IscsInterface: '109',
|
IscsInterface: '109',
|
||||||
|
|
||||||
planJustArrival: '200',
|
planJustRunning: '200',
|
||||||
planJustDeparture: '201'
|
planJustDeparture: '201'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -170,7 +170,6 @@ export default {
|
|||||||
scriptMode: ScriptMode.TEACH,
|
scriptMode: ScriptMode.TEACH,
|
||||||
mapLocation:{},
|
mapLocation:{},
|
||||||
playerList:[],
|
playerList:[],
|
||||||
actionList:[],
|
|
||||||
currentPlayList:[],
|
currentPlayList:[],
|
||||||
// formatUsedTime:'',
|
// formatUsedTime:'',
|
||||||
formatScore:0,
|
formatScore:0,
|
||||||
@ -454,12 +453,11 @@ export default {
|
|||||||
// this.$refs.menuScript.initLoadPage();
|
// this.$refs.menuScript.initLoadPage();
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
selectScript({playerList, mapLocation, actionList}) {
|
selectScript({playerList, mapLocation}) {
|
||||||
this.changeScriptMode(this.scriptMode);
|
this.changeScriptMode(this.scriptMode);
|
||||||
this.isScriptLoad = true;
|
this.isScriptLoad = true;
|
||||||
this.playerList = playerList;
|
this.playerList = playerList;
|
||||||
this.mapLocation = mapLocation;
|
this.mapLocation = mapLocation;
|
||||||
this.actionList = actionList;
|
|
||||||
this.userRole = 'AUDIENCE';
|
this.userRole = 'AUDIENCE';
|
||||||
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
this.$store.dispatch('training/setRoles', 'AUDIENCE');
|
||||||
},
|
},
|
||||||
@ -474,7 +472,7 @@ export default {
|
|||||||
this.showResultData(data);
|
this.showResultData(data);
|
||||||
},
|
},
|
||||||
showResultData(data) {
|
showResultData(data) {
|
||||||
this.$refs.testResult.doShow({data:data, actionList:this.actionList});
|
this.$refs.testResult.doShow({data:data});
|
||||||
},
|
},
|
||||||
endTraining() {
|
endTraining() {
|
||||||
competitionPracticalSceneFinish(this.group, {operationStatisticVO:{}}).then(res=>{
|
competitionPracticalSceneFinish(this.group, {operationStatisticVO:{}}).then(res=>{
|
||||||
|
@ -120,7 +120,6 @@ export default {
|
|||||||
const playerList = [];
|
const playerList = [];
|
||||||
EventBus.$emit('clearRunSeries');
|
EventBus.$emit('clearRunSeries');
|
||||||
EventBus.$emit('loadScene');
|
EventBus.$emit('loadScene');
|
||||||
const actionList = {};
|
|
||||||
if (res.data.memberList && res.data.memberList.length > 0) {
|
if (res.data.memberList && res.data.memberList.length > 0) {
|
||||||
this.form.type = '';
|
this.form.type = '';
|
||||||
res.data.memberList.sort((a, b) => {
|
res.data.memberList.sort((a, b) => {
|
||||||
@ -129,7 +128,6 @@ export default {
|
|||||||
this.$store.dispatch('training/setMemberList', {memberList:res.data.memberList, userId:this.$store.state.user.id});
|
this.$store.dispatch('training/setMemberList', {memberList:res.data.memberList, userId:this.$store.state.user.id});
|
||||||
const activeMemberList = [];
|
const activeMemberList = [];
|
||||||
res.data.actionList.forEach((activeMember)=>{
|
res.data.actionList.forEach((activeMember)=>{
|
||||||
actionList[activeMember.id] = activeMember;
|
|
||||||
if (!(activeMemberList.length > 0 && activeMemberList.includes(activeMember.memberId))) {
|
if (!(activeMemberList.length > 0 && activeMemberList.includes(activeMember.memberId))) {
|
||||||
activeMemberList.push(activeMember.memberId);
|
activeMemberList.push(activeMember.memberId);
|
||||||
}
|
}
|
||||||
@ -179,14 +177,14 @@ export default {
|
|||||||
if (res.data.mapLocation) {
|
if (res.data.mapLocation) {
|
||||||
this.mapLocation = res.data.mapLocation;
|
this.mapLocation = res.data.mapLocation;
|
||||||
}
|
}
|
||||||
this.confirm(playerList, actionList);
|
this.confirm(playerList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
confirm(playerList, actionList) {
|
confirm(playerList) {
|
||||||
// this.$store.dispatch('training/setScriptOperationType', this.operationType);
|
// this.$store.dispatch('training/setScriptOperationType', this.operationType);
|
||||||
// operationType:ScriptMode[this.operationType]
|
// operationType:ScriptMode[this.operationType]
|
||||||
this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation, actionList:actionList});
|
this.$emit('selectScript', {playerList:playerList, mapLocation:this.mapLocation});
|
||||||
this.doClose();
|
this.doClose();
|
||||||
},
|
},
|
||||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<!-- height="400" -->
|
<!-- height="400" -->
|
||||||
<el-table-column prop="actionId" label="步骤描述" width="230">
|
<el-table-column prop="actionId" label="步骤描述" width="230">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ covert(scope.row.actionId) }}
|
{{ covert(scope.row.actionVO) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="keyWords" label="关键字" width="200">
|
<el-table-column prop="keyWords" label="关键字" width="200">
|
||||||
@ -64,6 +64,11 @@
|
|||||||
<div class="OSTSignInfoTips">
|
<div class="OSTSignInfoTips">
|
||||||
<span class="el-icon-info" style="font-size: 16px;" /> 若竞赛未完成,运营指标不得分
|
<span class="el-icon-info" style="font-size: 16px;" /> 若竞赛未完成,运营指标不得分
|
||||||
</div>
|
</div>
|
||||||
|
<div class="OSTSignInfoTips">停运列车信息</div>
|
||||||
|
<el-table :data="finalStoppedRunningStatistics" border class="OSTTable4">
|
||||||
|
<el-table-column prop="groupNumber" label="车组号" width="400" />
|
||||||
|
<el-table-column prop="finalPointsDeducted" label="扣分" width="430" />
|
||||||
|
</el-table>
|
||||||
<div class="OSTSignInfoTips">晚点列车信息</div>
|
<div class="OSTSignInfoTips">晚点列车信息</div>
|
||||||
<el-table :data="finalLateStatistics" border class="OSTTable1">
|
<el-table :data="finalLateStatistics" border class="OSTTable1">
|
||||||
<el-table-column prop="groupNumber" label="车组号" width="300" />
|
<el-table-column prop="groupNumber" label="车组号" width="300" />
|
||||||
@ -84,11 +89,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="finalPointsDeducted" label="扣分" width="230" />
|
<el-table-column prop="finalPointsDeducted" label="扣分" width="230" />
|
||||||
</el-table>
|
</el-table>
|
||||||
<div class="OSTSignInfoTips">停运列车信息</div>
|
|
||||||
<el-table :data="finalStoppedRunningStatistics" border class="OSTTable4">
|
|
||||||
<el-table-column prop="groupNumber" label="车组号" width="400" />
|
|
||||||
<el-table-column prop="finalPointsDeducted" label="扣分" width="430" />
|
|
||||||
</el-table>
|
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doClose">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doClose">{{ $t('global.confirm') }}</el-button>
|
||||||
@ -110,7 +110,7 @@ export default {
|
|||||||
completed:false, // 竞赛是否已完成
|
completed:false, // 竞赛是否已完成
|
||||||
fullScore:'', // 总分
|
fullScore:'', // 总分
|
||||||
userScore:'', // 用户得分
|
userScore:'', // 用户得分
|
||||||
actionList:[], // 动作列表
|
// actionList:[], // 动作列表
|
||||||
fullScoreOfCommand:0, // 指令发布部分总分
|
fullScoreOfCommand:0, // 指令发布部分总分
|
||||||
userScoreOfCommand:0, // 关键步骤部分用户得分
|
userScoreOfCommand:0, // 关键步骤部分用户得分
|
||||||
fullScoreOfOperationStatistic:0, // 运营统计满分
|
fullScoreOfOperationStatistic:0, // 运营统计满分
|
||||||
@ -120,7 +120,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
doShow({data, actionList}) {
|
doShow({data}) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.completed = data.completed;
|
this.completed = data.completed;
|
||||||
this.operationStaticItemVOs = data.operationStatisticVO.itemVOS;
|
this.operationStaticItemVOs = data.operationStatisticVO.itemVOS;
|
||||||
@ -128,7 +128,7 @@ export default {
|
|||||||
this.finalStopInSectionStatistics = data.operationIndexStatisticVO.finalStopInSectionStatistics;
|
this.finalStopInSectionStatistics = data.operationIndexStatisticVO.finalStopInSectionStatistics;
|
||||||
this.finalStoppedRunningStatistics = data.operationIndexStatisticVO.finalStoppedRunningStatistics;
|
this.finalStoppedRunningStatistics = data.operationIndexStatisticVO.finalStoppedRunningStatistics;
|
||||||
this.commandPublishStatisticVO = data.commandPublishStatisticVO;
|
this.commandPublishStatisticVO = data.commandPublishStatisticVO;
|
||||||
this.actionList = actionList;
|
// this.actionList = actionList;
|
||||||
this.fullScore = data.fullScore;
|
this.fullScore = data.fullScore;
|
||||||
this.userScore = data.userScore;
|
this.userScore = data.userScore;
|
||||||
this.fullScoreOfCommand = data.fullScoreOfCommand;
|
this.fullScoreOfCommand = data.fullScoreOfCommand;
|
||||||
@ -142,12 +142,9 @@ export default {
|
|||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
},
|
},
|
||||||
covertTime(time) {
|
covertTime(time) {
|
||||||
return time.slice(0, time.length - 3);
|
return time ? time.slice(0, time.length - 3) : '';
|
||||||
},
|
},
|
||||||
covert(actionId) {
|
covert(element) {
|
||||||
// return actionId;
|
|
||||||
const element = this.actionList[actionId];
|
|
||||||
// this.$store.state.training.memberData[memberId]
|
|
||||||
const member = this.$store.state.training.memberData[element.memberId];
|
const member = this.$store.state.training.memberData[element.memberId];
|
||||||
let resultData = '';
|
let resultData = '';
|
||||||
if (element.type == 'Accept_Conversation_Invitation') {
|
if (element.type == 'Accept_Conversation_Invitation') {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-dialog v-dialogDrag append-to-body title="Modify run time" :visible.sync="dialogShow" width="30%" :close-on-click-modal="false" :before-close="doClose">
|
<el-dialog v-dialogDrag append-to-body title="Modify run time" :visible.sync="dialogShow" width="30%" :close-on-click-modal="false" :before-close="doClose">
|
||||||
<el-form ref="form" label-width="160px" :model="formModel" :rules="rules">
|
<el-form ref="form" label-width="160px" :model="formModel" :rules="rules">
|
||||||
<el-form-item label="Running time" prop="time">
|
<el-form-item label="Running time" prop="time">
|
||||||
<el-input-number v-model="formModel.time" controls-position="right" :min="0" :max="3600"/>
|
<el-input-number v-model="formModel.time" controls-position="right" :min="0" />
|
||||||
<span style="padding-left: 10px">s</span>
|
<span style="padding-left: 10px">s</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -23,22 +23,53 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
stations: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
var validator = (rule, value, callback) => {
|
||||||
|
const stations = this.stations;
|
||||||
|
const offset = Math.abs(
|
||||||
|
this.stations[this.selected.dataIndex].kmRange -
|
||||||
|
this.stations[this.selected.dataIndex+1].kmRange
|
||||||
|
)
|
||||||
|
const min = Math.floor(offset / 19.4);
|
||||||
|
const max = Math.floor(offset / 8.3);
|
||||||
|
|
||||||
|
if (value < min) {
|
||||||
|
callback(new Error('Below minimum run time.'));
|
||||||
|
} else if (value > max) {
|
||||||
|
callback(new Error('Run time above maximum.'));
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
time: 0,
|
time: 0,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
time: { required: true, message: 'Please select the arrival time.', trigger: 'change' },
|
time: [
|
||||||
|
{
|
||||||
|
type: 'number', min: 0, message: 'Please select the arrival time.', trigger: 'blur'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: validator, trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.menuOperation.menuCount': function (val) {
|
'$store.state.menuOperation.menuCount': function (val) {
|
||||||
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.planJustArrival)) {
|
if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.planJustRunning)) {
|
||||||
this.doShow(this.$store.state.menuOperation.menuPosition);
|
this.doShow(this.$store.state.menuOperation.menuPosition);
|
||||||
} else {
|
} else {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
@ -57,8 +88,10 @@ export default {
|
|||||||
},
|
},
|
||||||
doConfirm() {
|
doConfirm() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
this.$emit('justRunning', this.formModel.time);
|
if(valid) {
|
||||||
this.doClose();
|
this.$emit('justRunning', this.formModel.time);
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-dialog v-dialogDrag append-to-body title="Modify stop time" :visible.sync="dialogShow" width="30%" :close-on-click-modal="false" :before-close="doClose">
|
<el-dialog v-dialogDrag append-to-body title="Modify stop time" :visible.sync="dialogShow" width="30%" :close-on-click-modal="false" :before-close="doClose">
|
||||||
<el-form ref="form" label-width="160px" :model="formModel" :rules="rules">
|
<el-form ref="form" label-width="160px" :model="formModel" :rules="rules">
|
||||||
<el-form-item label="Stop time" prop="time">
|
<el-form-item label="Stop time" prop="time">
|
||||||
<el-input-number v-model="formModel.time" controls-position="right" :min="0" :max="3600"/>
|
<el-input-number v-model="formModel.time" controls-position="right" :min="0" :max="12*3600" />
|
||||||
<span style="padding-left: 10px">s</span>
|
<span style="padding-left: 10px">s</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -23,16 +23,37 @@ export default {
|
|||||||
default() {
|
default() {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
stations: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
var validator = (rule, value, callback) => {
|
||||||
|
if (value > 0 && value <= 15) {
|
||||||
|
callback(new Error('Stop time cannot be within 0-15 seconds.'));
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
time: 0
|
time: 0
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
time: { required: true, message: 'Please select the stop time.', trigger: 'change' },
|
time: [
|
||||||
|
{
|
||||||
|
type: 'number', min: 0, max: 12*3600, message: 'Please select the stop time.', trigger: 'blur'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: validator, trigger: 'blur'
|
||||||
|
}
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -57,8 +78,10 @@ export default {
|
|||||||
},
|
},
|
||||||
doConfirm() {
|
doConfirm() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
this.$emit('justStop', this.formModel.time);
|
if(valid) {
|
||||||
this.doClose();
|
this.$emit('justStop', this.formModel.time);
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,12 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
document.title = '运行图编辑工具'
|
||||||
|
this.PlanConvert = this.$theme.loadPlanConvert(this.lineCode);
|
||||||
|
// const project = getSessionStorage('project');
|
||||||
|
// if (project) {
|
||||||
|
// document.querySelector("link[rel*='icon']").href =;
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
setPosition() {
|
setPosition() {
|
||||||
|
@ -75,10 +75,11 @@ export default {
|
|||||||
if (this.myChart) {
|
if (this.myChart) {
|
||||||
const zr = this.myChart.getZr();
|
const zr = this.myChart.getZr();
|
||||||
|
|
||||||
zr.on('click', this.onClick, this)
|
zr.on('mousedown', this.onZrMouseDown, this);
|
||||||
|
zr.on('mouseup', this.onZrMouseUp, this);
|
||||||
this.myChart.on('mousedown', this.onMouseDown);
|
this.myChart.on('mousedown', this.onMouseDown);
|
||||||
this.myChart.on('mouseover', this.onMouseOver);
|
this.myChart.on('mouseover', this.onMouseOver);
|
||||||
this.myChart.on('mouseout', this.onMouseOver);
|
this.myChart.on('mouseout', this.onMouseOut);
|
||||||
this.myChart.on('mouseup', this.onMouseUP);
|
this.myChart.on('mouseup', this.onMouseUP);
|
||||||
this.myChart.on('datazoom', this.onUpdatePosition);
|
this.myChart.on('datazoom', this.onUpdatePosition);
|
||||||
window.addEventListener('resize', this.onUpdatePosition);
|
window.addEventListener('resize', this.onUpdatePosition);
|
||||||
@ -88,10 +89,11 @@ export default {
|
|||||||
if (this.myChart) {
|
if (this.myChart) {
|
||||||
const zr = this.myChart.getZr();
|
const zr = this.myChart.getZr();
|
||||||
|
|
||||||
zr.off('click', this.onClick);
|
zr.off('mousedown', this.onZrMouseDown);
|
||||||
|
zr.off('mouseup', this.onZrMouseUp, this);
|
||||||
this.myChart.off('mousedown', this.onMouseDown);
|
this.myChart.off('mousedown', this.onMouseDown);
|
||||||
this.myChart.off('mouseover', this.onMouseOver);
|
this.myChart.off('mouseover', this.onMouseOver);
|
||||||
this.myChart.off('mouseout', this.onMouseOver);
|
this.myChart.off('mouseout', this.onMouseOut);
|
||||||
this.myChart.off('mouseup', this.onMouseUP);
|
this.myChart.off('mouseup', this.onMouseUP);
|
||||||
this.myChart.off('datazoom', this.onUpdatePosition);
|
this.myChart.off('datazoom', this.onUpdatePosition);
|
||||||
window.removeEventListener('resize', this.onUpdatePosition);
|
window.removeEventListener('resize', this.onUpdatePosition);
|
||||||
@ -106,13 +108,23 @@ export default {
|
|||||||
})
|
})
|
||||||
this.myChart.setOption({graphic});
|
this.myChart.setOption({graphic});
|
||||||
},
|
},
|
||||||
onClick(e) {
|
onZrMouseDown(e) {
|
||||||
switch(this.action) {
|
switch(this.action) {
|
||||||
case 'Add':
|
case 'Add':
|
||||||
this.pixelExecCb(e, this.handleCreateMark);
|
this.pixelExecCb(e, this.handleCreateMark);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onZrMouseUp(e) {
|
||||||
|
switch(this.action) {
|
||||||
|
case 'Translate':
|
||||||
|
if (this.dragging) {
|
||||||
|
this.dragging = false;
|
||||||
|
this.handleTranslate(this.createModel)
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
},
|
||||||
onMouseDown(e) {
|
onMouseDown(e) {
|
||||||
switch(this.action) {
|
switch(this.action) {
|
||||||
case 'Edit':
|
case 'Edit':
|
||||||
@ -122,28 +134,48 @@ export default {
|
|||||||
},
|
},
|
||||||
onMouseOver(e) {
|
onMouseOver(e) {
|
||||||
this.pixelExecCb(e, this.handleSelectLine);
|
this.pixelExecCb(e, this.handleSelectLine);
|
||||||
|
if (this.action == 'Translate') {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.onShapeMouseOver(e);
|
||||||
|
}, 200);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onMouseOut(e) {
|
||||||
|
this.pixelExecCb(e, this.handleSelectLine);
|
||||||
|
if (this.action == 'Translate') {
|
||||||
|
this.onShapeMouseOver(e);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onMouseUP(e) {
|
onMouseUP(e) {
|
||||||
switch(this.action) {
|
// switch(this.action) {
|
||||||
case 'Translate':
|
// case 'Translate':
|
||||||
if (this.dragging) {
|
// if (this.dragging) {
|
||||||
this.dragging = false;
|
// this.dragging = false;
|
||||||
this.handleTranslate(this.createModel)
|
// this.handleTranslate(this.createModel)
|
||||||
}
|
// }
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
onShapePointDragging(e) {
|
onShapePointDragging(e) {
|
||||||
if (this.selected) {
|
if (this.selected) {
|
||||||
this.dragging = true;
|
this.dragging = true;
|
||||||
|
this.pixelExecCb(e, this.handleDragging);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShapeMouseOver() {
|
||||||
|
if (this.selected) {
|
||||||
this.myChart.dispatchAction({
|
this.myChart.dispatchAction({
|
||||||
type: 'showTip',
|
type: 'showTip',
|
||||||
seriesIndex: this.selected.seriesIndex,
|
seriesIndex: this.selected.seriesIndex,
|
||||||
dataIndex: this.selected.dataIndex
|
dataIndex: this.selected.dataIndex
|
||||||
});
|
});
|
||||||
|
}
|
||||||
this.pixelExecCb(e, this.handleDragging);
|
},
|
||||||
|
onShapeMouseOut() {
|
||||||
|
if (this.selected) {
|
||||||
|
this.myChart.dispatchAction({
|
||||||
|
type: 'hideTip',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setLineLight() {
|
setLineLight() {
|
||||||
@ -193,11 +225,11 @@ export default {
|
|||||||
cy: 0,
|
cy: 0,
|
||||||
r: 10
|
r: 10
|
||||||
},
|
},
|
||||||
style: {
|
invisible: true,
|
||||||
fill: 'rgba(0,0,0,0.0)'
|
|
||||||
},
|
|
||||||
draggable: 'horizontal',
|
draggable: 'horizontal',
|
||||||
ondrag: echarts.util.curry(this.onShapePointDragging),
|
ondrag: echarts.util.curry(this.onShapePointDragging),
|
||||||
|
onmouseover: echarts.util.curry(this.onShapeMouseOver),
|
||||||
|
onmouseout: echarts.util.curry(this.onShapeMouseOut),
|
||||||
z: 100
|
z: 100
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -246,12 +278,10 @@ export default {
|
|||||||
time: 0
|
time: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.dataIndex == length - 1 ||
|
if (e.dataIndex < length - 1 && value[2] == nxt[2]) {
|
||||||
e.dataIndex < length - 1 && value[1] == nxt[1]) {
|
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: DeviceMenu.planJustDeparture });
|
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: DeviceMenu.planJustDeparture });
|
||||||
} else if (e.dataIndex == 0 ||
|
} else if (e.dataIndex == 0 || e.dataIndex > 0 && value[1] == pre[1]) {
|
||||||
e.dataIndex > 0 && value[1] == pre[1]) {
|
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: DeviceMenu.planJustRunning });
|
||||||
this.$store.dispatch('menuOperation/setPopMenu', { position: point, menu: DeviceMenu.planJustArrival });
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -301,6 +331,12 @@ export default {
|
|||||||
option.graphic[0].elements = filters;
|
option.graphic[0].elements = filters;
|
||||||
|
|
||||||
this.myChart.setOption(option, {notMerge: true});
|
this.myChart.setOption(option, {notMerge: true});
|
||||||
|
|
||||||
|
this.myChart.dispatchAction({
|
||||||
|
type: 'showTip',
|
||||||
|
seriesIndex: this.selected.seriesIndex,
|
||||||
|
dataIndex: this.selected.dataIndex
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleCreateMark({pointInPixel, yObj, xVal}) {
|
handleCreateMark({pointInPixel, yObj, xVal}) {
|
||||||
const myChart = this.myChart;
|
const myChart = this.myChart;
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div :id="runPlanId" />
|
<div :id="runPlanId" />
|
||||||
</el-card>
|
</el-card>
|
||||||
<plan-just-running :selected="selected" @justRunning="handleJustRunning" />
|
<plan-just-running :selected="selected" :stations="stations" @justRunning="handleJustRunning" />
|
||||||
<plan-just-stop :selected="selected" @justStop="handleJustStop"/>
|
<plan-just-stop :selected="selected" :stations="stations" @justStop="handleJustStop"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user