Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
# Conflicts: # src/i18n/langs/en/rules.js # src/i18n/langs/zh/rules.js
This commit is contained in:
commit
c777b3dbcc
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,8 +6,7 @@ yarn-debug.log*
|
||||
yarn-error.log*
|
||||
package-lock.json
|
||||
tests/**/coverage/
|
||||
/src/utils/baseUrl.js
|
||||
/src/utils/
|
||||
src/utils/baseUrl.js
|
||||
|
||||
# Editor directories and files
|
||||
.idea
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 120 KiB |
33
src/i18n/langs/en/dashboard.js
Normal file
33
src/i18n/langs/en/dashboard.js
Normal file
@ -0,0 +1,33 @@
|
||||
export default {
|
||||
testStatistics: 'Test statistics',
|
||||
simulationStatistics: 'simulationStatistics',
|
||||
comprehensiveExerciseCloudPlatform: 'Comprehensive exercise cloud platform',
|
||||
driverSimulatedDrivingSystem: 'Driver simulated driving system',
|
||||
ATSLineAdjustmentWorkstation: 'ATS line adjustment workstation',
|
||||
ATSLocalWorkstation: 'ATS local workstation',
|
||||
courseStatistics: 'Course Statistics',
|
||||
signalTraining: 'Signal Training',
|
||||
turnoutTraining: 'Turnout Training',
|
||||
sectionTraining: 'Section Training',
|
||||
stationTraining: 'Station Training',
|
||||
permissions: 'Permissions (individual)',
|
||||
largeScreenSystemPermissions: 'Large screen system permissions',
|
||||
courseAuthority: 'Course authority',
|
||||
examinationAuthority: 'Examination authority',
|
||||
simulationPermission: 'Simulation Permission',
|
||||
residualPermissionDistributionMap: 'Residual permission distribution map',
|
||||
totalPermissions: 'total permissions',
|
||||
noMapLineDataYetAvailable: 'No map line data yet available',
|
||||
individual: 'individual',
|
||||
permissionMap: {
|
||||
'ATS local workstation - Course authority': 0,
|
||||
'ATS line adjustment workstation - Course authority': 0,
|
||||
'ATS local workstation - Examination authority': 0,
|
||||
'ATS line adjustment workstation - Examination authority': 0,
|
||||
'ATS local workstation - Simulation authority': 0,
|
||||
'ATS line adjustment workstation - Simulation authority': 0,
|
||||
'Comprehensive exercise cloud platform - Simulation authority': 0,
|
||||
'Driver simulated driving system - Simulation authority': 0,
|
||||
'Large screen system permissions': 0
|
||||
}
|
||||
};
|
171
src/i18n/langs/en/display.js
Normal file
171
src/i18n/langs/en/display.js
Normal file
@ -0,0 +1,171 @@
|
||||
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',
|
||||
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',
|
||||
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',
|
||||
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'
|
||||
}
|
||||
};
|
@ -62,6 +62,30 @@ export default {
|
||||
obtainChapterDataFailed: 'Failed to obtain chapter data',
|
||||
obtainCourseDetailsFailed: 'Failed to obtain course details',
|
||||
obtainCourseInformationFailed: 'Failed to obtain course information',
|
||||
obtainStepDataFailed: 'Failed to obtain step data'
|
||||
|
||||
obtainStepDataFailed: 'Failed to obtain step data',
|
||||
submitExamFailed: 'Automatic submission of test results failed',
|
||||
getTestInformationFailed: 'Failed to get test information',
|
||||
gifSource: 'gif source',
|
||||
page: 'page',
|
||||
noPermissionToGoToThisPage: 'You don\'t have permission to go to this page',
|
||||
dissatisfied: 'If you are dissatisfied, please contact your leader.',
|
||||
orYouCanGo: 'Or you can go:',
|
||||
backToHome: 'Back to home',
|
||||
justLookingAround: 'Just looking around',
|
||||
pointMeToSeeThePicture: 'Point me to see the picture',
|
||||
casualLook: 'Casual look',
|
||||
problemWithAudioQuality: 'There is a problem with audio quality',
|
||||
audioIsTooLong: 'The audio is too long, it is recommended to be below 60s',
|
||||
audioIsTooShort: 'The audio is too short, it is recommended to re-record',
|
||||
networkProblem: 'Network problem, please try again',
|
||||
initializationFailed: 'Initialization failed:',
|
||||
getMapDataFailed: 'Failed to get map data',
|
||||
ibpNoDraw: 'Unbound station or the station IBP disk is not drawn yet',
|
||||
startSimulationFailed: 'Start simulation failed, please go back and try again',
|
||||
endSimulationFailed: 'End simulation failed, please return',
|
||||
runGraphIsNotLoaded: 'Today\'s run graph is not loaded',
|
||||
startedComprehensiveDrillFailure: 'Started a comprehensive drill failure.',
|
||||
stationAttendantStationCannotBeEmpty: 'Station attendant station cannot be empty',
|
||||
destroyedRoomFailed: 'Destroyed room failed!',
|
||||
exceededTheTotalNumberOfAssignableRoles: 'The number of assigned roles has exceeded the total number of assignable roles!'
|
||||
};
|
||||
|
@ -1,16 +1,40 @@
|
||||
export default {
|
||||
testSystem: '城市轨道交通考试系统',
|
||||
testSystemDescription: ' 该系统具有自定义考试规则、自动生成考卷、学员成绩统计、数据曲线分析及题库管理等功能,从实战操作、业务流程、故障模拟及考试规则等多角度出发,力求打造最符合用户需求的城市轨道交通在线交互实操类考试系统',
|
||||
examResultsDetails: '考试结果详情',
|
||||
testQuestionsName: '试题名称',
|
||||
testScores: '考试得分',
|
||||
points: '分',
|
||||
whetherThrough: '是否通过',
|
||||
didNotCalculate: '未计算',
|
||||
pass: '通过',
|
||||
notPass: '未通过',
|
||||
examTime: '考试用时',
|
||||
trainingName: '实训名称',
|
||||
trainingScore: '实训得分',
|
||||
returnToExamList: '返回考试列表'
|
||||
testSystem: 'Urban rail transit examination system',
|
||||
testSystemDescription: 'The system has the functions of self-defined examination rules, automatic generation of examination papers, statistics of students\' scores, data curve analysis and question bank management, etc. From the perspectives of practical operation, business process, fault simulation and examination rules, it strives to build the online interactive practical operation examination system of urban rail transit that best meets users\' needs',
|
||||
examResultsDetails: 'Details of examination results',
|
||||
testQuestionsName: 'Item name',
|
||||
testScores: 'Test scores',
|
||||
points: 'Point',
|
||||
whetherThrough: 'Whether through',
|
||||
didNotCalculate: 'Did not calculate',
|
||||
pass: 'pass',
|
||||
notPass: 'Not pass',
|
||||
examTime: 'Exam time',
|
||||
trainingName: 'Training name',
|
||||
trainingScore: 'Training score',
|
||||
returnToExamList: 'Return to the exam list',
|
||||
totalScore: 'Total score',
|
||||
itemList: 'Item list',
|
||||
courseName: 'Course name',
|
||||
permissionsDetails: 'Permissions for details',
|
||||
buy: 'buy',
|
||||
distributePermission: 'Permission distribution (examination)',
|
||||
viewCoursePapers: 'View course papers',
|
||||
examStartTime: 'Exam start time',
|
||||
theExamIsReadyAnyTime: 'The exam is ready any time',
|
||||
testExplanation: 'Test Explanation',
|
||||
examTimeAvailable: 'Exam time available',
|
||||
fullMarksInTheExam: 'Full marks in the exam',
|
||||
passMarkTheExam: 'Pass mark the exam',
|
||||
examinationRules: 'Examination rules',
|
||||
trainingType: 'Training type',
|
||||
numberOfQuestions: 'Number of questions',
|
||||
score: 'Score',
|
||||
startTheExam: 'Start the exam',
|
||||
examinationTiming: 'Examination timing',
|
||||
maximumTimeToCompleteThisQuestion: 'Maximum time to complete this question',
|
||||
theBestTimeToCompleteTheQuestion: 'The best time to complete the question',
|
||||
trainingNotes: 'Training notes',
|
||||
giveUpTheExam: 'Give up the exam',
|
||||
nameOfTestPaper: 'Test name'
|
||||
};
|
||||
|
@ -83,7 +83,40 @@ export default {
|
||||
trainingNotStart: "{name}'s room hasn't started yet",
|
||||
inputRoomNumber: 'Please enter the room number.',
|
||||
chooseRoom: 'Choose Room',
|
||||
month: 'month',
|
||||
|
||||
month: ' month',
|
||||
indexA: ' piece',
|
||||
purchasePrice: 'Total Price: ',
|
||||
permissionNum: 'Permission Num: ',
|
||||
submitOrders: 'Submit orders',
|
||||
completePayment: 'Complete payment',
|
||||
weChatPay: 'WeChat Pay',
|
||||
alipayPayment: 'AliPay',
|
||||
clickRefresh: 'Please click to refresh',
|
||||
checkstand: 'Checkstand',
|
||||
permissionType: 'Permission Type: ',
|
||||
productName: 'Product Name',
|
||||
simulationPrice: 'Simulation Unit Price',
|
||||
yuanMonth: 'yuan/month',
|
||||
permissions: ' permissions',
|
||||
purchaseDuration: 'Purchase Duration: ',
|
||||
custom: 'custom',
|
||||
january: 'One month',
|
||||
march: 'Three months',
|
||||
year: 'One year',
|
||||
twoYears: 'Two years',
|
||||
fiveYears: 'Five years',
|
||||
tenYears: 'Ten years',
|
||||
orderCode: 'Order Code: ',
|
||||
creationTime: 'Create Time: ',
|
||||
amountPayable: 'Amounts Payable: ',
|
||||
|
||||
buyProject: 'The products you will purchase are virtual content services. After purchase, you will not be able to return, transfer or exchange. Please confirm.',
|
||||
relatedServices: 'You can view and use the related services in the “Permissions Details” area after purchase.',
|
||||
paymentSuccessful: 'Payment successful,click to return',
|
||||
cancelSuccessfully: 'Cancel success,click to return',
|
||||
paymentFailed: 'Payment failed,click to return',
|
||||
|
||||
putaway: 'Putaway',
|
||||
soldOut: 'Sold out',
|
||||
exportMap: 'Export Map',
|
||||
@ -104,7 +137,14 @@ export default {
|
||||
updateTime: 'Update time:',
|
||||
line: 'Line:',
|
||||
permissionList: 'Permissions list:',
|
||||
remove: 'remove',
|
||||
append: 'append',
|
||||
release: 'release'
|
||||
remove: 'Remove',
|
||||
append: 'Append',
|
||||
release: 'Release',
|
||||
temporarilyNoData: 'Temporarily no data',
|
||||
second: 'Seconds',
|
||||
amount: 'Amount',
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
details: 'Details',
|
||||
enterNameToFilter: 'Enter a name to filter'
|
||||
};
|
||||
|
@ -17,6 +17,12 @@ import planMonitor from './planMonitor';
|
||||
import screenMonitor from './screenMonitor';
|
||||
import demonstration from './demonstration';
|
||||
import exam from './exam';
|
||||
import dashboard from './dashboard';
|
||||
import jlmap3d from './jlmap3d';
|
||||
import display from './display';
|
||||
import joinTraining from './joinTraining';
|
||||
import trainRoom from './trainRoom';
|
||||
import menu from './menu';
|
||||
|
||||
export default {
|
||||
...enLocale,
|
||||
@ -37,5 +43,11 @@ export default {
|
||||
planMonitor,
|
||||
screenMonitor,
|
||||
demonstration,
|
||||
exam
|
||||
exam,
|
||||
dashboard,
|
||||
jlmap3d,
|
||||
display,
|
||||
joinTraining,
|
||||
trainRoom,
|
||||
menu
|
||||
};
|
||||
|
12
src/i18n/langs/en/jlmap3d.js
Normal file
12
src/i18n/langs/en/jlmap3d.js
Normal file
@ -0,0 +1,12 @@
|
||||
export default {
|
||||
trainGroupNumber: 'Train group number:',
|
||||
surveillanceHidden: 'In-vehicle surveillance - hidden',
|
||||
surveillanceDisplay: 'In-vehicle surveillance - display',
|
||||
trainInstrumentationDisplay: 'Train instrumentation - display',
|
||||
trainInstrumentationHidden: 'Train instrumentation - hidden',
|
||||
terminal: 'terminal:',
|
||||
nextStation: 'Next station:',
|
||||
confirmSignalOpen: 'Please confirm that the signal ahead is open',
|
||||
faultInformation: 'Fault information:',
|
||||
vWeek: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
||||
};
|
25
src/i18n/langs/en/joinTraining.js
Normal file
25
src/i18n/langs/en/joinTraining.js
Normal file
@ -0,0 +1,25 @@
|
||||
export default {
|
||||
chooseDriver: 'Choose driver',
|
||||
cancelDriver: 'Cancel driver',
|
||||
admin: 'Admin',
|
||||
teacher: 'Teacher',
|
||||
dispatcher: 'Dispatcher',
|
||||
stationAttendant: 'Station attendant',
|
||||
driver: 'Driver',
|
||||
universalAccount: 'Universal account',
|
||||
sending: 'sending...',
|
||||
autoplay: 'Autoplay',
|
||||
holdAndTalk: 'Hold and talk',
|
||||
recording: 'recording...',
|
||||
iBPDisk: 'IBP disk',
|
||||
driverPerspective: 'Driver perspective',
|
||||
drivingByPlan: 'Driving by plan',
|
||||
exitPlan: 'Exit plan',
|
||||
runGraphPreview: 'Run graph preview',
|
||||
runGraphLoading: 'Run graph loading',
|
||||
faultSetting: 'Fault setting',
|
||||
normalOperation: 'Normal operation',
|
||||
faultOperation: 'Fault operation',
|
||||
local: 'Local',
|
||||
lineAdjustment: 'Driving schedule'
|
||||
};
|
@ -87,5 +87,14 @@ export default {
|
||||
deleteTraining: 'Delete training',
|
||||
automaticGenerationOfTraining: 'Automatic generation of training',
|
||||
modifyTrainingByCategory: 'Modify training by category',
|
||||
deleteAutoGeneratedTraining: 'Delete auto-generated training'
|
||||
deleteAutoGeneratedTraining: 'Delete auto-generated training',
|
||||
menu: 'Menu',
|
||||
turnout: 'Turnout',
|
||||
section: 'Section',
|
||||
signaler: 'Signaler',
|
||||
controlMode: 'Control mode',
|
||||
platform: 'Platform',
|
||||
train: 'Train',
|
||||
station: 'Station',
|
||||
trainWindow: 'Train window'
|
||||
};
|
||||
|
66
src/i18n/langs/en/menu.js
Normal file
66
src/i18n/langs/en/menu.js
Normal file
@ -0,0 +1,66 @@
|
||||
export default {
|
||||
menuBar: {
|
||||
system: 'System',
|
||||
view: 'View',
|
||||
refresh: 'Refresh',
|
||||
display: 'Display',
|
||||
setTrainIdDisplay: 'Set TrainId Display',
|
||||
setNameDisplay: 'Set Name Display',
|
||||
setDeviceDisplay: 'Set Device Display',
|
||||
stationMapSwitch: 'StationMapSwitch',
|
||||
controlModeSwitch: 'ControlModeSwitch',
|
||||
toStationControl: 'Switch Station Control',
|
||||
forcedStationControl: 'Forced Station Control',
|
||||
toCentralControl: 'Switch Central Control',
|
||||
requestOperationArea: 'RequestOperationArea',
|
||||
historyQuery: 'HistoryQuery',
|
||||
userManage: 'UserManage',
|
||||
help: 'Help',
|
||||
about: 'ControlMonitor(A)',
|
||||
planCarOperation: 'PlanCarOperation',
|
||||
addPlanCar: 'Add Plan Car',
|
||||
panPlanCar: 'Pan Plan Car',
|
||||
deletePlanCar: 'Delete Plan Car',
|
||||
trainNumberMaintenance: 'TrainNumberMaintenance',
|
||||
schedulingLog: 'SchedulingLog',
|
||||
systemAnalysis: 'SystemAnalysis',
|
||||
implemented: 'implementing......'
|
||||
},
|
||||
menuCancle: {
|
||||
zoomIn: 'Zoom In',
|
||||
zoomOut: 'Zoom Out',
|
||||
back: 'Back'
|
||||
},
|
||||
menuSection: {
|
||||
sectionFaultUnlock: 'Section Fault Unlock',
|
||||
sectionResection: 'Section Resection',
|
||||
sectionActive: 'Section Active',
|
||||
sectionAxisPreReset: 'Section Axis PreReset',
|
||||
sectionBlockade: 'Section Blockade',
|
||||
sectionUnblock: 'Section Unblock',
|
||||
sectionSetSpeedLimit: 'Section Set Speed Limit',
|
||||
sectionCancelSpeedLimit: 'Section Cancel Speed Limit',
|
||||
axisPreReset: 'Axis PreReset',
|
||||
createTrain: 'Create Train',
|
||||
setFault: 'Set Fault',
|
||||
cancelFault: 'Cancel Fault'
|
||||
},
|
||||
menuSignal: {
|
||||
|
||||
},
|
||||
menuStation: {
|
||||
|
||||
},
|
||||
menuStationControl: {
|
||||
|
||||
},
|
||||
menuStationStand: {
|
||||
|
||||
},
|
||||
menuSwitch: {
|
||||
|
||||
},
|
||||
menuTrain: {
|
||||
|
||||
}
|
||||
};
|
@ -84,5 +84,23 @@ export default {
|
||||
sourcesOfInformation: 'Sources of information',
|
||||
distributePermission: 'Distribute permission',
|
||||
orderCreation: 'Order creation',
|
||||
chooseGoods: 'Choose goods'
|
||||
chooseGoods: 'Choose goods',
|
||||
permissionName: 'Permission Name',
|
||||
receivingPermission: 'Receiving permission',
|
||||
isPackage: 'Whether the permission package',
|
||||
modifyPermissionContent: 'Modify permission content',
|
||||
addPermissions: 'Add permissions',
|
||||
modifyPermissions: 'Modify permissions',
|
||||
createPermission: 'Create permission',
|
||||
oneClickGenerationPermission: 'One-click generation permission',
|
||||
packingDetails: 'Packing details',
|
||||
belongsToMap: 'Belongs to map',
|
||||
oneClickGeneration: 'One-click generation',
|
||||
selectPermission: 'Select Permission',
|
||||
permission: 'Permission',
|
||||
orderSelectionItem: 'Order selection item',
|
||||
orderDetails: 'Order details',
|
||||
statusType: 'Status type',
|
||||
private: 'Private',
|
||||
public: 'Public'
|
||||
};
|
||||
|
@ -26,6 +26,8 @@ export default {
|
||||
addPermissionPackageRule: 'Add authority packaging rules',
|
||||
editPermissionPackageRule: 'edit authority packaging rule',
|
||||
restPermissionMaxNumber: '(maximum number of remaining permissions: {0})',
|
||||
pleaseSelectTransferPermission: 'Select transfer permissions'
|
||||
|
||||
pleaseSelectTransferPermission: 'Select transfer permissions',
|
||||
permissionName: 'Permission Name',
|
||||
private: 'Private',
|
||||
public: 'Public'
|
||||
};
|
||||
|
@ -53,6 +53,7 @@ export default {
|
||||
dataDictionary: 'Data dictionary',
|
||||
dataDictionaryDetails: 'Data dictionary details',
|
||||
userManage: 'user management',
|
||||
cacheManage: 'cache management',
|
||||
userTrainingManage: 'User training management',
|
||||
userExamManage: 'User examination management',
|
||||
userSimulationManage: 'User simulation management',
|
||||
|
@ -239,8 +239,22 @@ export default {
|
||||
selectOneTrainingType: 'Only one training type can be selected',
|
||||
enterProductType: 'Please enter product type',
|
||||
selectAssociatedStation: 'Please select the associated station',
|
||||
pleaseSelectButtonContent: '请输入内容',
|
||||
pleaseSelectTrainDir: '请选择列车所在方向',
|
||||
pleaseEnterSplit: '请输入拆分数量',
|
||||
pleaseEnterSplitNumber: '请输入合理的拆分数量'
|
||||
pleaseEnterSplitNumber: '请输入合理的拆分数量',
|
||||
enterScale: 'Please enter the zoom ratio',
|
||||
enterXOffset: 'Please enter X offset',
|
||||
enterYOffset: 'Please enter Y offset',
|
||||
pleaseSelectButtonType: 'Please select the button type',
|
||||
pleaseSelectButtonContent: 'Please enter the content',
|
||||
endTimeRules: 'The end time must be greater than the start time.',
|
||||
selectCourses: 'Please select courses',
|
||||
selectTheMapRoute: 'Please select the map route.',
|
||||
enterKeyword: 'Please enter a keyword',
|
||||
successfullyModified: 'Successfully modified',
|
||||
modifyTheFailure: 'Modify the failure',
|
||||
selectTheCourseNameFirst: 'Please select the course name first',
|
||||
selectMultiplePermissions: 'Please select multiple permissions',
|
||||
enterPermissionName: 'Please enter a permission name',
|
||||
pleaseSelectPermission: 'Please select permission'
|
||||
};
|
||||
|
@ -1,22 +1,82 @@
|
||||
export default {
|
||||
scriptTitle: 'Task Recording',
|
||||
saveMaplocation: 'Update Location',
|
||||
saveBackground: 'Save Background',
|
||||
saveData: 'Save Data',
|
||||
roleManage: 'Role Manage',
|
||||
targetCondition: 'Task Target',
|
||||
taskScript: 'Task Script',
|
||||
roleName: 'Role Name',
|
||||
roleType: 'Role Type',
|
||||
deviceCode: 'Device Code',
|
||||
roleList: 'Role List',
|
||||
operation: 'Operation',
|
||||
roleAdd: 'Add',
|
||||
delete: 'Delete',
|
||||
behaviorOperate: 'Behavior Operate',
|
||||
conditionTitle: 'Target condition',
|
||||
deviceType: 'Device Type',
|
||||
deviceCondition: 'Device Condition',
|
||||
paramDeviceType: 'Param DeviceType',
|
||||
paramDeviceCode: 'Param DeviceCode'
|
||||
mapList: 'Map List',
|
||||
createScript: 'Create Script',
|
||||
scriptName: 'Script Name',
|
||||
addScript: 'Add Script',
|
||||
map: 'Map',
|
||||
scriptDescription: 'Script Description',
|
||||
submit: 'submit',
|
||||
scriptNameRule: 'Please input script name',
|
||||
scriptDescriptionRule: 'Please input script description',
|
||||
createScriptSuccess: 'Create script success',
|
||||
createScriptFail: 'Create script failure',
|
||||
scriptDetail: 'Script Detail',
|
||||
scriptRecord: 'Record',
|
||||
scriptModify: 'Modify',
|
||||
scriptDelete: 'Delete',
|
||||
getScriptFail: 'Get script information failure',
|
||||
createSimulationFail: 'Create simulation failure',
|
||||
modifyScriptSuccess: 'Modify script success',
|
||||
modifyScriptFail: 'Modify script failure',
|
||||
deleteScriptTip: 'This action will delete this script, whether to continue?',
|
||||
deleteScriptSucess: 'delete script sucess',
|
||||
deleteScriptFail: 'delete script failure',
|
||||
scriptRecordTitle: 'Script Record',
|
||||
drivingPause: 'Pause',
|
||||
recoverAndExecute: 'Recover And Execute',
|
||||
resetScript: 'Reset Script',
|
||||
pauseFail: 'Pause failure',
|
||||
recoverFail: 'Recover failure',
|
||||
saveBackgroundSuceess: 'Save background suceess',
|
||||
updateLocationFail: 'update location failure',
|
||||
saveBackgroundFail: 'Save background failure',
|
||||
saveDataSucess: 'Save data sucess',
|
||||
saveDataFail: 'Save data failure',
|
||||
clearDataTip: 'This action will clear the saved script data, whether to continue?',
|
||||
resetDataSuccess: 'Reset script success',
|
||||
resetDataFail: 'Reset script failure',
|
||||
|
||||
allRoles: 'All Roles',
|
||||
actors: 'Actors',
|
||||
roleSexMale: 'Male',
|
||||
roleSexFemale: 'Female',
|
||||
selectScriptActorSuccess: 'Select script actor success',
|
||||
selectScriptActorFail: 'Select script actor failure',
|
||||
cancleScriptActorSuccess: 'Cancle script actor success',
|
||||
cancleScriptActorFail: 'Cancle script actor failure',
|
||||
modifyScriptActorSexSuccess: 'Modify script actor sex success',
|
||||
modifyScriptActorSexFail: 'Modify script actor sex failure',
|
||||
|
||||
addConversition: 'Add Conversition',
|
||||
narrator: 'Narrator',
|
||||
narratorRules: 'Please select narrator',
|
||||
receiver: 'Receiver',
|
||||
receiverRules: 'Please select receiver',
|
||||
conversitionContent: 'Content',
|
||||
addCommand: 'Add Command',
|
||||
executor: 'Executor',
|
||||
executorRules: 'Please select executor',
|
||||
executeCommand: 'Command',
|
||||
executeCommandRules: 'Please select execute command',
|
||||
startStation: 'Start Station',
|
||||
startStationRules: 'Please select start station ',
|
||||
endStation: 'End Station',
|
||||
endStationRules: 'Please select end station',
|
||||
|
||||
addCommandButton: 'Add Command',
|
||||
addConversitionButton: 'Add Conversition',
|
||||
conversitionContentRules: 'Please input content',
|
||||
addCommandSucess: 'Add command sucess',
|
||||
addCommandFail: 'Add command failure',
|
||||
addConversitionSuccess: 'Add conversition success',
|
||||
addConversitionFail: 'Add conversition failure',
|
||||
modifyConversitionSuccess: 'Modify conversition success',
|
||||
modifyConversitionFail: 'Modify conversition failure',
|
||||
modifyConversition: 'Modify Conversition',
|
||||
modifyConversitionButton: 'modify',
|
||||
drivingByPlan: 'Driving By Plan',
|
||||
scriptBack: 'Back'
|
||||
};
|
||||
|
@ -46,6 +46,7 @@ export default {
|
||||
selectTraining: 'Selection Training',
|
||||
createUserTraining: 'Creating User Training',
|
||||
editTrainingDetail: 'Editor Training Details',
|
||||
trainingTime: 'Training duration'
|
||||
|
||||
trainingTime: 'Training duration',
|
||||
subscribeToTheMapList: 'Subscribe to the map list:',
|
||||
editSimulationDetails: 'Edit simulation details'
|
||||
};
|
||||
|
@ -5,7 +5,7 @@ export default {
|
||||
trainingTime: 'Best time to complete the training:',
|
||||
trainingMaximum: 'Maximum time to complete the training:',
|
||||
trainingInstructions: 'Training instructions:',
|
||||
startTraining: 'Began to practice',
|
||||
startTraining: 'Start training',
|
||||
|
||||
courseName: 'Course name',
|
||||
courseDescription: 'Course description',
|
||||
@ -15,5 +15,6 @@ export default {
|
||||
buy: 'buy',
|
||||
permissionDistribute: 'Permission distribution (class)',
|
||||
authorityTransferred: 'Authority transferred',
|
||||
courseList: 'Course list'
|
||||
courseList: 'Course list',
|
||||
seconds: 'seconds'
|
||||
};
|
||||
|
@ -130,6 +130,21 @@ export default {
|
||||
updateTrainingSuccessfully: 'Update training successfully!',
|
||||
updateTrainingFailed: 'Failed to update training',
|
||||
savedStepDataSuccessfully: 'Saved step data successfully',
|
||||
savedStepDataFailed: 'Failed to save step data'
|
||||
|
||||
savedStepDataFailed: 'Failed to save step data',
|
||||
noCourseAuthority: 'No examination permission for this course, please go to purchase!',
|
||||
notWithinTheScopeOfTheExamination: 'Not within the scope of the examination',
|
||||
giveUpTheExamTip: 'This operation will give up the examination. Will it continue?',
|
||||
theNumberOfPermissionsAvailableIsZero: 'The number of permissions available is 0',
|
||||
userRightsHaveBeenReclaimed: 'User rights have been reclaimed',
|
||||
beKickedOut: 'You are kicked out of the room by the administrator',
|
||||
deleteListHint: 'This will delete the list, will it continue?',
|
||||
setUpASubscriptionMapSuccessfully: 'Setting up a subscription map successfully!',
|
||||
setUpASubscriptionMapFailed: 'Setting up a subscription map failed!',
|
||||
getMapStateDataException: 'Get map state data exception, please refresh the page to reload. If you encounter such problems many times, please contact the development team in an emergency!',
|
||||
packagedSuccessfully: 'Packaged successfully',
|
||||
oneKeyGeneratedSuccessfully: 'One key generated successfully!',
|
||||
obtainedPermissionSuccessfully: 'Successfully obtained permission',
|
||||
modifyTheUserPermissionStatus: 'Will this action modify the user permission status?',
|
||||
destroyRoomHint: 'You will destroy the room, are you sure you want to do this?',
|
||||
contentIsEmptyAndCannotBeSent: 'The content is empty and cannot be sent!'
|
||||
};
|
||||
|
29
src/i18n/langs/en/trainRoom.js
Normal file
29
src/i18n/langs/en/trainRoom.js
Normal file
@ -0,0 +1,29 @@
|
||||
export default {
|
||||
comprehensiveTrainingManager: 'Comprehensive training manager:',
|
||||
comprehensiveDrillRoom: 'Comprehensive drill room',
|
||||
numberOfAssignableRoles: 'Number of assignable roles:',
|
||||
dispatcher: 'Dispatcher',
|
||||
increaseDispatchers: 'Increase dispatchers',
|
||||
stationAttendant: 'Station attendant',
|
||||
increaseStationAttendant: 'Increase station attendant',
|
||||
teacher: 'Teacher',
|
||||
increaseTeacher: 'Increase teacher',
|
||||
universalAccount: 'Universal Account',
|
||||
increaseUniversalAccount: 'Increase universal account',
|
||||
driver: 'Driver',
|
||||
increaseDriver: 'Increase driver',
|
||||
bigScreen: 'Big screen',
|
||||
increaseBigScreen: 'Increase big screen',
|
||||
destroyRoom: 'Destroy room',
|
||||
generatingQRCode: 'Generating QRCode',
|
||||
startSimulation: 'Start simulation',
|
||||
enterSimulation: 'Enter simulation',
|
||||
endSimulation: 'End Simulation',
|
||||
distributeTheRoomQRCode: 'Distribute the room QR code',
|
||||
increaseIbp: 'increase IBP',
|
||||
kickOutTheRoom: 'Kick out the room',
|
||||
sending: 'sending...',
|
||||
holdAndTalk: 'Hold and talk',
|
||||
recording: 'recording...',
|
||||
sendText: 'Send text'
|
||||
};
|
34
src/i18n/langs/zh/dashboard.js
Normal file
34
src/i18n/langs/zh/dashboard.js
Normal file
@ -0,0 +1,34 @@
|
||||
export default {
|
||||
testStatistics: '考试统计',
|
||||
simulationStatistics: '仿真统计',
|
||||
comprehensiveExerciseCloudPlatform: '综合演练云平台',
|
||||
driverSimulatedDrivingSystem: '司机模拟驾驶系统',
|
||||
ATSLineAdjustmentWorkstation: 'ATS行调工作站',
|
||||
ATSLocalWorkstation: 'ATS现地工作站',
|
||||
courseStatistics: '课程统计',
|
||||
controlRightsTraining: '控制权实训',
|
||||
signalTraining: '信号机实训',
|
||||
turnoutTraining: '道岔实训',
|
||||
sectionTraining: '区段实训',
|
||||
stationTraining: '车站培训',
|
||||
permissions: '权限(个)',
|
||||
largeScreenSystemPermissions: '大屏系统权限',
|
||||
courseAuthority: '课程权限',
|
||||
examinationAuthority: '考试权限',
|
||||
simulationPermission: '仿真权限',
|
||||
residualPermissionDistributionMap: '剩余权限分布图',
|
||||
totalPermissions: '权限总计',
|
||||
noMapLineDataYetAvailable: '暂无地图线路数据',
|
||||
individual: '个',
|
||||
permissionMap: {
|
||||
'ATS现地工作站-课程权限': 0,
|
||||
'ATS行调工作站-课程权限': 0,
|
||||
'ATS现地工作站-考试权限': 0,
|
||||
'ATS行调工作站-考试权限': 0,
|
||||
'ATS现地工作站-仿真权限': 0,
|
||||
'ATS行调工作站-仿真权限': 0,
|
||||
'综合演练云平台-仿真权限': 0,
|
||||
'司机模拟驾驶系统-仿真权限': 0,
|
||||
'大屏系统权限': 0
|
||||
}
|
||||
};
|
173
src/i18n/langs/zh/display.js
Normal file
173
src/i18n/langs/zh/display.js
Normal file
@ -0,0 +1,173 @@
|
||||
export default {
|
||||
startBtn: '开始',
|
||||
endBtn: '结束',
|
||||
backBtn: '返回',
|
||||
seconds: '秒',
|
||||
lesson: {
|
||||
teachingMode: '教学模式',
|
||||
practiceMode: '练习模式',
|
||||
testMode: '测验模式',
|
||||
score: '得分:',
|
||||
selectTraining: '请选择实训',
|
||||
endTrainingError: '结束实训错误',
|
||||
endTrainingTip: '操作未完成,是否确认结束?',
|
||||
startTrainingTip: '请先开始实训',
|
||||
createSimulationError: '创建仿真失败'
|
||||
},
|
||||
exam: {
|
||||
startTestOperateTip: '请点击开始考试操作',
|
||||
selectTest: '请选择试题',
|
||||
endTrainingError: '结束实训错误',
|
||||
startTestTip: '请先开始考试',
|
||||
endTestTip: '是否放弃本次考试?',
|
||||
refreshListError: '刷新列表失败',
|
||||
examTime: '考试计时:',
|
||||
questionTitle: '本题名称:',
|
||||
bestTime: '最佳用时:',
|
||||
maximumTime: '最大用时:',
|
||||
trainingInstructions: '实训说明:',
|
||||
viewQuestions: '查看试题',
|
||||
prev: '上一题',
|
||||
next: '下一题',
|
||||
submitExaminationPaper: '提交试卷',
|
||||
autoSubmit: '考试结束自动提交',
|
||||
getTestInformation: '获取试题信息失败',
|
||||
cancleExam: '考试未完成,是否确认退出?'
|
||||
},
|
||||
training: {
|
||||
trainingName: '实训名称:',
|
||||
bestTime: '最佳用时:',
|
||||
maximumTime: '最大用时:',
|
||||
trainingInstructions: '实训说明:',
|
||||
getCourseInformationFail: '获取课程信息失败'
|
||||
},
|
||||
demon: {
|
||||
trialTime: '试用时间:',
|
||||
dispatchingPlan: '派班计划',
|
||||
exitScript: '退出剧本',
|
||||
drivingByPlan: '按计划行车',
|
||||
exitPlan: '退出计划',
|
||||
back: '返回',
|
||||
threeDimensionalView: '三维视图',
|
||||
taskOperateSuccess: '任务操作成功',
|
||||
getTimeFail: '获取时间失败',
|
||||
startSimulationFail: '开始仿真失败,请返回重试',
|
||||
endSimulationFail: '结束仿真失败,请返回',
|
||||
exitTaskFail: '退出任务失败',
|
||||
driverPerspective: '司机视角'
|
||||
},
|
||||
systemTime: {
|
||||
timePause: '暂停中'
|
||||
},
|
||||
screen: {
|
||||
trialTime: '试用时间:',
|
||||
getTimeFail: '获取时间失败'
|
||||
},
|
||||
replay: {
|
||||
pleaseSelect: '请选择',
|
||||
back: '返回',
|
||||
pause: '暂停',
|
||||
play: '播放'
|
||||
},
|
||||
plan: {
|
||||
drivingByPlan: '按计划行车',
|
||||
exitPlan: '退出计划',
|
||||
back: '返回',
|
||||
startPlanFail: '开始计划失败,请返回重试',
|
||||
endPlanFail: '结束计划失败,请返回'
|
||||
},
|
||||
schema: {
|
||||
selectProduct: '请选择产品类型',
|
||||
loadScript: '加载剧本',
|
||||
previewRunDiagram: '运行图预览',
|
||||
loadRunDiagram: '运行图加载',
|
||||
faultSetting: '故障设置',
|
||||
normalOperation: '正常操作',
|
||||
faultOperation: '故障操作',
|
||||
getRunDiagramFail: '获取运行图数据失败',
|
||||
todayRunDiagramNoLoad: '今日运行图未加载',
|
||||
getStationListFail: '获取车站列表失败'
|
||||
},
|
||||
faultChoose: {
|
||||
manual: '手动',
|
||||
automatic: '自动',
|
||||
settingCondition: '设置条件',
|
||||
triggerTarget: '触发目标',
|
||||
selectFault: '选择故障',
|
||||
selectRules: '请选择规则',
|
||||
setFaultSuccess: '设置故障成功',
|
||||
setFaultFail: '设置故障失败'
|
||||
},
|
||||
setTime: {
|
||||
systemTime: '系统时间',
|
||||
anyTime: '任意时间点',
|
||||
loadTrainNum: '加载列车数',
|
||||
selectLoadTrainNum: '请选择可加载列车个数',
|
||||
maxTrainNum: '可加载的最大车辆个数',
|
||||
setSimulationSystemTime: '设置仿真系统时间',
|
||||
selectSystemTime: '请选择系统时间',
|
||||
selectValidStartTime: '请选择有效的开始时间',
|
||||
selectTrainNum: '请选择车辆个数'
|
||||
},
|
||||
script: {
|
||||
scriptList: '剧本列表',
|
||||
roleSelect: '角色选择',
|
||||
role: '角色',
|
||||
pleaseSelect: '请选择',
|
||||
scriptName: '剧本名称',
|
||||
createTime: '创建时间',
|
||||
operate: '操作',
|
||||
loadScript: '加载剧本',
|
||||
admin: '管理员',
|
||||
instructor: '教员',
|
||||
dispatcher: '行调',
|
||||
attendant: '车站',
|
||||
audience: '观众',
|
||||
driver: '列车',
|
||||
none: '无'
|
||||
},
|
||||
schedule: {
|
||||
scheduleSelect: '派班选择:',
|
||||
runDiagramName: '运行图名称:',
|
||||
scheduleMode: '派班模式:',
|
||||
check: '检查',
|
||||
save: '保存',
|
||||
driverNumber: '司机号',
|
||||
trainNumber: '车组号',
|
||||
onlineSection: '上线轨',
|
||||
onlineServerNumber: '上线服务号',
|
||||
onlineTargetNumber: '上线目的地',
|
||||
onlineTime: '上线时间',
|
||||
onlineTripNumber: '上线车次号',
|
||||
outDepot: '出库段',
|
||||
outDepotStatus: '出库状态',
|
||||
offlineSection: '下线轨',
|
||||
offlineServerNumber: '下线服务号',
|
||||
offlineTargetNumber: '下线目的地',
|
||||
offlineTime: '下线时间',
|
||||
offlineTripNumber: '下线车次号',
|
||||
inDepot: '回库段',
|
||||
inDepotStatus: '回库状态',
|
||||
schedulePlan: '派班计划',
|
||||
noSchedulePlan: '无派班计划,是否创建?',
|
||||
loadData: '加载数据',
|
||||
schedulePlanSuccess: '派班计划成功!',
|
||||
createSchedulePlanSuccess: '创建派班计划成功',
|
||||
regenerateSchedulePlanSuccess: '重新生成派班计划成功',
|
||||
checkPassed: '检查通过',
|
||||
checkFailed: '检查不通过',
|
||||
checkSchedulePlanFailed: '检查派班计划失败',
|
||||
saveSchedulePlanSuccess: '保存派班计划成功',
|
||||
saveSchedulePlanFail: '保存派班失败',
|
||||
selectSchedulePlan: '请先选择派班计划'
|
||||
},
|
||||
runPlan: {
|
||||
runDiagramPlanTool: '运行图计划工具',
|
||||
previewRunDiagram: '运行图预览',
|
||||
stationName: '车站名称',
|
||||
stationMark: '车站公里标',
|
||||
arrivalTime: '到站时间'
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -62,5 +62,30 @@ export default {
|
||||
obtainChapterDataFailed: '获取章节数据失败',
|
||||
obtainCourseDetailsFailed: '获取课程详情失败',
|
||||
obtainCourseInformationFailed: '获取课程信息失败',
|
||||
obtainStepDataFailed: '获取步骤数据失败'
|
||||
obtainStepDataFailed: '获取步骤数据失败',
|
||||
submitExamFailed: '自动提交考试结果失败',
|
||||
getTestInformationFailed: '获取试题息失败',
|
||||
gifSource: 'gif来源',
|
||||
page: '页面',
|
||||
noPermissionToGoToThisPage: '你没有权限去该页面',
|
||||
dissatisfied: '如有不满请联系你领导',
|
||||
orYouCanGo: '或者你可以去:',
|
||||
backToHome: '回首页',
|
||||
justLookingAround: '随便看看',
|
||||
pointMeToSeeThePicture: '点我看图',
|
||||
casualLook: '随便看',
|
||||
problemWithAudioQuality: '音频质量有问题',
|
||||
audioIsTooLong: '音频过长,建议60s以下',
|
||||
audioIsTooShort: '音频太短,建议重录',
|
||||
networkProblem: '网络问题,请重试',
|
||||
initializationFailed: '初始化失败:',
|
||||
getMapDataFailed: '获取地图数据失败',
|
||||
ibpNoDraw: '未绑定车站或该车站IBP盘暂未绘制',
|
||||
startSimulationFailed: '开始仿真失败,请返回重试',
|
||||
endSimulationFailed: '结束仿真失败,请返回',
|
||||
runGraphIsNotLoaded: '今日运行图未加载',
|
||||
startedComprehensiveDrillFailure: '开始综合演练失败。',
|
||||
stationAttendantStationCannotBeEmpty: '值班员所属车站不能为空',
|
||||
destroyedRoomFailed: '销毁房间失败!',
|
||||
exceededTheTotalNumberOfAssignableRoles: '分配角色数量已超过可分配角色总数!'
|
||||
};
|
||||
|
@ -12,5 +12,29 @@ export default {
|
||||
examTime: '考试用时',
|
||||
trainingName: '实训名称',
|
||||
trainingScore: '实训得分',
|
||||
returnToExamList: '返回考试列表'
|
||||
returnToExamList: '返回考试列表',
|
||||
totalScore: '总分',
|
||||
itemList: '试题列表',
|
||||
courseName: '课程名称',
|
||||
permissionsDetails: '权限详情',
|
||||
buy: '购买',
|
||||
distributePermission: '权限分发(考试)',
|
||||
viewCoursePapers: '查看课程试卷',
|
||||
nameOfTestPaper: '试卷名称',
|
||||
examStartTime: '考试时间',
|
||||
theExamIsReadyAnyTime: '随时都可以考试',
|
||||
testExplanation: '考试说明',
|
||||
examTimeAvailable: '考试时长',
|
||||
fullMarksInTheExam: '考试满分',
|
||||
passMarkTheExam: '考试及格分',
|
||||
examinationRules: '考试规则',
|
||||
trainingType: '实训类型',
|
||||
numberOfQuestions: '题数',
|
||||
score: '分值',
|
||||
startTheExam: '开始考试',
|
||||
examinationTiming: '考试计时',
|
||||
maximumTimeToCompleteThisQuestion: '完成本题最大用时',
|
||||
theBestTimeToCompleteTheQuestion: '完成本题最佳用时',
|
||||
trainingNotes: '实训说明',
|
||||
giveUpTheExam: '放弃考试'
|
||||
};
|
||||
|
@ -18,7 +18,7 @@ export default {
|
||||
chooseDate: '请选择日期',
|
||||
chooseTime: '请选择时间',
|
||||
chooseDateTime: '请选择日期时间',
|
||||
choosh: '请选择',
|
||||
choose: '请选择',
|
||||
select: '选 择',
|
||||
selectAdd: '选中添加',
|
||||
export: '导 出',
|
||||
@ -145,5 +145,12 @@ export default {
|
||||
permissionList: '权限列表:',
|
||||
remove: '移除',
|
||||
append: '添 加',
|
||||
release: '发布'
|
||||
release: '发布',
|
||||
temporarilyNoData: '暂无数据',
|
||||
second: '秒',
|
||||
amount: '总数量',
|
||||
yes: '是',
|
||||
no: '否',
|
||||
details: '详情',
|
||||
enterNameToFilter: '输入名称进行过滤'
|
||||
};
|
||||
|
@ -17,6 +17,12 @@ import planMonitor from './planMonitor';
|
||||
import screenMonitor from './screenMonitor';
|
||||
import demonstration from './demonstration';
|
||||
import exam from './exam';
|
||||
import dashboard from './dashboard';
|
||||
import jlmap3d from './jlmap3d';
|
||||
import display from './display';
|
||||
import joinTraining from './joinTraining';
|
||||
import trainRoom from './trainRoom';
|
||||
import menu from './menu';
|
||||
|
||||
export default {
|
||||
...cnLocale,
|
||||
@ -37,5 +43,11 @@ export default {
|
||||
planMonitor,
|
||||
screenMonitor,
|
||||
demonstration,
|
||||
exam
|
||||
exam,
|
||||
dashboard,
|
||||
jlmap3d,
|
||||
display,
|
||||
joinTraining,
|
||||
trainRoom,
|
||||
menu
|
||||
};
|
||||
|
12
src/i18n/langs/zh/jlmap3d.js
Normal file
12
src/i18n/langs/zh/jlmap3d.js
Normal file
@ -0,0 +1,12 @@
|
||||
export default {
|
||||
trainGroupNumber: '车组号:',
|
||||
surveillanceHidden: '车内监控——隐藏',
|
||||
surveillanceDisplay: '车内监控——显示',
|
||||
trainInstrumentationDisplay: '列车仪表——显示',
|
||||
trainInstrumentationHidden: '列车仪表——隐藏',
|
||||
terminal: '终点站:',
|
||||
nextStation: '下一站:',
|
||||
confirmSignalOpen: '请确认前方信号开放',
|
||||
faultInformation: '故障信息:',
|
||||
vWeek: ['星期天', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
|
||||
};
|
25
src/i18n/langs/zh/joinTraining.js
Normal file
25
src/i18n/langs/zh/joinTraining.js
Normal file
@ -0,0 +1,25 @@
|
||||
export default {
|
||||
chooseDriver: '设置司机',
|
||||
cancelDriver: '取消司机',
|
||||
admin: '管理员',
|
||||
teacher: '教员',
|
||||
dispatcher: '调度员',
|
||||
stationAttendant: '车站值班员',
|
||||
driver: '列车',
|
||||
universalAccount: '通号',
|
||||
sending: '发送中...',
|
||||
autoplay: '自动播放',
|
||||
holdAndTalk: '按住说话',
|
||||
recording: '录音中...',
|
||||
iBPDisk: 'IBP盘',
|
||||
driverPerspective: '司机视角',
|
||||
drivingByPlan: '按计划行车',
|
||||
exitPlan: '退出计划',
|
||||
runGraphPreview: '运行图预览',
|
||||
runGraphLoading: '运行图加载',
|
||||
faultSetting: '故障设置',
|
||||
normalOperation: '正常操作',
|
||||
faultOperation: '故障操作',
|
||||
local: '现地',
|
||||
lineAdjustment: '行调'
|
||||
};
|
@ -87,6 +87,15 @@ export default {
|
||||
deleteTraining: '删除实训',
|
||||
automaticGenerationOfTraining: '自动生成实训',
|
||||
modifyTrainingByCategory: '按类别修改实训',
|
||||
deleteAutoGeneratedTraining: '删除自动生成实训'
|
||||
deleteAutoGeneratedTraining: '删除自动生成实训',
|
||||
menu: '菜单',
|
||||
turnout: '道岔',
|
||||
section: '区段',
|
||||
signaler: '信号机',
|
||||
controlMode: '控制模式',
|
||||
platform: '站台',
|
||||
train: '列车',
|
||||
station: '车站',
|
||||
trainWindow: '车次窗'
|
||||
};
|
||||
|
||||
|
127
src/i18n/langs/zh/menu.js
Normal file
127
src/i18n/langs/zh/menu.js
Normal file
@ -0,0 +1,127 @@
|
||||
export default {
|
||||
menuBar: {
|
||||
system: '系统',
|
||||
view: '查看',
|
||||
refresh: '刷新',
|
||||
display: '显示',
|
||||
setTrainIdDisplay: '设置列车识别号显示',
|
||||
setNameDisplay: '设置名称显示',
|
||||
setDeviceDisplay: '设置设备显示',
|
||||
stationMapSwitch: '站场图切换',
|
||||
controlModeSwitch: '控制模式转换',
|
||||
toStationControl: '转为站控',
|
||||
forcedStationControl: '强制站控',
|
||||
toCentralControl: '转为中控',
|
||||
requestOperationArea: '请求操作区域',
|
||||
historyQuery: '历史查询',
|
||||
userManage: '用户管理',
|
||||
help: '帮助',
|
||||
about: '关于ControlMonitor(A)',
|
||||
planCarOperation: '计划车操作',
|
||||
addPlanCar: '添加计划车',
|
||||
panPlanCar: '平移计划车',
|
||||
deletePlanCar: '删除计划车',
|
||||
trainNumberMaintenance: '车次号维护',
|
||||
schedulingLog: '调度日志',
|
||||
systemAnalysis: '系统分析',
|
||||
implemented: '实现中......'
|
||||
},
|
||||
menuCancle: {
|
||||
zoomIn: '放大地图',
|
||||
zoomOut: '缩小地图',
|
||||
back: '返回'
|
||||
},
|
||||
menuSection: {
|
||||
sectionFaultUnlock: '区段故障解锁',
|
||||
sectionResection: '区段切除',
|
||||
sectionActive: '区段激活',
|
||||
sectionAxisPreReset: '区段计轴预复位',
|
||||
sectionBlockade: '区段封锁',
|
||||
sectionUnblock: '区段解封',
|
||||
sectionSetSpeedLimit: '区段设置限速',
|
||||
sectionCancelSpeedLimit: '区段取消限速',
|
||||
axisPreReset: '计轴预复位',
|
||||
createTrain: '新建列车',
|
||||
setFault: '设置故障',
|
||||
cancelFault: '取消故障'
|
||||
},
|
||||
menuSignal: {
|
||||
// 进路选排
|
||||
// 进路取消
|
||||
// 信号封闭
|
||||
// 信号解封
|
||||
// 信号重开
|
||||
// 引导进路办理
|
||||
// 设置联锁自动进路
|
||||
// 取消联锁自动进路
|
||||
// 设置联锁自动触发
|
||||
// 取消联锁自动触发
|
||||
// 信号关灯
|
||||
// 进路选排
|
||||
// 进路引导
|
||||
// 自排关
|
||||
// 自排开
|
||||
// 查询进路控制模式
|
||||
// 设置故障
|
||||
// 取消故障
|
||||
},
|
||||
menuStation: {
|
||||
// 全站设置联锁自动触发
|
||||
// 全站取消联锁自动触发
|
||||
// 上电解锁
|
||||
// 执行关键操作测试
|
||||
// 所有进路自排关
|
||||
// 所有进路自排开
|
||||
// 执行关键操作测试
|
||||
// 设置ZC故障
|
||||
// 取消ZC故障
|
||||
},
|
||||
menuStationStand: {
|
||||
// 全站设置联锁自动触发
|
||||
// 全站取消联锁自动触发
|
||||
// 上电解锁
|
||||
// 执行关键操作测试
|
||||
// 所有进路自排关
|
||||
// 所有进路自排开
|
||||
// 执行关键操作测试
|
||||
// 设置ZC故障
|
||||
// 取消ZC故障
|
||||
},
|
||||
menuSwitch: {
|
||||
// 道岔单锁
|
||||
// 道岔单解
|
||||
// 道岔区段封闭
|
||||
// 道岔区段解封
|
||||
// 道岔转动
|
||||
// 道岔区段故障解锁
|
||||
// 道岔区段计轴预复位
|
||||
// 区段切除
|
||||
// 区段激活
|
||||
// 道岔区段设置限速
|
||||
// 道岔区段取消限速
|
||||
// 道岔单锁
|
||||
// 道岔单解
|
||||
// 道岔区段封闭
|
||||
// 道岔区段解封
|
||||
// 道岔转动
|
||||
// 道岔区段故障解锁
|
||||
// 区段切除
|
||||
// 区段激活
|
||||
// 道岔区段设置限速
|
||||
// 道岔区段取消限速
|
||||
// 设置故障
|
||||
// 取消故障
|
||||
},
|
||||
menuTrain: {
|
||||
// 添加列车识别号
|
||||
// 删除列车识别号
|
||||
// 修改列车识别号
|
||||
// 修改车组号
|
||||
// 移动列车识别号
|
||||
// 交换列车识别号
|
||||
// 设置通信故障
|
||||
// 取消通信故障
|
||||
// 确认运行至前方站
|
||||
}
|
||||
|
||||
};
|
@ -84,5 +84,21 @@ export default {
|
||||
distributePermission: '权限分发',
|
||||
orderCreation: '订单创建',
|
||||
select: '选择',
|
||||
chooseGoods: '选择商品'
|
||||
chooseGoods: '选择商品',
|
||||
permissionName: '权限名称',
|
||||
receivingPermission: '领取权限',
|
||||
isPackage: '是否权限包',
|
||||
modifyPermissionContent: '修改权限内容',
|
||||
addPermissions: '添加权限',
|
||||
modifyPermissions: '修改权限',
|
||||
createPermission: '新建权限',
|
||||
oneClickGenerationPermission: '一键生成权限',
|
||||
packingDetails: '打包详情',
|
||||
belongsToMap: '所属地图',
|
||||
oneClickGeneration: '一键生成',
|
||||
selectPermission: '选择权限',
|
||||
permission: '权限',
|
||||
orderSelectionItem: '订单选择商品',
|
||||
orderDetails: '订单详情',
|
||||
statusType: '状态类型',
|
||||
};
|
||||
|
@ -26,6 +26,8 @@ export default {
|
||||
addPermissionPackageRule: '增加权限打包规则',
|
||||
editPermissionPackageRule: '编辑权限打包规则',
|
||||
restPermissionMaxNumber: '(剩余最大权限个数:{0})',
|
||||
pleaseSelectTransferPermission: '选择转赠权限'
|
||||
|
||||
pleaseSelectTransferPermission: '选择转赠权限',
|
||||
permissionName: '权限名称',
|
||||
private: '专用',
|
||||
public: '公用'
|
||||
};
|
||||
|
@ -249,15 +249,23 @@ export default {
|
||||
selectOneTrainingType: '只能选择一个实训类型',
|
||||
enterProductType: '请输入产品类型',
|
||||
selectAssociatedStation: '请选择关联的车站',
|
||||
|
||||
enterScale: '请输入缩放比例',
|
||||
enterXOffset: '请输入X偏移',
|
||||
enterYOffset: '请输入Y偏移',
|
||||
|
||||
pleaseSelectButtonType: '请选择按钮类型',
|
||||
pleaseSelectButtonContent: '请输入内容',
|
||||
pleaseSelectTrainDir: '请选择列车所在方向',
|
||||
pleaseEnterSplit: '请输入拆分数量',
|
||||
pleaseEnterSplitNumber: '请输入合理的拆分数量'
|
||||
pleaseEnterSplitNumber: '请输入合理的拆分数量',
|
||||
|
||||
endTimeRules: '结束时间必须大于开始时间',
|
||||
selectCourses: '请选择课程',
|
||||
selectTheMapRoute: '请选择地图线路',
|
||||
enterKeyword: '请输入关键词',
|
||||
successfullyModified: '修改成功',
|
||||
modifyTheFailure: '修改失败',
|
||||
selectTheCourseNameFirst: '请先选择课程名称',
|
||||
selectMultiplePermissions: '请选择多个权限',
|
||||
enterPermissionName: '请输入权限名称',
|
||||
pleaseSelectPermission: '请选择权限'
|
||||
};
|
||||
|
@ -1,26 +1,83 @@
|
||||
export default {
|
||||
scriptTitle: '剧本录制',
|
||||
// saveMaplocation: '更新定位',
|
||||
saveBackground: '保存背景',
|
||||
saveData: '保存数据',
|
||||
mapList: '地图列表',
|
||||
createScript: '创建剧本',
|
||||
scriptName: '剧本名称',
|
||||
|
||||
// roleManage: '角色管理',
|
||||
// targetCondition: '任务目标',
|
||||
// taskScript: '任务剧本',
|
||||
// roleName: '角色名称',
|
||||
// roleType: '角色类型',
|
||||
// deviceCode: '设备编码',
|
||||
// roleList: '角色列表',
|
||||
// operation: '操作',
|
||||
// roleAdd: '添加',
|
||||
// delete: '删除',
|
||||
// behaviorOperate: '行为操作',
|
||||
// conditionTitle: '目标条件',
|
||||
// deviceType: '设备类型',
|
||||
// deviceCondition: '设备条件',
|
||||
// paramDeviceType: '参数设备类型',
|
||||
// paramDeviceCode: '参数设备编号'
|
||||
addScript: '添加剧本',
|
||||
map: '所属地图',
|
||||
scriptDescription: '剧本描述',
|
||||
submit: '确定',
|
||||
scriptNameRule: '请输入剧本名称',
|
||||
scriptDescriptionRule: '请输入剧本描述',
|
||||
createScriptSuccess: '创建剧本成功',
|
||||
createScriptFail: '创建剧本失败',
|
||||
scriptDetail: '剧本详情',
|
||||
scriptRecord: '编制',
|
||||
scriptModify: '修改',
|
||||
scriptDelete: '删除',
|
||||
getScriptFail: '获取剧本信息失败',
|
||||
createSimulationFail: '创建仿真失败',
|
||||
modifyScriptSuccess: '修改剧本成功',
|
||||
modifyScriptFail: '修改剧本失败',
|
||||
deleteScriptTip: '此操作将删除此剧本, 是否继续?',
|
||||
deleteScriptSucess: '删除成功',
|
||||
deleteScriptFail: '删除失败',
|
||||
scriptRecordTitle: '剧本编制',
|
||||
drivingPause: '暂停',
|
||||
recoverAndExecute: '恢复并执行',
|
||||
resetScript: '重置剧本',
|
||||
pauseFail: '暂停失败',
|
||||
recoverFail: '恢复失败',
|
||||
saveBackgroundSuceess: '保存背景成功',
|
||||
updateLocationFail: '更新定位失败',
|
||||
saveBackgroundFail: '保存背景失败',
|
||||
saveDataSucess: '保存数据成功',
|
||||
saveDataFail: '保存数据失败',
|
||||
clearDataTip: '此操作将会清除已保存的编制数据, 是否继续?',
|
||||
resetDataSuccess: '重置剧本成功',
|
||||
resetDataFail: '重置剧本失败',
|
||||
|
||||
allRoles: '所有角色',
|
||||
actors: '演员角色',
|
||||
roleSexMale: '男',
|
||||
roleSexFemale: '女',
|
||||
selectScriptActorSuccess: '选择剧本角色成功',
|
||||
selectScriptActorFail: '选择剧本角色失败',
|
||||
cancleScriptActorSuccess: '取消剧本角色成功',
|
||||
cancleScriptActorFail: '取消剧本角色失败',
|
||||
modifyScriptActorSexSuccess: '修改剧本成员性别成功',
|
||||
modifyScriptActorSexFail: '修改剧本成员性别失败',
|
||||
|
||||
addConversition: '添加对话',
|
||||
narrator: '讲述者',
|
||||
narratorRules: '请选择讲述者',
|
||||
receiver: '接收者',
|
||||
receiverRules: '请选择接收者',
|
||||
conversitionContent: '内容',
|
||||
addCommand: '添加指令',
|
||||
executor: '执行者',
|
||||
executorRules: '请选择执行者',
|
||||
executeCommand: '执行指令',
|
||||
executeCommandRules: '请选择执行指令',
|
||||
startStation: '起始站台',
|
||||
startStationRules: '请选择起始站台',
|
||||
endStation: '终点站台',
|
||||
endStationRules: '请选择终点站台',
|
||||
|
||||
addCommandButton: '添加指令',
|
||||
addConversitionButton: '添加对话',
|
||||
conversitionContentRules: '请输入内容',
|
||||
addCommandSucess: '添加指令成功',
|
||||
addCommandFail: '添加指令失败',
|
||||
addConversitionSuccess: '添加对话成功',
|
||||
addConversitionFail: '添加对话失败',
|
||||
modifyConversitionSuccess: '修改对话成功',
|
||||
modifyConversitionFail: '修改对话失败',
|
||||
modifyConversition: '修改对话',
|
||||
modifyConversitionButton: '修改',
|
||||
|
||||
drivingByPlan: '按计划行车',
|
||||
scriptBack: '返回'
|
||||
};
|
||||
|
@ -46,6 +46,7 @@ export default {
|
||||
selectTraining: '选择实训',
|
||||
createUserTraining: '创建用户实训',
|
||||
editTrainingDetail: '编辑实训详情',
|
||||
trainingTime: '实训时长'
|
||||
|
||||
trainingTime: '实训时长',
|
||||
subscribeToTheMapList: '订阅地图列表:',
|
||||
editSimulationDetails: '编辑仿真详情'
|
||||
};
|
||||
|
@ -15,5 +15,6 @@ export default {
|
||||
buy: '购买',
|
||||
permissionDistribute: '权限分发(上课)',
|
||||
authorityTransferred: '权限转赠',
|
||||
courseList: '课程列表'
|
||||
courseList: '课程列表',
|
||||
seconds: '秒'
|
||||
};
|
||||
|
@ -134,5 +134,21 @@ export default {
|
||||
updateTrainingSuccessfully: '更新实训成功!',
|
||||
updateTrainingFailed: '更新实训失败',
|
||||
savedStepDataSuccessfully: '保存步骤数据成功',
|
||||
savedStepDataFailed: '保存步骤数据失败'
|
||||
savedStepDataFailed: '保存步骤数据失败',
|
||||
noCourseAuthority: '无此课程的考试权限,请前往购买!',
|
||||
notWithinTheScopeOfTheExamination: '不在考试范围之内',
|
||||
giveUpTheExamTip: '此操作将放弃本次考试, 是否继续?',
|
||||
theNumberOfPermissionsAvailableIsZero: '可用的权限数量为0',
|
||||
userRightsHaveBeenReclaimed: '用户权限已被收回',
|
||||
beKickedOut: '您被管理员踢出房间',
|
||||
deleteListHint: '此操作将删除该列表, 是否继续?',
|
||||
setUpASubscriptionMapSuccessfully: '设置订阅地图成功!',
|
||||
setUpASubscriptionMapFailed: '设置订阅地图失败!',
|
||||
getMapStateDataException: '获取地图状态数据异常,请刷新页面重新加载。若多次遇到此类问题,请急时联系开发团队处理!',
|
||||
packagedSuccessfully: '打包成功',
|
||||
oneKeyGeneratedSuccessfully: '一键生成成功!',
|
||||
obtainedPermissionSuccessfully: '领取权限成功',
|
||||
modifyTheUserPermissionStatus: '此操作将修改用户权限状态?',
|
||||
destroyRoomHint: '您将销毁房间,是否确定执行此操作',
|
||||
contentIsEmptyAndCannotBeSent: '内容为空,不可发送!'
|
||||
};
|
||||
|
29
src/i18n/langs/zh/trainRoom.js
Normal file
29
src/i18n/langs/zh/trainRoom.js
Normal file
@ -0,0 +1,29 @@
|
||||
export default {
|
||||
comprehensiveTrainingManager: '综合实训管理者:',
|
||||
comprehensiveDrillRoom: '综合演练室',
|
||||
numberOfAssignableRoles: '可分配角色数量:',
|
||||
dispatcher: '调度员',
|
||||
increaseDispatchers: '增加调度人员',
|
||||
stationAttendant: '车站值班员',
|
||||
increaseStationAttendant: '增加车站值班员',
|
||||
teacher: '教员',
|
||||
increaseTeacher: '增加教员',
|
||||
universalAccount: '通号',
|
||||
increaseUniversalAccount: '增加通号',
|
||||
driver: '司机',
|
||||
increaseDriver: '增加司机',
|
||||
bigScreen: '大屏',
|
||||
increaseBigScreen: '增加大屏',
|
||||
destroyRoom: '销毁房间',
|
||||
generatingQRCode: '生成二维码',
|
||||
startSimulation: '开始仿真',
|
||||
enterSimulation: '进入仿真',
|
||||
endSimulation: '结束仿真',
|
||||
distributeTheRoomQRCode: '分发房间二维码',
|
||||
increaseIbp: '增加IBP',
|
||||
kickOutTheRoom: '提出房间',
|
||||
sending: '发送中...',
|
||||
holdAndTalk: '按住说话',
|
||||
recording: '录音中...',
|
||||
sendText: '发送文字'
|
||||
};
|
@ -30,13 +30,6 @@ deviceRender[deviceType.Arrow] = {
|
||||
z: 2
|
||||
};
|
||||
|
||||
/** RotatingButton渲染配置*/
|
||||
deviceRender[deviceType.RotatingButton] = {
|
||||
_type: deviceType.RotatingButton,
|
||||
zlevel: 1,
|
||||
z: 3
|
||||
};
|
||||
|
||||
/** TipBox渲染配置*/
|
||||
deviceRender[deviceType.TipBox] = {
|
||||
_type: deviceType.TipBox,
|
||||
|
@ -2,7 +2,6 @@ const deviceType = {
|
||||
IbpText: 'IbpText',
|
||||
SquareButton: 'SquareButton',
|
||||
Arrow: 'Arrow',
|
||||
RotatingButton: 'RotatingButton',
|
||||
TipBox: 'TipBox',
|
||||
Background: 'Background',
|
||||
CircularLamp: 'CircularLamp',
|
||||
|
File diff suppressed because one or more lines are too long
@ -4,7 +4,6 @@ import localStore from 'storejs';
|
||||
import Options from './options';
|
||||
import MouseController from './mouseController';
|
||||
import Painter from './painter';
|
||||
import deviceState from '../jmap/constant/deviceState';
|
||||
import deviceType from './constant/deviceType';
|
||||
import {calculateDCenter, createBoundingRect, deviceFactory} from './utils/parser';
|
||||
import { updateIbpData } from './utils/parser';
|
||||
@ -17,10 +16,7 @@ class IbpPan {
|
||||
this.methods = opts.methods;
|
||||
|
||||
// 鼠标事件
|
||||
this.events = { __Pan: 'pan', __Zoom: 'zoom', Selected: 'selected', Contextmenu: 'contextmenu', DataZoom: 'dataZoom'};
|
||||
|
||||
// 皮肤参数
|
||||
// this.skinCode = '';
|
||||
this.events = { __Pan: 'pan', Contextmenu: 'contextmenu'};
|
||||
|
||||
// 设备数据
|
||||
this.ibpDevice = {};
|
||||
@ -28,9 +24,6 @@ class IbpPan {
|
||||
// 展示的画布大小
|
||||
this.canvasSize = {};
|
||||
|
||||
// 默认状态
|
||||
this.defaultStateDict = this.loadDefaultState();
|
||||
|
||||
this.initIbpPage(opts);
|
||||
}
|
||||
initIbpPage(opts) {
|
||||
@ -38,7 +31,7 @@ class IbpPan {
|
||||
const height = opts.config.height;
|
||||
this.isAllowDragging=false;
|
||||
this.$ibpZr = zrender.init(opts.dom, Object.assign({ renderer, devicePixelRatio, width, height }, opts.config));
|
||||
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {}), (dataZoom) => { this.$mouseController.trigger(this.events.DataZoom, dataZoom); }); // 缩放
|
||||
this.$options = new Options(Object.assign({ scaleRate: 1, offsetX: 0, offsetY: 0 }, opts.options || {})); // 缩放
|
||||
this.$mouseController = new MouseController(this);
|
||||
|
||||
this.$mouseController.enable();
|
||||
@ -50,21 +43,8 @@ class IbpPan {
|
||||
this.optionsHandler = this.setOptions.bind(this);
|
||||
|
||||
this.$mouseController.on(this.events.__Pan, this.optionsHandler);
|
||||
this.$mouseController.on(this.events.__Zoom, this.optionsHandler);
|
||||
|
||||
}
|
||||
loadDefaultState() {
|
||||
const defaultStateDict = {};
|
||||
|
||||
zrUtil.each(Object.keys(deviceState), (type) => {
|
||||
defaultStateDict[type] = {};
|
||||
zrUtil.each(Object.keys(deviceState[type] || {}), (state) => {
|
||||
defaultStateDict[type][state] = deviceState[type][state].Default;
|
||||
}, this);
|
||||
}, this);
|
||||
|
||||
return defaultStateDict;
|
||||
}
|
||||
setMap(config, ibpDevice) {
|
||||
// 保存平移缩放数据
|
||||
if (config.config) {
|
||||
@ -84,7 +64,7 @@ class IbpPan {
|
||||
height: config.background.height
|
||||
};
|
||||
|
||||
// 解析地图数据
|
||||
// 地图数据
|
||||
this.ibpDevice = ibpDevice;
|
||||
|
||||
// 数据加载完成 回调
|
||||
@ -152,14 +132,13 @@ class IbpPan {
|
||||
updateIbpData(elem);
|
||||
const oDevice = this.ibpDevice[code] || deviceFactory(type, elem);
|
||||
const nDevice = deviceFactory(type, Object.assign(oDevice.model || {}, elem));
|
||||
delete this.mapDevice[code];
|
||||
delete this.ibpDevice[code];
|
||||
this.$painter.delete(oDevice);
|
||||
if (!elem._dispose) {
|
||||
this.ibpDevice[code] = nDevice;
|
||||
this.$painter.add(nDevice);
|
||||
}
|
||||
});
|
||||
|
||||
if (this.methods.viewUpdate instanceof Function) { this.methods.viewUpdate(list); }
|
||||
}
|
||||
|
||||
@ -236,13 +215,6 @@ class IbpPan {
|
||||
return this.ibpDevice[code];
|
||||
}
|
||||
|
||||
getShapeTipPoint(opts) {
|
||||
const device = this.ibpDevice[opts.code];
|
||||
if (device) {
|
||||
return this.$painter.getShapeTipPoint(device.instance, opts);
|
||||
}
|
||||
}
|
||||
|
||||
resize(opt) {
|
||||
this.$ibpZr.resize(opt);
|
||||
this.$painter.updateZrSize(opt);
|
||||
|
@ -28,21 +28,18 @@ class MouseController extends Eventful {
|
||||
this.$zr = ibp.getZr();
|
||||
this.isAllowDragging=ibp.isAllowDragging||false;
|
||||
this.events = ibp.getEvents();
|
||||
this._draggingTarget=null;
|
||||
this._dragging = false;
|
||||
this.initHandler(this.$zr);
|
||||
}
|
||||
|
||||
initHandler(zr) {
|
||||
if (zr) {
|
||||
zr.on('click', this.click, this);
|
||||
zr.on('contextmenu', this.contextmenu, this);
|
||||
zr.on('mousemove', this.moveEvent, this);
|
||||
|
||||
this.enable = function (opts) {
|
||||
opts = opts || {};
|
||||
this._moveOnMouseMove = opts.moveOnMouseMove || true;
|
||||
this._zoomOnMouseWheel = opts.zoomOnMouseWheel || false;
|
||||
this._preventDefaultMouseMove = opts.preventDefaultMouseMove || true;
|
||||
|
||||
this.disable();
|
||||
@ -53,30 +50,20 @@ class MouseController extends Eventful {
|
||||
zr.on('touchstart', this.mousedown, this);
|
||||
zr.on('touchmove', this.mousemove, this);
|
||||
zr.on('touchend', this.mouseup, this);
|
||||
zr.on('mousewheel', this.mousewheel, this);
|
||||
};
|
||||
|
||||
this.disable = function () {
|
||||
zr.off('mousedown', this.mousedown);
|
||||
zr.off('mousemove', this.mousemove);
|
||||
zr.off('mouseup', this.mouseup);
|
||||
|
||||
zr.off('touchstart', this.mousedown);
|
||||
zr.off('touchmove', this.mousemove);
|
||||
zr.off('touchend', this.mouseup);
|
||||
|
||||
zr.off('mousewheel', this.mousewheel);
|
||||
};
|
||||
|
||||
this.dispose = function () {
|
||||
zr.off('click', this.click);
|
||||
zr.off('contextmenu', this.contextmenu);
|
||||
zr.off('mousemove', this.moveEvent);
|
||||
|
||||
zr.off('touchstart', this.mousedown);
|
||||
zr.off('touchmove', this.mousemove);
|
||||
zr.off('touchend', this.mouseup);
|
||||
|
||||
this.disable();
|
||||
};
|
||||
|
||||
@ -94,6 +81,9 @@ class MouseController extends Eventful {
|
||||
}
|
||||
const em = new EventModel(e);
|
||||
this.eventTarget = em.eventTarget;
|
||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
||||
this.eventTarget.setCursor('pointer');
|
||||
}
|
||||
this._offsetX=e.offsetX;
|
||||
this._offsetY=e.offsetY;
|
||||
this._x = e.offsetX;
|
||||
@ -118,7 +108,7 @@ class MouseController extends Eventful {
|
||||
this._x = e.offsetX;
|
||||
this._y = e.offsetY;
|
||||
if (this._dragging) {
|
||||
if (this.eventTarget._type === deviceType.Background || !this.isAllowDragging) {
|
||||
if ((this.eventTarget && this.eventTarget._type === deviceType.Background) || !this.isAllowDragging) {
|
||||
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
||||
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
||||
return true;
|
||||
@ -132,42 +122,20 @@ class MouseController extends Eventful {
|
||||
}
|
||||
|
||||
mouseup(e) {
|
||||
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging) {
|
||||
console.log('-------', this.eventTarget._type===deviceType.Background);
|
||||
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) {
|
||||
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
||||
this.eventTarget.dirty();
|
||||
this.eventTarget = '';
|
||||
}
|
||||
// debugger;
|
||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
||||
// console.log('111-------');
|
||||
this.eventTarget.setCursor('default');
|
||||
}
|
||||
this.eventTarget = '';
|
||||
this._dragging = false;
|
||||
}
|
||||
|
||||
mousewheel(e) {
|
||||
const shouldZoom = this._zoomOnMouseWheel;
|
||||
const wheelDelta = e.wheelDelta;
|
||||
const originX = e.offsetX;
|
||||
const originY = e.offsetY;
|
||||
|
||||
if (wheelDelta === 0 || !shouldZoom) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (shouldZoom) {
|
||||
eventTool.stop(e.event);
|
||||
let scale = 1;
|
||||
if (wheelDelta > 0) {
|
||||
scale = 1;
|
||||
} else if (wheelDelta < 0) {
|
||||
scale = -1;
|
||||
}
|
||||
|
||||
this.trigger(this.events.__Zoom, {type: 'zoom', scale, originX, originY });
|
||||
}
|
||||
}
|
||||
|
||||
click(e) {
|
||||
var em = this.checkEvent(e);
|
||||
this.trigger(this.events.Selected, em);
|
||||
}
|
||||
|
||||
contextmenu(e) {
|
||||
var em = this.checkEvent(e);
|
||||
this.trigger(this.events.Contextmenu, em);
|
||||
@ -216,10 +184,6 @@ class MouseController extends Eventful {
|
||||
|
||||
return newEm;
|
||||
}
|
||||
|
||||
updateDatazoom(zoom) {
|
||||
this.trigger(this.events.Datazoom, zoom);
|
||||
}
|
||||
}
|
||||
|
||||
export default MouseController;
|
||||
|
@ -117,25 +117,6 @@ class Painter {
|
||||
}
|
||||
|
||||
/**
|
||||
* 过去坐标提示位置
|
||||
* @param {*} opts
|
||||
*/
|
||||
getShapeTipPoint(instance, opts) {
|
||||
if (instance) {
|
||||
var point = instance.getShapeTipPoint(opts);
|
||||
if (point) {
|
||||
// 矩阵变换
|
||||
var transform = this.$transformHandle.transform;
|
||||
var transPoint = vector.applyTransform([], [point.x, point.y], transform);
|
||||
return {
|
||||
x: transPoint[0],
|
||||
y: transPoint[1]
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 初始化电子时钟时间
|
||||
*/
|
||||
initClockTime(device, initTime) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import AppendageBoxImage from '@/assets/ibp_images/appendage_box.png';
|
||||
import Sector from 'zrender/src/graphic/shape/Sector';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
export default class AppendageBox extends Group {
|
||||
constructor(device) {
|
||||
@ -18,19 +18,108 @@ export default class AppendageBox extends Group {
|
||||
id: this.model.code,
|
||||
position: [this.model.point.x, this.model.point.y]
|
||||
});
|
||||
this.appendageBox = new Image({
|
||||
const spaceHeight = (this.model.height-this.model.borderWidth*3)/2;
|
||||
this.rect1 = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
draggable: false,
|
||||
style: {
|
||||
image: AppendageBoxImage,
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: this.model.width,
|
||||
height: this.model.height
|
||||
width: this.model.width - this.model.borderWidth,
|
||||
height: this.model.borderWidth
|
||||
},
|
||||
style: {
|
||||
fill: '#34383A'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.appendageBox);
|
||||
this.rect2 = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: 0,
|
||||
y: this.model.borderWidth + spaceHeight,
|
||||
width: this.model.width - this.model.borderWidth,
|
||||
height: this.model.borderWidth
|
||||
},
|
||||
style: {
|
||||
fill: '#34383A'
|
||||
}
|
||||
});
|
||||
this.rect3 = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 2*this.model.borderWidth + 2*spaceHeight,
|
||||
width: this.model.width - this.model.borderWidth,
|
||||
height: this.model.borderWidth
|
||||
},
|
||||
style: {
|
||||
fill: '#34383A'
|
||||
}
|
||||
});
|
||||
this.rect4 = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: this.model.borderWidth,
|
||||
height: this.model.height
|
||||
},
|
||||
style: {
|
||||
fill: '#34383A'
|
||||
}
|
||||
});
|
||||
this.sector1 = new Sector({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: this.model.width - this.model.borderWidth,
|
||||
cy: this.model.borderWidth,
|
||||
r: this.model.borderWidth,
|
||||
startAngle: 1.5*Math.PI,
|
||||
endAngle: 2*Math.PI
|
||||
},
|
||||
style: {
|
||||
fill: '#34383A'
|
||||
}
|
||||
});
|
||||
this.sector2 = new Sector({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: this.model.width - this.model.borderWidth,
|
||||
cy: 2*this.model.borderWidth + spaceHeight,
|
||||
r: this.model.borderWidth,
|
||||
startAngle: 1.5*Math.PI,
|
||||
endAngle: 2*Math.PI
|
||||
},
|
||||
style: {
|
||||
fill: '#34383A'
|
||||
}
|
||||
});
|
||||
this.sector3 = new Sector({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
shape: {
|
||||
cx: this.model.width - this.model.borderWidth,
|
||||
cy: 3*this.model.borderWidth + 2*spaceHeight,
|
||||
r: this.model.borderWidth,
|
||||
startAngle: 1.5*Math.PI,
|
||||
endAngle: 2*Math.PI
|
||||
},
|
||||
style: {
|
||||
fill: '#34383A'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.rect1);
|
||||
this.grouper.add(this.rect2);
|
||||
this.grouper.add(this.rect3);
|
||||
this.grouper.add(this.rect4);
|
||||
this.grouper.add(this.sector1);
|
||||
this.grouper.add(this.sector2);
|
||||
this.grouper.add(this.sector3);
|
||||
this.add(this.grouper);
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
|
@ -16,26 +16,31 @@ export default class background extends Group {
|
||||
create() {
|
||||
const image = new Image(25, 25);
|
||||
image.src = ibpBg;
|
||||
image.onload = (e) => {
|
||||
const pattern = new Pattern(image, 'repeat');
|
||||
this.imageBg = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
cursor: 'default',
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: this.model.width,
|
||||
height: this.model.height
|
||||
},
|
||||
style: {
|
||||
fill: pattern
|
||||
}
|
||||
image.decode()
|
||||
.then(() => {
|
||||
const pattern = new Pattern(image, 'repeat');
|
||||
this.imageBg = new Rect({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
cursor: 'default',
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: this.model.width,
|
||||
height: this.model.height
|
||||
},
|
||||
style: {
|
||||
fill: pattern
|
||||
}
|
||||
});
|
||||
this.add(this.imageBg);
|
||||
}).catch((encodingError) => {
|
||||
// Do something with the error.
|
||||
});
|
||||
this.add(this.imageBg);
|
||||
};
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
|
||||
}
|
||||
setCursor(mouseStyle) {
|
||||
this.imageBg.attr('cursor', mouseStyle);
|
||||
}
|
||||
}
|
||||
|
@ -176,11 +176,16 @@ export default class clock extends Group {
|
||||
}
|
||||
return pic;
|
||||
}
|
||||
setClockStart() {
|
||||
setClockStart(started) {
|
||||
const _this = this;
|
||||
this.timer = setInterval(() => {
|
||||
_this.handleClock(_this);
|
||||
}, 1000);
|
||||
if (started) {
|
||||
this.timer&&clearInterval(this.timer);
|
||||
this.timer = setInterval(() => {
|
||||
_this.handleClock(_this);
|
||||
}, 1000);
|
||||
} else {
|
||||
this.timer&&clearInterval(this.timer);
|
||||
}
|
||||
}
|
||||
handleClock(_this) {
|
||||
_this.initTime += 1000;
|
||||
|
@ -8,7 +8,6 @@ import IbpLine from './ibpLine';
|
||||
import Button from './button';
|
||||
import TipBox from './ibpTipBox';
|
||||
import AppendageBox from './appendageBox';
|
||||
import RotatingButton from './rotatingButton';
|
||||
import Elevator from './elevator';
|
||||
import Key from './key';
|
||||
import TeleTerminal from './teleTerminal';
|
||||
@ -25,7 +24,6 @@ ibpShape[deviceType.IbpLine] = IbpLine;
|
||||
ibpShape[deviceType.SquareButton] = Button;
|
||||
ibpShape[deviceType.TipBox] = TipBox;
|
||||
ibpShape[deviceType.AppendageBox] = AppendageBox;
|
||||
ibpShape[deviceType.RotatingButton] = RotatingButton;
|
||||
ibpShape[deviceType.Elevator] = Elevator;
|
||||
ibpShape[deviceType.Key] = Key;
|
||||
ibpShape[deviceType.TeleTerminal] = TeleTerminal;
|
||||
|
@ -28,7 +28,9 @@ export default class ibpTipBox extends Group {
|
||||
height: this.model.height
|
||||
},
|
||||
style: {
|
||||
fill: this.model.fillColor
|
||||
fill: this.model.opacity ? 'rgb(0,0,0,0)':this.model.fillColor,
|
||||
lineWidth: this.model.lineWidth,
|
||||
stroke: this.model.stroke
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.tipBox);
|
||||
|
@ -1,7 +1,10 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import Line from 'zrender/src/graphic/shape/Line';
|
||||
import Text from 'zrender/src/graphic/Text';
|
||||
import keyPic from '@/assets/ibp_images/key.png';
|
||||
import keyPicOn from '@/assets/ibp_images/key_on.png';
|
||||
import Keyhole from '@/assets/ibp_images/keyhole.png';
|
||||
|
||||
export default class key extends Group {
|
||||
|
||||
@ -20,28 +23,113 @@ export default class key extends Group {
|
||||
id: model.code,
|
||||
position: [model.point.x, model.point.y]
|
||||
});
|
||||
|
||||
this.keyImage = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
z: model.z+1,
|
||||
style: {
|
||||
image: this.getRotateColor(),
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 314,
|
||||
height: 932
|
||||
width: model.width,
|
||||
height: model.width/314*932
|
||||
}
|
||||
});
|
||||
|
||||
this.rotatingButton = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
image: Keyhole,
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: model.width,
|
||||
height: model.width/361*336
|
||||
}
|
||||
});
|
||||
this.ibpLine1 = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
shape: {
|
||||
x1: model.width+2,
|
||||
y1: model.width/361*336/2,
|
||||
x2: model.width+12,
|
||||
y2: model.width/361*336/2
|
||||
},
|
||||
style: {
|
||||
lineWidth: 3,
|
||||
stroke: '#000'
|
||||
}
|
||||
});
|
||||
this.ibpLine2 = new Line({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
draggable: false,
|
||||
shape: {
|
||||
y1: model.width/361*336+2,
|
||||
x1: model.width/2,
|
||||
y2: model.width/361*336+12,
|
||||
x2: model.width/2
|
||||
},
|
||||
style: {
|
||||
lineWidth: 3,
|
||||
stroke: '#000'
|
||||
}
|
||||
});
|
||||
|
||||
this.bottomText = new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
x: model.width/2,
|
||||
y: model.width/361*336+12,
|
||||
fontWeight: 600,
|
||||
fontSize: 10,
|
||||
fontFamily: model.fontFamily,
|
||||
text: model.bottomText,
|
||||
textStrokeWidth: 0,
|
||||
textFill: '#000',
|
||||
textAlign: 'center',
|
||||
textPosition: model.textPosition || 'inside',
|
||||
textLineHeight: 10
|
||||
}
|
||||
});
|
||||
|
||||
this.topText= new Text({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z,
|
||||
style: {
|
||||
x: model.width+14,
|
||||
y: model.width/361*336/2-4,
|
||||
fontWeight: 600,
|
||||
fontSize: 10,
|
||||
fontFamily: model.fontFamily,
|
||||
text: model.topText,
|
||||
textStrokeWidth: 0,
|
||||
textFill: '#000',
|
||||
textAlign: 'left',
|
||||
textPosition: model.textPosition || 'inside',
|
||||
textLineHeight: 10
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.bottomText);
|
||||
this.grouper.add(this.topText);
|
||||
this.grouper.add(this.ibpLine1);
|
||||
this.grouper.add(this.ibpLine2);
|
||||
this.grouper.add(this.rotatingButton);
|
||||
this.grouper.add(this.keyImage);
|
||||
this.add(this.grouper);
|
||||
this.transformScale();
|
||||
// this.transformScale();
|
||||
}
|
||||
|
||||
/** 缩放按钮 */
|
||||
transformScale() {
|
||||
this.keyImage.origin = [0, 0];
|
||||
this.keyImage.scale =[this.model.width/314, this.model.width/314];
|
||||
this.keyImage.dirty();
|
||||
// this.keyImage.origin = [0, 0];
|
||||
// this.rotatingButton.origin = [0, 0];
|
||||
// this.keyImage.scale =[this.model.width/314, this.model.width/314];
|
||||
// this.rotatingButton.scale =[this.model.width/361, this.model.width/336];
|
||||
// this.keyImage.dirty();
|
||||
// this.rotatingButton.dirty();
|
||||
}
|
||||
|
||||
getRotateColor() {
|
||||
@ -94,4 +182,5 @@ export default class key extends Group {
|
||||
this.model.point.x+=dx;
|
||||
this.model.point.y+=dy;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import rotateBlack from '@/assets/ibp_images/rotate_black.png';
|
||||
import rotateRed from '@/assets/ibp_images/rotate_red.png';
|
||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||
|
||||
export default class rotateTip extends Group {
|
||||
|
||||
@ -21,7 +22,7 @@ export default class rotateTip extends Group {
|
||||
id: model.code,
|
||||
position: [model.point.x, model.point.y]
|
||||
});
|
||||
this.imageBg = new Image({
|
||||
this.tip = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
draggable: false,
|
||||
@ -29,20 +30,28 @@ export default class rotateTip extends Group {
|
||||
image: this.getRotateColor(),
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 68,
|
||||
height: 60
|
||||
width: this.model.width,
|
||||
height: this.model.width
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.imageBg);
|
||||
const tipRect = this.tip.getBoundingRect();
|
||||
this.tipBg = new Rect({
|
||||
zlevel: model.zlevel,
|
||||
z: model.z-1,
|
||||
draggable: false,
|
||||
shape: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: tipRect.width,
|
||||
height: tipRect.height
|
||||
},
|
||||
style: {
|
||||
fill: '#CE950F'
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.tip);
|
||||
this.grouper.add(this.tipBg);
|
||||
this.add(this.grouper);
|
||||
this.transformScale();
|
||||
}
|
||||
|
||||
/** 缩放按钮 */
|
||||
transformScale() {
|
||||
this.imageBg.origin = [0, 0];
|
||||
this.imageBg.scale =[this.model.width/68, this.model.width/68];
|
||||
this.imageBg.dirty();
|
||||
}
|
||||
|
||||
getRotateColor() {
|
||||
|
@ -1,41 +0,0 @@
|
||||
import Group from 'zrender/src/container/Group';
|
||||
import Image from 'zrender/src/graphic/Image';
|
||||
import Keyhole from '@/assets/ibp_images/keyhole.png';
|
||||
|
||||
export default class RotatingButton extends Group {
|
||||
constructor(device) {
|
||||
super();
|
||||
this.model = device.model;
|
||||
this._type = device.model._type;
|
||||
this._code = device.model.code;
|
||||
this.zlevel = device.model.zlevel;
|
||||
this.z = device.model.z;
|
||||
this.create();
|
||||
}
|
||||
|
||||
create() {
|
||||
const model = this.model;
|
||||
this.grouper=new Group({
|
||||
id: model.code,
|
||||
position: [model.point.x, model.point.y]
|
||||
});
|
||||
this.rotatingButton = new Image({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
draggable: false,
|
||||
style: {
|
||||
image: Keyhole,
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: model.width,
|
||||
height: model.width/361*336
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.rotatingButton);
|
||||
this.add(this.grouper);
|
||||
}
|
||||
setModel(dx, dy) {
|
||||
this.model.point.x+=dx;
|
||||
this.model.point.y+=dy;
|
||||
}
|
||||
}
|
@ -59,10 +59,6 @@ export function parser(data) {
|
||||
ibpDevice[elem.code] = deviceFactory(deviceType.Arrow, elem);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.rotatingButtonList || [], elem => {
|
||||
ibpDevice[elem.code] = deviceFactory(deviceType.RotatingButton, elem);
|
||||
}, this);
|
||||
|
||||
zrUtil.each(data.tipBoxList || [], elem => {
|
||||
ibpDevice[elem.code] = deviceFactory(deviceType.TipBox, elem);
|
||||
}, this);
|
||||
@ -104,7 +100,7 @@ function updateIbpListByDevice(ibp, name, device) {
|
||||
if (list) {
|
||||
const index = list.findIndex(elem => { return elem.code == device.code; });
|
||||
if (index >= 0) {
|
||||
list[index].dispose ? list.splice(index, 1) : list[index] = device;
|
||||
device._dispose ? list.splice(index, 1) : list[index] = device;
|
||||
} else {
|
||||
list.push(device);
|
||||
}
|
||||
@ -130,9 +126,6 @@ export function updateIbpData(device) {
|
||||
case deviceType.Arrow :
|
||||
updateIbpListByDevice(ibpData, 'arrowList', device);
|
||||
break;
|
||||
case deviceType.RotatingButton :
|
||||
updateIbpListByDevice(ibpData, 'rotatingButtonList', device);
|
||||
break;
|
||||
case deviceType.TipBox :
|
||||
updateIbpListByDevice(ibpData, 'tipBoxList', device);
|
||||
break;
|
||||
|
@ -2,12 +2,12 @@ export function SetScene() {
|
||||
var scene = new THREE.Scene();
|
||||
var cubeTextureLoader = new THREE.CubeTextureLoader();
|
||||
|
||||
cubeTextureLoader.setPath( '../../static/skybox/city/' );
|
||||
cubeTextureLoader.setPath( '../../static/skybox/star/' );
|
||||
|
||||
var cubeTexture = cubeTextureLoader.load( [
|
||||
'px.jpg', 'nx.jpg',
|
||||
'py.jpg', 'ny.jpg',
|
||||
'pz.jpg', 'nz.jpg',
|
||||
'px.png', 'nx.png',
|
||||
'py.png', 'ny.png',
|
||||
'pz.png', 'nz.png',
|
||||
] );
|
||||
|
||||
scene.background = cubeTexture;
|
||||
|
@ -41,9 +41,13 @@ var clock = new THREE.Clock();
|
||||
export function JLmapDriving(dom, data, skinCode) {
|
||||
|
||||
const scope = this;
|
||||
|
||||
//界面更新函数
|
||||
let updatemmi = {};
|
||||
this.dom = dom;
|
||||
// 渲染循环开关
|
||||
this.animateswitch = false;
|
||||
this.cctvswitch = false;
|
||||
// 初始化webgl渲染
|
||||
const renderer = SetRender(dom);
|
||||
renderer.domElement.style.position = 'absolute';
|
||||
@ -57,7 +61,7 @@ export function JLmapDriving(dom, data, skinCode) {
|
||||
document.getElementById('jlsimulation').appendChild(renderer.domElement);
|
||||
document.getElementById('jlcctv').appendChild(renderercctv.domElement);
|
||||
// 定义相机
|
||||
// let camera = SetCamera(dom);
|
||||
//let camera = SetCamera(dom);
|
||||
// 定义场景(渲染容器)
|
||||
const scene = SetScene();
|
||||
|
||||
@ -78,7 +82,7 @@ export function JLmapDriving(dom, data, skinCode) {
|
||||
// 选中物体描边方框
|
||||
this.helpbox = null;
|
||||
// 车门,站台门道岔动画构造器
|
||||
this.mixers = [];
|
||||
let mixers = [];
|
||||
// 模型操作命令组
|
||||
this.actions = {};
|
||||
this.nowspeed = null;
|
||||
@ -103,21 +107,20 @@ export function JLmapDriving(dom, data, skinCode) {
|
||||
controls3.enabled = true;
|
||||
scene.add(controls3.getObject());
|
||||
|
||||
const cameracctv = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 150);
|
||||
cameracctv.position.set( 5, -3, 27 );
|
||||
let cameracctv = new THREE.PerspectiveCamera(70, dom.clientWidth/dom.clientHeight, 1, 120);
|
||||
cameracctv.position.set( 5, -3,27 );
|
||||
|
||||
cameracctv.rotation.y = Math.PI/5*3;
|
||||
camera.add(cameracctv);
|
||||
// 订阅仿真socket
|
||||
this.Subscribe = new Jl3dDriving(scope);
|
||||
this.Subscribe = new Jl3dDriving(updatemmi);
|
||||
|
||||
this.Subscribe.socketon(scope.Subscribe.topic);
|
||||
|
||||
// 初始化加载数据和模型
|
||||
getPublish3dMapDetail(skinCode).then(netdata => {
|
||||
ModelLoad(data, scope, netdata.data, mapdata, camera, controls3, scene);
|
||||
ModelLoad(data, scope, netdata.data, mapdata, camera, controls3, scene,mixers);
|
||||
});
|
||||
|
||||
// let stats = new Stats();
|
||||
// dom.appendChild( stats.dom );
|
||||
// 开启渲染
|
||||
@ -135,12 +138,19 @@ export function JLmapDriving(dom, data, skinCode) {
|
||||
if (scope.animateswitch == true) {
|
||||
// 根据相机渲染场景
|
||||
renderer.render(scene, camera);
|
||||
renderercctv.render(scene, cameracctv);
|
||||
// updatcontrols();
|
||||
// renderercctv
|
||||
controls3.update();
|
||||
// 检测动画构造器播放动画
|
||||
//cctv渲染
|
||||
|
||||
|
||||
if(scope.cctvswitch == true){
|
||||
renderercctv.render(scene,cameracctv);
|
||||
}
|
||||
//相机按键位移
|
||||
//controls3.update();
|
||||
delta = clock.getDelta();
|
||||
for (let i=mixers.length-1; i>=0; i--) {
|
||||
mixers[i].update( delta );
|
||||
}
|
||||
// stats.update();
|
||||
}
|
||||
|
||||
}
|
||||
@ -160,43 +170,36 @@ export function JLmapDriving(dom, data, skinCode) {
|
||||
|
||||
scope.webwork.onmessage = function (event) {
|
||||
// 更新列车位置
|
||||
// stats.update();
|
||||
UpdateTrain(camera, mapdata.trainlisttest);
|
||||
delta = clock.getDelta();
|
||||
for (let i=scope.mixers.length-1; i>=0; i--) {
|
||||
if ( scope.mixers[i] ) {
|
||||
scope.mixers[i].update( delta );
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
this.updatenowspeed = function(speed) {
|
||||
updatemmi.updatenowspeed = function(speed) {
|
||||
scope.nowspeed = speed;
|
||||
};
|
||||
this.updatenowlen = function(maLen) {
|
||||
updatemmi.updatenowlen = function(maLen) {
|
||||
scope.nowmxlen = maLen;
|
||||
};
|
||||
this.updateatpspeed = function(atpspeed) {
|
||||
updatemmi.updateatpspeed = function(atpspeed) {
|
||||
scope.atpspeed = atpspeed;
|
||||
};
|
||||
this.updateatospeed = function(atospeed) {
|
||||
updatemmi.updateatospeed = function(atospeed) {
|
||||
scope.atospeed = atospeed;
|
||||
};
|
||||
this.updatetrainnum = function(trainnum) {
|
||||
updatemmi.updatetrainnum = function(trainnum) {
|
||||
scope.trainnum = trainnum;
|
||||
};
|
||||
this.updatestoptime = function(stime) {
|
||||
updatemmi.updatestoptime = function(stime) {
|
||||
scope.stime = stime;
|
||||
};
|
||||
this.updatedrivedata = function(drivedata) {
|
||||
updatemmi.updatedrivedata = function(drivedata) {
|
||||
scope.drivecount += 1;
|
||||
scope.drivedata = drivedata;
|
||||
};
|
||||
|
||||
this.updatedrivingcode = function(code) {
|
||||
updatemmi.updatedrivingcode = function(code) {
|
||||
drivingcode = code;
|
||||
mapdata.trainlisttest.list[drivingcode].children[0].add(controls3.getObject());
|
||||
mapdata.trainlisttest.list[drivingcode].children[0].add(scope.assetloader.modellist[4].mesh);
|
||||
@ -221,7 +224,7 @@ export function JLmapDriving(dom, data, skinCode) {
|
||||
scope.materiallist = null;
|
||||
scope.selectmodel = null;
|
||||
scope.helpbox = null;
|
||||
scope.mixers = null;
|
||||
mixers = null;
|
||||
scope.actions = null;
|
||||
scope.Subscribe = null;
|
||||
// console.log(scope);
|
||||
@ -274,6 +277,14 @@ export function JLmapDriving(dom, data, skinCode) {
|
||||
scope.animateswitch = false;
|
||||
};
|
||||
|
||||
this.cctvon = function() {
|
||||
scope.cctvswitch = true;
|
||||
};
|
||||
|
||||
this.cctvoff = function() {
|
||||
scope.cctvswitch = false;
|
||||
};
|
||||
|
||||
this.endsocket = function() {
|
||||
scope.Subscribe.socketoff(scope.Subscribe.topic);
|
||||
};
|
||||
|
@ -7,9 +7,9 @@ import { handleToken } from '@/utils/auth';
|
||||
import router from '@/router';
|
||||
|
||||
// 定于仿真socket接口
|
||||
export function Jl3dDriving(jlmap3d) {
|
||||
export function Jl3dDriving(updatemmi) {
|
||||
|
||||
const scope = this;
|
||||
let scope = this;
|
||||
this.map = null;
|
||||
|
||||
var trainlisttest = null;
|
||||
@ -29,16 +29,16 @@ export function Jl3dDriving(jlmap3d) {
|
||||
|
||||
let driverswitch = false;
|
||||
|
||||
const stoptimer = null;
|
||||
const num = 30;
|
||||
const pointstand = null;
|
||||
let stoptimer = null;
|
||||
let num = 30;
|
||||
let pointstand = null;
|
||||
|
||||
// run as plane = 01;
|
||||
// reset = 02;
|
||||
var datatype = '00';
|
||||
this.teststomp = new StompClient();
|
||||
this.topic = '/user/queue/simulation/jl3d';
|
||||
const header = {'X-Token': handleToken() };
|
||||
let header = {'X-Token': handleToken() };
|
||||
|
||||
this.updatamap = function(mapdata, materiallist, nowaction, scene) {
|
||||
// console.log(mapdata);
|
||||
@ -85,7 +85,7 @@ export function Jl3dDriving(jlmap3d) {
|
||||
// 仿真socket接口回调函数
|
||||
function callback(Response) {
|
||||
// 对象化数据
|
||||
const data = JSON.parse(Response.body);
|
||||
let data = JSON.parse(Response.body);
|
||||
// 遍历后台数据
|
||||
|
||||
// 判断消息类型
|
||||
@ -93,26 +93,63 @@ export function Jl3dDriving(jlmap3d) {
|
||||
//
|
||||
//
|
||||
// }
|
||||
if (data.type == 'Simulation_Driver_Change') {
|
||||
drivingcode = data.body.code;
|
||||
jlmap3d.updatedrivingcode( data.body.code);
|
||||
}
|
||||
if(data.type == 'Simulation_Drive_Data_Routing'){
|
||||
jlmap3d.updatedrivedata(data.body);
|
||||
}
|
||||
if (data.type == 'Simulation_TrainSpeed') {
|
||||
switch (data.type) {
|
||||
case 'Simulation_TrainSpeed':
|
||||
trainspeed(data);
|
||||
break;
|
||||
case 'Simulation_Drive_Data_Routing':
|
||||
updatemmi.updatedrivedata(data.body);
|
||||
break;
|
||||
case 'Simulation_Driver_Change':
|
||||
drivingcode = data.body.code;
|
||||
updatemmi.updatedrivingcode( data.body.code);
|
||||
break;
|
||||
case 'SJL3D_TrainStatus':
|
||||
trainstatus(data);
|
||||
break;
|
||||
case 'Simulation_DeviceStatus':
|
||||
devicestatus(data);
|
||||
break;
|
||||
default :
|
||||
//TODO
|
||||
}
|
||||
|
||||
if (trainlisttest) {
|
||||
// if(data.type == 'Simulation_Drive_Data_Routing'){
|
||||
// updatemmi.updatedrivedata(data.body);
|
||||
// }
|
||||
//
|
||||
// if (data.type == 'Simulation_Driver_Change') {
|
||||
// drivingcode = data.body.code;
|
||||
// updatemmi.updatedrivingcode( data.body.code);
|
||||
// }
|
||||
//
|
||||
// if (data.type == 'Simulation_TrainSpeed') {
|
||||
// trainspeed(data);
|
||||
// }
|
||||
//
|
||||
// if (data.type == 'SJL3D_TrainStatus') {
|
||||
// trainstatus(data);
|
||||
// }
|
||||
//
|
||||
// if (data.type == 'Simulation_DeviceStatus') {
|
||||
// devicestatus(data);
|
||||
// }
|
||||
|
||||
for (let tl = 0; tl<data.body.length; tl++) {
|
||||
code = data.body[tl].id;
|
||||
}
|
||||
|
||||
function trainspeed(data){
|
||||
if (trainlisttest) {
|
||||
for (let tl = 0; tl<data.body.length; tl++) {
|
||||
code = data.body[tl].id;
|
||||
if(trainlisttest.list[code].speed != data.body[tl].v){
|
||||
trainlisttest.list[code].speed = data.body[tl].v;
|
||||
|
||||
if (trainlisttest.list[code].runMode == '02') {
|
||||
|
||||
if (trainlisttest.list[code].isStandTrack == true) {
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/19/trainlisttest.list[code].len);
|
||||
} else {
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/20/trainlisttest.list[code].len);
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[tl].v*10/36/19/trainlisttest.list[code].len);
|
||||
}
|
||||
} else {
|
||||
|
||||
@ -120,429 +157,414 @@ export function Jl3dDriving(jlmap3d) {
|
||||
}
|
||||
|
||||
if (code == drivingcode) {
|
||||
if (data.body[tl].v >0) {
|
||||
jlmap3d.updatenowspeed(data.body[tl].v);
|
||||
} else {
|
||||
jlmap3d.updatenowspeed(Math.abs(data.body[tl].v));
|
||||
}
|
||||
// if (data.body[tl].v >0) {
|
||||
// updatemmi.updatenowspeed(data.body[tl].v);
|
||||
// } else {
|
||||
updatemmi.updatenowspeed(Math.abs(data.body[tl].v));
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
if (data.body[tl].atpv) {
|
||||
jlmap3d.updateatpspeed(data.body[tl].atpv);
|
||||
} else {
|
||||
jlmap3d.updateatpspeed(-1);
|
||||
}
|
||||
if (data.body[tl].atov) {
|
||||
jlmap3d.updateatospeed(data.body[tl].atov);
|
||||
} else {
|
||||
jlmap3d.updateatospeed(-1);
|
||||
}
|
||||
|
||||
|
||||
if (code == drivingcode) {
|
||||
if (data.body[tl].atpv) {
|
||||
updatemmi.updateatpspeed(data.body[tl].atpv);
|
||||
} else {
|
||||
updatemmi.updateatpspeed(-1);
|
||||
}
|
||||
if (data.body[tl].atov) {
|
||||
updatemmi.updateatospeed(data.body[tl].atov);
|
||||
} else {
|
||||
updatemmi.updateatospeed(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data.type == 'SJL3D_TrainStatus') {
|
||||
for (let i=data.body.length-1; i>=0; i--) {
|
||||
if (data.body[i]._type == 'Train') {
|
||||
// 遍历列车对象组
|
||||
if (trainlisttest) {
|
||||
code = data.body[i].code;
|
||||
// 剔除不显示的车
|
||||
// 找到对应列车
|
||||
function trainstatus(data){
|
||||
for (let i=data.body.length-1; i>=0; i--) {
|
||||
// 遍历列车对象组
|
||||
if (trainlisttest) {
|
||||
code = data.body[i].code;
|
||||
// 剔除不显示的车
|
||||
// 找到对应列车
|
||||
|
||||
if ( trainlisttest.list[code]) {
|
||||
if (code == drivingcode) {
|
||||
driverswitch = data.body[i].runMode;
|
||||
jlmap3d.updatetrainnum(data.body[i].groupNumber);
|
||||
// console.log(trainlisttest.list[code].progress);
|
||||
const syncdata = {
|
||||
type: 'Train',
|
||||
code: code,
|
||||
sectionCode: data.body[i].sectionCode,
|
||||
percent: 0
|
||||
};
|
||||
if ( trainlisttest.list[code]) {
|
||||
if (code == drivingcode) {
|
||||
driverswitch = data.body[i].runMode;
|
||||
//更新车组号
|
||||
updatemmi.updatetrainnum(data.body[i].groupNumber);
|
||||
//更新列车
|
||||
let syncdata = {
|
||||
type: 'Train',
|
||||
code: code,
|
||||
sectionCode: data.body[i].sectionCode,
|
||||
percent: 0
|
||||
};
|
||||
|
||||
if (trainlisttest.list[code].isStandTrack == true && trainlisttest.list[code].progress>0.95 && trainlisttest.list[code].speed<=0) {
|
||||
if (data.body[i].directionType == '02') {
|
||||
syncdata.percent = 1-(sectionlist.sections.datalist[data.body[i].sectionCode].rstop/trainlisttest.list[code].len);
|
||||
} else {
|
||||
syncdata.percent = sectionlist.sections.datalist[data.body[i].sectionCode].lstop/trainlisttest.list[code].len;
|
||||
}
|
||||
//scope.teststomp.send('/app/topic/simulation/wgu3d', syncdata);
|
||||
if (trainlisttest.list[code].isStandTrack == true && trainlisttest.list[code].progress>0.95 && trainlisttest.list[code].speed<=0) {
|
||||
if (data.body[i].directionType == '02') {
|
||||
syncdata.percent = 1-(sectionlist.sections.datalist[data.body[i].sectionCode].rstop/trainlisttest.list[code].len);
|
||||
} else {
|
||||
if (data.body[i].directionType == '02') {
|
||||
syncdata.percent = trainlisttest.list[code].progress;
|
||||
} else {
|
||||
syncdata.percent = 1 - trainlisttest.list[code].progress;
|
||||
}
|
||||
//scope.teststomp.send('/app/topic/simulation/wgu3d', syncdata);
|
||||
syncdata.percent = sectionlist.sections.datalist[data.body[i].sectionCode].lstop/trainlisttest.list[code].len;
|
||||
}
|
||||
|
||||
if (data.body[i].parkRemainTime>0) {
|
||||
jlmap3d.updatestoptime('停站时间:'+parseInt(data.body[i].parkRemainTime));
|
||||
//scope.teststomp.send('/app/topic/simulation/wgu3d', syncdata);
|
||||
} else {
|
||||
if (data.body[i].directionType == '02') {
|
||||
syncdata.percent = trainlisttest.list[code].progress;
|
||||
} else {
|
||||
if (data.body[i].runMode == '02') {
|
||||
jlmap3d.updatestoptime('列车自动驾驶中');
|
||||
} else {
|
||||
if (trainlisttest.list[code].isStandTrack == true && trainlisttest.list[code].progress>0.95 && trainlisttest.list[code].speed<=0) {
|
||||
// if(stoptimer){
|
||||
//
|
||||
// }else{
|
||||
// stoptimer = setInterval(function(){
|
||||
// if(num >=0){
|
||||
// jlmap3d.updatestoptime("停站时间:"+num);
|
||||
// num --;
|
||||
// }
|
||||
// },1000);
|
||||
// }
|
||||
|
||||
} else {
|
||||
jlmap3d.updatestoptime('列车人工驾驶中');
|
||||
}
|
||||
|
||||
}
|
||||
syncdata.percent = 1 - trainlisttest.list[code].progress;
|
||||
}
|
||||
// if(trainlisttest.list[code].speed > 0){
|
||||
// if(stoptimer){
|
||||
// clearInterval( stoptimer );
|
||||
// stoptimer = null;
|
||||
// num = 30;
|
||||
// }
|
||||
// }
|
||||
|
||||
//scope.teststomp.send('/app/topic/simulation/wgu3d', syncdata);
|
||||
}
|
||||
trainlisttest.list[code].runMode = data.body[i].runMode;
|
||||
// 车门开关验证
|
||||
if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') {
|
||||
// console.log("close");
|
||||
trainlisttest.list[code].doorStatus = '01';
|
||||
for (let an=actions[code].top.length-1; an>=0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') {
|
||||
// console.log("open");
|
||||
trainlisttest.list[code].doorStatus = '02';
|
||||
for (let an=actions[code].top.length-1; an>=0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
actions[code].top[an].timeScale = 1;
|
||||
actions[code].top[an].play();
|
||||
|
||||
if (data.body[i].parkRemainTime>0) {
|
||||
updatemmi.updatestoptime('停站时间:'+parseInt(data.body[i].parkRemainTime));
|
||||
} else {
|
||||
if (data.body[i].runMode == '02') {
|
||||
updatemmi.updatestoptime('列车自动驾驶中');
|
||||
} else {
|
||||
if (trainlisttest.list[code].isStandTrack == true && trainlisttest.list[code].progress>0.95 && trainlisttest.list[code].speed<=0) {
|
||||
// if(stoptimer){
|
||||
//
|
||||
// }else{
|
||||
// stoptimer = setInterval(function(){
|
||||
// if(num >=0){
|
||||
// updatemmi.updatestoptime("停站时间:"+num);
|
||||
// num --;
|
||||
// }
|
||||
// },1000);
|
||||
// }
|
||||
|
||||
} else {
|
||||
updatemmi.updatestoptime('列车人工驾驶中');
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (data.body[i].directionType == '02') {
|
||||
//
|
||||
// } else {
|
||||
// if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') {
|
||||
// // console.log("close");
|
||||
// trainlisttest.list[code].doorStatus = '01';
|
||||
// for (let an=actions[code].down.length-1; an>=0; an--) {
|
||||
// actions[code].down[an].reset();
|
||||
// actions[code].down[an].time = actions[code].top[an]._clip.duration;
|
||||
// actions[code].down[an].timeScale = -1;
|
||||
// actions[code].down[an].play();
|
||||
// }
|
||||
// } else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') {
|
||||
// // console.log("open");
|
||||
// trainlisttest.list[code].doorStatus = '02';
|
||||
// for (let an=actions[code].down.length-1; an>=0; an--) {
|
||||
// actions[code].down[an].reset();
|
||||
// actions[code].down[an].time = 0;
|
||||
// actions[code].down[an].timeScale = 1;
|
||||
// actions[code].down[an].play();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// 遍历获取所在轨道
|
||||
}
|
||||
trainlisttest.list[code].runMode = data.body[i].runMode;
|
||||
|
||||
if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) {
|
||||
// 车门开关验证
|
||||
if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') {
|
||||
// console.log("close");
|
||||
trainlisttest.list[code].doorStatus = '01';
|
||||
for (let an=actions[code].top.length-1; an>=0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = actions[code].top[an]._clip.duration;
|
||||
actions[code].top[an].timeScale = -1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
} else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') {
|
||||
// console.log("open");
|
||||
trainlisttest.list[code].doorStatus = '02';
|
||||
for (let an=actions[code].top.length-1; an>=0; an--) {
|
||||
actions[code].top[an].reset();
|
||||
actions[code].top[an].time = 0;
|
||||
actions[code].top[an].timeScale = 1;
|
||||
actions[code].top[an].play();
|
||||
}
|
||||
}
|
||||
// if (data.body[i].directionType == '02') {
|
||||
//
|
||||
// } else {
|
||||
// if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '01') {
|
||||
// // console.log("close");
|
||||
// trainlisttest.list[code].doorStatus = '01';
|
||||
// for (let an=actions[code].down.length-1; an>=0; an--) {
|
||||
// actions[code].down[an].reset();
|
||||
// actions[code].down[an].time = actions[code].top[an]._clip.duration;
|
||||
// actions[code].down[an].timeScale = -1;
|
||||
// actions[code].down[an].play();
|
||||
// }
|
||||
// } else if (trainlisttest.list[code].doorStatus != data.body[i].doorStatus && data.body[i].doorStatus == '02') {
|
||||
// // console.log("open");
|
||||
// trainlisttest.list[code].doorStatus = '02';
|
||||
// for (let an=actions[code].down.length-1; an>=0; an--) {
|
||||
// actions[code].down[an].reset();
|
||||
// actions[code].down[an].time = 0;
|
||||
// actions[code].down[an].timeScale = 1;
|
||||
// actions[code].down[an].play();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// 遍历获取所在轨道
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].code) {
|
||||
trainlisttest.group.add(trainlisttest.list[code]);
|
||||
if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == false) {
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].code) {
|
||||
trainlisttest.group.add(trainlisttest.list[code]);
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].oldoffset = data.body[i].sectionOffsetPercent;
|
||||
trainlisttest.list[code].dispose = false;
|
||||
trainlisttest.list[code].nowcode = data.body[i].sectionCode;
|
||||
trainlisttest.list[code].nextcode = data.body[i].nextSectionCode;
|
||||
let vexlist = [];
|
||||
let endrotation = null;
|
||||
|
||||
if (data.body[i].directionType == '02') { // 向右
|
||||
let offset = null;
|
||||
let rotaposx = null;
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x+offset*data.body[i].sectionOffsetPercent;
|
||||
} else {
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x+offset*data.body[i].sectionOffsetPercent;
|
||||
}
|
||||
|
||||
let rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].z;
|
||||
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].oldoffset = data.body[i].sectionOffsetPercent;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = rotaposz;
|
||||
}
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x>rotaposx) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x>rotaposx) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].status = '02';
|
||||
|
||||
} else if (data.body[i].directionType == '03') { // 向左
|
||||
|
||||
trainlisttest.list[code].dispose = false;
|
||||
trainlisttest.group.add(trainlisttest.list[code]);
|
||||
let offset = null;
|
||||
let rotaposx = null;
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x+offset*data.body[i].sectionOffsetPercent;
|
||||
} else {
|
||||
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x+offset*data.body[i].sectionOffsetPercent;
|
||||
}
|
||||
let rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].z;
|
||||
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = -rotaposz;
|
||||
}
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x<sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x<rotaposx) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x<rotaposx) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].status = '03';
|
||||
}
|
||||
|
||||
trainlisttest.list[code].curve = new THREE.CatmullRomCurve3(vexlist);
|
||||
trainlisttest.list[code].isStandTrack = sectionlist.sections.datalist[data.body[i].sectionCode].isStandTrack;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].len = sectionlist.sections.datalist[data.body[i].sectionCode].distance;
|
||||
|
||||
|
||||
if(data.body[i].speed == 0){
|
||||
trainlisttest.list[code].speeds = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = 0;
|
||||
// trainlisttest.list[code].startmark = 1;
|
||||
}else{
|
||||
trainlisttest.list[code].speeds = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/20/trainlisttest.list[code].len);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == true) {
|
||||
trainlisttest.group.remove(trainlisttest.list[code]);
|
||||
trainlisttest.list[code].progress = null;
|
||||
trainlisttest.list[code].dispose = true;
|
||||
code = trainlisttest.group.children[i].name;
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
trainlisttest.list[code].doorStatus = '01';
|
||||
trainlisttest.list[code].speed = 0;
|
||||
trainlisttest.list[code].position.x = -50000;
|
||||
trainlisttest.list[code].position.y = -50000;
|
||||
|
||||
} else if (trainlisttest.list[code].dispose == data.body[i].dispose && data.body[i].dispose == false) {
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].code) {
|
||||
if (driverswitch == '02' && code == drivingcode) {
|
||||
// updatemmi.updatenowspeed(data.body[i].speed);
|
||||
// if (data.body[i].atpSpeed) {
|
||||
// updatemmi.updateatpspeed(data.body[i].atpSpeed);
|
||||
// } else {
|
||||
// updatemmi.updateatpspeed(-1);
|
||||
// }
|
||||
// if (data.body[i].targetSpeed) {
|
||||
// updatemmi.updateatospeed(data.body[i].targetSpeed);
|
||||
// } else {
|
||||
// updatemmi.updateatospeed(-1);
|
||||
// }
|
||||
if (data.body[i].maLen) {
|
||||
updatemmi.updatenowlen(data.body[i].maLen);
|
||||
} else {
|
||||
updatemmi.updatenowlen(0);
|
||||
}
|
||||
}
|
||||
if (driverswitch == '05' && code == drivingcode) {
|
||||
if (data.body[i].maLen) {
|
||||
updatemmi.updatenowlen(data.body[i].maLen);
|
||||
} else {
|
||||
updatemmi.updatenowlen(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (trainlisttest.list[code].nowcode != data.body[i].sectionCode || trainlisttest.list[code].nextcode != data.body[i].nextSectionCode) {
|
||||
trainlisttest.list[code].nowcode = data.body[i].sectionCode;
|
||||
trainlisttest.list[code].nextcode = data.body[i].nextSectionCode;
|
||||
const vexlist = [];
|
||||
const endrotation = null;
|
||||
|
||||
let vexlist = [];
|
||||
let endrotation = null;
|
||||
if (data.body[i].directionType == '02') { // 向右
|
||||
let offset = null;
|
||||
let rotaposx = null;
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x+offset*data.body[i].sectionOffsetPercent;
|
||||
} else {
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x+offset*data.body[i].sectionOffsetPercent;
|
||||
}
|
||||
|
||||
const rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].z;
|
||||
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = rotaposz;
|
||||
}
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x>rotaposx) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
//转向
|
||||
if (trainlisttest.list[code].status != data.body[i].directionType) {
|
||||
let rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12];
|
||||
let rotaposz = trainlisttest.list[code].children[0].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = rotaposz;
|
||||
}
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x>trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x>trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x>rotaposx) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
} else {
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
}
|
||||
trainlisttest.list[code].status = '02';
|
||||
|
||||
} else if (data.body[i].directionType == '03') { // 向左
|
||||
|
||||
trainlisttest.list[code].dispose = false;
|
||||
trainlisttest.group.add(trainlisttest.list[code]);
|
||||
let offset = null;
|
||||
let rotaposx = null;
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x+offset*data.body[i].sectionOffsetPercent;
|
||||
} else {
|
||||
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x+offset*data.body[i].sectionOffsetPercent;
|
||||
}
|
||||
const rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].z;
|
||||
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = -rotaposz;
|
||||
}
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x<sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x<rotaposx) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
//转向
|
||||
if (trainlisttest.list[code].status != data.body[i].directionType) {
|
||||
let rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12];
|
||||
let rotaposz = Math.abs(trainlisttest.list[code].children[0].matrixWorld.elements[14]);
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = rotaposz;
|
||||
}
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x<sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x<trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x<trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x<rotaposx) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x<sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
|
||||
} else {
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
}
|
||||
trainlisttest.list[code].status = '03';
|
||||
}
|
||||
|
||||
trainlisttest.list[code].curve = new THREE.CatmullRomCurve3(vexlist);
|
||||
trainlisttest.list[code].isStandTrack = sectionlist.sections.datalist[data.body[i].sectionCode].isStandTrack;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].len = sectionlist.sections.datalist[data.body[i].sectionCode].distance;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].speed = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/20/trainlisttest.list[code].len);
|
||||
|
||||
|
||||
if(data.body[i].speed == 0){
|
||||
trainlisttest.list[code].speeds = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = 0;
|
||||
// trainlisttest.list[code].startmark = 1;
|
||||
}else{
|
||||
trainlisttest.list[code].speeds = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/20/trainlisttest.list[code].len);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == true) {
|
||||
trainlisttest.group.remove(trainlisttest.list[code]);
|
||||
trainlisttest.list[code].progress = null;
|
||||
trainlisttest.list[code].dispose = true;
|
||||
code = trainlisttest.group.children[i].name;
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
trainlisttest.list[code].doorStatus = '01';
|
||||
trainlisttest.list[code].speed = 0;
|
||||
trainlisttest.list[code].position.x = -50000;
|
||||
trainlisttest.list[code].position.y = -50000;
|
||||
|
||||
} else if (trainlisttest.list[code].dispose == data.body[i].dispose && data.body[i].dispose == false) {
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].code) {
|
||||
if (driverswitch == '02' && code == drivingcode) {
|
||||
jlmap3d.updatenowspeed(data.body[i].speed);
|
||||
if (data.body[i].atpSpeed) {
|
||||
jlmap3d.updateatpspeed(data.body[i].atpSpeed);
|
||||
} else {
|
||||
jlmap3d.updateatpspeed(-1);
|
||||
}
|
||||
if (data.body[i].targetSpeed) {
|
||||
jlmap3d.updateatospeed(data.body[i].targetSpeed);
|
||||
} else {
|
||||
jlmap3d.updateatospeed(-1);
|
||||
}
|
||||
if (data.body[i].maLen) {
|
||||
jlmap3d.updatenowlen(data.body[i].maLen);
|
||||
} else {
|
||||
jlmap3d.updatenowlen(0);
|
||||
}
|
||||
// if(trainlisttest.list[code].isStandTrack == true){
|
||||
// pointstand = null;
|
||||
// if(data.body[i].directionType == "02"){
|
||||
// pointstand = trainlisttest.list[code].curve.getPointAt(data.body[i].sectionOffsetPercent);
|
||||
// }else{
|
||||
// pointstand = trainlisttest.list[code].curve.getPointAt(1-data.body[i].sectionOffsetPercent);
|
||||
// }
|
||||
// console.log(data.body[i].sectionOffsetPercent)
|
||||
// console.log(pointstand.x);
|
||||
//
|
||||
// trainlisttest.list[code].position.x = pointstand.x;
|
||||
// }
|
||||
}
|
||||
if (driverswitch == '05' && code == drivingcode) {
|
||||
if (data.body[i].maLen) {
|
||||
jlmap3d.updatenowlen(data.body[i].maLen);
|
||||
} else {
|
||||
jlmap3d.updatenowlen(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (trainlisttest.list[code].nowcode != data.body[i].sectionCode || trainlisttest.list[code].nextcode != data.body[i].nextSectionCode) {
|
||||
trainlisttest.list[code].nowcode = data.body[i].sectionCode;
|
||||
trainlisttest.list[code].nextcode = data.body[i].nextSectionCode;
|
||||
const vexlist = [];
|
||||
const endrotation = null;
|
||||
if (data.body[i].directionType == '02') { // 向右
|
||||
if (trainlisttest.list[code].status != data.body[i].directionType) {
|
||||
const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12];
|
||||
const rotaposz = trainlisttest.list[code].children[0].matrixWorld.elements[14];
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = rotaposz;
|
||||
}
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x>trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x>trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
} else {
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
}
|
||||
trainlisttest.list[code].status = '02';
|
||||
} else if (data.body[i].directionType == '03') { // 向左
|
||||
if (trainlisttest.list[code].status != data.body[i].directionType) {
|
||||
const rotaposx = trainlisttest.list[code].children[5].matrixWorld.elements[12];
|
||||
const rotaposz = Math.abs(trainlisttest.list[code].children[0].matrixWorld.elements[14]);
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = rotaposz;
|
||||
}
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x<sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x<trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
vexlist.push(new THREE.Vector3(trainlisttest.list[code].position.x, 0, trainlisttest.list[code].children[0].matrixWorld.elements[14]));
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[m].x<trainlisttest.list[code].position.x) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x<sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
|
||||
} else {
|
||||
for (let m=0; m<sectionlist.sections.datalist[data.body[i].sectionCode].rail.length; m++) {
|
||||
vexlist.push(sectionlist.sections.datalist[data.body[i].sectionCode].rail[m]);
|
||||
}
|
||||
}
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
}
|
||||
trainlisttest.list[code].status = '03';
|
||||
}
|
||||
trainlisttest.list[code].curve = new THREE.CatmullRomCurve3(vexlist);
|
||||
trainlisttest.list[code].isStandTrack = sectionlist.sections.datalist[data.body[i].sectionCode].isStandTrack;
|
||||
trainlisttest.list[code].len = sectionlist.sections.datalist[data.body[i].sectionCode].distance;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].speed = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/20/trainlisttest.list[code].len);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (data.type == 'Simulation_DeviceStatus') {
|
||||
for (let i=data.body.length-1; i>=0; i--) {
|
||||
// 0xFFFFFF
|
||||
// 0xCD0000 红
|
||||
// 0xEEEE00 黄
|
||||
// 0x32CD32 绿
|
||||
if (data.body[i]._type == 'Signal') {
|
||||
if (signallist) {
|
||||
signalupdate(data.body[i]);
|
||||
}
|
||||
function devicestatus(data){
|
||||
for (let i=data.body.length-1; i>=0; i--) {
|
||||
// 0xFFFFFF
|
||||
// 0xCD0000 红
|
||||
// 0xEEEE00 黄
|
||||
// 0x32CD32 绿
|
||||
if (data.body[i]._type == 'Signal') {
|
||||
if (signallist) {
|
||||
signalupdate(data.body[i]);
|
||||
}
|
||||
|
||||
if (data.body[i]._type == 'StationStand') {
|
||||
if (actions) {
|
||||
standupdate(data.body[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (data.body[i]._type == 'Switch') {
|
||||
if (sectionlist) {
|
||||
switchupdate(data.body[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (data.body[i]._type == 'StationStand') {
|
||||
if (actions) {
|
||||
standupdate(data.body[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (data.body[i]._type == 'Switch') {
|
||||
if (sectionlist) {
|
||||
switchupdate(data.body[i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -263,8 +263,8 @@ export function Jlmap3dSubscribe(jlmap3d) {
|
||||
trainlisttest.list[code].dispose = false;
|
||||
trainlisttest.list[code].nowcode = data.body[i].sectionCode;
|
||||
trainlisttest.list[code].nextcode = data.body[i].nextSectionCode;
|
||||
const vexlist = [];
|
||||
const endrotation = null;
|
||||
let vexlist = [];
|
||||
let endrotation = null;
|
||||
|
||||
if (data.body[i].directionType == '02') { // 向右
|
||||
let offset = null;
|
||||
@ -278,13 +278,15 @@ export function Jlmap3dSubscribe(jlmap3d) {
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x+offset*data.body[i].sectionOffsetPercent;
|
||||
}
|
||||
|
||||
const rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].z;
|
||||
let rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].z;
|
||||
|
||||
trainlisttest.list[code].rotation.y = 0;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = rotaposz;
|
||||
}
|
||||
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x>sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
@ -319,16 +321,15 @@ export function Jlmap3dSubscribe(jlmap3d) {
|
||||
offset = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x-sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x;
|
||||
rotaposx = sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x+offset*data.body[i].sectionOffsetPercent;
|
||||
}
|
||||
const rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].z;
|
||||
let rotaposz = sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].z;
|
||||
|
||||
trainlisttest.list[code].rotation.y = Math.PI;
|
||||
trainlisttest.list[code].position.x = rotaposx;
|
||||
trainlisttest.list[code].position.y = 0;
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = rotaposz;
|
||||
}
|
||||
if (data.body[i].groupNumber == '001') {
|
||||
}
|
||||
|
||||
for (let tl=0; tl<6; tl++) {
|
||||
trainlisttest.list[code].children[tl].position.z = -rotaposz;
|
||||
}
|
||||
if (sectionlist.sections.datalist[data.body[i].sectionCode].rail[0].x<sectionlist.sections.datalist[data.body[i].sectionCode].rail[1].x) {
|
||||
vexlist.push(new THREE.Vector3(rotaposx, 0, rotaposz));
|
||||
for (let m=sectionlist.sections.datalist[data.body[i].sectionCode].rail.length-1; m>=0; m--) {
|
||||
@ -344,17 +345,25 @@ export function Jlmap3dSubscribe(jlmap3d) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
trainlisttest.list[code].status = '03';
|
||||
}
|
||||
|
||||
trainlisttest.list[code].curve = new THREE.CatmullRomCurve3(vexlist);
|
||||
trainlisttest.list[code].isStandTrack = sectionlist.sections.datalist[data.body[i].sectionCode].isStandTrack;
|
||||
trainlisttest.list[code].progress = 0;
|
||||
trainlisttest.list[code].len = sectionlist.sections.datalist[data.body[i].sectionCode].distance;
|
||||
trainlisttest.list[code].speed = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/20/trainlisttest.list[code].len);
|
||||
}
|
||||
|
||||
|
||||
if(data.body[i].speed == 0){
|
||||
trainlisttest.list[code].speeds = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = 0;
|
||||
// trainlisttest.list[code].startmark = 1;
|
||||
}else{
|
||||
trainlisttest.list[code].speeds = data.body[i].speed;
|
||||
trainlisttest.list[code].speeds = parseFloat(data.body[i].speed*10/36/20/trainlisttest.list[code].len);
|
||||
}
|
||||
|
||||
}
|
||||
} else if (trainlisttest.list[code].dispose != data.body[i].dispose && data.body[i].dispose == true) {
|
||||
trainlisttest.group.remove(trainlisttest.list[code]);
|
||||
trainlisttest.list[code].progress = null;
|
||||
|
@ -10,7 +10,7 @@ import {Materialload} from '@/jlmap3d/main/loaders/Materialload.js';
|
||||
import { Loading } from 'element-ui';
|
||||
// import {SwitchModel} from '@/jlmap3d/model/SwitchModel.js';
|
||||
|
||||
export function ModelLoad(data,scope,netdata,mapdata,camera,controls,scene){
|
||||
export function ModelLoad(data,scope,netdata,mapdata,camera,controls,scene,mixerss){
|
||||
//console.log(mapdata);
|
||||
Materialload(scope);
|
||||
//console.log(data);
|
||||
@ -20,7 +20,7 @@ export function ModelLoad(data,scope,netdata,mapdata,camera,controls,scene){
|
||||
let assetloader = scope.assetloader;
|
||||
let animateswitch = scope.animateswitch;
|
||||
|
||||
let mixers = scope.mixers;
|
||||
let mixers = mixerss;
|
||||
let actions = scope.actions;
|
||||
|
||||
let loadingInstance = Loading.service({ fullscreen: true });
|
||||
|
@ -340,33 +340,33 @@ stationcanvas.src = "../../static/texture/msgt.png";
|
||||
function getTextCanvas(text){
|
||||
let canvas = document.getElementById('canvastexture');
|
||||
|
||||
canvas.width = 300;
|
||||
canvas.height = 374;
|
||||
canvas.width = 256;
|
||||
canvas.height = 512;
|
||||
// canvas.style.width = width;
|
||||
// canvas.style.height = height;
|
||||
|
||||
let ctx = canvas.getContext('2d');
|
||||
//ctx.fillStyle = '#FFFFFF';
|
||||
ctx.fillRect(0, 0,300,374);
|
||||
ctx.fillRect(0, 0,256,512);
|
||||
|
||||
ctx.fillStyle = '#FFFFFF';
|
||||
// ctx.textAlign = 'center';
|
||||
// ctx.textBaseline = 'middle';
|
||||
ctx.clearRect(0,0,300,374);
|
||||
ctx.clearRect(0,0,256,512);
|
||||
|
||||
ctx.drawImage(stationcanvas,0,0,300,374);
|
||||
ctx.drawImage(stationcanvas,0,0,256,512);
|
||||
|
||||
ctx.font = "20px Verdana";
|
||||
ctx.fillText("车站名称: "+text.runPlanName, 40,58);
|
||||
ctx.fillText("车站名称: "+text.runPlanName, 20,58);
|
||||
|
||||
ctx.fillText("漫游", 40,110);
|
||||
ctx.fillText("信息", 124,110);
|
||||
ctx.fillText("备忘", 210,110);
|
||||
ctx.fillText("漫游", 30,100);
|
||||
ctx.fillText("信息", 114,100);
|
||||
ctx.fillText("备忘", 190,100);
|
||||
|
||||
ctx.fillText("车站序号: "+text.name, 40,155);
|
||||
|
||||
ctx.fillText("公里标记:"+text.kmPost,40 ,256*3/4);
|
||||
|
||||
let data = ctx.getImageData(0, 0,300,374);
|
||||
let data = ctx.getImageData(0, 0,256,512);
|
||||
return data;
|
||||
}
|
||||
|
@ -85,10 +85,13 @@ deviceState[deviceType.Signal] = {
|
||||
status: {
|
||||
Default: '01', /** 关闭(缺省值)*/
|
||||
State01: '01', /** 关闭 */
|
||||
State02: '02', /** 开放 */
|
||||
State03: '03', /** 引导 */
|
||||
State04: '04', /** 封锁 */
|
||||
State05: '05' /** 故障 */
|
||||
State02: '02', /** 开放正向 */
|
||||
State03: '03', /** 开放侧向 */
|
||||
State04: '04', /** 引导 */
|
||||
State05: '05', /** 封锁 */
|
||||
State06: '06', /** 故障 */
|
||||
State07: '07', /** 功能封锁 */
|
||||
State08: '08' /** 信号保护区段监视 */
|
||||
},
|
||||
/** 信号机状态类型 */
|
||||
lightType: {
|
||||
|
@ -135,7 +135,7 @@ class MouseController extends Eventful {
|
||||
scale = -1;
|
||||
}
|
||||
|
||||
this.trigger(this.events.__Zoom, {type: 'zoom', scale, originX, originY });
|
||||
this.trigger(this.events.__Zoom, {type: this.events.__Zoom, scale, originX, originY });
|
||||
}
|
||||
}
|
||||
|
||||
@ -192,10 +192,6 @@ class MouseController extends Eventful {
|
||||
|
||||
return newEm;
|
||||
}
|
||||
|
||||
updateDatazoom(zoom) {
|
||||
this.trigger(this.events.Datazoom, zoom);
|
||||
}
|
||||
}
|
||||
|
||||
export default MouseController;
|
||||
|
@ -230,9 +230,9 @@ class Signal extends Group {
|
||||
}
|
||||
}
|
||||
|
||||
// 开放
|
||||
open() {
|
||||
if (this.count == 2 && this.model.lightType == '01' && this.model.switchLocateType == '01') { // 双灯 物理点灯 道岔定位
|
||||
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
|
||||
openPositive() {
|
||||
if (this.count == 2 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
@ -241,7 +241,7 @@ class Signal extends Group {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02' && this.model.switchLocateType == '01') { // 双灯 逻辑点灯 道岔定位
|
||||
} else if (this.count == 2 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
@ -250,7 +250,21 @@ class Signal extends Group {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.backgroundColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '01' && this.model.switchLocateType == '02') { // 双灯 物理点灯 道岔反位
|
||||
} else if (this.count == 1 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
/* count 1单灯 2双灯 lightType 01物理点灯 02逻辑点灯*/
|
||||
openLateral() {
|
||||
if (this.count == 2 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
@ -259,7 +273,7 @@ class Signal extends Group {
|
||||
this.lamps[1].setStop(false);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 2 && this.model.lightType == '02' && this.model.switchLocateType == '02') { // 双灯 逻辑点灯 道岔反位
|
||||
} else if (this.count == 2 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.backgroundColor);
|
||||
@ -268,7 +282,7 @@ class Signal extends Group {
|
||||
this.lamps[1].setStop(true);
|
||||
this.lamps[1].setColor(this.style.Signal.lamp.yellowColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '02') { // 单灯 物理点灯 允许调车
|
||||
} else if (this.count == 1 && this.model.lightType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
// 出站信号机/阻隔信号机
|
||||
@ -278,24 +292,13 @@ class Signal extends Group {
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.whiteColor);
|
||||
}
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '01' && this.model.switchLocateType == '01') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(false);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
} else if (this.count == 1 && this.model.lightType == '02' && this.model.switchLocateType == '01' ) {
|
||||
} else if (this.count == 1 && this.model.lightType == '02') {
|
||||
if (this.lamps[0]) {
|
||||
this.lamps[0].setStop(true);
|
||||
this.lamps[0].setColor(this.style.Signal.lamp.greenColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 列车进路
|
||||
trainRoute() {
|
||||
if (this.count == 1) {
|
||||
@ -437,12 +440,13 @@ class Signal extends Group {
|
||||
/** 设置状态 (点灯类型)*/
|
||||
switch (model.status) {
|
||||
case '01': this.close(); break; // 关闭
|
||||
case '02': this.open(); break; // 开放
|
||||
case '03': this.guid(); break; // 引导
|
||||
case '04': this.block(); break; // 封锁
|
||||
case '05': this.fault(); break; // 故障
|
||||
case '06': this.block(); break; // 功能封锁
|
||||
case '07': this.signalCheck(); break; // 信号保护区段检测
|
||||
case '02': this.openPositive(); break; // 开放正向
|
||||
case '03': this.openLateral(); break; // 开放侧向
|
||||
case '04': this.guid(); break; // 引导
|
||||
case '05': this.block(); break; // 封锁
|
||||
case '06': this.fault(); break; // 故障
|
||||
case '07': this.block(); break; // 功能封锁
|
||||
case '08': this.signalCheck(); break; // 信号保护区段检测
|
||||
}
|
||||
|
||||
/** 进路性质类型*/
|
||||
|
@ -134,70 +134,70 @@ export default {
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
title: '系统',
|
||||
title: this.$t('menu.menuBar.system'),
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
title: this.$t('menu.menuBar.view'),
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '刷新',
|
||||
title: this.$t('menu.menuBar.refresh'),
|
||||
operate: OperationEvent.Command.mBar.fresh,
|
||||
click: this.refresh,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: '设置列车识别号显示',
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: '设置名称显示',
|
||||
title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: '设置设备显示',
|
||||
title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '站场图切换',
|
||||
title: this.$t('menu.menuBar.stationMapSwitch'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '控制模式转换',
|
||||
title: this.$t('menu.menuBar.controlModeSwitch'),
|
||||
operate: OperationEvent.Command.mBar.remoteControl,
|
||||
children: [
|
||||
{
|
||||
title: '转为站控',
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar
|
||||
},
|
||||
{
|
||||
title: '强制站控',
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password
|
||||
},
|
||||
{
|
||||
title: '转为中控',
|
||||
title: this.$t('menu.menuBar.toCentralControl'),
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar,
|
||||
froce: true
|
||||
@ -205,36 +205,36 @@ export default {
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '请求操作区域',
|
||||
title: this.$t('menu.menuBar.requestOperationArea'),
|
||||
operate: OperationEvent.Command.mBar.requestZone,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '历史查询',
|
||||
title: this.$t('menu.menuBar.historyQuery'),
|
||||
operate: OperationEvent.Command.mBar.historyQuery,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '用户管理',
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
operate: OperationEvent.Command.mBar.userManage,
|
||||
children: [
|
||||
{
|
||||
title: '用户管理',
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
click: this.userManage,
|
||||
operate: OperationEvent.Command.manage.userManage
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
title: this.$t('menu.menuBar.help'),
|
||||
operate: OperationEvent.Command.mBar.help,
|
||||
children: [
|
||||
{
|
||||
title: '关于ControlMonitor(A)',
|
||||
title: this.$t('menu.menuBar.about'),
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
@ -243,150 +243,150 @@ export default {
|
||||
],
|
||||
central: [
|
||||
{
|
||||
title: '系统',
|
||||
title: this.$t('menu.menuBar.system'),
|
||||
operate: OperationEvent.Command.mBar.system,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '查看',
|
||||
title: this.$t('menu.menuBar.view'),
|
||||
operate: OperationEvent.Command.mBar.check,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '刷新',
|
||||
title: this.$t('menu.menuBar.refresh'),
|
||||
operate: OperationEvent.Command.mBar.fresh,
|
||||
click: this.refresh,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '显示',
|
||||
title: this.$t('menu.menuBar.display'),
|
||||
operate: OperationEvent.Command.mBar.view,
|
||||
children: [
|
||||
{
|
||||
title: '设置列车识别号显示',
|
||||
title: this.$t('menu.menuBar.setTrainIdDisplay'),
|
||||
click: this.setTrainIdDisplay,
|
||||
operate: OperationEvent.Command.view.setTrainIdDisplay
|
||||
},
|
||||
{
|
||||
title: '设置名称显示',
|
||||
title: this.$t('menu.menuBar.setNameDisplay'),
|
||||
click: this.setNameDisplay,
|
||||
operate: OperationEvent.Command.view.setNameDisplay
|
||||
},
|
||||
{
|
||||
title: '设置设备显示',
|
||||
title: this.$t('menu.menuBar.setDeviceDisplay'),
|
||||
click: this.setDeviceDisplay,
|
||||
operate: OperationEvent.Command.view.setDeviceDisplay
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '站场图切换',
|
||||
title: this.$t('menu.menuBar.stationMapSwitch'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '计划车操作',
|
||||
title: this.$t('menu.menuBar.planCarOperation'),
|
||||
operate: OperationEvent.Command.mBar.planTrain,
|
||||
children: [
|
||||
{
|
||||
title: '添加计划车',
|
||||
title: this.$t('menu.menuBar.addPlanCar'),
|
||||
click: this.addPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.addPlanTrain
|
||||
},
|
||||
{
|
||||
title: '平移计划车',
|
||||
title: this.$t('menu.menuBar.panPlanCar'),
|
||||
click: this.translatPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.translatPlanTrain
|
||||
},
|
||||
{
|
||||
title: '删除计划车',
|
||||
title: this.$t('menu.menuBar.deletePlanCar'),
|
||||
click: this.delPlanTrain,
|
||||
operate: OperationEvent.Command.planTrain.delPlanTrain
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '车次号维护',
|
||||
title: this.$t('menu.menuBar.trainNumberMaintenance'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '控制模式转换',
|
||||
title: this.$t('menu.menuBar.controlModeSwitch'),
|
||||
operate: OperationEvent.Command.mBar.remoteControl,
|
||||
children: [
|
||||
{
|
||||
title: '转为站控',
|
||||
title: this.$t('menu.menuBar.toStationControl'),
|
||||
click: this.turnToStationControl,
|
||||
operate: OperationEvent.StationControl.requestStationControl.mbar,
|
||||
froce: true
|
||||
},
|
||||
{
|
||||
title: '强制站控',
|
||||
title: this.$t('menu.menuBar.forcedStationControl'),
|
||||
click: this.mandatoryStationControl,
|
||||
operate: OperationEvent.StationControl.forcedStationControl.password,
|
||||
froce: true
|
||||
},
|
||||
{
|
||||
title: '转为中控',
|
||||
title: this.$t('menu.menuBar.toCentralControl'),
|
||||
click: this.conterStationControl,
|
||||
operate: OperationEvent.StationControl.requestCentralControl.mbar
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '请求操作区域',
|
||||
title: this.$t('menu.menuBar.requestOperationArea'),
|
||||
operate: OperationEvent.Command.mBar.requestZone,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '调度日志',
|
||||
title: this.$t('menu.menuBar.schedulingLog'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '系统分析',
|
||||
title: this.$t('menu.menuBar.systemAnalysis'),
|
||||
operate: '',
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '用户管理',
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
operate: OperationEvent.Command.mBar.userManage,
|
||||
children: [
|
||||
{
|
||||
title: '用户管理',
|
||||
title: this.$t('menu.menuBar.userManage'),
|
||||
click: this.userManage,
|
||||
operate: OperationEvent.Command.manage.userManage
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '历史查询',
|
||||
title: this.$t('menu.menuBar.historyQuery'),
|
||||
operate: OperationEvent.Command.mBar.historyQuery,
|
||||
click: this.undeveloped,
|
||||
children: [
|
||||
]
|
||||
},
|
||||
{
|
||||
title: '帮助',
|
||||
title: this.$t('menu.menuBar.help'),
|
||||
operate: OperationEvent.Command.mBar.help,
|
||||
children: [
|
||||
{
|
||||
title: '关于ControlMonitor(A)',
|
||||
title: this.$t('menu.menuBar.about'),
|
||||
click: this.about,
|
||||
operate: OperationEvent.Command.help.about
|
||||
}
|
||||
@ -689,8 +689,9 @@ export default {
|
||||
},
|
||||
undeveloped() {
|
||||
this.doClose();
|
||||
this.$alert('实现中......', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
|
||||
this.$alert(this.$t('menu.menuBar.implemented'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
|
@ -22,17 +22,17 @@ export default {
|
||||
menuNormal: [],
|
||||
menuScreen: [
|
||||
{
|
||||
label: '放大地图',
|
||||
label: this.$t('menu.menuCancle.zoomIn'),
|
||||
handler: this.magnifyMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '缩小地图',
|
||||
label: this.$t('menu.menuCancle.zoomOut'),
|
||||
handler: this.shrinkMap,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
label: '返回',
|
||||
label: this.$t('menu.menuCancle.back'),
|
||||
handler: this.back,
|
||||
disabled: false
|
||||
}
|
||||
|
@ -42,49 +42,49 @@
|
||||
menuNormal: {
|
||||
local: [
|
||||
{
|
||||
label: '区段故障解锁',
|
||||
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
||||
handler: this.fault,
|
||||
disabledCallback: MenuDisabledState.Section.fault,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
label: this.$t('menu.menuSection.sectionResection'),
|
||||
handler: this.split,
|
||||
disabledCallback: MenuDisabledState.Section.split,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
label: this.$t('menu.menuSection.sectionActive'),
|
||||
handler: this.active,
|
||||
disabledCallback: MenuDisabledState.Section.active,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段计轴预复位',
|
||||
label: this.$t('menu.menuSection.sectionAxisPreReset'),
|
||||
handler: this.axlePreReset,
|
||||
disabledCallback: MenuDisabledState.Section.axlePreReset,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段封锁',
|
||||
label: this.$t('menu.menuSection.sectionBlockade'),
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Section.lock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Section.unlock,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段设置限速',
|
||||
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
||||
handler: this.setSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
auth: { station: true, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段取消限速',
|
||||
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: true, center: false }
|
||||
@ -92,49 +92,49 @@
|
||||
],
|
||||
central: [
|
||||
{
|
||||
label: '区段故障解锁',
|
||||
label: this.$t('menu.menuSection.sectionFaultUnlock'),
|
||||
handler: this.fault,
|
||||
disabledCallback: MenuDisabledState.Section.fault,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '区段切除',
|
||||
label: this.$t('menu.menuSection.sectionResection'),
|
||||
handler: this.split,
|
||||
disabledCallback: MenuDisabledState.Section.split,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '区段激活',
|
||||
label: this.$t('menu.menuSection.sectionActive'),
|
||||
handler: this.active,
|
||||
disabledCallback: MenuDisabledState.Section.active,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '计轴预复位',
|
||||
label: this.$t('menu.menuSection.axisPreReset') ,
|
||||
handler: this.axlePreReset,
|
||||
disabledCallback: MenuDisabledState.Section.axlePreReset,
|
||||
auth: { station: false, center: false }
|
||||
},
|
||||
{
|
||||
label: '区段封锁',
|
||||
label: this.$t('menu.menuSection.sectionBlockade'),
|
||||
handler: this.lock,
|
||||
disabledCallback: MenuDisabledState.Section.lock,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '区段解封',
|
||||
label: this.$t('menu.menuSection.sectionUnblock'),
|
||||
handler: this.unlock,
|
||||
disabledCallback: MenuDisabledState.Section.unlock,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '区段设置限速',
|
||||
label: this.$t('menu.menuSection.sectionSetSpeedLimit'),
|
||||
handler: this.setSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.setSpeed,
|
||||
auth: { station: false, center: true }
|
||||
},
|
||||
{
|
||||
label: '区段取消限速',
|
||||
label: this.$t('menu.menuSection.sectionCancelSpeedLimit'),
|
||||
handler: this.cancelSpeed,
|
||||
disabledCallback: MenuDisabledState.Section.cancelSpeed,
|
||||
auth: { station: false, center: true }
|
||||
@ -143,19 +143,19 @@
|
||||
},
|
||||
menuTrain: [
|
||||
{
|
||||
label: '新建列车',
|
||||
label: this.$t('menu.menuSection.createTrain'),
|
||||
handler: this.newTrain,
|
||||
disabledCallback: MenuDisabledState.Section.newTrain
|
||||
},
|
||||
],
|
||||
menuForce: [
|
||||
{
|
||||
label: '设置故障',
|
||||
label: this.$t('menu.menuSection.setFault'),
|
||||
handler: this.setStoppage,
|
||||
disabledCallback: MenuDisabledState.Section.setStoppage
|
||||
},
|
||||
{
|
||||
label: '取消故障',
|
||||
label: this.$t('menu.menuSection.cancelFault'),
|
||||
handler: this.cancelStoppage,
|
||||
disabledCallback: MenuDisabledState.Section.cancelStoppage
|
||||
}
|
||||
|
@ -85,7 +85,6 @@ import RunPlanEveryDay from '@/views/publish/runPlanEveryDay/index';
|
||||
import ProductStatus from '@/views/publish/productStatus/index';
|
||||
import PublishLesson from '@/views/publish/publishLesson/index';
|
||||
// import SimulationScript from '@/views/publish/simulationScript/index';
|
||||
// import IbpDraft from '@/views/ibp/ibpDraft/index';
|
||||
import IbpEdit from '@/views/ibp/ibpDraft/ibpEdit/index';
|
||||
|
||||
import Commodity from '@/views/orderauthor/commodity/index';
|
||||
|
@ -126,7 +126,7 @@ export default {
|
||||
getTotalRemains(model).then(response => {
|
||||
this.maxTotal = response.data;
|
||||
if (this.maxTotal == 0) {
|
||||
this.numberMessage = '可用权限数量为0';
|
||||
this.numberMessage = this.$t('tip.theNumberOfPermissionsAvailableIsZero');
|
||||
} else {
|
||||
this.numberMessage = `(${this.$t('global.remainPermissionNumber')}:${this.maxTotal})`;
|
||||
}
|
||||
@ -134,7 +134,7 @@ export default {
|
||||
this.$messageBox(this.$t('error.obtainMaxNumberFailed'));
|
||||
});
|
||||
} else {
|
||||
this.numberMessage = '结束时间必须大于开始时间';
|
||||
this.numberMessage = this.$t('tip.endTimeRules');
|
||||
}
|
||||
} else {
|
||||
this.numberMessage = '';
|
||||
|
@ -23,7 +23,7 @@ export default {
|
||||
backgroundColor: '#F0F2F5',
|
||||
title: {
|
||||
top: 20,
|
||||
text: '仿真统计',
|
||||
text: this.$t('dashboard.simulationStatistics'),
|
||||
textStyle: {
|
||||
fontWeight: 'normal',
|
||||
fontSize: 18,
|
||||
@ -139,7 +139,8 @@ export default {
|
||||
|
||||
this.option.series = [];
|
||||
this.option.legend.data = [];
|
||||
this.option.xAxis[0].data = ['综合演练云平台', '司机模拟驾驶系统', 'ATS行调工作站', 'ATS现地工作站'];
|
||||
this.option.xAxis[0].data = [this.$t('dashboard.comprehensiveExerciseCloudPlatform'),
|
||||
this.$t('dashboard.driverSimulatedDrivingSystem'), this.$t('dashboard.ATSLineAdjustmentWorkstation'), this.$t('dashboard.ATSLocalWorkstation')];
|
||||
data.forEach(elem => {
|
||||
this.option.legend.data.push(elem.name);
|
||||
this.option.series.push({
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div :id="id" :style="{height: size.height+'px', width: size.width+'px'}" />
|
||||
<div class="lesson-select">
|
||||
<el-select v-model="lessonId" placeholder="请选择课程">
|
||||
<el-select v-model="lessonId" :placeholder="this.$t('rules.selectCourses')">
|
||||
<el-option v-for="item in lessonList" :key="item.statsProjectId" :label="item.statsProjectName" :value="item.statsProjectId" />
|
||||
</el-select>
|
||||
</div>
|
||||
@ -32,7 +32,7 @@ export default {
|
||||
backgroundColor: '#F0F2F5',
|
||||
title: {
|
||||
top: 20,
|
||||
text: '考试统计',
|
||||
text: this.$t('dashboard.testStatistics'),
|
||||
textStyle: {
|
||||
fontWeight: 'normal',
|
||||
fontSize: 18,
|
||||
|
@ -23,7 +23,7 @@ export default {
|
||||
backgroundColor: '#F0F2F5',
|
||||
title: {
|
||||
top: 20,
|
||||
text: '课程统计',
|
||||
text: this.$t('dashboard.courseStatistics'),
|
||||
textStyle: {
|
||||
fontWeight: 'normal',
|
||||
fontSize: 18,
|
||||
@ -139,7 +139,8 @@ export default {
|
||||
|
||||
this.option.series = [];
|
||||
this.option.legend.data = [];
|
||||
this.option.xAxis[0].data = ['控制权实训', ' 信号机实训', ' 道岔实训', '区段实训', '站台实训'];
|
||||
this.option.xAxis[0].data = [this.$t('dashboard.controlRightsTraining'),
|
||||
this.$t('dashboard.signalTraining'),this.$t('dashboard.turnoutTraining'), this.$t('dashboard.sectionTraining'), this.$t('dashboard.stationTraining')];
|
||||
data.forEach(elem => {
|
||||
this.option.legend.data.push(elem.statsProjectName);
|
||||
this.option.series.push({
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div :id="id" :style="{height: size.height+'px', width: size.width+'px'}" />
|
||||
<div class="lesson-select">
|
||||
<el-select v-model="mapName" placeholder="请选择地图线路" size="mini" style="width: 300px">
|
||||
<el-select v-model="mapName" :placeholder="this.$t('dashboard.selectTheMapRoute')" size="mini" style="width: 300px">
|
||||
<el-option v-for="name in mapNameList" :key="name" :label="name" :value="name" />
|
||||
</el-select>
|
||||
</div>
|
||||
@ -62,7 +62,7 @@ export default {
|
||||
type: 'value',
|
||||
show: false,
|
||||
minInterval: 1,
|
||||
name: '权限(个)'
|
||||
name: this.$t('dashboard.permissions')
|
||||
},
|
||||
series: [{
|
||||
type: 'bar',
|
||||
@ -145,7 +145,6 @@ export default {
|
||||
(permissionList ||[]).forEach(elem => {
|
||||
permissionDict[elem.code] = elem.name;
|
||||
});
|
||||
|
||||
var permissionMap = {
|
||||
'ATS现地工作站-课程权限': 0,
|
||||
'ATS行调工作站-课程权限': 0,
|
||||
@ -170,8 +169,8 @@ export default {
|
||||
const values = Object.values(permissionMap);
|
||||
const sum = values.reduce((total, num) => { return total + num; });
|
||||
|
||||
this.option.title.text = `剩余权限分布图 —— ${mapName}`;
|
||||
this.option.title.subtext = `权限总计${sum}个`;
|
||||
this.option.title.text = this.$t('dashboard.residualPermissionDistributionMap') + ` —— ${mapName}`;
|
||||
this.option.title.subtext = this.$t('dashboard.totalPermissions') + `${sum}` + this.$t('dashboard.individual');
|
||||
|
||||
this.option.xAxis.show = true;
|
||||
this.option.yAxis.show = true;
|
||||
@ -181,8 +180,8 @@ export default {
|
||||
this.option.series[0].data = values;
|
||||
this.option.series[1].data = keys.filter(name => { return permissionMap[name]; } ).map(name => { return {name, value: permissionMap[name]}; });
|
||||
} else {
|
||||
this.option.title.text = `剩余权限分布图(暂无地图线路数据)`;
|
||||
this.option.title.subtext = `权限总计0个`;
|
||||
this.option.title.text =this.$t('dashboard.residualPermissionDistributionMap') + `(`+ this.$t('dashboard.noMapLineDataYetAvailable') +`)`;
|
||||
this.option.title.subtext = this.$t('dashboard.totalPermissions') + `0` + this.$t('dashboard.individual');
|
||||
this.option.xAxis.show = false;
|
||||
this.option.yAxis.show = false;
|
||||
this.option.xAxis.data = [];
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
title="剧本列表"
|
||||
:title="$t('display.script.scriptList')"
|
||||
:visible.sync="show"
|
||||
top="50px"
|
||||
width="70%"
|
||||
@ -17,7 +17,7 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="角色选择"
|
||||
:title="$t('display.script.roleSelect')"
|
||||
:visible.sync="roleShow"
|
||||
top="50px"
|
||||
width="350px"
|
||||
@ -27,8 +27,8 @@
|
||||
>
|
||||
<div>
|
||||
<el-form ref="ruleForm" :model="form" label-width="50px">
|
||||
<el-form-item label="角色" prop="role">
|
||||
<el-select v-model="form.role" placeholder="请选择">
|
||||
<el-form-item :label="$t('display.script.role')" prop="role">
|
||||
<el-select v-model="form.role" :placeholder="$t('display.script.pleaseSelect')">
|
||||
<el-option
|
||||
v-for="item in memberList"
|
||||
:key="item.id"
|
||||
@ -41,8 +41,8 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="roleDoClose">取 消</el-button>
|
||||
<el-button type="primary" @click="confirm">确 定</el-button>
|
||||
<el-button @click="roleDoClose">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="confirm">{{$t('global.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@ -94,20 +94,20 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '任务名称',
|
||||
title: this.$t('display.script.scriptName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
title: this.$t('display.script.createTime'),
|
||||
prop: 'createTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('display.script.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '加载剧本',
|
||||
name: this.$t('display.script.loadScript'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleLoad
|
||||
}
|
||||
@ -120,12 +120,12 @@ export default {
|
||||
|
||||
currentModel: {},
|
||||
roleConfig: {
|
||||
'Admin': '管理员',
|
||||
'Instructor': '教员',
|
||||
'Dispatcher': '行调',
|
||||
'Attendant': '车站',
|
||||
'Audience': '观众',
|
||||
'Driver': '列车',
|
||||
'Admin': this.$t('display.script.admin'),
|
||||
'Instructor': this.$t('display.script.instructor'),
|
||||
'Dispatcher': this.$t('display.script.dispatcher'),
|
||||
'Attendant': this.$t('display.script.attendant'),
|
||||
'Audience': this.$t('display.script.audience'),
|
||||
'Driver': this.$t('display.script.driver'),
|
||||
'no': ''
|
||||
}
|
||||
};
|
||||
@ -157,7 +157,7 @@ export default {
|
||||
newMemberList = res.data.memberVOList.filter(item => item.hasPlay === true);
|
||||
}
|
||||
this.memberList = newMemberList || [];
|
||||
this.memberList.unshift({ id: '', name: '无', role: 'no' });
|
||||
this.memberList.unshift({ id: '', name: this.$t('display.script.none'), role: 'no' });
|
||||
}
|
||||
this.roleShow = true;
|
||||
},
|
||||
|
@ -2,8 +2,8 @@
|
||||
<el-dialog :title="title" :visible.sync="dialogShow" width="800px" :before-close="doClose" :modal="false">
|
||||
<div class="draft">
|
||||
<el-radio-group v-model="auto">
|
||||
<el-radio :label="false" border>手动</el-radio>
|
||||
<el-radio :label="true" border>自动</el-radio>
|
||||
<el-radio :label="false" border>{{$t('display.faultChoose.manual')}}</el-radio>
|
||||
<el-radio :label="true" border>{{$t('display.faultChoose.automatic')}}</el-radio>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<div class="card" v-if="auto">
|
||||
@ -11,8 +11,8 @@
|
||||
</QueryListPage>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm" :loading="loading">确 定</el-button>
|
||||
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="handleConfirm" :loading="loading">{{$t('global.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -46,7 +46,7 @@
|
||||
queryObject: {
|
||||
condition: {
|
||||
type: 'text',
|
||||
label: '设置条件'
|
||||
label: this.$t('display.faultChoose.settingCondition')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -56,11 +56,11 @@
|
||||
radioShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '设置条件',
|
||||
title: this.$t('display.faultChoose.settingCondition'),
|
||||
prop: 'condition'
|
||||
},
|
||||
{
|
||||
title: '触发目标',
|
||||
title: this.$t('display.faultChoose.triggerTarget'),
|
||||
prop: 'target'
|
||||
}
|
||||
]
|
||||
@ -69,7 +69,7 @@
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '选择故障'
|
||||
return this.$t('display.faultChoose.selectFault')
|
||||
},
|
||||
skinCode() {
|
||||
return this.$route.query.skinCode;
|
||||
@ -126,11 +126,10 @@
|
||||
},
|
||||
getFailureModel(auto) {
|
||||
let model = { auto };
|
||||
|
||||
if (auto) {
|
||||
const choose = this.$refs.pageRules.currentChoose();
|
||||
if (choose) {
|
||||
choose.id ? Object.assign(model, { ruleId: choose.id }) : this.$messageBox(`请选择规则`);
|
||||
choose.id ? Object.assign(model, { ruleId: choose.id }) : this.$messageBox(this.$t('display.faultChoose.selectRules'));
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,9 +139,9 @@
|
||||
this.$nextTick(() => {
|
||||
let faultModel = this.getFailureModel(this.auto);
|
||||
setFailureMode(faultModel, this.group).then(() => {
|
||||
this.$message.success(`设置故障成功`);
|
||||
this.$message.success(this.$t('display.faultChoose.setFaultSuccess'));
|
||||
}).catch(error => {
|
||||
this.$messageBox(`设置故障失败`);
|
||||
this.$messageBox(this.$t('display.faultChoose.setFaultFail'));
|
||||
})
|
||||
|
||||
this.doClose();
|
||||
|
@ -22,7 +22,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '运行图计划工具';
|
||||
return this.$t('display.runPlan.runDiagramPlanTool');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -156,7 +156,7 @@ export default {
|
||||
'stations'
|
||||
]),
|
||||
title() {
|
||||
return '运行图预览';
|
||||
return this.$t('display.runPlan.previewRunDiagram');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -312,9 +312,9 @@ export default {
|
||||
const station = this.stations[Math.floor((param.data[1] - this.PlanConvert.EdgeHeight) / this.PlanConvert.CoordMultiple)] || { name: '', kmRange: '' };
|
||||
return [
|
||||
`Point Data <hr size=1 style="margin: 3px 0">`,
|
||||
`车站名称: ${station.name}<br>`,
|
||||
`车站公里标: ${station.kmRange} km <br>`,
|
||||
`到站时间: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||
`${$t('display.runPlan.stationName')}: ${station.name}<br>`,
|
||||
`${$t('display.runPlan.stationMark')}: ${station.kmRange} km <br>`,
|
||||
`${$t('display.runPlan.arrivalTime')}: ${timeFormat(param.data[0] + this.PlanConvert.TranslationTime)} (${param.data[0]})<br>`
|
||||
].join('');
|
||||
},
|
||||
settingExac(data) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
<el-form>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="派班选择:">
|
||||
<el-form-item :label="$t('display.schedule.scheduleSelect')">
|
||||
<el-date-picker
|
||||
v-model="formModel.planDate"
|
||||
clearable
|
||||
@ -26,7 +26,7 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="运行图名称:">
|
||||
<el-form-item :label="$t('display.schedule.runDiagramName')">
|
||||
<el-select v-model="formModel.runPlanName" size="small" style="display: inline-block">
|
||||
<el-option
|
||||
v-for="item in runPlanList"
|
||||
@ -38,15 +38,15 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="派班模式:">
|
||||
<el-form-item :label="$t('display.schedule.scheduleMode')">
|
||||
<div>{{ formModel.mode }}</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item style="text-align: right">
|
||||
<el-button-group>
|
||||
<el-button size="small" type="warning" @click="handleCheck">检查</el-button>
|
||||
<el-button size="small" type="primary" @click="handleSave">保存</el-button>
|
||||
<el-button size="small" type="warning" @click="handleCheck">{{$t('display.schedule.check')}}</el-button>
|
||||
<el-button size="small" type="primary" @click="handleSave">{{$t('display.schedule.save')}}</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -95,12 +95,12 @@ export default {
|
||||
index: true,
|
||||
columns: [
|
||||
{
|
||||
title: '司机号',
|
||||
title: this.$t('display.schedule.driverNumber'),
|
||||
prop: 'driverCode',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '车组号',
|
||||
title: this.$t('display.schedule.trainNumber'),
|
||||
prop: 'trainCode',
|
||||
type: 'select',
|
||||
width: '150',
|
||||
@ -109,38 +109,38 @@ export default {
|
||||
editing: true
|
||||
},
|
||||
{
|
||||
title: '上线轨',
|
||||
title: this.$t('display.schedule.onlineSection'),
|
||||
prop: 'onlineSection',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '上线服务号',
|
||||
title: this.$t('display.schedule.onlineServerNumber'),
|
||||
prop: 'onlineServerNumber',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '上线目的地',
|
||||
title: this.$t('display.schedule.onlineTargetNumber'),
|
||||
prop: 'onlineTargetNumber',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '上线时间',
|
||||
title: this.$t('display.schedule.onlineTime'),
|
||||
prop: 'onlineTime',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '上线车次号',
|
||||
title: this.$t('display.schedule.onlineTripNumber'),
|
||||
prop: 'onlineTripNumber',
|
||||
type: 'text',
|
||||
format: (row) => { return `${row.onlineDirectionCode}${row.onlineTripNumber}`; }
|
||||
},
|
||||
{
|
||||
title: '出库段',
|
||||
title: this.$t('display.schedule.outDepot'),
|
||||
prop: 'outDepot',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '出库状态',
|
||||
title: this.$t('display.schedule.outDepotStatus'),
|
||||
prop: 'outStatus',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.outStatus, 'Whether'); },
|
||||
@ -152,38 +152,38 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '下线轨',
|
||||
title: this.$t('display.schedule.offlineSection'),
|
||||
prop: 'offlineSection',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '下线服务号',
|
||||
title: this.$t('display.schedule.offlineServerNumber'),
|
||||
prop: 'offlineServerNumber',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '下线目的地',
|
||||
title: this.$t('display.schedule.offlineTargetNumber'),
|
||||
prop: 'offlineTargetNumber',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '下线时间',
|
||||
title: this.$t('display.schedule.offlineTime'),
|
||||
prop: 'offlineTime',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '下线车次号',
|
||||
title: this.$t('display.schedule.offlineTripNumber'),
|
||||
prop: 'offlineTripNumber',
|
||||
type: 'text',
|
||||
format: (row) => { return `${row.offlineDirectionCode}${row.offlineTripNumber}`; }
|
||||
},
|
||||
{
|
||||
title: '回库段',
|
||||
title: this.$t('display.schedule.inDepot'),
|
||||
prop: 'inDepot',
|
||||
type: 'text'
|
||||
},
|
||||
{
|
||||
title: '回库状态',
|
||||
title: this.$t('display.schedule.inDepotStatus'),
|
||||
prop: 'inStatus',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.inStatus, 'Whether'); },
|
||||
@ -201,7 +201,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '排班计划';
|
||||
return this.$t('display.schedule.schedulePlan');
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@ -226,7 +226,7 @@ export default {
|
||||
this.loading = true;
|
||||
querySecheduling(this.group, {day}).then(resp => {
|
||||
if (!resp.data) {
|
||||
this.$confirm('无派班计划,是否创建?', this.$t('global.tips'), {
|
||||
this.$confirm(this.$t('display.schedule.noSchedulePlan'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
@ -241,7 +241,7 @@ export default {
|
||||
this.formModel.id = resp.data.id;
|
||||
this.formModel.planDate = resp.data.planDate;
|
||||
this.formModel.runPlanName = resp.data.runPlanName;
|
||||
this.$message.success(`加载数据 ${day} 派班计划成功!`);
|
||||
this.$message.success(`${$t('display.schedule.loadData')} ${day} ${$t('display.schedule.schedulePlanSuccess')}`);
|
||||
this.loading = false;
|
||||
}
|
||||
}).catch(error => {
|
||||
@ -262,7 +262,7 @@ export default {
|
||||
this.formModel.id = resp.data.id;
|
||||
this.formModel.planDate = resp.data.planDate;
|
||||
this.formModel.runPlanName = resp.data.runPlanName;
|
||||
this.$message.success('创建派班计划成功');
|
||||
this.$message.success(this.$t('display.schedule.createSchedulePlanSuccess'));
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.clearData();
|
||||
@ -276,7 +276,7 @@ export default {
|
||||
this.formModel.id = resp.data.id;
|
||||
this.formModel.planDate = resp.data.planDate;
|
||||
this.formModel.runPlanName = resp.data.runPlanName;
|
||||
this.$message.success('重新生成派班计划成功');
|
||||
this.$message.success(this.$t('display.schedule.regenerateSchedulePlanSuccess'));
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.clearData();
|
||||
@ -289,26 +289,26 @@ export default {
|
||||
const data = resp.data;
|
||||
this.setConflictList(data.conflictList);
|
||||
if (data.pass) {
|
||||
this.$message.success('检查通过');
|
||||
this.$message.success(this.$t('display.schedule.checkPassed'));
|
||||
} else {
|
||||
this.$message.warning('检查不通过');
|
||||
this.$message.warning(this.$t('display.schedule.checkFailed'));
|
||||
}
|
||||
}).catch(error => {
|
||||
this.$messageBox(`检查派班计划失败: ${error.message}`);
|
||||
this.$messageBox(`${$t('display.schedule.checkSchedulePlanFailed')}: ${error.message}`);
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('清先选择派班计划');
|
||||
this.$messageBox(this.$t('display.schedule.selectSchedulePlan'));
|
||||
}
|
||||
},
|
||||
handleSave() {
|
||||
if (this.formModel.planDate) {
|
||||
saveScheduling(this.group, this.tableData).then(resp => {
|
||||
this.$message.success('保存派班计划成功');
|
||||
this.$message.success(this.$t('display.schedule.saveSchedulePlanSuccess'));
|
||||
}).catch(() => {
|
||||
this.$messageBox('保存派班失败');
|
||||
this.$messageBox(this.$t('display.schedule.saveSchedulePlanFail'));
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('清先选择派班计划');
|
||||
this.$messageBox(this.$t('display.schedule.selectSchedulePlan'));
|
||||
}
|
||||
|
||||
},
|
||||
|
@ -1,22 +1,22 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="show" width="550px" :before-close="doClose">
|
||||
<el-form ref="form" label-width="120px" :model="formModel" :rules="rules">
|
||||
<el-form-item label="系统时间" prop="initTime">
|
||||
<el-form-item :label="$t('display.setTime.systemTime')" prop="initTime">
|
||||
<el-time-picker
|
||||
v-model="formModel.initTime"
|
||||
:picker-options="pickerOptions"
|
||||
placeholder="任意时间点"
|
||||
:placeholder="$t('display.setTime.anyTime')"
|
||||
@change="handleChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="hasNumber" label="加载列车数" prop="loadNum">
|
||||
<el-input-number v-model="formModel.loadNum" :min="1" :max="maxNumber" label="请选择可加载列车个数" />
|
||||
<span> {{ `(可加载的最大车辆个数:${maxNumber})` }} </span>
|
||||
<el-form-item v-if="hasNumber" :label="$t('display.setTime.loadTrainNum')" prop="loadNum">
|
||||
<el-input-number v-model="formModel.loadNum" :min="1" :max="maxNumber" :label="$t('display.setTime.selectLoadTrainNum')" />
|
||||
<span> {{ ` (${$t('display.setTime.maxTrainNum')} :${maxNumber}) ` }} </span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="show = false">取 消</el-button>
|
||||
<el-button type="primary" :loading="status" @click="handleSure">确 定</el-button>
|
||||
<el-button @click="show = false">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" :loading="status" @click="handleSure">{{$t('global.confirm')}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -40,7 +40,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return '设置仿真系统时间';
|
||||
return this.$t('display.setTime.setSimulationSystemTime');
|
||||
},
|
||||
hasNumber() {
|
||||
return this.$route.params.mode == 'demon' && this.$route.query.prdType == '04';
|
||||
@ -51,11 +51,11 @@ export default {
|
||||
rules() {
|
||||
return {
|
||||
initTime: [
|
||||
{ required: true, message: '请选择系统时间', trigger: 'change' },
|
||||
{ required: true, message: this.$t('display.setTime.selectSystemTime'), trigger: 'change' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (this.maxNumber == 0) {
|
||||
callback(new Error('请选择有效的开始时间'));
|
||||
callback(new Error(this.$t('display.setTime.selectValidStartTime')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@ -65,7 +65,7 @@ export default {
|
||||
}
|
||||
],
|
||||
loadNum: [
|
||||
{ required: true, message: '请选择车辆个数', trigger: 'change' }
|
||||
{ required: true, message: this.$t('display.setTime.selectTrainNum'), trigger: 'change' }
|
||||
|
||||
]
|
||||
};
|
||||
|
@ -2,21 +2,21 @@
|
||||
<div>
|
||||
<div class="display-card" :style="{top: offset+'px'}">
|
||||
<el-row>
|
||||
<span v-if="countTime" class="display-score">试用时间:{{ countTime }}</span>
|
||||
<span v-if="countTime" class="display-score">{{$t('display.demon.trialTime')}} {{ countTime }}</span>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isShowScheduling" type="primary" @click="jumpScheduling">派班计划</el-button>
|
||||
<el-button v-if="isShowScheduling" type="primary" @click="jumpScheduling">{{$t('display.demon.dispatchingPlan')}}</el-button>
|
||||
<el-button type="jumpjlmap3d" @click="jumpjlmap3d">{{ jl3dname }}</el-button>
|
||||
<template v-if="isShowQuest">
|
||||
<el-button type="danger" @click="handleQuitQuest">退出剧本</el-button>
|
||||
<el-button type="danger" @click="handleQuitQuest">{{$t('display.demon.exitScript')}}</el-button>
|
||||
</template>
|
||||
<template v-else>
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable" @click="end">退出计划</el-button>
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{$t('display.demon.drivingByPlan')}}</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable" @click="end">{{$t('display.demon.exitPlan')}}</el-button>
|
||||
</template>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
<el-button type="primary" @click="back">{{$t('display.demon.back')}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
@ -72,7 +72,7 @@ export default {
|
||||
name: '',
|
||||
remarks: ''
|
||||
},
|
||||
jl3dname: '三维视图'
|
||||
jl3dname: this.$t('display.demon.threeDimensionalView')
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -88,8 +88,8 @@ export default {
|
||||
this.group && this.initLoadPage();
|
||||
},
|
||||
'$store.state.socket.tipOperateCount': function (val) {
|
||||
this.$alert('任务操作成功!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
this.$alert(this.$t('display.demon.taskOperateSuccess') , this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
callback: action => {
|
||||
}
|
||||
});
|
||||
@ -142,7 +142,7 @@ export default {
|
||||
}, 1000);
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取时间失败`);
|
||||
this.$messageBox(this.$t('display.demon.getTimeFail'));
|
||||
});
|
||||
},
|
||||
selectBeginTime() {
|
||||
@ -156,7 +156,7 @@ export default {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = false;
|
||||
this.$messageBox('开始仿真失败,请返回重试');
|
||||
this.$messageBox(this.$t('display.demon.startSimulationFail'));
|
||||
});
|
||||
},
|
||||
end() {
|
||||
@ -170,14 +170,14 @@ export default {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox('结束仿真失败,请返回');
|
||||
this.$messageBox(this.$t('display.demon.endSimulationFail'));
|
||||
});
|
||||
},
|
||||
handleQuitQuest() {
|
||||
quitScript(this.group).then(resp => {
|
||||
this.$emit('quitQuest');
|
||||
}).catch(() => {
|
||||
this.$messageBox('退出任务失败');
|
||||
this.$messageBox(this.$t('display.demon.exitTaskFail'));
|
||||
});
|
||||
},
|
||||
back() {
|
||||
@ -208,9 +208,9 @@ export default {
|
||||
},
|
||||
change3dname() {
|
||||
if (this.$route.query.prdType == '04') {
|
||||
this.jl3dname = '司机视角';
|
||||
this.jl3dname = this.$t('display.demon.driverPerspective');
|
||||
} else {
|
||||
this.jl3dname = '三维视图';
|
||||
this.jl3dname = this.$t('display.demon.threeDimensionalView');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,9 +7,9 @@
|
||||
</div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button type="success" :disabled="isDisable" :loading="startLoading" @click="start">开始</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable" @click="end">结束</el-button>
|
||||
<el-button type="primary" class="back" @click="back">返回</el-button>
|
||||
<el-button type="success" :disabled="isDisable" :loading="startLoading" @click="start">{{$t('display.startBtn')}}</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable" @click="end">{{$t('display.endBtn')}}</el-button>
|
||||
<el-button type="primary" class="back" @click="back">{{$t('display.backBtn')}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<tip-exam-list @refresh="refresh" />
|
||||
@ -71,10 +71,10 @@ export default {
|
||||
const h = this.$createElement;
|
||||
this.$notify({
|
||||
title: this.$t('global.tips'),
|
||||
message: h('i', { style: 'color:' + opt.color }, '请点击开始考试操作')
|
||||
message: h('i', { style: 'color:' + opt.color }, this.$t('display.exam.startTestOperateTip'))
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
start() {
|
||||
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||
this.startLoading = true;
|
||||
@ -94,7 +94,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
this.startLoading = true;
|
||||
this.$messageBox(`请选择试题`);
|
||||
this.$messageBox(this.$t('display.exam.selectTest'));
|
||||
}
|
||||
},
|
||||
end() {
|
||||
@ -113,18 +113,18 @@ export default {
|
||||
this.init();
|
||||
}).catch(() => {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
this.$messageBox(`结束实训错误`);
|
||||
this.$messageBox(this.$t('display.exam.endTrainingError'));
|
||||
});
|
||||
} else {
|
||||
this.isDisable = true;
|
||||
this.$messageBox(`请先开始考试`);
|
||||
this.$messageBox(this.$t('display.exam.startTestTip'));
|
||||
}
|
||||
}
|
||||
},
|
||||
back() {
|
||||
this.$confirm('是否放弃本次考试?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('display.exam.endTestTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$emit('quit');
|
||||
@ -147,7 +147,7 @@ export default {
|
||||
if (error.code === 500009) {
|
||||
this.$router.replace({ path: `/exam/result/${this.$route.params.userExamId}` });
|
||||
} else {
|
||||
this.$messageBox(`刷新列表失败`);
|
||||
this.$messageBox(this.$t('display.exam.refreshListError'));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -3,19 +3,19 @@
|
||||
<div class="display-card" :style="{top: offset + 'px'}">
|
||||
<el-row>
|
||||
<el-radio-group v-model="demoMode" class="mode" size="small">
|
||||
<el-radio-button :label="TrainingMode.TEACH">教学模式</el-radio-button>
|
||||
<el-radio-button :label="TrainingMode.PRACTICE">练习模式</el-radio-button>
|
||||
<el-radio-button :label="TrainingMode.TEST">测验模式</el-radio-button>
|
||||
<el-radio-button :label="TrainingMode.TEACH">{{ $t('display.lesson.teachingMode')}}</el-radio-button>
|
||||
<el-radio-button :label="TrainingMode.PRACTICE">{{ $t('display.lesson.practiceMode')}}</el-radio-button>
|
||||
<el-radio-button :label="TrainingMode.TEST">{{ $t('display.lesson.testMode')}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
<span class="display-time">{{ formatUsedTime }}</span>
|
||||
<span v-if="demoMode === TrainingMode.TEST" class="display-score">得分:{{ formatScore }}</span>
|
||||
<span v-if="demoMode === TrainingMode.TEST" class="display-score">{{ $t('display.lesson.score')}}{{ formatScore }}</span>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button type="success" :disabled="isDisable" :loading="startLoading" @click="start">开始</el-button>
|
||||
<el-button type="danger" class="end" :disabled="!isDisable" @click="end">结束</el-button>
|
||||
<el-button type="primary" :disabled="backDisable" class="back" @click="back">返回</el-button>
|
||||
<el-button type="success" :disabled="isDisable" :loading="startLoading" @click="start">{{ $t('display.startBtn')}}</el-button>
|
||||
<el-button type="danger" class="end" :disabled="!isDisable" @click="end">{{ $t('display.endBtn')}}</el-button>
|
||||
<el-button type="primary" :disabled="backDisable" class="back" @click="back">{{ $t('display.backBtn')}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<tip-training-detail :training-obj="trainingObj" />
|
||||
@ -99,7 +99,8 @@ export default {
|
||||
if (opt && opt.hasOwnProperty('color') && opt.hasOwnProperty('message')) {
|
||||
const h = this.$createElement;
|
||||
this.$notify({
|
||||
title: '提示',
|
||||
title: this.$t('global.tips'),
|
||||
|
||||
message: h('i', { style: 'color:' + opt.color }, opt.message)
|
||||
});
|
||||
}
|
||||
@ -125,7 +126,7 @@ export default {
|
||||
});
|
||||
} else {
|
||||
this.startLoading = false;
|
||||
this.$messageBox(`请选择实训`);
|
||||
this.$messageBox(this.$t('display.lesson.selectTraining'));
|
||||
}
|
||||
},
|
||||
endCommit() {
|
||||
@ -143,7 +144,7 @@ export default {
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(`结束实训错误`);
|
||||
this.$messageBox(this.$t('display.lesson.endTrainingError'));
|
||||
});
|
||||
},
|
||||
end() {
|
||||
@ -156,9 +157,9 @@ export default {
|
||||
this.endCommit();
|
||||
} else {
|
||||
this.backDisable = true;
|
||||
this.$confirm('操作未完成,是否确认结束?', '提示', {
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonText: '确定',
|
||||
this.$confirm(this.$t('display.lesson.endTrainingTip'), this.$t('global.tips'), {
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
type: 'warning',
|
||||
center: true,
|
||||
zIndex: 9999
|
||||
@ -174,7 +175,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.$messageBox(`请先开始实训`);
|
||||
this.$messageBox(this.$t('display.lesson.startTrainingTip'));
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -188,7 +189,7 @@ export default {
|
||||
trainingNotify({ trainingId: this.$route.query.trainingId }).then(resp => {
|
||||
this.$router.push({ path: `${UrlConfig.lesson.record}/${this.$route.query.trainingId}/${this.$route.query.trainingName}`, query: { group: resp.data } });
|
||||
}).catch(error => {
|
||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
this.$messageBox(`${this.$t('display.lesson.createSimulationError')}: ${error.message}`);
|
||||
});
|
||||
} else {
|
||||
history.go(-1);
|
||||
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
|
||||
<el-button type="danger" :disabled="!isDisable" @click="end">退出计划</el-button>
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
<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>
|
||||
@ -74,7 +74,7 @@ export default {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = false;
|
||||
this.$messageBox('开始计划失败,请返回重试');
|
||||
this.$messageBox(this.$t('display.plan.startPlanFail'));
|
||||
});
|
||||
},
|
||||
end() {
|
||||
@ -88,7 +88,7 @@ export default {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.isDisable = true;
|
||||
this.$messageBox('结束计划失败,请返回');
|
||||
this.$messageBox(this.$t('display.plan.endPlanFail'));
|
||||
});
|
||||
},
|
||||
async back() {
|
||||
|
@ -7,7 +7,7 @@
|
||||
<div class="draft-menu">
|
||||
<el-row>
|
||||
<el-col :span="4">
|
||||
<el-select v-model="speed" placeholder="请选择" @change="changeSpeed">
|
||||
<el-select v-model="speed" :placeholder="$t('display.replay.pleaseSelect')" @change="changeSpeed">
|
||||
<el-option
|
||||
v-for="item in optionsList"
|
||||
:key="item.value"
|
||||
@ -24,7 +24,7 @@
|
||||
<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">返回</el-button>
|
||||
<el-button type="primary" class="back" @click="back">{{$t('display.replay.back')}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
@ -92,7 +92,7 @@ export default {
|
||||
'mapDeviceStatus'
|
||||
]),
|
||||
playName() {
|
||||
return this.isPlay ? '暂停' : '播放';
|
||||
return this.isPlay ? this.$t('display.replay.pause') : this.$t('display.replay.play');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -1,19 +1,19 @@
|
||||
<template>
|
||||
<div class="schema" :style="{top: offset+'px'}">
|
||||
<el-select v-if="isScript" v-model="swch" size="small" placeholder="请选择产品类型" @change="switchMode">
|
||||
<el-select v-if="isScript" v-model="swch" size="small" :placeholder="$t('display.schema.selectProduct')" @change="switchMode">
|
||||
<el-option v-for="item in swchList" :key="item.value" :label="item.name" :value="item.value" />
|
||||
</el-select>
|
||||
|
||||
<el-button-group>
|
||||
<el-button v-if="isDemon" size="small" :disabled="viewDisabled" type="success" @click="viewRunQuest">加载剧本</el-button>
|
||||
<el-button v-if="notScript && runing" size="small" :disabled="viewDisabled" @click="viewRunPlan">运行图预览</el-button>
|
||||
<el-button v-if="!runing && !isPlan && notScript" size="small" :disabled="viewDisabled" type="warning" @click="loadRunPlan">运行图加载</el-button>
|
||||
<el-button v-if="mode==OperateMode.FAULT" size="small" type="danger" @click="setFault">故障设置</el-button>
|
||||
<el-button v-if="isDemon" 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="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-button class="mode" :label="OperateMode.NORMAL">正常操作</el-radio-button>
|
||||
<el-radio-button class="mode" :label="OperateMode.FAULT">故障操作</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-group>
|
||||
</div>
|
||||
</template>
|
||||
@ -96,7 +96,7 @@ export default {
|
||||
this.viewDisabled = false;
|
||||
}).catch(() => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
this.$messageBox(`获取运行图数据失败`);
|
||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
});
|
||||
} else {
|
||||
getEveryDayRunPlanData(this.group).then(resp => {
|
||||
@ -105,15 +105,15 @@ export default {
|
||||
}).catch(error => {
|
||||
this.$store.dispatch('runPlan/setPlanData', []);
|
||||
if (error.code == 30001) {
|
||||
this.$messageBox(`今日运行图未加载`);
|
||||
this.$messageBox(this.$t('display.schema.todayRunDiagramNoLoad'));
|
||||
} else {
|
||||
this.$messageBox(`获取运行图数据失败`);
|
||||
this.$messageBox(this.$t('display.schema.getRunDiagramFail'));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(`获取车站列表失败`);
|
||||
this.$messageBox(this.$t('display.schema.getStationListFail'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -2,12 +2,11 @@
|
||||
<div>
|
||||
<div class="display-card" :style="{top: offset+'px'}">
|
||||
<el-row>
|
||||
<span v-if="countTime" class="display-score">试用时间:{{ countTime }}</span>
|
||||
<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';
|
||||
@ -77,7 +76,7 @@ export default {
|
||||
}, 1000);
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(`获取时间失败`);
|
||||
this.$messageBox(this.$t('display.screen.getTimeFail'));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,9 +7,9 @@
|
||||
<el-button type="danger" @click="dumpScenesData">重置剧本</el-button>
|
||||
</el-button-group> -->
|
||||
<el-button-group>
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">{{$t('scriptRecord.drivingByPlan')}}</el-button>
|
||||
<!-- <el-button type="danger" :disabled="!isDisable" @click="end">退出计划</el-button> -->
|
||||
<el-button type="primary" @click="back">返回</el-button>
|
||||
<el-button type="primary" @click="back">{{$t('scriptRecord.scriptBack')}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div v-if="isShowSystemTime" class="display-card" :style="{top: offset+'px', right: right+'px'}">
|
||||
<template v-if="pause">
|
||||
<span class="display-pause">暂停中</span>
|
||||
<span class="display-pause">{{$t('display.systemTime.timePause')}}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<system-time
|
||||
|
@ -5,7 +5,8 @@
|
||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
||||
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
||||
<p v-if="!isShrink" style="color: #fff;">
|
||||
<span class="time-label">考试计时:</span>
|
||||
<span class="time-label">{{$t('display.exam.examTime')}}</span>
|
||||
|
||||
<span class="time-elem">{{ formatRemainTime }}</span>
|
||||
</p>
|
||||
<p v-if="isShrink" style="color: #fff;">
|
||||
@ -33,35 +34,35 @@
|
||||
<div v-show="!detailShow" class="tip-body">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<p class="list-item">
|
||||
<span class="list-label">本题名称:</span>
|
||||
<span class="list-label">{{$t('display.exam.questionTitle')}}</span>
|
||||
<span class="list-elem">{{ courseModel.name }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">最佳用时:</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration }}秒 </span>
|
||||
<span class="list-label">{{$t('display.exam.bestTime')}}</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration }} {{$t('display.seconds')}} </span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">最大用时:</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration }}秒 </span>
|
||||
<span class="list-label">{{$t('display.exam.maximumTime')}}</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration }} {{$t('display.seconds')}} </span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label"> 实训说明:</span>
|
||||
<span class="list-label"> {{$t('display.exam.trainingInstructions')}}</span>
|
||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
||||
</p>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="tip-foot">
|
||||
<div v-show="!detailShow" class="foot-detail">
|
||||
<el-button class="btn" @click="backList">查看试题</el-button>
|
||||
<el-button v-if="!isFirst" class="btn" type="primary" @click="lastExam">上一题</el-button>
|
||||
<el-button v-if="!isLast" class="btn" type="primary" @click="nextExam">下一题</el-button>
|
||||
<el-button v-if="isLast" class="btn" type="primary" @click="overExam">提交试卷</el-button>
|
||||
<el-button class="btn" @click="backList">{{$t('display.exam.viewQuestions')}}</el-button>
|
||||
<el-button v-if="!isFirst" class="btn" type="primary" @click="lastExam">{{$t('display.exam.prev')}}</el-button>
|
||||
<el-button v-if="!isLast" class="btn" type="primary" @click="nextExam">{{$t('display.exam.next')}}</el-button>
|
||||
<el-button v-if="isLast" class="btn" type="primary" @click="overExam">{{$t('display.exam.submitExaminationPaper')}}</el-button>
|
||||
</div>
|
||||
<div v-show="detailShow" class="foot-submit">
|
||||
<el-button class="btn" type="primary" @click="overExam">提交试卷</el-button>
|
||||
<el-button class="btn" type="primary" @click="overExam">{{$t('display.exam.submitExaminationPaper')}}</el-button>
|
||||
</div>
|
||||
<p style="color: #000; float: left;">
|
||||
<span class="time-label">考试计时:</span>
|
||||
<span class="time-label">{{$t('display.exam.examTime')}}</span>
|
||||
<span class="time-elem">{{ formatRemainTime }}</span>
|
||||
</p>
|
||||
</div>
|
||||
@ -115,7 +116,7 @@ export default {
|
||||
},
|
||||
formatRemainTime() {
|
||||
if (this.remainTime < 0) {
|
||||
this.$message.success('考试结束自动提交');
|
||||
this.$message.success(this.$t('display.exam.autoSubmit'));
|
||||
this.submit();
|
||||
}
|
||||
|
||||
@ -157,7 +158,7 @@ export default {
|
||||
updateTime: res.data.updateTime
|
||||
};
|
||||
}).catch(error => {
|
||||
this.$message.error('获取试题息失败:' + error.message);
|
||||
this.$message.error(this.$t('display.exam.getTestInformation')+':' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
@ -192,7 +193,8 @@ export default {
|
||||
if (error.code === 500009) {
|
||||
this.$router.replace({ path: `/exam/result/${this.$route.params.userExamId}` });
|
||||
} else {
|
||||
this.$messageBox(`刷新列表失败`);
|
||||
this.$messageBox(this.$t('display.exam.refreshListError'));
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
@ -242,9 +244,9 @@ export default {
|
||||
if (isOver) {
|
||||
this.submit();
|
||||
} else {
|
||||
this.$confirm('考试未完成,是否确认退出?', '提示', {
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonText: '确定',
|
||||
this.$confirm(this.$t('display.exam.cancleExam'), this.$t('global.tips'), {
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
type: 'warning',
|
||||
center: true
|
||||
}).then(() => {
|
||||
|
@ -12,19 +12,19 @@
|
||||
<div class="tip-body">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<p class="list-item">
|
||||
<span class="list-label">实训名称:</span>
|
||||
<span class="list-label">{{$t('display.training.trainingName')}}</span>
|
||||
<span class="list-elem">{{ courseModel.name }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">最佳用时:</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration }}秒 </span>
|
||||
<span class="list-label">{{$t('display.training.bestTime')}}</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration }} {{$t('display.seconds')}} </span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">最大用时:</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration }}秒 </span>
|
||||
<span class="list-label">{{$t('display.training.maximumTime')}}</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration }} {{$t('display.seconds')}} </span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label"> 实训说明:</span>
|
||||
<span class="list-label"> {{$t('display.training.trainingInstructions')}}</span>
|
||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
||||
</p>
|
||||
</el-scrollbar>
|
||||
@ -115,7 +115,7 @@ export default {
|
||||
getPublishLessonDetail({ id: obj.lessonId }).then(response => {
|
||||
this.lessonName = response.data.name;
|
||||
}).catch(error => {
|
||||
this.$message.error('获取课程信息失败:' + error.message);
|
||||
this.$message.error(this.$t('display.training.getCourseInformationFail')+':' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,34 +1,34 @@
|
||||
<template>
|
||||
<div class="errPage-container">
|
||||
<el-button icon="arrow-left" class="pan-back-btn" @click="back">
|
||||
返回
|
||||
{{$t('global.back')}}
|
||||
</el-button>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<h1 class="text-jumbo text-ginormous">
|
||||
Oops!
|
||||
</h1>
|
||||
gif来源<a href="https://zh.airbnb.com/" target="_blank">airbnb</a> 页面
|
||||
<h2>你没有权限去该页面</h2>
|
||||
<h6>如有不满请联系你领导</h6>
|
||||
{{$t('error.gifSource')}}<a href="https://zh.airbnb.com/" target="_blank">airbnb</a> {{$t('error.page')}}
|
||||
<h2>{{$t('error.noPermissionToGoToThisPage')}}</h2>
|
||||
<h6>{{$t('error.dissatisfied')}}</h6>
|
||||
<ul class="list-unstyled">
|
||||
<li>或者你可以去:</li>
|
||||
<li>{{$t('error.orYouCanGo')}}</li>
|
||||
<li class="link-type">
|
||||
<router-link to="/dashboard">
|
||||
回首页
|
||||
{{$t('error.backToHome')}}
|
||||
</router-link>
|
||||
</li>
|
||||
<li class="link-type">
|
||||
<a href="https://www.taobao.com/">随便看看</a>
|
||||
<a href="https://www.taobao.com/">{{$t('error.justLookingAround')}}</a>
|
||||
</li>
|
||||
<li><a href="#" @click.prevent="dialogVisible=true">点我看图</a></li>
|
||||
<li><a href="#" @click.prevent="dialogVisible=true">{{$t('error.pointMeToSeeThePicture')}}</a></li>
|
||||
</ul>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<img :src="errGif" width="313" height="428" alt="Girl has dropped her ice cream.">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog :visible.sync="dialogVisible" title="随便看">
|
||||
<el-dialog :visible.sync="dialogVisible" :title="this.$t('error.casualLook')">
|
||||
<img :src="ewizardClap" class="pan-img">
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>课程名称: {{ courseModel.name }}</b>
|
||||
<b>{{ $t('exam.courseName') + ': '+ courseModel.name }}</b>
|
||||
</div>
|
||||
<div style=" margin:50px" :style="{ height: height - 150 +'px' }">
|
||||
<!-- <p style="font-size: 14px; margin-bottom: 20px"> 课程说明:
|
||||
@ -10,7 +10,7 @@
|
||||
</span>
|
||||
</p> -->
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="试题列表" name="first">
|
||||
<el-tab-pane :label="this.$t('exam.itemList')" name="first">
|
||||
<div v-if="courseModel.detail.length != 0" :style="{ height: height - 230 +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<template v-for="item in courseModel.detail">
|
||||
@ -21,10 +21,10 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div v-else class="noList">
|
||||
暂无数据
|
||||
{{ $t('global.temporarilyNoData') }}
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="权限详情" name="second">
|
||||
<el-tab-pane :label="this.$t('exam.permissionsDetails')" name="second">
|
||||
<div :style="{ height: height - 230 +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="loadInitPage" />
|
||||
@ -34,10 +34,10 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="btn-buy">
|
||||
<el-button type="success" @click="buy">购买</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="distribute">权限分发(考试)</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="transfer">权限转赠</el-button>
|
||||
<el-button v-if="isAddRule" type="primary" @click="checkCourse">查看课程试卷</el-button>
|
||||
<el-button type="success" @click="buy">{{ $t('exam.buy') }}</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
|
||||
<el-button v-if="isAddRule" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -57,7 +57,7 @@ export default {
|
||||
loading: false,
|
||||
courseModel: {
|
||||
id: '',
|
||||
name: '请选择课程',
|
||||
name: this.$t('rules.lessonInput'),
|
||||
price: 0,
|
||||
remarks: '',
|
||||
detail: [],
|
||||
|
@ -1,41 +1,41 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>试卷名称: {{ examDetails.name }}</b>
|
||||
<b>{{ $t('exam.nameOfTestPaper') +': ' + examDetails.name }}</b>
|
||||
</div>
|
||||
<div style="margin:50px; overflow-y: auto;">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height - 190 +'px' }">
|
||||
<p class="list-item">
|
||||
<span class="list-label">考试时间:</span>
|
||||
<span class="list-label">{{ $t('exam.examStartTime') +':'}}</span>
|
||||
<span v-if="examDetails.startTime" class="list-elem">
|
||||
{{ examDetails.startTime }} - {{ examDetails.endTime }}</span>
|
||||
<span v-else class="list-elem">随时都可以考试</span>
|
||||
<span v-else class="list-elem">{{ $t('exam.theExamIsReadyAnyTime') }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">考试说明:</span>
|
||||
<span class="list-label">{{ $t('exam.testExplanation') + ':' }}</span>
|
||||
<span class="list-elem">{{ examDetails.remarks }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">考试时长:</span>
|
||||
<span class="list-elem">{{ parseInt(examDetails.duration) / 60 }}分钟</span>
|
||||
<span class="list-label">{{ $t('exam.examTimeAvailable') + ':' }}</span>
|
||||
<span class="list-elem">{{ parseInt(examDetails.duration) / 60 + $t('global.minutes') }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">考试满分:</span>
|
||||
<span class="list-elem">{{ examDetails.fullPoint }}分</span>
|
||||
<span class="list-label">{{ $t('exam.fullMarksInTheExam') + ':' }}</span>
|
||||
<span class="list-elem">{{ examDetails.fullPoint + $t('exam.points') }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">考试及格分:</span>
|
||||
<span class="list-elem">{{ examDetails.passingPoint }}分</span>
|
||||
<span class="list-label">{{ $t('exam.passMarkTheExam') + ':' }}</span>
|
||||
<span class="list-elem">{{ examDetails.passingPoint + $t('exam.points') }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">考试规则:</span>
|
||||
<span class="list-label">{{ $t('exam.examinationRules') + ':' }}</span>
|
||||
<span class="list-elem">
|
||||
<p class="list-table">
|
||||
<el-table :data="examDetails.examDefinitionRulesVOList" border show-summary>
|
||||
<el-table-column prop="name" label="实训类型" width="180" />
|
||||
<el-table-column prop="num" label="题数" />
|
||||
<el-table-column prop="point" label="分值" />
|
||||
<el-table-column prop="chapterIdLong" label="总分" />
|
||||
<el-table-column prop="name" :label="this.$t('exam.trainingType')" width="180" />
|
||||
<el-table-column prop="num" :label="this.$t('exam.numberOfQuestions')" />
|
||||
<el-table-column prop="point" :label="this.$t('exam.score')" />
|
||||
<el-table-column prop="chapterIdLong" :label="this.$t('exam.totalScore')" />
|
||||
</el-table>
|
||||
</p>
|
||||
</span>
|
||||
@ -43,7 +43,7 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="btn-start">
|
||||
<el-button :loading="loading" type="primary" @click="exmaStart">开始考试</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="exmaStart">{{ $t('exam.startTheExam') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -157,7 +157,7 @@ export default {
|
||||
query: { permissionType: PermissionType.EXAM, prdCode: res.data.prdCode, mapId: res.data.mapId }
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox('获取课程详情失败');
|
||||
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
||||
this.loading = false;
|
||||
});
|
||||
|
||||
@ -175,16 +175,16 @@ export default {
|
||||
} catch (error) {
|
||||
// 判断是否有考试权限,如果没有权限则跳到购买页面,否则报错
|
||||
if (error.code === 500004) {
|
||||
this.$confirm('无此课程的考试权限,请前往购买!', '提示', {
|
||||
cancelButtonText: '取消',
|
||||
confirmButtonText: '确定',
|
||||
this.$confirm( this.$t('tip.noCourseAuthority'), this.$t('tip.hint'), {
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
type: 'warning',
|
||||
center: true
|
||||
}).then(() => {
|
||||
this.buy();
|
||||
}).catch(() => { });
|
||||
} else if (error.code === 500005) {
|
||||
this.$messageBox('不在考试范围之内');
|
||||
this.$messageBox(this.$t('tip.notWithinTheScopeOfTheExamination'));
|
||||
} else {
|
||||
this.$messageBox(`${error.message}`);
|
||||
}
|
||||
@ -205,7 +205,7 @@ export default {
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
this.$messageBox( this.$t('error.createSimulationFailed') +`: ${error.message}`);
|
||||
});
|
||||
} else {
|
||||
this.loading = false;
|
||||
|
@ -1,29 +1,29 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<span class="title">实训名称: {{ courseModel.name }}</span>
|
||||
<span class="title">{{this.$t('exam.trainingName')}}: {{ courseModel.name }}</span>
|
||||
</div>
|
||||
<div style="margin:50px" :style="{ height: height - 150 +'px' }">
|
||||
<p class="time-item">
|
||||
<span class="time-label">考试计时:</span>
|
||||
<span class="time-label">{{this.$t('exam.examinationTiming')}}:</span>
|
||||
<span class="time-elem">{{ formatExamUsedTime }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">完成本题最大用时:</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration | setTime }}秒 </span>
|
||||
<span class="list-label">{{this.$t('exam.maximumTimeToCompleteThisQuestion')}}:</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration | setTime }}{{this.$t('global.second')}} </span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">完成本题最佳用时:</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration | setTime }}秒 </span>
|
||||
<span class="list-label">{{this.$t('exam.theBestTimeToCompleteTheQuestion')}}:</span>
|
||||
<span class="list-elem">{{ courseModel.minDuration | setTime }}{{this.$t('global.second')}}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label"> 实训说明:</span>
|
||||
<span class="list-label"> {{this.$t('exam.trainingNotes')}}:</span>
|
||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
||||
</p>
|
||||
<p>
|
||||
<span class="list-label" />
|
||||
<el-button :loading="loading" type="primary" @click="start">开始考试</el-button>
|
||||
<el-button :loading="loading" type="danger" @click="back">放弃考试</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="start">{{this.$t('exam.startTheExam')}}</el-button>
|
||||
<el-button :loading="loading" type="danger" @click="back">{{this.$t('exam.giveUpTheExam')}}</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</el-card>
|
||||
@ -86,7 +86,7 @@ export default {
|
||||
updateTime: res.data.updateTime
|
||||
};
|
||||
}).catch(error => {
|
||||
this.$message.error('获取试题息失败:' + error.message);
|
||||
this.$message.error( this.$t('error.getTestInformationFailed') + ':' + error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -98,9 +98,9 @@ export default {
|
||||
},
|
||||
back() {
|
||||
this.loading = true;
|
||||
this.$confirm('此操作将放弃本次考试, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm( this.$t('tip.giveUpTheExamTip'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
// 放弃试卷接口
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>试题列表</span>
|
||||
<span>{{ $t('exam.itemList') }}</span>
|
||||
</div>
|
||||
<filter-city
|
||||
ref="filerCity"
|
||||
@ -10,7 +10,7 @@
|
||||
:query-function="queryFunction"
|
||||
@filterSelectChange="refresh"
|
||||
/>
|
||||
<el-input v-model="filterText" placeholder="输入关键字进行过滤" clearable />
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-175) +'px' }">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
|
@ -2,24 +2,24 @@
|
||||
<div v-loading="loading">
|
||||
<el-card class="paper" :style="{height: height - 10 + 'px'}">
|
||||
<div slot="header" style="text-align: center;">
|
||||
<span style="font-weight:bold ">考试结果详情</span>
|
||||
<span style="font-weight:bold ">{{ $t('exam.examResultsDetails') }}</span>
|
||||
</div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: height - 150 + 'px'}">
|
||||
<div class="context">
|
||||
<el-form ref="form" :model="resultModel" size="mini">
|
||||
<el-form-item label="试题名称:" prop="name">
|
||||
<el-form-item :label="this.$t('exam.testQuestionsName')+':'" prop="name">
|
||||
<span>{{ resultModel.examName }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试得分:" prop="score">
|
||||
<span>{{ resultModel.score + ' 分' }}</span>
|
||||
<el-form-item :label="this.$t('exam.testScores')+':'" prop="score">
|
||||
<span>{{ resultModel.score + ' '+ $t('exam.points') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否通过:" prop="detail">
|
||||
<span v-if="resultModel.result === '01'" style="color:darkgray">未计算</span>
|
||||
<span v-else-if="resultModel.result === '02'" style="color:green">通过</span>
|
||||
<span v-else-if="resultModel.result === '03'" style="color:red">未通过</span>
|
||||
<el-form-item :label="this.$t('exam.whetherThrough')+':'" prop="detail">
|
||||
<span v-if="resultModel.result === '01'" style="color:darkgray">{{ $t('exam.didNotCalculate') }}</span>
|
||||
<span v-else-if="resultModel.result === '02'" style="color:green">{{ $t('exam.pass') }}</span>
|
||||
<span v-else-if="resultModel.result === '03'" style="color:red">{{ $t('exam.notPass') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试用时:" prop="detail">
|
||||
<span>{{ Math.ceil(resultModel.usedTime/60) + ' 分钟' }}</span>
|
||||
<el-form-item :label="this.$t('exam.examTime')+':'" prop="detail">
|
||||
<span>{{ Math.ceil(resultModel.usedTime/60) + ' '+ $t('global.minutes') }}</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
@ -29,13 +29,13 @@
|
||||
:summary-method="getSummaries"
|
||||
show-summary
|
||||
>
|
||||
<el-table-column prop="trainingName" label="实训名称" />
|
||||
<el-table-column prop="score" label="实训得分" />
|
||||
<el-table-column prop="trainingName" :label="this.$t('exam.trainingName')" />
|
||||
<el-table-column prop="score" :label="this.$('exam.trainingScore')" />
|
||||
</el-table>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
<div style="position: relative; float: right; right: 60px; bottom: -30px;">
|
||||
<el-button type="primary " @click="back">返回考试列表</el-button>
|
||||
<el-button type="primary " @click="back">{{ $t('exam.returnToExamList') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
@ -75,7 +75,7 @@ export default {
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = '总分';
|
||||
sums[index] = this.$t('exam.totalScore');
|
||||
return;
|
||||
}
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
@ -88,7 +88,7 @@ export default {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
sums[index] += ' 分';
|
||||
sums[index] += this.$('exam.points');
|
||||
} else {
|
||||
sums[index] = 'N/A';
|
||||
}
|
||||
@ -110,7 +110,7 @@ export default {
|
||||
this.loading = false;
|
||||
clearInterval(interval);
|
||||
interval = null;
|
||||
this.$messageBox('自动提交考试结果失败');
|
||||
this.$messageBox(this.$t('error.submitExamFailed'));
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
|
@ -7,10 +7,13 @@
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="扶梯框宽度" prop="appendageBoxWidth">
|
||||
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="1"></el-input-number>
|
||||
<el-input-number v-model="form.appendageBoxWidth" controls-position="right" :min="50"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="扶梯框高度" prop="appendageBoxHeight">
|
||||
<el-input-number v-model="form.appendageBoxHeight" controls-position="right" :min="1"></el-input-number>
|
||||
<el-input-number v-model="form.appendageBoxHeight" controls-position="right" :min="75"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="边框宽度" prop="borderWidth">
|
||||
<el-input-number v-model="form.borderWidth" controls-position="right" :min="1"></el-input-number><span>  (建议尺寸25)</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="X轴坐标">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||
@ -42,7 +45,8 @@
|
||||
appendageBoxWidth: '',
|
||||
appendageBoxHeight: '',
|
||||
x: 10,
|
||||
y: 10
|
||||
y: 10,
|
||||
borderWidth: 25
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -53,6 +57,9 @@
|
||||
],
|
||||
appendageBoxHeight: [
|
||||
{ required: true, message: '请输入扶梯框高度', trigger: 'blur' },
|
||||
],
|
||||
borderWidth: [
|
||||
{ required: true, message: '请输入边框宽度', trigger: 'blur'},
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -72,6 +79,7 @@
|
||||
this.form.appendageBoxHeight = model.height;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
this.form.borderWidth = model.borderWidth
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -89,7 +97,8 @@
|
||||
_type: 'AppendageBox',
|
||||
code: this.form.code,
|
||||
width: this.form .appendageBoxWidth,
|
||||
height: this.form.appendageBoxHeight
|
||||
height: this.form.appendageBoxHeight,
|
||||
borderWidth: this.form.borderWidth
|
||||
};
|
||||
this.$emit('createAppendageBox', appendageBoxModel);
|
||||
this.initPage();
|
||||
@ -107,7 +116,8 @@
|
||||
_type: 'AppendageBox',
|
||||
code: this.form.code,
|
||||
width: this.form .appendageBoxWidth,
|
||||
height: this.form.appendageBoxHeight
|
||||
height: this.form.appendageBoxHeight,
|
||||
borderWidth: this.form.borderWidth
|
||||
};
|
||||
this.$emit('deleteDataModel',appendageBoxModel );
|
||||
this.initPage();
|
||||
@ -120,6 +130,7 @@
|
||||
code: '',
|
||||
appendageBoxWidth: '',
|
||||
appendageBoxHeight: '',
|
||||
borderWidth: 25,
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
|
@ -21,7 +21,7 @@
|
||||
<el-input-number v-model="form.arrowWidth" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="箭头颜色" prop="fillColor">
|
||||
<el-input v-model="form.fillColor"></el-input>
|
||||
<el-color-picker v-model="form.fillColor"></el-color-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="顶点X轴坐标">
|
||||
<el-input-number v-model="form.x" controls-position="right" :min="1"></el-input-number>
|
||||
@ -50,7 +50,7 @@
|
||||
showDeleteButton: false,
|
||||
form: {
|
||||
code: '',
|
||||
orientation: '',
|
||||
orientation: 'left',
|
||||
arrowWidth: '',
|
||||
arrowLength: '',
|
||||
fillColor: '',
|
||||
@ -144,7 +144,7 @@
|
||||
this.showDeleteButton = false;
|
||||
this.form = {
|
||||
code: '',
|
||||
orientation: '',
|
||||
orientation: 'left',
|
||||
arrowWidth: '',
|
||||
arrowLength: '',
|
||||
fillColor: '',
|
||||
|
@ -24,9 +24,10 @@
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
bgWidth: '',
|
||||
bgHeight: ''
|
||||
bgWidth: this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.width:1,
|
||||
bgHeight: this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.height:1,
|
||||
},
|
||||
code: this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.code:'',
|
||||
rules: {
|
||||
bgWidth: [
|
||||
{ required: true, message: '请输入背景板宽度', trigger: 'blur' },
|
||||
@ -41,7 +42,13 @@
|
||||
|
||||
},
|
||||
watch: {
|
||||
|
||||
'$store.state.ibp.rightClickCount': function (val) {
|
||||
const model = this.$store.getters['ibp/updateDeviceData'];
|
||||
if (model._type === 'Background' ){
|
||||
this.form.bgWidth = model.width;
|
||||
this.form.bgHeight = model.height;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
@ -51,12 +58,16 @@
|
||||
x: 0,
|
||||
y: 0,
|
||||
_type: 'Background',
|
||||
code: this.code,
|
||||
width: this.form .bgWidth,
|
||||
height: this.form.bgHeight
|
||||
};
|
||||
this.$emit('createBg', bgModel)
|
||||
this.$emit('updateBg', bgModel)
|
||||
},
|
||||
initPage(){
|
||||
this.form.bgWidth = this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.width:1;
|
||||
this.form.bgHeight = this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.height:1;
|
||||
this.code = this.$store.state.ibp.ibpBgDevice.model?this.$store.state.ibp.ibpBgDevice.model.code:'';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -45,8 +45,8 @@
|
||||
showDeleteButton: false,
|
||||
form: {
|
||||
code: '',
|
||||
buttonColor: '',
|
||||
buttonWidth: '',
|
||||
buttonColor: 'red',
|
||||
buttonWidth: 25,
|
||||
x: 10,
|
||||
y: 10
|
||||
},
|
||||
@ -126,8 +126,8 @@
|
||||
this.showDeleteButton = false;
|
||||
this.form = {
|
||||
code: '',
|
||||
buttonColor: '',
|
||||
buttonWidth: '',
|
||||
buttonColor: 'red',
|
||||
buttonWidth: 25,
|
||||
x: 10,
|
||||
y: 10
|
||||
};
|
||||
|
@ -6,12 +6,9 @@
|
||||
<el-button slot="append" :disabled="isUpdate" type="primary" @click="generateCode">生成编号</el-button>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="钥匙宽度" prop="keyWidth">
|
||||
<el-form-item label="钥匙孔宽度" prop="keyWidth">
|
||||
<el-input-number v-model="form.keyWidth" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="钥匙高度" prop="keyHeight">
|
||||
<el-input-number v-model="form.keyHeight" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="钥匙朝向" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择钥匙朝向">
|
||||
<el-option label="水平" value="on"></el-option>
|
||||
@ -24,6 +21,12 @@
|
||||
<el-form-item label="Y轴坐标">
|
||||
<el-input-number v-model="form.y" controls-position="right" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="上侧文字" prop="topText">
|
||||
<el-input v-model="form.topText"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="下侧文字" prop="bottomText">
|
||||
<el-input v-model="form.bottomText"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||
<el-button v-show="showDeleteButton" @click="deleteDevice" type="danger">删除</el-button>
|
||||
@ -46,10 +49,11 @@
|
||||
form: {
|
||||
code: '',
|
||||
keyWidth: '',
|
||||
keyHeight: '',
|
||||
status:'',
|
||||
status:'on',
|
||||
x: 10,
|
||||
y: 10
|
||||
y: 10,
|
||||
topText:'',
|
||||
bottomText:''
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
@ -58,12 +62,15 @@
|
||||
keyWidth: [
|
||||
{ required: true, message: '请输入钥匙孔宽度', trigger: 'blur' },
|
||||
],
|
||||
keyHeight: [
|
||||
{ required: true, message: '请输入钥匙孔高度', trigger: 'blur' },
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: '请选择钥匙朝向', trigger: 'change' },
|
||||
],
|
||||
topText: [
|
||||
{ required: true, message: '请输入上侧文字', trigger: 'blur' },
|
||||
],
|
||||
bottomText: [
|
||||
{ required: true, message: '请输入下侧文字', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -79,10 +86,11 @@
|
||||
this.isUpdate = true;
|
||||
this.form.code = model.code;
|
||||
this.form.keyWidth = model.width;
|
||||
this.form.keyHeight = model.height;
|
||||
this.form.status = model.status;
|
||||
this.form.x = model.point.x;
|
||||
this.form.y = model.point.y;
|
||||
this.form.topText = model.topText;
|
||||
this.form.bottomText = model.bottomText;
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -101,8 +109,9 @@
|
||||
_type: 'Key',
|
||||
code: this.form.code,
|
||||
width: this.form.keyWidth,
|
||||
height: this.form.keyHeight,
|
||||
status:this.form.status
|
||||
status:this.form.status,
|
||||
topText:this.form.topText,
|
||||
bottomText:this.form.bottomText,
|
||||
};
|
||||
this.$emit('createKey', keyModel);
|
||||
this.initPage();
|
||||
@ -122,8 +131,9 @@
|
||||
_type: 'Key',
|
||||
code: this.form.code,
|
||||
width: this.form .keyWidth,
|
||||
height: this.form.keyHeight,
|
||||
status:this.form.status
|
||||
status:this.form.status,
|
||||
topText:this.form.topText,
|
||||
bottomText:this.form.bottomText,
|
||||
};
|
||||
this.$emit('deleteDataModel',keyModel);
|
||||
this.initPage();
|
||||
@ -135,10 +145,11 @@
|
||||
this.form = {
|
||||
code: '',
|
||||
keyWidth: '',
|
||||
keyHeight: '',
|
||||
status:'',
|
||||
status:'on',
|
||||
x: 10,
|
||||
y: 10
|
||||
y: 10,
|
||||
topText:'',
|
||||
bottomText:'',
|
||||
};
|
||||
},
|
||||
generateCode() {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user