代码调整
This commit is contained in:
parent
68a7171495
commit
2554ed1135
@ -1,179 +1,182 @@
|
||||
export default {
|
||||
startBtn: 'Start',
|
||||
endBtn: 'End',
|
||||
backBtn: 'Back',
|
||||
seconds: 'seconds',
|
||||
lesson: {
|
||||
teachingMode: 'Teaching Mode',
|
||||
practiceMode: 'Practice Mode',
|
||||
testMode: 'Test Mode',
|
||||
score: 'Score: ',
|
||||
selectTraining: 'Please select training',
|
||||
endTrainingError: 'Ending training error',
|
||||
endTrainingTip: 'The operation is not completed, confirm the end?',
|
||||
startTrainingTip: 'Please start training',
|
||||
createSimulationError: 'create simulation error'
|
||||
},
|
||||
exam: {
|
||||
startTestOperateTip: 'Please click to start the exam',
|
||||
selectTest: 'Please select a question',
|
||||
endTrainingError: 'Ending training error',
|
||||
startTestTip: 'Please start the exam first',
|
||||
endTestTip: 'Do you give up this exam? ',
|
||||
refreshListError: 'Refresh List Error',
|
||||
examTime: 'Exam timing: ',
|
||||
questionTitle: 'Question title: ',
|
||||
bestTime: 'Best time: ',
|
||||
maximumTime: 'Maximum time: ',
|
||||
trainingInstructions: 'Training instructions: ',
|
||||
viewQuestions: 'View questions',
|
||||
prev: 'prev',
|
||||
next: 'next',
|
||||
submitExaminationPaper: 'Submit Exam',
|
||||
autoSubmit: 'Automatic submission at the end of the exam',
|
||||
getTestInformation: 'Failed to get test information',
|
||||
cancleExam: 'The exam is not completed,confirm to exit?'
|
||||
},
|
||||
training: {
|
||||
trainingName: 'Training name: ',
|
||||
bestTime: 'Best time: ',
|
||||
maximumTime: 'Maximum time: ',
|
||||
trainingInstructions: 'Training instructions: ',
|
||||
getCourseInformationFail: 'Failed to get course information'
|
||||
},
|
||||
demon: {
|
||||
trialTime: 'Trial time: ',
|
||||
dispatchingPlan: 'Schedule Plan',
|
||||
exitScript: 'Exit Script',
|
||||
drivingByPlan: 'Driving By Plan',
|
||||
exitPlan: 'Exit Plan',
|
||||
back: 'Back',
|
||||
threeDimensionalView: 'Three-Dimensional View',
|
||||
deviceView: 'DeviceView',
|
||||
taskOperateSuccess: 'Task Operate success',
|
||||
getTimeFail: 'Failed to get time',
|
||||
startSimulationFail: 'Start simulation failed, please go back and try again',
|
||||
endSimulationFail: 'End simulation failed, please go back',
|
||||
exitTaskFail: 'Failed to Exit task',
|
||||
driverPerspective: 'Driver Perspective'
|
||||
},
|
||||
systemTime: {
|
||||
timePause: 'Pausing'
|
||||
},
|
||||
screen: {
|
||||
trialTime: 'Trial time: ',
|
||||
getTimeFail: 'Failed to get time'
|
||||
},
|
||||
replay: {
|
||||
pleaseSelect: 'Please select',
|
||||
back: 'Back',
|
||||
pause: 'Pause',
|
||||
play: 'Play'
|
||||
},
|
||||
plan: {
|
||||
drivingByPlan: 'Driving By Plan',
|
||||
exitPlan: 'Exit Plan',
|
||||
back: 'Back',
|
||||
startPlanFail: 'Start planning failed, please go back and try again',
|
||||
endPlanFail: 'End plan failed, please go back'
|
||||
},
|
||||
schema: {
|
||||
selectProduct: 'Please select product type',
|
||||
loadScript: 'Load Script',
|
||||
selectRoles: 'Select Roles',
|
||||
previewRunDiagram: 'Preview Run Diagram',
|
||||
loadRunDiagram: 'Load Run Diagram',
|
||||
faultSetting: 'Fault Setting',
|
||||
normalOperation: 'Normal Operation',
|
||||
faultOperation: 'Fault Operation',
|
||||
getRunDiagramFail: 'Failed to get run diagram data',
|
||||
todayRunDiagramNoLoad: 'Today\'s run diagram is not loaded',
|
||||
getStationListFail: 'Failed to get station list'
|
||||
},
|
||||
faultChoose: {
|
||||
manual: 'Manual',
|
||||
automatic: 'Automatic',
|
||||
settingCondition: 'Setting Condition',
|
||||
triggerTarget: 'Trigger Target',
|
||||
selectFault: 'Select Fault',
|
||||
selectRules: 'Please select rules',
|
||||
setFaultSuccess: 'Set fault success',
|
||||
setFaultFail: 'Set fault failed'
|
||||
},
|
||||
setTime: {
|
||||
systemTime: 'System Time',
|
||||
anyTime: 'Any Time',
|
||||
loadTrainNum: 'Number of trains loaded',
|
||||
selectLoadTrainNum: 'Please select the number of trains that can be loaded',
|
||||
maxTrainNum: 'maximum number of trains that can be loaded',
|
||||
setSimulationSystemTime: 'Set simulation system time',
|
||||
selectSystemTime: 'Please select system time',
|
||||
selectValidStartTime: 'Please select valid start time',
|
||||
selectTrainNum: 'Please select number of trains'
|
||||
},
|
||||
script: {
|
||||
scriptList: 'Script List',
|
||||
roleSelect: 'Role Select',
|
||||
role: 'Role',
|
||||
pleaseSelect: 'Please select',
|
||||
scriptName: 'Script Name',
|
||||
createTime: 'Create Time',
|
||||
operate: 'Operate',
|
||||
loadScript: 'Load Script',
|
||||
admin: 'Administrator',
|
||||
instructor: 'Instructor',
|
||||
dispatcher: 'Dispatcher',
|
||||
attendant: 'Station',
|
||||
audience: 'Audience',
|
||||
repair: 'Repair',
|
||||
driver: 'Train',
|
||||
none: 'None'
|
||||
},
|
||||
schedule: {
|
||||
scheduleSelect: 'Schedule Select: ',
|
||||
runDiagramName: 'Run Diagram Name:',
|
||||
scheduleMode: 'Schedule Mode:',
|
||||
check: 'Check',
|
||||
save: 'Save',
|
||||
driverNumber: 'Driver Number',
|
||||
trainNumber: 'Train Number',
|
||||
onlineSection: 'Online Section',
|
||||
onlineServerNumber: 'Online Server Number',
|
||||
onlineTargetNumber: 'Online Target Number',
|
||||
onlineTime: 'Online Time',
|
||||
onlineTripNumber: 'Online Trip Number',
|
||||
outDepot: 'Out Depot',
|
||||
outDepotStatus: 'Out Depot Status',
|
||||
offlineSection: 'Offline Section',
|
||||
offlineServerNumber: 'Offline Server Number',
|
||||
offlineTargetNumber: 'Offline Target Number',
|
||||
offlineTime: 'Offline Time',
|
||||
offlineTripNumber: 'Offline Trip Number',
|
||||
inDepot: 'In Depot',
|
||||
inDepotStatus: 'InDepot Status',
|
||||
schedulePlan: 'Schedule Plan',
|
||||
noSchedulePlan: 'No schedule plan,whether to create?',
|
||||
loadData: 'Load Data',
|
||||
schedulePlanSuccess: 'Schedule plan success',
|
||||
createSchedulePlanSuccess: 'Create schedule plan success',
|
||||
regenerateSchedulePlanSuccess: 'Regenerate schedule plan success',
|
||||
checkPassed: 'Check passed',
|
||||
checkFailed: 'Check failed',
|
||||
checkSchedulePlanFailed: 'Check schedule plan failed',
|
||||
saveSchedulePlanSuccess: 'Save schedule plan success',
|
||||
saveSchedulePlanFail: 'Save schedule plan fail',
|
||||
selectSchedulePlan: 'Please select schedule plan'
|
||||
},
|
||||
runPlan: {
|
||||
runDiagramPlanTool: 'Run Diagram Plan Tool',
|
||||
previewRunDiagram: 'Preview Run Diagram',
|
||||
stationName: 'Station Name',
|
||||
stationMark: 'Station kilometer Mark',
|
||||
arrivalTime: 'ArrivalTime'
|
||||
},
|
||||
chatBox: {
|
||||
chatWindow: 'Chat Window',
|
||||
autoplay: 'Autoplay',
|
||||
holdAndTalk: 'Hold And Talk'
|
||||
}
|
||||
startBtn: 'Start',
|
||||
endBtn: 'End',
|
||||
backBtn: 'Back',
|
||||
seconds: 'seconds',
|
||||
lesson: {
|
||||
teachingMode: 'Teaching Mode',
|
||||
practiceMode: 'Practice Mode',
|
||||
testMode: 'Test Mode',
|
||||
score: 'Score: ',
|
||||
selectTraining: 'Please select training',
|
||||
endTrainingError: 'Ending training error',
|
||||
endTrainingTip: 'The operation is not completed, confirm the end?',
|
||||
startTrainingTip: 'Please start training',
|
||||
createSimulationError: 'create simulation error',
|
||||
coursePracticeList: 'Course practice list',
|
||||
unfold: 'Unfold',
|
||||
fold: 'fold'
|
||||
},
|
||||
exam: {
|
||||
startTestOperateTip: 'Please click to start the exam',
|
||||
selectTest: 'Please select a question',
|
||||
endTrainingError: 'Ending training error',
|
||||
startTestTip: 'Please start the exam first',
|
||||
endTestTip: 'Do you give up this exam? ',
|
||||
refreshListError: 'Refresh List Error',
|
||||
examTime: 'Exam timing: ',
|
||||
questionTitle: 'Question title: ',
|
||||
bestTime: 'Best time: ',
|
||||
maximumTime: 'Maximum time: ',
|
||||
trainingInstructions: 'Training instructions: ',
|
||||
viewQuestions: 'View questions',
|
||||
prev: 'prev',
|
||||
next: 'next',
|
||||
submitExaminationPaper: 'Submit Exam',
|
||||
autoSubmit: 'Automatic submission at the end of the exam',
|
||||
getTestInformation: 'Failed to get test information',
|
||||
cancleExam: 'The exam is not completed,confirm to exit?'
|
||||
},
|
||||
training: {
|
||||
trainingName: 'Training name: ',
|
||||
bestTime: 'Best time: ',
|
||||
maximumTime: 'Maximum time: ',
|
||||
trainingInstructions: 'Training instructions: ',
|
||||
getCourseInformationFail: 'Failed to get course information'
|
||||
},
|
||||
demon: {
|
||||
trialTime: 'Trial time: ',
|
||||
dispatchingPlan: 'Schedule Plan',
|
||||
exitScript: 'Exit Script',
|
||||
drivingByPlan: 'Driving By Plan',
|
||||
exitPlan: 'Exit Plan',
|
||||
back: 'Back',
|
||||
threeDimensionalView: 'Three-Dimensional View',
|
||||
deviceView: 'DeviceView',
|
||||
taskOperateSuccess: 'Task Operate success',
|
||||
getTimeFail: 'Failed to get time',
|
||||
startSimulationFail: 'Start simulation failed, please go back and try again',
|
||||
endSimulationFail: 'End simulation failed, please go back',
|
||||
exitTaskFail: 'Failed to Exit task',
|
||||
driverPerspective: 'Driver Perspective'
|
||||
},
|
||||
systemTime: {
|
||||
timePause: 'Pausing'
|
||||
},
|
||||
screen: {
|
||||
trialTime: 'Trial time: ',
|
||||
getTimeFail: 'Failed to get time'
|
||||
},
|
||||
replay: {
|
||||
pleaseSelect: 'Please select',
|
||||
back: 'Back',
|
||||
pause: 'Pause',
|
||||
play: 'Play'
|
||||
},
|
||||
plan: {
|
||||
drivingByPlan: 'Driving By Plan',
|
||||
exitPlan: 'Exit Plan',
|
||||
back: 'Back',
|
||||
startPlanFail: 'Start planning failed, please go back and try again',
|
||||
endPlanFail: 'End plan failed, please go back'
|
||||
},
|
||||
schema: {
|
||||
selectProduct: 'Please select product type',
|
||||
loadScript: 'Load Script',
|
||||
selectRoles: 'Select Roles',
|
||||
previewRunDiagram: 'Preview Run Diagram',
|
||||
loadRunDiagram: 'Load Run Diagram',
|
||||
faultSetting: 'Fault Setting',
|
||||
normalOperation: 'Normal Operation',
|
||||
faultOperation: 'Fault Operation',
|
||||
getRunDiagramFail: 'Failed to get run diagram data',
|
||||
todayRunDiagramNoLoad: 'Today\'s run diagram is not loaded',
|
||||
getStationListFail: 'Failed to get station list'
|
||||
},
|
||||
faultChoose: {
|
||||
manual: 'Manual',
|
||||
automatic: 'Automatic',
|
||||
settingCondition: 'Setting Condition',
|
||||
triggerTarget: 'Trigger Target',
|
||||
selectFault: 'Select Fault',
|
||||
selectRules: 'Please select rules',
|
||||
setFaultSuccess: 'Set fault success',
|
||||
setFaultFail: 'Set fault failed'
|
||||
},
|
||||
setTime: {
|
||||
systemTime: 'System Time',
|
||||
anyTime: 'Any Time',
|
||||
loadTrainNum: 'Number of trains loaded',
|
||||
selectLoadTrainNum: 'Please select the number of trains that can be loaded',
|
||||
maxTrainNum: 'maximum number of trains that can be loaded',
|
||||
setSimulationSystemTime: 'Set simulation system time',
|
||||
selectSystemTime: 'Please select system time',
|
||||
selectValidStartTime: 'Please select valid start time',
|
||||
selectTrainNum: 'Please select number of trains'
|
||||
},
|
||||
script: {
|
||||
scriptList: 'Script List',
|
||||
roleSelect: 'Role Select',
|
||||
role: 'Role',
|
||||
pleaseSelect: 'Please select',
|
||||
scriptName: 'Script Name',
|
||||
createTime: 'Create Time',
|
||||
operate: 'Operate',
|
||||
loadScript: 'Load Script',
|
||||
admin: 'Administrator',
|
||||
instructor: 'Instructor',
|
||||
dispatcher: 'Dispatcher',
|
||||
attendant: 'Station',
|
||||
audience: 'Audience',
|
||||
repair: 'Repair',
|
||||
driver: 'Train',
|
||||
none: 'None'
|
||||
},
|
||||
schedule: {
|
||||
scheduleSelect: 'Schedule Select: ',
|
||||
runDiagramName: 'Run Diagram Name:',
|
||||
scheduleMode: 'Schedule Mode:',
|
||||
check: 'Check',
|
||||
save: 'Save',
|
||||
driverNumber: 'Driver Number',
|
||||
trainNumber: 'Train Number',
|
||||
onlineSection: 'Online Section',
|
||||
onlineServerNumber: 'Online Server Number',
|
||||
onlineTargetNumber: 'Online Target Number',
|
||||
onlineTime: 'Online Time',
|
||||
onlineTripNumber: 'Online Trip Number',
|
||||
outDepot: 'Out Depot',
|
||||
outDepotStatus: 'Out Depot Status',
|
||||
offlineSection: 'Offline Section',
|
||||
offlineServerNumber: 'Offline Server Number',
|
||||
offlineTargetNumber: 'Offline Target Number',
|
||||
offlineTime: 'Offline Time',
|
||||
offlineTripNumber: 'Offline Trip Number',
|
||||
inDepot: 'In Depot',
|
||||
inDepotStatus: 'InDepot Status',
|
||||
schedulePlan: 'Schedule Plan',
|
||||
noSchedulePlan: 'No schedule plan,whether to create?',
|
||||
loadData: 'Load Data',
|
||||
schedulePlanSuccess: 'Schedule plan success',
|
||||
createSchedulePlanSuccess: 'Create schedule plan success',
|
||||
regenerateSchedulePlanSuccess: 'Regenerate schedule plan success',
|
||||
checkPassed: 'Check passed',
|
||||
checkFailed: 'Check failed',
|
||||
checkSchedulePlanFailed: 'Check schedule plan failed',
|
||||
saveSchedulePlanSuccess: 'Save schedule plan success',
|
||||
saveSchedulePlanFail: 'Save schedule plan fail',
|
||||
selectSchedulePlan: 'Please select schedule plan'
|
||||
},
|
||||
runPlan: {
|
||||
runDiagramPlanTool: 'Run Diagram Plan Tool',
|
||||
previewRunDiagram: 'Preview Run Diagram',
|
||||
stationName: 'Station Name',
|
||||
stationMark: 'Station kilometer Mark',
|
||||
arrivalTime: 'ArrivalTime'
|
||||
},
|
||||
chatBox: {
|
||||
chatWindow: 'Chat Window',
|
||||
autoplay: 'Autoplay',
|
||||
holdAndTalk: 'Hold And Talk'
|
||||
}
|
||||
};
|
||||
|
@ -12,7 +12,10 @@ export default {
|
||||
endTrainingError: '结束实训错误',
|
||||
endTrainingTip: '操作未完成,是否确认结束?',
|
||||
startTrainingTip: '请先开始实训',
|
||||
createSimulationError: '创建仿真失败'
|
||||
createSimulationError: '创建仿真失败',
|
||||
coursePracticeList: '课程实训列表',
|
||||
unfold: '展开',
|
||||
fold: '收回'
|
||||
},
|
||||
exam: {
|
||||
startTestOperateTip: '请点击开始考试操作',
|
||||
|
@ -156,13 +156,15 @@ export default {
|
||||
this.$messageBox(this.$t('global.buyingTips'));
|
||||
},
|
||||
checkCourse() {
|
||||
this.disabled = true;
|
||||
setTimeout(() => {
|
||||
this.loading = true;
|
||||
if (this.isAddRule) {
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.trainingPlatform.examRuleManage}`,
|
||||
query: { lessonId: this.courseModel.id }
|
||||
});
|
||||
}, 100);
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.notViewTheCoursePaper'));
|
||||
}
|
||||
},
|
||||
distribute() { // 分发
|
||||
this.disabled = true;
|
||||
|
@ -192,7 +192,7 @@ export default {
|
||||
roomId: this.$route.query.roomId
|
||||
});
|
||||
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].deviceCode = item.deviceCode;
|
||||
}
|
||||
@ -250,10 +250,10 @@ export default {
|
||||
// cancelButtonText: '取消',
|
||||
// type: 'warning'
|
||||
// }).then(()=> {
|
||||
// this.undate();
|
||||
// this.update();
|
||||
// });
|
||||
// } else {
|
||||
// this.undate();
|
||||
// this.update();
|
||||
// }
|
||||
// });
|
||||
this.update();
|
||||
|
@ -2,12 +2,12 @@
|
||||
<div id="leftSlider" class="left-slider">
|
||||
<div class="tip-title">
|
||||
<span>
|
||||
课程实训列表
|
||||
{{ $t('display.lesson.coursePracticeList') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="handleShow">
|
||||
<span v-if="show" class="el-icon-arrow-right" @click="handleSliderShow(true)">展开</span>
|
||||
<span v-else class="el-icon-arrow-left" @click="handleSliderShow(false)">收回</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)">{{ $t('display.lesson.fold') }}</span>
|
||||
</div>
|
||||
<div class="slider-tree">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
|
@ -19,14 +19,10 @@
|
||||
@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-schema
|
||||
v-if="isDemon || isPlan || isScript "
|
||||
v-if="isDemon || isScript "
|
||||
ref="menuSchema"
|
||||
:offset="offset"
|
||||
:group="group"
|
||||
@ -55,10 +51,8 @@ import FaultChoose from './demon/faultChoose';
|
||||
import MapSystemDraft from '@/views/mapsystem/index';
|
||||
import MenuLesson from '@/views/display/menuLesson';
|
||||
import MenuDemon from '@/views/display/menuDemon';
|
||||
import MenuScreen from '@/views/display/menuScreen';
|
||||
import MenuSchema from '@/views/display/menuSchema';
|
||||
import MenuSystemTime from '@/views/display/menuSystemTime';
|
||||
import MenuPlan from '@/views/display/menuPlan';
|
||||
import MenuScript from '@/views/display/menuScript';
|
||||
import AddQuest from './demon/addQuest';
|
||||
import Scheduling from './demon/scheduling';
|
||||
@ -85,9 +79,7 @@ export default {
|
||||
AddQuest,
|
||||
MenuLesson,
|
||||
MapSystemDraft,
|
||||
MenuPlan,
|
||||
MenuDemon,
|
||||
MenuScreen,
|
||||
MenuScript,
|
||||
MenuSchema,
|
||||
MenuSystemTime,
|
||||
@ -167,19 +159,13 @@ export default {
|
||||
return this.$route.query.skinCode;
|
||||
},
|
||||
isLesson() {
|
||||
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
|
||||
return this.mode === 'teach' || this.mode === 'manage';
|
||||
},
|
||||
isDemon() {
|
||||
return this.mode === 'demon';
|
||||
},
|
||||
isScreen() {
|
||||
return this.mode === 'dp';
|
||||
},
|
||||
isScript() {
|
||||
return this.mode === 'script';
|
||||
},
|
||||
isPlan() {
|
||||
return this.mode === 'plan';
|
||||
}
|
||||
// isDrive() {
|
||||
// return this.prdType == '04';
|
||||
@ -227,7 +213,6 @@ export default {
|
||||
EventBus.$on('clearCheckLogin', () => {
|
||||
this.clearCheckLogin();
|
||||
});
|
||||
|
||||
await this.setWindowSize();
|
||||
await this.initLoadData();
|
||||
this.switchMode('');
|
||||
@ -329,20 +314,13 @@ export default {
|
||||
// 加载地图数据
|
||||
async initLoadData() {
|
||||
this.$store.dispatch('training/reset');
|
||||
|
||||
try {
|
||||
await this.loadSimulationInfo();
|
||||
|
||||
if (this.isDemon) {
|
||||
await this.initLoadDemonData();
|
||||
} else if (this.isScreen) {
|
||||
await this.initLoadScreenData();
|
||||
} else if (this.isPlan) {
|
||||
await this.initLoadTestRunData();
|
||||
} else if (this.isScript) {
|
||||
await this.initLoadTaskData();
|
||||
}
|
||||
|
||||
this.checkLoginLineTimer();
|
||||
this.checkMouseStatusTimer();
|
||||
} catch (error) {
|
||||
@ -362,18 +340,6 @@ export default {
|
||||
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() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
@ -386,18 +352,6 @@ export default {
|
||||
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() {
|
||||
this.$refs.addQuest.doShow();
|
||||
@ -481,10 +435,6 @@ export default {
|
||||
await this.$refs.lessonMenu.back();
|
||||
} else if (this.isDemon) {
|
||||
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) {
|
||||
await this.$refs.menuScript.back();
|
||||
}
|
||||
|
@ -22,14 +22,10 @@
|
||||
@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-schema
|
||||
v-if="isDemon || isPlan || isScript "
|
||||
v-if="isDemon || isScript "
|
||||
ref="menuSchema"
|
||||
:offset="offset"
|
||||
:group="group"
|
||||
@ -54,10 +50,8 @@ import MapSystemDraft from '@/views/newMap/mapsystemNew/index';
|
||||
import MenuExam from '@/views/newMap/displayNew/menuExam';
|
||||
import MenuLesson from '@/views/newMap/displayNew/menuLesson';
|
||||
import MenuDemon from '@/views/newMap/displayNew/menuDemon';
|
||||
import MenuScreen from '@/views/newMap/displayNew/menuScreen';
|
||||
import MenuSchema from '@/views/newMap/displayNew/menuSchema';
|
||||
import MenuSystemTime from '@/views/newMap/displayNew/menuSystemTime';
|
||||
import MenuPlan from '@/views/newMap/displayNew/menuPlan';
|
||||
import MenuScript from '@/views/newMap/displayNew/menuScript';
|
||||
import Scheduling from './demon/scheduling';
|
||||
import { mapGetters } from 'vuex';
|
||||
@ -82,9 +76,7 @@ export default {
|
||||
MenuExam,
|
||||
MenuLesson,
|
||||
MapSystemDraft,
|
||||
MenuPlan,
|
||||
MenuDemon,
|
||||
MenuScreen,
|
||||
MenuScript,
|
||||
MenuSchema,
|
||||
MenuSystemTime,
|
||||
@ -163,7 +155,7 @@ export default {
|
||||
return this.$route.query.skinCode;
|
||||
},
|
||||
isLesson() {
|
||||
return this.mode === 'teach' || this.mode === 'record' || this.mode === 'manage';
|
||||
return this.mode === 'teach' || this.mode === 'manage';
|
||||
},
|
||||
isExam() {
|
||||
return this.mode === 'exam';
|
||||
@ -171,15 +163,9 @@ export default {
|
||||
isDemon() {
|
||||
return this.mode === 'demon';
|
||||
},
|
||||
isScreen() { // 暂时不用
|
||||
return this.mode === 'dp';
|
||||
},
|
||||
isScript() {
|
||||
return this.mode === 'script';
|
||||
},
|
||||
isPlan() {
|
||||
return this.mode === 'plan';
|
||||
},
|
||||
isDrive() {
|
||||
return this.prdType == '04';
|
||||
},
|
||||
@ -338,22 +324,15 @@ export default {
|
||||
// 加载地图数据
|
||||
async initLoadData() {
|
||||
this.$store.dispatch('training/reset');
|
||||
|
||||
try {
|
||||
await this.loadSimulationInfo();
|
||||
|
||||
if (this.isDemon) {
|
||||
await this.initLoadDemonData();
|
||||
} else if (this.isScreen) {
|
||||
await this.initLoadScreenData();
|
||||
} else if (this.isPlan) {
|
||||
await this.initLoadTestRunData();
|
||||
} else if (this.isScript) {
|
||||
await this.initLoadTaskData();
|
||||
} else {
|
||||
await this.initLoadLessonOrExamData();
|
||||
}
|
||||
|
||||
this.checkLoginLineTimer();
|
||||
this.checkMouseStatusTimer();
|
||||
} catch (error) {
|
||||
@ -394,17 +373,6 @@ export default {
|
||||
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() {
|
||||
this.$store.dispatch('training/end', TrainingMode.NORMAL);
|
||||
@ -417,18 +385,6 @@ export default {
|
||||
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) {
|
||||
try {
|
||||
@ -482,10 +438,6 @@ export default {
|
||||
await this.$refs.lessonMenu.back();
|
||||
} else if (this.isDemon) {
|
||||
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) {
|
||||
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="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-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.FAULT">{{ $t('display.schema.faultOperation') }}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</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-view ref="runPlanView" :group="group" />
|
||||
<!-- 加载剧本列表弹窗 -->
|
||||
@ -76,9 +76,6 @@ export default {
|
||||
notScript() {
|
||||
return this.$route.params.mode !== 'script';
|
||||
},
|
||||
isPlan() {
|
||||
return this.$route.params.mode === 'plan';
|
||||
},
|
||||
isScript() {
|
||||
return this.$route.params.mode === 'script';
|
||||
},
|
||||
@ -112,40 +109,18 @@ export default {
|
||||
this.viewDisabled = true;
|
||||
getStationList(opt.mapId).then(response => {
|
||||
this.$store.dispatch('runPlan/setStations', response.data).then(() => {
|
||||
if (this.$route.params.mode == 'plan') {
|
||||
if (this.$route.query.from == 'user') {
|
||||
// 测试运行图功能
|
||||
getRpDetailByUserMapId(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 {
|
||||
// 测试运行图功能
|
||||
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'));
|
||||
});
|
||||
}
|
||||
// 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'));
|
||||
// }
|
||||
// });
|
||||
|
||||
} 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(() => {
|
||||
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: {
|
||||
formTop() {
|
||||
const form = {
|
||||
return {
|
||||
labelWidth: '220px',
|
||||
items: [
|
||||
{ prop: 'gatewayCode', label: '网关编码:', type: 'select', required: true, options: this.gatewayList, placeholder: '请选择网关编码' }
|
||||
]
|
||||
};
|
||||
return form;
|
||||
},
|
||||
topRules() {
|
||||
const crules = {
|
||||
return {
|
||||
gatewayCode: [
|
||||
{ required: true, message: '请输入网关编码', trigger: 'change' }
|
||||
]
|
||||
};
|
||||
return crules;
|
||||
},
|
||||
title() {
|
||||
return '编辑设备配置';
|
||||
|
Loading…
Reference in New Issue
Block a user