夜考
This commit is contained in:
parent
2b470f0c3c
commit
d35a770c5a
@ -251,6 +251,7 @@ struct Index {
|
|||||||
let currentParams: any = router.getParams();
|
let currentParams: any = router.getParams();
|
||||||
const {carName,carType,examSubject} = this;
|
const {carName,carType,examSubject} = this;
|
||||||
this.mode = Number(currentParams.mode)
|
this.mode = Number(currentParams.mode)
|
||||||
|
this.totalScore = Number(currentParams.score) || this.totalScore
|
||||||
//小车车型列表
|
//小车车型列表
|
||||||
if (globalThis.singlePlay) {
|
if (globalThis.singlePlay) {
|
||||||
this.wayno = currentParams.wayno || 1;
|
this.wayno = currentParams.wayno || 1;
|
||||||
@ -280,16 +281,15 @@ struct Index {
|
|||||||
this.carlist = carNo
|
this.carlist = carNo
|
||||||
}
|
}
|
||||||
//获取及格分数线
|
//获取及格分数线
|
||||||
console.log("lixiao passingScore", carNo, carName, txt1, this.passingScore)
|
|
||||||
if (no1 == 3 && no3 == 3 && Number(carNo) == no2) {
|
if (no1 == 3 && no3 == 3 && Number(carNo) == no2) {
|
||||||
this.passingScore = Number(txt1) || 0;
|
this.passingScore = Number(txt1) || 0;
|
||||||
}
|
}
|
||||||
//根据车型获取应行驶里程数
|
//根据车型获取应行驶里程数
|
||||||
if (no1 == 3 && no3 == 15 && Number(carNo) == no2) {
|
if (no1 == 3 && no3 == 15 && Number(carNo) == no2) {
|
||||||
let mileage = (decodeURI(systemParm.txt1) || '').split('^')
|
let mileage = (decodeURI(systemParm.txt1) || '').split('^')
|
||||||
if(this.mode === 1) {
|
if (this.mode === 1) {
|
||||||
this.examMileage = mileage[1]
|
this.examMileage = mileage[1]
|
||||||
} else if(this.mode === 2) {
|
} else if (this.mode === 2) {
|
||||||
this.examMileage = mileage[2]
|
this.examMileage = mileage[2]
|
||||||
} else {
|
} else {
|
||||||
this.examMileage = mileage[0]
|
this.examMileage = mileage[0]
|
||||||
@ -310,10 +310,15 @@ struct Index {
|
|||||||
allItems = decodeURIComponent(systemParm.txt1).split(',').filter(txt => txt !== '')
|
allItems = decodeURIComponent(systemParm.txt1).split(',').filter(txt => txt !== '')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.info('lixiao', JSON.stringify(allItems))
|
|
||||||
|
|
||||||
if (no1 == 6) {
|
if (no1 == 6) {
|
||||||
const name = decodeURI(systemParm.txt1)
|
const name = decodeURI(systemParm.txt1)
|
||||||
|
if (this.mode !== 2 && name === '夜间行驶') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.mode !== 3 && name === '模拟夜间驾驶') {
|
||||||
|
return
|
||||||
|
}
|
||||||
let isRequired = allItems.includes(no2 + '')
|
let isRequired = allItems.includes(no2 + '')
|
||||||
if (no2 == 14) {
|
if (no2 == 14) {
|
||||||
isRequired = false
|
isRequired = false
|
||||||
@ -321,7 +326,6 @@ struct Index {
|
|||||||
if (no2 == 13 && this.mode === 1) {
|
if (no2 == 13 && this.mode === 1) {
|
||||||
isRequired = false
|
isRequired = false
|
||||||
}
|
}
|
||||||
console.log("lixiao must", name, isRequired)
|
|
||||||
const currentProject: Project = {
|
const currentProject: Project = {
|
||||||
name,
|
name,
|
||||||
abbreviation: decodeURI(systemParm.txt3),
|
abbreviation: decodeURI(systemParm.txt3),
|
||||||
@ -338,7 +342,6 @@ struct Index {
|
|||||||
this.projectsObj[no2*1] = currentProject
|
this.projectsObj[no2*1] = currentProject
|
||||||
if (this.mode === 2) {
|
if (this.mode === 2) {
|
||||||
let type: '2' | '3' = (no2 == 13 && this.kssycs != '1') ? '2' : '3'
|
let type: '2' | '3' = (no2 == 13 && this.kssycs != '1') ? '2' : '3'
|
||||||
console.log('lixiao no2 type', no2, type)
|
|
||||||
this.projectsObj[no2*1].type = type
|
this.projectsObj[no2*1].type = type
|
||||||
}
|
}
|
||||||
this.projectsCenterObj[txt2] = currentProject
|
this.projectsCenterObj[txt2] = currentProject
|
||||||
@ -439,42 +442,29 @@ struct Index {
|
|||||||
return judge
|
return judge
|
||||||
}
|
}
|
||||||
|
|
||||||
// 断点续考判断
|
// 夜考扣分
|
||||||
async goDdxkItems() {
|
async goDdxkItems() {
|
||||||
const judgeConfigObj = this.judgeConfigObj
|
|
||||||
const examSubject = this.examSubject
|
|
||||||
|
|
||||||
//科目二强制开始断点续考
|
|
||||||
if (judgeConfigObj['432'] != 0 || examSubject == 2) {
|
|
||||||
//断点续考判断
|
|
||||||
let currentParams: any = router.getParams();
|
let currentParams: any = router.getParams();
|
||||||
const examItems: string = currentParams?.examItems;
|
const examItems: string = currentParams?.examItems + "";
|
||||||
// 2024-01-03 16:29:26;0;20300,;2,4^2,4;null;
|
console.log("lixiao ddxkKfArr", JSON.stringify(examItems))
|
||||||
if (examItems !== '' && examItems !== undefined) {
|
const ddxkKfArr = examItems?.split(",").filter(item => item)
|
||||||
console.info('surenjun examItems=>', JSON.stringify(examItems))
|
if(ddxkKfArr.length === 0) {
|
||||||
const examItemsArrs = examItems.split(';');
|
return
|
||||||
const startTime = examItemsArrs[0]
|
}
|
||||||
const ddxkKsxmArr = examItemsArrs[2]?.split(',').filter(item => item) || []
|
console.log("lixiao ddxkKfArr", JSON.stringify(ddxkKfArr))
|
||||||
const ddxkKfArr = examItemsArrs[3]?.split('^').filter(item => item) || []
|
console.log("lixiao ddxkKfArr", JSON.stringify(this.manualMarkRules))
|
||||||
if (judgeConfigObj['432'] == 2 || examSubject == 2) {
|
console.log("lixiao ddxkKfArr", JSON.stringify(this.markRuleListObj))
|
||||||
//TODO 带项目带里程
|
|
||||||
if (ddxkKsxmArr?.length) {
|
ddxkKfArr.forEach((kf) => {
|
||||||
//断点续考
|
let xmdm = '';
|
||||||
ddxkKsxmArr.forEach(xmdm => {
|
let kfdm = ''
|
||||||
const projectCode = this.projectsCenterObj[xmdm].projectCode
|
let currentKf
|
||||||
if (this.projectsObj[projectCode]) {
|
Object.entries(this.markRuleListObj).forEach(([key, value]) => {
|
||||||
this.projectsObj[projectCode].type = '3'
|
if (value.markcatalog == kf) {
|
||||||
this.projectsObj[projectCode].isUpload = true
|
[xmdm, kfdm] = key.split('_')
|
||||||
this.projectsObj[projectCode].isEnd = true
|
currentKf = value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.ddxkKsxmArr = ddxkKsxmArr
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//扣分续考
|
|
||||||
ddxkKfArr.forEach((kf) => {
|
|
||||||
const [xmdm, kfdm] = kf.split(',')
|
|
||||||
const currentKf = this.markRuleListObj[`${xmdm}_${kfdm}`]
|
|
||||||
const currentProject = this.projectsObj[xmdm] || { name: '通用评判' }
|
const currentProject = this.projectsObj[xmdm] || { name: '通用评判' }
|
||||||
if (this.projectsObj[xmdm]) {
|
if (this.projectsObj[xmdm]) {
|
||||||
this.projectsObj[xmdm].type = '4'
|
this.projectsObj[xmdm].type = '4'
|
||||||
@ -490,14 +480,8 @@ struct Index {
|
|||||||
markserial: currentKf.markserial,
|
markserial: currentKf.markserial,
|
||||||
kfxh: currentKf.kfxh
|
kfxh: currentKf.kfxh
|
||||||
})
|
})
|
||||||
this.totalScore += currentKf.markreal * 1;
|
|
||||||
})
|
})
|
||||||
this.ddxkKfArr = ddxkKfArr
|
this.ddxkKfArr = ddxkKfArr
|
||||||
this.ddxkTime = Date.parse(startTime);
|
|
||||||
this.isDdxk = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化mapPoint表
|
// 初始化mapPoint表
|
||||||
|
|||||||
@ -200,7 +200,6 @@ struct UserInfo {
|
|||||||
//身份证读卡器初始化
|
//身份证读卡器初始化
|
||||||
// this.openDeviceByIDCard()
|
// this.openDeviceByIDCard()
|
||||||
const routerParam = router.getParams() || { type: 0 };
|
const routerParam = router.getParams() || { type: 0 };
|
||||||
console.log('routerParam', JSON.stringify(routerParam))
|
|
||||||
|
|
||||||
if (!globalThis.singlePlay) {
|
if (!globalThis.singlePlay) {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
@ -456,10 +455,12 @@ struct UserInfo {
|
|||||||
})
|
})
|
||||||
let now = new Date(await systemDateTime.getCurrentTime())
|
let now = new Date(await systemDateTime.getCurrentTime())
|
||||||
let hour = now.getHours()
|
let hour = now.getHours()
|
||||||
|
let minute = now.getMinutes()
|
||||||
|
let t_hour = Number(nightTime.split(":")[0])
|
||||||
|
let t_minute = Number(nightTime.split(":")[1])
|
||||||
console.log("lixiao nightTime", nightTime)
|
console.log("lixiao nightTime", nightTime)
|
||||||
if (kStringArr.length === 0) {
|
if (kStringArr.length === 0) {
|
||||||
if (hour < 5 || hour >= Number(nightTime.split(":")[0] || 24)) {
|
if (hour > t_hour || (hour === t_hour && minute >= t_minute)) {
|
||||||
// 夜考
|
|
||||||
this.mode = 2
|
this.mode = 2
|
||||||
} else {
|
} else {
|
||||||
// 白考
|
// 白考
|
||||||
@ -473,8 +474,7 @@ struct UserInfo {
|
|||||||
// 增驾(模拟灯光已考)
|
// 增驾(模拟灯光已考)
|
||||||
this.mode = 4
|
this.mode = 4
|
||||||
} else if (kStringArr.includes("41600")) {
|
} else if (kStringArr.includes("41600")) {
|
||||||
if (hour < 5 || hour >= Number(nightTime.split(":")[0]) || 24) {
|
if (hour > t_hour || (hour === t_hour && minute >= t_minute)) {
|
||||||
// 夜考
|
|
||||||
this.mode = 2
|
this.mode = 2
|
||||||
} else {
|
} else {
|
||||||
// 白考
|
// 白考
|
||||||
@ -687,8 +687,6 @@ struct UserInfo {
|
|||||||
this.isFirstBoardPrePareSetPopupBtnShow = false
|
this.isFirstBoardPrePareSetPopupBtnShow = false
|
||||||
console.log('isFirstBoardPrePareSetPopupBtnShow', this.isFirstBoardPrePareSetPopupBtnShow, this.isBoardPrePareSetPopupOpen)
|
console.log('isFirstBoardPrePareSetPopupBtnShow', this.isFirstBoardPrePareSetPopupBtnShow, this.isBoardPrePareSetPopupOpen)
|
||||||
this.startExam = false
|
this.startExam = false
|
||||||
// await upDateTableByArray('USER', [])
|
|
||||||
// await upDateTableByArray('USERLIST', [])
|
|
||||||
await DB.clearTable('USER')
|
await DB.clearTable('USER')
|
||||||
await DB.clearTable('USERLIST')
|
await DB.clearTable('USERLIST')
|
||||||
this.type = '2'
|
this.type = '2'
|
||||||
@ -918,25 +916,31 @@ struct UserInfo {
|
|||||||
let kStringArr = decodeURIComponent(keystr || '').split(",").filter(item => item)
|
let kStringArr = decodeURIComponent(keystr || '').split(",").filter(item => item)
|
||||||
console.log("lixiao kStringArr", JSON.stringify(kStringArr))
|
console.log("lixiao kStringArr", JSON.stringify(kStringArr))
|
||||||
await this.getExamMode(kStringArr)
|
await this.getExamMode(kStringArr)
|
||||||
console.log("lixiao model", this.mode)
|
console.log("lixiao model", this.mode,JSON.stringify(examItems))
|
||||||
// if (this.mode === 2 && !examItems?.getExaminationItemRsp?.body?.jdxx) {
|
let score = Number(this.currentUser.jdxx?.split("^")[0])
|
||||||
// promptAction.showToast({
|
let kfxm = this.currentUser.jdxx?.split("^")[1]
|
||||||
// message: "当前尚未进行白考,无法开始夜考!"
|
let length = Number(this.currentUser.jdxx?.split("^")[2])
|
||||||
// })
|
if (this.mode === 2 && !this.currentUser.jdxx) {
|
||||||
// this.updateTimeLimit = false
|
promptAction.showToast({
|
||||||
// this.stopDeviceById()
|
message: "当前尚未进行白考,无法开始夜考!"
|
||||||
// this.stepFlag = false
|
})
|
||||||
// return
|
this.updateTimeLimit = false
|
||||||
// }
|
this.stopDeviceById()
|
||||||
|
this.stepFlag = false
|
||||||
|
this.ksksLimit = false
|
||||||
|
return
|
||||||
|
}
|
||||||
router.pushUrl({
|
router.pushUrl({
|
||||||
url: 'pages/Judge',
|
url: 'pages/Judge',
|
||||||
params: {
|
params: {
|
||||||
examItems: examItems?.getExaminationItemRsp?.body?.ykxx,
|
examItems: kfxm,
|
||||||
sczb: Number(this.isBoardPrePareSetPopupOpen),
|
sczb: Number(this.isBoardPrePareSetPopupOpen),
|
||||||
kfdm: this.sczbkf,
|
kfdm: this.sczbkf,
|
||||||
mode: this.mode,
|
mode: this.mode,
|
||||||
//真实监管项目
|
//真实监管项目
|
||||||
kString: decodeURIComponent(keystr || '')
|
kString: decodeURIComponent(keystr || ''),
|
||||||
|
// 白考分数
|
||||||
|
score
|
||||||
}
|
}
|
||||||
}, router.RouterMode.Single);
|
}, router.RouterMode.Single);
|
||||||
this.updateTimeLimit = false
|
this.updateTimeLimit = false
|
||||||
|
|||||||
@ -22,6 +22,7 @@ export interface User {
|
|||||||
yycs: string
|
yycs: string
|
||||||
ksy2sfzmhm: string
|
ksy2sfzmhm: string
|
||||||
kslx?: string
|
kslx?: string
|
||||||
|
jdxx?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface VideoConfig {
|
export interface VideoConfig {
|
||||||
|
|||||||
@ -761,6 +761,7 @@ export default class Judge {
|
|||||||
const {isExam} = this;
|
const {isExam} = this;
|
||||||
const judgeUI = this.judgeUI
|
const judgeUI = this.judgeUI
|
||||||
const {projects,carType,kssycs,isDdxk,ddxkTime,projectsCenterObj,ddxkKsxmArr,ddxkKfArr,passingScore} = judgeUI;
|
const {projects,carType,kssycs,isDdxk,ddxkTime,projectsCenterObj,ddxkKsxmArr,ddxkKfArr,passingScore} = judgeUI;
|
||||||
|
console.log("lixiao projects", JSON.stringify(projects.map(item => item.name)))
|
||||||
const beginInfo = {
|
const beginInfo = {
|
||||||
kgid: '012',
|
kgid: '012',
|
||||||
kgxm: decodeURI(examinerName || ''),
|
kgxm: decodeURI(examinerName || ''),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user