代码调整
This commit is contained in:
parent
68a7171495
commit
2554ed1135
@ -1,179 +1,182 @@
|
|||||||
export default {
|
export default {
|
||||||
startBtn: 'Start',
|
startBtn: 'Start',
|
||||||
endBtn: 'End',
|
endBtn: 'End',
|
||||||
backBtn: 'Back',
|
backBtn: 'Back',
|
||||||
seconds: 'seconds',
|
seconds: 'seconds',
|
||||||
lesson: {
|
lesson: {
|
||||||
teachingMode: 'Teaching Mode',
|
teachingMode: 'Teaching Mode',
|
||||||
practiceMode: 'Practice Mode',
|
practiceMode: 'Practice Mode',
|
||||||
testMode: 'Test Mode',
|
testMode: 'Test Mode',
|
||||||
score: 'Score: ',
|
score: 'Score: ',
|
||||||
selectTraining: 'Please select training',
|
selectTraining: 'Please select training',
|
||||||
endTrainingError: 'Ending training error',
|
endTrainingError: 'Ending training error',
|
||||||
endTrainingTip: 'The operation is not completed, confirm the end?',
|
endTrainingTip: 'The operation is not completed, confirm the end?',
|
||||||
startTrainingTip: 'Please start training',
|
startTrainingTip: 'Please start training',
|
||||||
createSimulationError: 'create simulation error'
|
createSimulationError: 'create simulation error',
|
||||||
},
|
coursePracticeList: 'Course practice list',
|
||||||
exam: {
|
unfold: 'Unfold',
|
||||||
startTestOperateTip: 'Please click to start the exam',
|
fold: 'fold'
|
||||||
selectTest: 'Please select a question',
|
},
|
||||||
endTrainingError: 'Ending training error',
|
exam: {
|
||||||
startTestTip: 'Please start the exam first',
|
startTestOperateTip: 'Please click to start the exam',
|
||||||
endTestTip: 'Do you give up this exam? ',
|
selectTest: 'Please select a question',
|
||||||
refreshListError: 'Refresh List Error',
|
endTrainingError: 'Ending training error',
|
||||||
examTime: 'Exam timing: ',
|
startTestTip: 'Please start the exam first',
|
||||||
questionTitle: 'Question title: ',
|
endTestTip: 'Do you give up this exam? ',
|
||||||
bestTime: 'Best time: ',
|
refreshListError: 'Refresh List Error',
|
||||||
maximumTime: 'Maximum time: ',
|
examTime: 'Exam timing: ',
|
||||||
trainingInstructions: 'Training instructions: ',
|
questionTitle: 'Question title: ',
|
||||||
viewQuestions: 'View questions',
|
bestTime: 'Best time: ',
|
||||||
prev: 'prev',
|
maximumTime: 'Maximum time: ',
|
||||||
next: 'next',
|
trainingInstructions: 'Training instructions: ',
|
||||||
submitExaminationPaper: 'Submit Exam',
|
viewQuestions: 'View questions',
|
||||||
autoSubmit: 'Automatic submission at the end of the exam',
|
prev: 'prev',
|
||||||
getTestInformation: 'Failed to get test information',
|
next: 'next',
|
||||||
cancleExam: 'The exam is not completed,confirm to exit?'
|
submitExaminationPaper: 'Submit Exam',
|
||||||
},
|
autoSubmit: 'Automatic submission at the end of the exam',
|
||||||
training: {
|
getTestInformation: 'Failed to get test information',
|
||||||
trainingName: 'Training name: ',
|
cancleExam: 'The exam is not completed,confirm to exit?'
|
||||||
bestTime: 'Best time: ',
|
},
|
||||||
maximumTime: 'Maximum time: ',
|
training: {
|
||||||
trainingInstructions: 'Training instructions: ',
|
trainingName: 'Training name: ',
|
||||||
getCourseInformationFail: 'Failed to get course information'
|
bestTime: 'Best time: ',
|
||||||
},
|
maximumTime: 'Maximum time: ',
|
||||||
demon: {
|
trainingInstructions: 'Training instructions: ',
|
||||||
trialTime: 'Trial time: ',
|
getCourseInformationFail: 'Failed to get course information'
|
||||||
dispatchingPlan: 'Schedule Plan',
|
},
|
||||||
exitScript: 'Exit Script',
|
demon: {
|
||||||
drivingByPlan: 'Driving By Plan',
|
trialTime: 'Trial time: ',
|
||||||
exitPlan: 'Exit Plan',
|
dispatchingPlan: 'Schedule Plan',
|
||||||
back: 'Back',
|
exitScript: 'Exit Script',
|
||||||
threeDimensionalView: 'Three-Dimensional View',
|
drivingByPlan: 'Driving By Plan',
|
||||||
deviceView: 'DeviceView',
|
exitPlan: 'Exit Plan',
|
||||||
taskOperateSuccess: 'Task Operate success',
|
back: 'Back',
|
||||||
getTimeFail: 'Failed to get time',
|
threeDimensionalView: 'Three-Dimensional View',
|
||||||
startSimulationFail: 'Start simulation failed, please go back and try again',
|
deviceView: 'DeviceView',
|
||||||
endSimulationFail: 'End simulation failed, please go back',
|
taskOperateSuccess: 'Task Operate success',
|
||||||
exitTaskFail: 'Failed to Exit task',
|
getTimeFail: 'Failed to get time',
|
||||||
driverPerspective: 'Driver Perspective'
|
startSimulationFail: 'Start simulation failed, please go back and try again',
|
||||||
},
|
endSimulationFail: 'End simulation failed, please go back',
|
||||||
systemTime: {
|
exitTaskFail: 'Failed to Exit task',
|
||||||
timePause: 'Pausing'
|
driverPerspective: 'Driver Perspective'
|
||||||
},
|
},
|
||||||
screen: {
|
systemTime: {
|
||||||
trialTime: 'Trial time: ',
|
timePause: 'Pausing'
|
||||||
getTimeFail: 'Failed to get time'
|
},
|
||||||
},
|
screen: {
|
||||||
replay: {
|
trialTime: 'Trial time: ',
|
||||||
pleaseSelect: 'Please select',
|
getTimeFail: 'Failed to get time'
|
||||||
back: 'Back',
|
},
|
||||||
pause: 'Pause',
|
replay: {
|
||||||
play: 'Play'
|
pleaseSelect: 'Please select',
|
||||||
},
|
back: 'Back',
|
||||||
plan: {
|
pause: 'Pause',
|
||||||
drivingByPlan: 'Driving By Plan',
|
play: 'Play'
|
||||||
exitPlan: 'Exit Plan',
|
},
|
||||||
back: 'Back',
|
plan: {
|
||||||
startPlanFail: 'Start planning failed, please go back and try again',
|
drivingByPlan: 'Driving By Plan',
|
||||||
endPlanFail: 'End plan failed, please go back'
|
exitPlan: 'Exit Plan',
|
||||||
},
|
back: 'Back',
|
||||||
schema: {
|
startPlanFail: 'Start planning failed, please go back and try again',
|
||||||
selectProduct: 'Please select product type',
|
endPlanFail: 'End plan failed, please go back'
|
||||||
loadScript: 'Load Script',
|
},
|
||||||
selectRoles: 'Select Roles',
|
schema: {
|
||||||
previewRunDiagram: 'Preview Run Diagram',
|
selectProduct: 'Please select product type',
|
||||||
loadRunDiagram: 'Load Run Diagram',
|
loadScript: 'Load Script',
|
||||||
faultSetting: 'Fault Setting',
|
selectRoles: 'Select Roles',
|
||||||
normalOperation: 'Normal Operation',
|
previewRunDiagram: 'Preview Run Diagram',
|
||||||
faultOperation: 'Fault Operation',
|
loadRunDiagram: 'Load Run Diagram',
|
||||||
getRunDiagramFail: 'Failed to get run diagram data',
|
faultSetting: 'Fault Setting',
|
||||||
todayRunDiagramNoLoad: 'Today\'s run diagram is not loaded',
|
normalOperation: 'Normal Operation',
|
||||||
getStationListFail: 'Failed to get station list'
|
faultOperation: 'Fault Operation',
|
||||||
},
|
getRunDiagramFail: 'Failed to get run diagram data',
|
||||||
faultChoose: {
|
todayRunDiagramNoLoad: 'Today\'s run diagram is not loaded',
|
||||||
manual: 'Manual',
|
getStationListFail: 'Failed to get station list'
|
||||||
automatic: 'Automatic',
|
},
|
||||||
settingCondition: 'Setting Condition',
|
faultChoose: {
|
||||||
triggerTarget: 'Trigger Target',
|
manual: 'Manual',
|
||||||
selectFault: 'Select Fault',
|
automatic: 'Automatic',
|
||||||
selectRules: 'Please select rules',
|
settingCondition: 'Setting Condition',
|
||||||
setFaultSuccess: 'Set fault success',
|
triggerTarget: 'Trigger Target',
|
||||||
setFaultFail: 'Set fault failed'
|
selectFault: 'Select Fault',
|
||||||
},
|
selectRules: 'Please select rules',
|
||||||
setTime: {
|
setFaultSuccess: 'Set fault success',
|
||||||
systemTime: 'System Time',
|
setFaultFail: 'Set fault failed'
|
||||||
anyTime: 'Any Time',
|
},
|
||||||
loadTrainNum: 'Number of trains loaded',
|
setTime: {
|
||||||
selectLoadTrainNum: 'Please select the number of trains that can be loaded',
|
systemTime: 'System Time',
|
||||||
maxTrainNum: 'maximum number of trains that can be loaded',
|
anyTime: 'Any Time',
|
||||||
setSimulationSystemTime: 'Set simulation system time',
|
loadTrainNum: 'Number of trains loaded',
|
||||||
selectSystemTime: 'Please select system time',
|
selectLoadTrainNum: 'Please select the number of trains that can be loaded',
|
||||||
selectValidStartTime: 'Please select valid start time',
|
maxTrainNum: 'maximum number of trains that can be loaded',
|
||||||
selectTrainNum: 'Please select number of trains'
|
setSimulationSystemTime: 'Set simulation system time',
|
||||||
},
|
selectSystemTime: 'Please select system time',
|
||||||
script: {
|
selectValidStartTime: 'Please select valid start time',
|
||||||
scriptList: 'Script List',
|
selectTrainNum: 'Please select number of trains'
|
||||||
roleSelect: 'Role Select',
|
},
|
||||||
role: 'Role',
|
script: {
|
||||||
pleaseSelect: 'Please select',
|
scriptList: 'Script List',
|
||||||
scriptName: 'Script Name',
|
roleSelect: 'Role Select',
|
||||||
createTime: 'Create Time',
|
role: 'Role',
|
||||||
operate: 'Operate',
|
pleaseSelect: 'Please select',
|
||||||
loadScript: 'Load Script',
|
scriptName: 'Script Name',
|
||||||
admin: 'Administrator',
|
createTime: 'Create Time',
|
||||||
instructor: 'Instructor',
|
operate: 'Operate',
|
||||||
dispatcher: 'Dispatcher',
|
loadScript: 'Load Script',
|
||||||
attendant: 'Station',
|
admin: 'Administrator',
|
||||||
audience: 'Audience',
|
instructor: 'Instructor',
|
||||||
repair: 'Repair',
|
dispatcher: 'Dispatcher',
|
||||||
driver: 'Train',
|
attendant: 'Station',
|
||||||
none: 'None'
|
audience: 'Audience',
|
||||||
},
|
repair: 'Repair',
|
||||||
schedule: {
|
driver: 'Train',
|
||||||
scheduleSelect: 'Schedule Select: ',
|
none: 'None'
|
||||||
runDiagramName: 'Run Diagram Name:',
|
},
|
||||||
scheduleMode: 'Schedule Mode:',
|
schedule: {
|
||||||
check: 'Check',
|
scheduleSelect: 'Schedule Select: ',
|
||||||
save: 'Save',
|
runDiagramName: 'Run Diagram Name:',
|
||||||
driverNumber: 'Driver Number',
|
scheduleMode: 'Schedule Mode:',
|
||||||
trainNumber: 'Train Number',
|
check: 'Check',
|
||||||
onlineSection: 'Online Section',
|
save: 'Save',
|
||||||
onlineServerNumber: 'Online Server Number',
|
driverNumber: 'Driver Number',
|
||||||
onlineTargetNumber: 'Online Target Number',
|
trainNumber: 'Train Number',
|
||||||
onlineTime: 'Online Time',
|
onlineSection: 'Online Section',
|
||||||
onlineTripNumber: 'Online Trip Number',
|
onlineServerNumber: 'Online Server Number',
|
||||||
outDepot: 'Out Depot',
|
onlineTargetNumber: 'Online Target Number',
|
||||||
outDepotStatus: 'Out Depot Status',
|
onlineTime: 'Online Time',
|
||||||
offlineSection: 'Offline Section',
|
onlineTripNumber: 'Online Trip Number',
|
||||||
offlineServerNumber: 'Offline Server Number',
|
outDepot: 'Out Depot',
|
||||||
offlineTargetNumber: 'Offline Target Number',
|
outDepotStatus: 'Out Depot Status',
|
||||||
offlineTime: 'Offline Time',
|
offlineSection: 'Offline Section',
|
||||||
offlineTripNumber: 'Offline Trip Number',
|
offlineServerNumber: 'Offline Server Number',
|
||||||
inDepot: 'In Depot',
|
offlineTargetNumber: 'Offline Target Number',
|
||||||
inDepotStatus: 'InDepot Status',
|
offlineTime: 'Offline Time',
|
||||||
schedulePlan: 'Schedule Plan',
|
offlineTripNumber: 'Offline Trip Number',
|
||||||
noSchedulePlan: 'No schedule plan,whether to create?',
|
inDepot: 'In Depot',
|
||||||
loadData: 'Load Data',
|
inDepotStatus: 'InDepot Status',
|
||||||
schedulePlanSuccess: 'Schedule plan success',
|
schedulePlan: 'Schedule Plan',
|
||||||
createSchedulePlanSuccess: 'Create schedule plan success',
|
noSchedulePlan: 'No schedule plan,whether to create?',
|
||||||
regenerateSchedulePlanSuccess: 'Regenerate schedule plan success',
|
loadData: 'Load Data',
|
||||||
checkPassed: 'Check passed',
|
schedulePlanSuccess: 'Schedule plan success',
|
||||||
checkFailed: 'Check failed',
|
createSchedulePlanSuccess: 'Create schedule plan success',
|
||||||
checkSchedulePlanFailed: 'Check schedule plan failed',
|
regenerateSchedulePlanSuccess: 'Regenerate schedule plan success',
|
||||||
saveSchedulePlanSuccess: 'Save schedule plan success',
|
checkPassed: 'Check passed',
|
||||||
saveSchedulePlanFail: 'Save schedule plan fail',
|
checkFailed: 'Check failed',
|
||||||
selectSchedulePlan: 'Please select schedule plan'
|
checkSchedulePlanFailed: 'Check schedule plan failed',
|
||||||
},
|
saveSchedulePlanSuccess: 'Save schedule plan success',
|
||||||
runPlan: {
|
saveSchedulePlanFail: 'Save schedule plan fail',
|
||||||
runDiagramPlanTool: 'Run Diagram Plan Tool',
|
selectSchedulePlan: 'Please select schedule plan'
|
||||||
previewRunDiagram: 'Preview Run Diagram',
|
},
|
||||||
stationName: 'Station Name',
|
runPlan: {
|
||||||
stationMark: 'Station kilometer Mark',
|
runDiagramPlanTool: 'Run Diagram Plan Tool',
|
||||||
arrivalTime: 'ArrivalTime'
|
previewRunDiagram: 'Preview Run Diagram',
|
||||||
},
|
stationName: 'Station Name',
|
||||||
chatBox: {
|
stationMark: 'Station kilometer Mark',
|
||||||
chatWindow: 'Chat Window',
|
arrivalTime: 'ArrivalTime'
|
||||||
autoplay: 'Autoplay',
|
},
|
||||||
holdAndTalk: 'Hold And Talk'
|
chatBox: {
|
||||||
}
|
chatWindow: 'Chat Window',
|
||||||
|
autoplay: 'Autoplay',
|
||||||
|
holdAndTalk: 'Hold And Talk'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
@ -12,7 +12,10 @@ export default {
|
|||||||
endTrainingError: '结束实训错误',
|
endTrainingError: '结束实训错误',
|
||||||
endTrainingTip: '操作未完成,是否确认结束?',
|
endTrainingTip: '操作未完成,是否确认结束?',
|
||||||
startTrainingTip: '请先开始实训',
|
startTrainingTip: '请先开始实训',
|
||||||
createSimulationError: '创建仿真失败'
|
createSimulationError: '创建仿真失败',
|
||||||
|
coursePracticeList: '课程实训列表',
|
||||||
|
unfold: '展开',
|
||||||
|
fold: '收回'
|
||||||
},
|
},
|
||||||
exam: {
|
exam: {
|
||||||
startTestOperateTip: '请点击开始考试操作',
|
startTestOperateTip: '请点击开始考试操作',
|
||||||
|
@ -156,13 +156,15 @@ export default {
|
|||||||
this.$messageBox(this.$t('global.buyingTips'));
|
this.$messageBox(this.$t('global.buyingTips'));
|
||||||
},
|
},
|
||||||
checkCourse() {
|
checkCourse() {
|
||||||
this.disabled = true;
|
this.loading = true;
|
||||||
setTimeout(() => {
|
if (this.isAddRule) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `${UrlConfig.trainingPlatform.examRuleManage}`,
|
path: `${UrlConfig.trainingPlatform.examRuleManage}`,
|
||||||
query: { lessonId: this.courseModel.id }
|
query: { lessonId: this.courseModel.id }
|
||||||
});
|
});
|
||||||
}, 100);
|
} else {
|
||||||
|
this.$messageBox(this.$t('tip.notViewTheCoursePaper'));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
distribute() { // 分发
|
distribute() { // 分发
|
||||||
this.disabled = true;
|
this.disabled = true;
|
||||||
|
@ -192,7 +192,7 @@ export default {
|
|||||||
roomId: this.$route.query.roomId
|
roomId: this.$route.query.roomId
|
||||||
});
|
});
|
||||||
res.data.forEach(item => {
|
res.data.forEach(item => {
|
||||||
if (it.id == item.projectDeviceId) { // it.id为int item.projectDeviceId为string
|
if (it.id == item.projectDeviceId) { // it.id为number item.projectDeviceId为string
|
||||||
this.options[index].id = item.id;
|
this.options[index].id = item.id;
|
||||||
this.options[index].deviceCode = item.deviceCode;
|
this.options[index].deviceCode = item.deviceCode;
|
||||||
}
|
}
|
||||||
@ -250,10 +250,10 @@ export default {
|
|||||||
// cancelButtonText: '取消',
|
// cancelButtonText: '取消',
|
||||||
// type: 'warning'
|
// type: 'warning'
|
||||||
// }).then(()=> {
|
// }).then(()=> {
|
||||||
// this.undate();
|
// this.update();
|
||||||
// });
|
// });
|
||||||
// } else {
|
// } else {
|
||||||
// this.undate();
|
// this.update();
|
||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
this.update();
|
this.update();
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
<div id="leftSlider" class="left-slider">
|
<div id="leftSlider" class="left-slider">
|
||||||
<div class="tip-title">
|
<div class="tip-title">
|
||||||
<span>
|
<span>
|
||||||
课程实训列表
|
{{ $t('display.lesson.coursePracticeList') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="handleShow">
|
<div class="handleShow">
|
||||||
<span v-if="show" class="el-icon-arrow-right" @click="handleSliderShow(true)">展开</span>
|
<span v-if="show" class="el-icon-arrow-right" @click="handleSliderShow(true)">{{ $t('display.lesson.unfold') }}</span>
|
||||||
<span v-else class="el-icon-arrow-left" @click="handleSliderShow(false)">收回</span>
|
<span v-else class="el-icon-arrow-left" @click="handleSliderShow(false)">{{ $t('display.lesson.fold') }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="slider-tree">
|
<div class="slider-tree">
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||||
|
@ -19,14 +19,10 @@
|
|||||||
@showScheduling="showScheduling"
|
@showScheduling="showScheduling"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<menu-screen v-if="isScreen" ref="menuScreen" :offset="offset" :group="group" @tryTime="tryTime" />
|
|
||||||
|
|
||||||
<menu-plan v-if="isPlan" ref="menuPlan" :offset="offset" :group="group" />
|
|
||||||
|
|
||||||
<menu-script v-if="isScript" ref="menuScript" :offset="offset" :group="group" />
|
<menu-script v-if="isScript" ref="menuScript" :offset="offset" :group="group" />
|
||||||
|
|
||||||
<menu-schema
|
<menu-schema
|
||||||
v-if="isDemon || isPlan || isScript "
|
v-if="isDemon || isScript "
|
||||||
ref="menuSchema"
|
ref="menuSchema"
|
||||||
:offset="offset"
|
:offset="offset"
|
||||||
:group="group"
|
:group="group"
|
||||||
@ -55,10 +51,8 @@ import FaultChoose from './demon/faultChoose';
|
|||||||
import MapSystemDraft from '@/views/mapsystem/index';
|
import MapSystemDraft from '@/views/mapsystem/index';
|
||||||
import MenuLesson from '@/views/display/menuLesson';
|
import MenuLesson from '@/views/display/menuLesson';
|
||||||
import MenuDemon from '@/views/display/menuDemon';
|
import MenuDemon from '@/views/display/menuDemon';
|
||||||
import MenuScreen from '@/views/display/menuScreen';
|
|
||||||
import MenuSchema from '@/views/display/menuSchema';
|
import MenuSchema from '@/views/display/menuSchema';
|
||||||
import MenuSystemTime from '@/views/display/menuSystemTime';
|
import MenuSystemTime from '@/views/display/menuSystemTime';
|
||||||
import MenuPlan from '@/views/display/menuPlan';
|
|
||||||
import MenuScript from '@/views/display/menuScript';
|
import MenuScript from '@/views/display/menuScript';
|
||||||
import AddQuest from './demon/addQuest';
|
import AddQuest from './demon/addQuest';
|
||||||
import Scheduling from './demon/scheduling';
|
import Scheduling from './demon/scheduling';
|
||||||
@ -85,9 +79,7 @@ export default {
|
|||||||
AddQuest,
|
AddQuest,
|
||||||
MenuLesson,
|
MenuLesson,
|
||||||
MapSystemDraft,
|
MapSystemDraft,
|
||||||
MenuPlan,
|
|
||||||
MenuDemon,
|
MenuDemon,
|
||||||
MenuScreen,
|
|
||||||
MenuScript,
|
MenuScript,
|
||||||
MenuSchema,
|
MenuSchema,
|
||||||
MenuSystemTime,
|
MenuSystemTime,
|
||||||
@ -167,19 +159,13 @@ export default {
|
|||||||
return this.$route.query.skinCode;
|
return this.$route.query.skinCode;
|
||||||
},
|
},
|
||||||
isLesson() {
|
isLesson() {
|
||||||
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
|
return this.mode === 'teach' || this.mode === 'manage';
|
||||||
},
|
},
|
||||||
isDemon() {
|
isDemon() {
|
||||||
return this.mode === 'demon';
|
return this.mode === 'demon';
|
||||||
},
|
},
|
||||||
isScreen() {
|
|
||||||
return this.mode === 'dp';
|
|
||||||
},
|
|
||||||
isScript() {
|
isScript() {
|
||||||
return this.mode === 'script';
|
return this.mode === 'script';
|
||||||
},
|
|
||||||
isPlan() {
|
|
||||||
return this.mode === 'plan';
|
|
||||||
}
|
}
|
||||||
// isDrive() {
|
// isDrive() {
|
||||||
// return this.prdType == '04';
|
// return this.prdType == '04';
|
||||||
@ -227,7 +213,6 @@ export default {
|
|||||||
EventBus.$on('clearCheckLogin', () => {
|
EventBus.$on('clearCheckLogin', () => {
|
||||||
this.clearCheckLogin();
|
this.clearCheckLogin();
|
||||||
});
|
});
|
||||||
|
|
||||||
await this.setWindowSize();
|
await this.setWindowSize();
|
||||||
await this.initLoadData();
|
await this.initLoadData();
|
||||||
this.switchMode('');
|
this.switchMode('');
|
||||||
@ -329,20 +314,13 @@ export default {
|
|||||||
// 加载地图数据
|
// 加载地图数据
|
||||||
async initLoadData() {
|
async initLoadData() {
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.loadSimulationInfo();
|
await this.loadSimulationInfo();
|
||||||
|
|
||||||
if (this.isDemon) {
|
if (this.isDemon) {
|
||||||
await this.initLoadDemonData();
|
await this.initLoadDemonData();
|
||||||
} else if (this.isScreen) {
|
|
||||||
await this.initLoadScreenData();
|
|
||||||
} else if (this.isPlan) {
|
|
||||||
await this.initLoadTestRunData();
|
|
||||||
} else if (this.isScript) {
|
} else if (this.isScript) {
|
||||||
await this.initLoadTaskData();
|
await this.initLoadTaskData();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.checkLoginLineTimer();
|
this.checkLoginLineTimer();
|
||||||
this.checkMouseStatusTimer();
|
this.checkMouseStatusTimer();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -362,18 +340,6 @@ export default {
|
|||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 大屏系统请求
|
|
||||||
async initLoadScreenData() {
|
|
||||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
|
||||||
|
|
||||||
if (parseInt(this.mapId)) {
|
|
||||||
await this.loadMapDataById(this.mapId);
|
|
||||||
} else {
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 任务录制系统
|
// 任务录制系统
|
||||||
async initLoadTaskData() {
|
async initLoadTaskData() {
|
||||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||||
@ -386,18 +352,6 @@ export default {
|
|||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 测试跑车
|
|
||||||
async initLoadTestRunData() {
|
|
||||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
|
||||||
|
|
||||||
if (parseInt(this.mapId)) {
|
|
||||||
await this.loadMapDataById(this.mapId);
|
|
||||||
} else {
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 加载剧本
|
// 加载剧本
|
||||||
async runQuestLoadShow() {
|
async runQuestLoadShow() {
|
||||||
this.$refs.addQuest.doShow();
|
this.$refs.addQuest.doShow();
|
||||||
@ -481,10 +435,6 @@ export default {
|
|||||||
await this.$refs.lessonMenu.back();
|
await this.$refs.lessonMenu.back();
|
||||||
} else if (this.isDemon) {
|
} else if (this.isDemon) {
|
||||||
await this.$refs.menuDemon.back();
|
await this.$refs.menuDemon.back();
|
||||||
} else if (this.isScreen) {
|
|
||||||
await this.$refs.menuScreen.back();
|
|
||||||
} else if (this.isPlan) {
|
|
||||||
await this.$refs.menuPlan.back();
|
|
||||||
} else if (this.isScript) {
|
} else if (this.isScript) {
|
||||||
await this.$refs.menuScript.back();
|
await this.$refs.menuScript.back();
|
||||||
}
|
}
|
||||||
|
@ -22,14 +22,10 @@
|
|||||||
@showScheduling="showScheduling"
|
@showScheduling="showScheduling"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<menu-screen v-if="isScreen" ref="menuScreen" :offset="offset" :group="group" @tryTime="tryTime" />
|
|
||||||
|
|
||||||
<menu-plan v-if="isPlan" ref="menuPlan" :offset="offset" :group="group" />
|
|
||||||
|
|
||||||
<menu-script v-if="isScript" ref="menuScript" :offset="offset" :group="group" />
|
<menu-script v-if="isScript" ref="menuScript" :offset="offset" :group="group" />
|
||||||
|
|
||||||
<menu-schema
|
<menu-schema
|
||||||
v-if="isDemon || isPlan || isScript "
|
v-if="isDemon || isScript "
|
||||||
ref="menuSchema"
|
ref="menuSchema"
|
||||||
:offset="offset"
|
:offset="offset"
|
||||||
:group="group"
|
:group="group"
|
||||||
@ -54,10 +50,8 @@ import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
|||||||
import MenuExam from '@/views/newMap/displayNew/menuExam';
|
import MenuExam from '@/views/newMap/displayNew/menuExam';
|
||||||
import MenuLesson from '@/views/newMap/displayNew/menuLesson';
|
import MenuLesson from '@/views/newMap/displayNew/menuLesson';
|
||||||
import MenuDemon from '@/views/newMap/displayNew/menuDemon';
|
import MenuDemon from '@/views/newMap/displayNew/menuDemon';
|
||||||
import MenuScreen from '@/views/newMap/displayNew/menuScreen';
|
|
||||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||||
import MenuPlan from '@/views/newMap/displayNew/menuPlan';
|
|
||||||
import MenuScript from '@/views/newMap/displayNew/menuScript';
|
import MenuScript from '@/views/newMap/displayNew/menuScript';
|
||||||
import Scheduling from './demon/scheduling';
|
import Scheduling from './demon/scheduling';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
@ -82,9 +76,7 @@ export default {
|
|||||||
MenuExam,
|
MenuExam,
|
||||||
MenuLesson,
|
MenuLesson,
|
||||||
MapSystemDraft,
|
MapSystemDraft,
|
||||||
MenuPlan,
|
|
||||||
MenuDemon,
|
MenuDemon,
|
||||||
MenuScreen,
|
|
||||||
MenuScript,
|
MenuScript,
|
||||||
MenuSchema,
|
MenuSchema,
|
||||||
MenuSystemTime,
|
MenuSystemTime,
|
||||||
@ -163,7 +155,7 @@ export default {
|
|||||||
return this.$route.query.skinCode;
|
return this.$route.query.skinCode;
|
||||||
},
|
},
|
||||||
isLesson() {
|
isLesson() {
|
||||||
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
|
return this.mode === 'teach' || this.mode === 'manage';
|
||||||
},
|
},
|
||||||
isExam() {
|
isExam() {
|
||||||
return this.mode === 'exam';
|
return this.mode === 'exam';
|
||||||
@ -171,15 +163,9 @@ export default {
|
|||||||
isDemon() {
|
isDemon() {
|
||||||
return this.mode === 'demon';
|
return this.mode === 'demon';
|
||||||
},
|
},
|
||||||
isScreen() { // 暂时不用
|
|
||||||
return this.mode === 'dp';
|
|
||||||
},
|
|
||||||
isScript() {
|
isScript() {
|
||||||
return this.mode === 'script';
|
return this.mode === 'script';
|
||||||
},
|
},
|
||||||
isPlan() {
|
|
||||||
return this.mode === 'plan';
|
|
||||||
},
|
|
||||||
isDrive() {
|
isDrive() {
|
||||||
return this.prdType == '04';
|
return this.prdType == '04';
|
||||||
},
|
},
|
||||||
@ -338,22 +324,15 @@ export default {
|
|||||||
// 加载地图数据
|
// 加载地图数据
|
||||||
async initLoadData() {
|
async initLoadData() {
|
||||||
this.$store.dispatch('training/reset');
|
this.$store.dispatch('training/reset');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.loadSimulationInfo();
|
await this.loadSimulationInfo();
|
||||||
|
|
||||||
if (this.isDemon) {
|
if (this.isDemon) {
|
||||||
await this.initLoadDemonData();
|
await this.initLoadDemonData();
|
||||||
} else if (this.isScreen) {
|
|
||||||
await this.initLoadScreenData();
|
|
||||||
} else if (this.isPlan) {
|
|
||||||
await this.initLoadTestRunData();
|
|
||||||
} else if (this.isScript) {
|
} else if (this.isScript) {
|
||||||
await this.initLoadTaskData();
|
await this.initLoadTaskData();
|
||||||
} else {
|
} else {
|
||||||
await this.initLoadLessonOrExamData();
|
await this.initLoadLessonOrExamData();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.checkLoginLineTimer();
|
this.checkLoginLineTimer();
|
||||||
this.checkMouseStatusTimer();
|
this.checkMouseStatusTimer();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -394,17 +373,6 @@ export default {
|
|||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 大屏系统请求
|
|
||||||
async initLoadScreenData() {
|
|
||||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
|
||||||
if (parseInt(this.mapId)) {
|
|
||||||
await this.loadNewMapDataByGroup(this.group);
|
|
||||||
} else {
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 任务录制系统
|
// 任务录制系统
|
||||||
async initLoadTaskData() {
|
async initLoadTaskData() {
|
||||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||||
@ -417,18 +385,6 @@ export default {
|
|||||||
this.endViewLoading();
|
this.endViewLoading();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 测试跑车
|
|
||||||
async initLoadTestRunData() {
|
|
||||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
|
||||||
this.$store.dispatch('training/changeOperateMode', { mode: OperateMode.NORMAL }); // 默认为正常模式
|
|
||||||
this.$store.dispatch('training/setPrdType', '01');
|
|
||||||
|
|
||||||
if (parseInt(this.mapId)) {
|
|
||||||
await this.loadNewMapDataByGroup(this.group);
|
|
||||||
} else {
|
|
||||||
this.endViewLoading();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 选择脚本
|
// 选择脚本
|
||||||
async selectQuest(row, id, mapLocation, roleName) {
|
async selectQuest(row, id, mapLocation, roleName) {
|
||||||
try {
|
try {
|
||||||
@ -482,10 +438,6 @@ export default {
|
|||||||
await this.$refs.lessonMenu.back();
|
await this.$refs.lessonMenu.back();
|
||||||
} else if (this.isDemon) {
|
} else if (this.isDemon) {
|
||||||
await this.$refs.menuDemon.back();
|
await this.$refs.menuDemon.back();
|
||||||
} else if (this.isScreen) {
|
|
||||||
await this.$refs.menuScreen.back();
|
|
||||||
} else if (this.isPlan) {
|
|
||||||
await this.$refs.menuPlan.back();
|
|
||||||
} else if (this.isScript) {
|
} else if (this.isScript) {
|
||||||
await this.$refs.menuScript.back();
|
await this.$refs.menuScript.back();
|
||||||
}
|
}
|
||||||
|
@ -1,141 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="display-draft">
|
|
||||||
<el-button-group>
|
|
||||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{ $t('display.plan.drivingByPlan') }}</el-button>
|
|
||||||
<el-button type="danger" :disabled="!isDisable" @click="end">{{ $t('display.plan.exitPlan') }}</el-button>
|
|
||||||
<el-button type="primary" @click="back">{{ $t('display.plan.back') }}</el-button>
|
|
||||||
</el-button-group>
|
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import SetTime from './demon/setTime';
|
|
||||||
import { Notification } from 'element-ui';
|
|
||||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramOver, runDiagramStart } from '@/api/simulation';
|
|
||||||
import { timeFormat } from '@/utils/date';
|
|
||||||
|
|
||||||
// 琏计划 暂时不用
|
|
||||||
export default {
|
|
||||||
name: 'MenuPlan',
|
|
||||||
components: {
|
|
||||||
SetTime
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
group: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
offset: {
|
|
||||||
type: Number,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isDisable: false
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.training.simulationGroupCount': function () {
|
|
||||||
this.initLoadPage();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async initLoadPage() {
|
|
||||||
try {
|
|
||||||
const rest = '';//await runDiagramIsStart(this.group);
|
|
||||||
if (rest && rest.data) {
|
|
||||||
this.isDisable = true;
|
|
||||||
this.$store.dispatch('training/simulationStart');
|
|
||||||
} else {
|
|
||||||
this.isDisable = false;
|
|
||||||
this.$store.dispatch('training/over');
|
|
||||||
}
|
|
||||||
await this.loadSystemTime();
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async loadSystemTime() {
|
|
||||||
// const rest = await runDiagramGetTime(this.group);
|
|
||||||
// if (rest && rest.code == 200) {
|
|
||||||
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
selectBeginTime() {
|
|
||||||
this.$refs.setTime.doShow();
|
|
||||||
},
|
|
||||||
start(model) {
|
|
||||||
this.isDisable = true;
|
|
||||||
runDiagramStart(model, this.group).then(res => {
|
|
||||||
this.$store.dispatch('training/simulationStart').then(() => {
|
|
||||||
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
this.isDisable = false;
|
|
||||||
this.$messageBox(this.$t('display.plan.startPlanFail'));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
end() {
|
|
||||||
this.isDisable = false;
|
|
||||||
runDiagramOver(this.group).then(() => {
|
|
||||||
this.$store.dispatch('training/over').then(() => {
|
|
||||||
this.$store.dispatch('training/setMapDefaultState').then(() => {
|
|
||||||
this.$store.dispatch('map/clearJlmapTrainView');
|
|
||||||
this.$store.dispatch('map/setTrainWindowShow', false);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}).catch(() => {
|
|
||||||
this.isDisable = true;
|
|
||||||
this.$messageBox(this.$t('display.plan.endPlanFail'));
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async back() {
|
|
||||||
this.$store.dispatch('training/over').then(() => {
|
|
||||||
history.go(-1);
|
|
||||||
Notification.closeAll();
|
|
||||||
// exitFullscreen();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
|
|
||||||
.display-card {
|
|
||||||
z-index: 9;
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
top: 17px;
|
|
||||||
left: 160px;
|
|
||||||
height: 32px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.display-card .el-row {
|
|
||||||
line-height: 32px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.display-score {
|
|
||||||
background-color: black;
|
|
||||||
display: -moz-inline-box;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: left;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 24px;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding-left: 2px;
|
|
||||||
margin-left: 10px;
|
|
||||||
font-family: "Microsoft" !important;
|
|
||||||
font-size: 18px !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.display-draft {
|
|
||||||
position: absolute;
|
|
||||||
float: right;
|
|
||||||
right: 15px;
|
|
||||||
bottom: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,180 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div>
|
|
||||||
<chart-view ref="chatView" :group="group" />
|
|
||||||
</div>
|
|
||||||
<div class="draft-box">
|
|
||||||
<div class="draft-menu">
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-select v-model="speed" :placeholder="$t('display.replay.pleaseSelect')" @change="changeSpeed">
|
|
||||||
<el-option
|
|
||||||
v-for="item in optionsList"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
size="mini"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="4">
|
|
||||||
<el-button type="primary" class="back btn" @click="play">{{ playName }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-progress class="progress" :percentage="progress" style="width: 100%" :show-text="false" />
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="2">
|
|
||||||
<el-button type="primary" class="back" @click="back">{{ $t('display.replay.back') }}</el-button>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- 回放界面 -->
|
|
||||||
<script>
|
|
||||||
import { Notification } from 'element-ui';
|
|
||||||
// import { exitFullscreen } from '@/utils/screen';
|
|
||||||
import { putsSimulationRecord, putsSimulationRecordPause, putsSimulationRecordPlay, putsSimulationRecordPlaySpeed, putsSimulationRecordplayTime } from '@/api/simulationRecord';
|
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'MenuReplay',
|
|
||||||
components: {
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
group: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
offset: {
|
|
||||||
type: Number,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isDisable: false,
|
|
||||||
startLoading: false,
|
|
||||||
speed: '1X',
|
|
||||||
level: 1,
|
|
||||||
isPlay: false,
|
|
||||||
time: '',
|
|
||||||
timeInterval: null,
|
|
||||||
progress: 0,
|
|
||||||
schedule: 0,
|
|
||||||
optionsList: [
|
|
||||||
{
|
|
||||||
label: '1X',
|
|
||||||
value: '1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '2X',
|
|
||||||
value: '2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '4X',
|
|
||||||
value: '4'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '8X',
|
|
||||||
value: '8'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
playName() {
|
|
||||||
return this.isPlay ? this.$t('display.replay.pause') : this.$t('display.replay.play');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.map.mapViewLoadedCount': function() {
|
|
||||||
this.isPlay = true;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
EventBus.$emit('showChat');
|
|
||||||
this.time = (+new Date(this.$route.query.destroyTime) - +new Date(this.$route.query.createTime)) / 1000;
|
|
||||||
this.timeIntervals();
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
clearInterval(this.timeInterval);
|
|
||||||
this.timeInterval = null;
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
timeIntervals() {
|
|
||||||
const timebili = 100 / this.time;
|
|
||||||
if (!this.timeInterval) {
|
|
||||||
this.timeInterval = setInterval(() => {
|
|
||||||
if (this.isPlay) {
|
|
||||||
this.progress += (this.level) * timebili;
|
|
||||||
if (this.progress >= 100) {
|
|
||||||
clearInterval(this.timeInterval);
|
|
||||||
this.timeInterval = null;
|
|
||||||
this.progress = 100;
|
|
||||||
this.isPlay = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async play() {
|
|
||||||
this.isPlay = !this.isPlay;
|
|
||||||
if (this.isPlay) {
|
|
||||||
if (this.progress >= 100) {
|
|
||||||
this.progress = 0;
|
|
||||||
this.timeIntervals();
|
|
||||||
this.$refs.chatView.clearTextList();
|
|
||||||
await putsSimulationRecordplayTime(this.$route.query.replayId, 0);
|
|
||||||
} else {
|
|
||||||
await putsSimulationRecordPlay(this.$route.query.replayId);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
await putsSimulationRecordPause(this.$route.query.replayId);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async changeSpeed(val) {
|
|
||||||
this.level = val;
|
|
||||||
await putsSimulationRecordPlaySpeed(this.$route.query.replayId, val);
|
|
||||||
},
|
|
||||||
async back() {
|
|
||||||
await putsSimulationRecord(this.$route.query.replayId);
|
|
||||||
history.go(-1);
|
|
||||||
Notification.closeAll();
|
|
||||||
// exitFullscreen();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
|
|
||||||
.draft-box {
|
|
||||||
position: absolute;
|
|
||||||
display: inline;
|
|
||||||
bottom: 10px;
|
|
||||||
right: 0px;
|
|
||||||
|
|
||||||
.draft-menu {
|
|
||||||
position: static;
|
|
||||||
width: 800px;
|
|
||||||
float: right;
|
|
||||||
|
|
||||||
.back {
|
|
||||||
z-index: 100000;
|
|
||||||
|
|
||||||
/deep/ .el-button {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.progress {
|
|
||||||
left: -30px;
|
|
||||||
position: relative;
|
|
||||||
top: 14px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -10,16 +10,16 @@
|
|||||||
<!-- 加载剧本 -->
|
<!-- 加载剧本 -->
|
||||||
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
<el-button v-if="isDemon && !isDesignPlatform" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">{{ $t('display.schema.loadScript') }}</el-button>
|
||||||
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||||
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
<el-button v-if="!runing && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
|
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">{{ $t('display.schema.faultSetting') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
<el-radio-group v-if="!isPlan" v-model="mode" size="small" @change="changeOperateMode(mode)">
|
<el-radio-group v-model="mode" size="small" @change="changeOperateMode(mode)">
|
||||||
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.NORMAL">{{ $t('display.schema.normalOperation') }}</el-radio-button>
|
||||||
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
|
<el-radio-button class="mode" :label="OperateMode.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<fault-choose v-if="isDemon || isPlan || isScript" ref="faultChoose" :group="group" />
|
<fault-choose v-if="isDemon || isScript" ref="faultChoose" :group="group" />
|
||||||
<run-plan-Load ref="runPlanLoad" :group="group" />
|
<run-plan-Load ref="runPlanLoad" :group="group" />
|
||||||
<run-plan-view ref="runPlanView" :group="group" />
|
<run-plan-view ref="runPlanView" :group="group" />
|
||||||
<!-- 加载剧本列表弹窗 -->
|
<!-- 加载剧本列表弹窗 -->
|
||||||
@ -76,9 +76,6 @@ export default {
|
|||||||
notScript() {
|
notScript() {
|
||||||
return this.$route.params.mode !== 'script';
|
return this.$route.params.mode !== 'script';
|
||||||
},
|
},
|
||||||
isPlan() {
|
|
||||||
return this.$route.params.mode === 'plan';
|
|
||||||
},
|
|
||||||
isScript() {
|
isScript() {
|
||||||
return this.$route.params.mode === 'script';
|
return this.$route.params.mode === 'script';
|
||||||
},
|
},
|
||||||
@ -112,40 +109,18 @@ export default {
|
|||||||
this.viewDisabled = true;
|
this.viewDisabled = true;
|
||||||
getStationList(opt.mapId).then(response => {
|
getStationList(opt.mapId).then(response => {
|
||||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||||
if (this.$route.params.mode == 'plan') {
|
// getEveryDayRunPlanNew(this.group).then(resp => {
|
||||||
if (this.$route.query.from == 'user') {
|
// this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
// 测试运行图功能
|
// this.viewDisabled = false;
|
||||||
getRpDetailByUserMapId(this.$route.query.planId).then(resp => {
|
// }).catch(error => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
// this.$store.dispatch('runPlan/setPlanData', []);
|
||||||
this.viewDisabled = false;
|
// if (error.code == 30001) {
|
||||||
}).catch(() => {
|
// this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||||
this.$store.dispatch('runPlan/setPlanData', []);
|
// } else {
|
||||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
// this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||||
});
|
// }
|
||||||
} else {
|
// });
|
||||||
// 测试运行图功能
|
|
||||||
queryRunPlan(this.$route.query.planId).then(resp => {
|
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
|
||||||
this.viewDisabled = false;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$store.dispatch('runPlan/setPlanData', []);
|
|
||||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// getEveryDayRunPlanNew(this.group).then(resp => {
|
|
||||||
// this.$store.dispatch('runPlan/setPlanData', resp.data);
|
|
||||||
// this.viewDisabled = false;
|
|
||||||
// }).catch(error => {
|
|
||||||
// this.$store.dispatch('runPlan/setPlanData', []);
|
|
||||||
// if (error.code == 30001) {
|
|
||||||
// this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
|
||||||
// } else {
|
|
||||||
// this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('display.schema.getStationListFail'));
|
this.$messageBox(this.$t('display.schema.getStationListFail'));
|
||||||
|
@ -1,151 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<div class="display-card" :style="{top: offset+'px'}">
|
|
||||||
<el-row>
|
|
||||||
<span v-if="countTime" class="display-score">{{ $t('display.screen.trialTime') }} {{ countTime }}</span>
|
|
||||||
</el-row>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<script>
|
|
||||||
import { getGoodsTryUse } from '@/api/management/goods';
|
|
||||||
import { PermissionType } from '@/scripts/ConstDic';
|
|
||||||
import { getCountTime } from '@/utils/index';
|
|
||||||
import { runDiagramIsStart, runDiagramGetTime, runDiagramStart } from '@/api/simulation';
|
|
||||||
import { timeFormat } from '@/utils/date';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'MenuScreen',
|
|
||||||
props: {
|
|
||||||
group: {
|
|
||||||
type: String,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
offset: {
|
|
||||||
type: Number,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
tryTime: 0, // 进入页面多少秒
|
|
||||||
timeNow: 0, // 进入页面 相对时间
|
|
||||||
time: null, // 定时器
|
|
||||||
countTime: 0, // 显示 倒计时
|
|
||||||
remainingTime: 0,
|
|
||||||
goodsId: this.$route.query.goodsId,
|
|
||||||
try: this.$route.query.try, // 是否是试用权限
|
|
||||||
training: {
|
|
||||||
id: '',
|
|
||||||
name: '',
|
|
||||||
remarks: ''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'$store.state.training.subscribeCount': function () {
|
|
||||||
this.group && this.initLoadPage();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
|
||||||
if (this.time) {
|
|
||||||
this.setTryTime();
|
|
||||||
clearTimeout(this.time);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
async initLoadPage() {
|
|
||||||
try {
|
|
||||||
if (this.try != '0') {
|
|
||||||
const data = {
|
|
||||||
permissionType: PermissionType.SCREEN
|
|
||||||
};
|
|
||||||
|
|
||||||
const resr = await getGoodsTryUse(data);
|
|
||||||
if (resr && resr.code == 200) {
|
|
||||||
this.remainingTime = resr.data.tryTime;
|
|
||||||
this.timeNow = Date.parse(new Date()) / 1000 + this.remainingTime;
|
|
||||||
if (this.try) {
|
|
||||||
this.time = setInterval(() => {
|
|
||||||
this.tryTime += 1;
|
|
||||||
this.countTime = getCountTime(this.timeNow);
|
|
||||||
if (this.countTime == -1) {
|
|
||||||
this.back();
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.$messageBox(this.$t('display.screen.getTimeFail'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const initTime = this.$route.query.initTime;
|
|
||||||
const retp = '';//await runDiagramIsStart(this.group);
|
|
||||||
if (retp && !retp.data) {
|
|
||||||
await runDiagramStart({ initTime: initTime }, this.group);
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.$store.dispatch('training/simulationStart');
|
|
||||||
await this.loadSystemTime();
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async loadSystemTime() {
|
|
||||||
// const rest = await runDiagramGetTime(this.group);
|
|
||||||
// if (rest && rest.code == 200) {
|
|
||||||
// this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${timeFormat(rest.data)}`));
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
setTryTime() {
|
|
||||||
if (this.try) {
|
|
||||||
this.$emit('tryTime', { time: this.tryTime, goodsId: this.goodsId });
|
|
||||||
}
|
|
||||||
},
|
|
||||||
back() {
|
|
||||||
this.$store.dispatch('training/over').then(() => {
|
|
||||||
Notification.closeAll();
|
|
||||||
history.go(-1);
|
|
||||||
// exitFullscreen();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
|
|
||||||
.display-card {
|
|
||||||
z-index: 9;
|
|
||||||
display: inline;
|
|
||||||
position: absolute;
|
|
||||||
top: 17px;
|
|
||||||
left: 30px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.display-card .el-row {
|
|
||||||
line-height: 32px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.display-score {
|
|
||||||
background-color: black;
|
|
||||||
display: -moz-inline-box;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: left;
|
|
||||||
height: 32px;
|
|
||||||
line-height: 24px;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding-left: 2px;
|
|
||||||
margin-left: 10px;
|
|
||||||
font-family: "Microsoft" !important;
|
|
||||||
font-size: 18px !important;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.display-draft {
|
|
||||||
position: absolute;
|
|
||||||
float: right;
|
|
||||||
right: 15px;
|
|
||||||
bottom: 15px;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -97,21 +97,19 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
formTop() {
|
formTop() {
|
||||||
const form = {
|
return {
|
||||||
labelWidth: '220px',
|
labelWidth: '220px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'gatewayCode', label: '网关编码:', type: 'select', required: true, options: this.gatewayList, placeholder: '请选择网关编码' }
|
{ prop: 'gatewayCode', label: '网关编码:', type: 'select', required: true, options: this.gatewayList, placeholder: '请选择网关编码' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
|
||||||
},
|
},
|
||||||
topRules() {
|
topRules() {
|
||||||
const crules = {
|
return {
|
||||||
gatewayCode: [
|
gatewayCode: [
|
||||||
{ required: true, message: '请输入网关编码', trigger: 'change' }
|
{ required: true, message: '请输入网关编码', trigger: 'change' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '编辑设备配置';
|
return '编辑设备配置';
|
||||||
|
Loading…
Reference in New Issue
Block a user