<script setup>
import { reactive, onMounted } from 'vue'
import { useRouter, useRoute } from 'vue-router'
import { useStore } from '@/stores/index.js'
import {
get,
post
} from '@/http/axios.js'
import {
NoticeBar,
Popover,
Icon,
Picker,
Popup,
Button,
Toast,
} from 'vant'
import { queryParkByMenuItemID, getPreference, getExamSchemeRelationInfo, getRelationInfoToExam, startToExam, startAnswerSheet, userLogin, } from "@/http/api.js";
import {
isMobilePhone,
isIdentityNumber,
} from '@/utils/regex.js'
import { getQueryString } from '@/utils/com.js'
import { events } from '@/utils/mitt.js'
import parkLoc from '@/assets/icons/park_location.jpg';
import passIcon from '@/assets/icons/pass_valid.png';
import errorIcon from '@/assets/icons/error_invalid.png';
import personIcon from '@/assets/icons/person_change.png';
const router = useRouter()
const route = useRoute()
const store = useStore()
const state = reactive({
parkName: '',
parkID: '',
menuItemID: '',
mod: '',
showParkPopover: false,
gps: {
lat: '',
lng: ''
},
parkPositons: [],
showPreference: false,
showPreferenceIcon: true,
preferInfoList: [],
personalInfo: {
examineeName: '',
queuerMobileNo: '',
queuerIdentificationCode: '',
belongComponent: '',
belongComponentCode: ''
},
readOnly: false,
belongComponentList: [],
opentityIdAndParkPersonnelIdMap: {},
parkPersonnelId: '',
validPhone: true,
validCrewID: true,
loading: false,
belongCompany: false,
pkExamScheme: '',
pkExamPaper: '',
examInfo: null,
onceMoreInfo: null,
paramsInfo: {},
pkExaminee: '',
remainingExamTimes: 0,
getInfoLink: {},
videoUrl: '',
routerMode: '',
examRecognizeId: '',
})
onMounted(() => {
document.title = '在线考试'
let url = window.location.href.split('/')
state.baseURL = url[0] + '//' + url[2]
if (getQueryString('token')) {
sessionStorage.clear()
store.setToken(getQueryString('token'))
sessionStorage.setItem('token', getQueryString('token'))
if (getQueryString('menuInfo')) {
state.readOnly = false
state.showPreferenceIcon = true
let info = JSON.parse(decodeURIComponent(decodeURIComponent(getQueryString('menuInfo'))))
state.paramsInfo = info
console.log(info)
state.menuItemID = info.appletProjectMenuItemID
if (info.mod) {
state.mod = info.mod
} else {
state.mod = getSearchParams(info.param).mod
}
sessionStorage.setItem("applyParkMenuInfo", JSON.stringify(state.paramsInfo));
sessionStorage.setItem("menuInfor", JSON.stringify(info));
state.getInfoLink = info
if (info.queueBizType != 'STM_SBG' && info.queueBizType != 'STM_EXP') {
if (info.parkID) {
state.parkID = info.parkID
initAppointData()
console.log(info.queueBizType)
if (!info.examineeName) {
getPersonInfo()
} else {
state.readOnly = false
state.personalInfo = {
examineeName: state.getInfoLink.examineeName,
queuerMobileNo: state.getInfoLink.mobileNo,
queuerIdentificationCode: (state.getInfoLink.idNo == 'null' || state.getInfoLink.idNo == 'undefined' || !state.getInfoLink.idNo) ? '' : state.getInfoLink.idNo,
belongComponent: state.getInfoLink.opEntityName,
belongComponentCode: state.getInfoLink.opEntityId
}
}
sessionStorage.setItem("applyGetInfoLink", JSON.stringify(state.getInfoLink));
sessionStorage.setItem("resourceServQueuerID", state.getInfoLink.resourceServQueuerID);
sessionStorage.setItem("applyParkMenuInfo", JSON.stringify(state.getInfoLink));
getExamInfo()
} else if (state.menuItemID) {
initParkList()
if (!info.examineeName) {
getPersonInfo()
}
}
} else {
sessionStorage.setItem("applyGetInfoLink", JSON.stringify(state.getInfoLink));
sessionStorage.setItem("applyParkMenuInfo", JSON.stringify(state.getInfoLink));
state.routerMode = 'express'
state.personalInfo = {
examineeName: info.examineeName,
queuerMobileNo: info.mobileNo,
queuerIdentificationCode: (info.idNo == 'null' || info.idNo == 'undefined' || !info.idNo) ? '' : info.idNo,
}
if (info.examBizType && info.softProdCode && info.objectType && info.objectId) {
getExamInfo()
}
}
} else if (getQueryString('info')) {
state.readOnly = true
let guiInfo = JSON.parse(decodeURIComponent(decodeURIComponent(getQueryString('info'))))
state.personalInfo = {
examineeName: guiInfo.examineeName,
queuerMobileNo: guiInfo.mobileNo,
queuerIdentificationCode: (guiInfo.idNo == 'null' || guiInfo.idNo == 'undefined' || !guiInfo.idNo) ? '' : guiInfo.idNo,
belongComponent: guiInfo.opEntityName,
belongComponentCode: guiInfo.opEntityId
}
state.getInfoLink = guiInfo
sessionStorage.setItem("applyGetInfoLink", JSON.stringify(state.getInfoLink));
sessionStorage.setItem("resourceServQueuerID", getQueryString('resourceServQueuerID'));
sessionStorage.setItem("applyParkMenuInfo", JSON.stringify(state.getInfoLink));
getExamInfo()
}
} else {
if (JSON.parse(sessionStorage.getItem('onceMoreInfo'))) {
console.log(sessionStorage.getItem('onceMoreInfo'))
state.readOnly = false
state.showPreferenceIcon = false
state.examRecognizeId = sessionStorage.getItem("examRecognizeId");
if (sessionStorage.getItem('personalInfo')) state.personalInfo = JSON.parse(sessionStorage.getItem('personalInfo'))
store.setToken(sessionStorage.getItem('token'))
state.onceMoreInfo = JSON.parse(sessionStorage.getItem('onceMoreInfo'))
state.paramsInfo = JSON.parse(sessionStorage.getItem("applyParkMenuInfo"));
state.getInfoLink = JSON.parse(sessionStorage.getItem("applyGetInfoLink"));
console.log(store.token)
if (store.token) {
if (state.paramsInfo) {
state.menuItemID = state.paramsInfo.appletProjectMenuItemID;
state.mod = state.paramsInfo.mod
initAppointData()
getRelationInfoToExamInfo()
}
}
} else {
state.onceMoreInfo = null
}
}
})
const getSearchParams = (params) => {
const searchParams = new URLSearchParams(params);
const paramsObj = {};
for (const [key, value] of searchParams.entries()) {
paramsObj[key] = value;
}
return paramsObj;
}
const testUserLogin = async () => {
let result = await userLogin({
loginName: 'yms-test',
pswd: '1qaz@WSX',
})
if (result.data.code == 'S') {
store.setToken(result.data.data.token)
initParkList()
}
}
const initParkList = async () => {
const toast = Toast.loading({
duration: 0,
forbidClick: true,
loadingType: 'spinner',
})
let res = await queryParkByMenuItemID({
token: store.token,
gps: state.gps,
mod: state.mod,
menuItemID: state.menuItemID,
parkID: state.parkID,
})
toast.clear()
if (res.data.code == 'S') {
state.parkPositons = res.data.data
if (state.parkPositons.length) {
state.parkPositons.forEach((ele) => {
ele.text = ele.resourceName
})
handleSelectPark(state.parkPositons[0])
}
} else {
Toast.fail({
duration: 0,
closeOnClick: true,
message: res.data.msg,
icon: 'close',
})
}
}
const initAppointData = () => {
handlePreferenceInfo(3);
}
const handleSelectPark = (action) => {
state.parkName = action.text;
state.parkID = action.parkID;
if (state.menuItemID) {
state.getInfoLink = getSearchParams(state.paramsInfo.param)
sessionStorage.setItem("applyGetInfoLink", JSON.stringify(state.getInfoLink));
state.personalInfo = {
examineeName: state.getInfoLink.examineeName,
queuerMobileNo: state.getInfoLink.mobileNo,
queuerIdentificationCode: (state.getInfoLink.idNo == 'null' || state.getInfoLink.idNo == 'undefined' || !state.getInfoLink.idNo) ? '' : state.getInfoLink.idNo,
belongComponent: state.getInfoLink.opEntityName,
belongComponentCode: state.getInfoLink.opEntityId
}
} else {
state.personalInfo = {
examineeName: '',
queuerMobileNo: '',
queuerIdentificationCode: '',
belongComponent: '',
}
}
initAppointData();
};
const getPersonInfo = async () => {
let params = {
"ServiceType": "getParkPersonnelByToken",
"ServiceData": {
token: store.token,
appletProjectMenuItemID: state.menuItemID,
mod: state.mod,
appletCode: ''
}
};
await post(
"/hlcloud-yms-app/webServiceReport/adapter", params
).then((res) => {
console.log(res)
if (res.data.code == "S") {
let returnInfor = res.data.data
state.personalInfo.examineeName = returnInfor.examineeName
state.personalInfo.queuerMobileNo = returnInfor.mobileNo
state.personalInfo.queuerIdentificationCode = (returnInfor.idNo == 'null' || returnInfor.idNo == 'undefined' || !returnInfor.idNo) ? '' : returnInfor.idNo,
state.belongComponentList = returnInfor.operateEntityList ? returnInfor.operateEntityList : []
state.validPhone = true
state.validCrewID = true
state.opentityIdAndParkPersonnelIdMap = returnInfor.opentityIdAndParkPersonnelIdMap
console.log(state.belongComponentList)
if (state.mod == 'QUR') {
qurMod(state.belongComponentList[0], returnInfor.resourceServQueuerID)
} else if (state.mod == 'PPS') {
confirmVisitCompany(state.belongComponentList[0])
}
}
});
}
const qurMod = (action, resourceServQueuerID) => {
state.belongCompany = false
console.log(action)
state.personalInfo.belongComponent = action?.opentityname;
state.personalInfo.belongComponentCode = action?.opentityid;
state.showVisitType = false;
state.parkPersonnelId = resourceServQueuerID
getElseParam()
}
const handlePreferenceInfo = async (times) => {
let params = {
token: store.token,
parkID: state.parkID,
preferenceType: 'QII',
parkPassRole: '',
otherTimes: new Date().getTime() + '-' + times
};
let res = await getPreference(params);
if (res.data.code == 'S') {
state.preferInfoList = res.data.data;
if (localStorage.getItem('debugger') == 'open') {
alert(JSON.stringify(res));
}
}
}
const handleSelectPreference = (item) => {
let result = item;
if (result.driverName) state.personalInfo.examineeName = result.driverName;
if (result.queuerMobileNo) {
state.personalInfo.queuerMobileNo = result.queuerMobileNo;
changeInput('phone');
}
state.showPreference = false;
}
const changeInput = (type) => {
if (type == 'phone') {
state.validPhone = state.personalInfo.queuerMobileNo ? isMobilePhone(state.personalInfo.queuerMobileNo) : true;
} else if (type == 'queuerIdentificationCode') {
state.validCrewID = state.personalInfo.queuerIdentificationCode ? isIdentityNumber(state.personalInfo.queuerIdentificationCode) : true;
}
console.log(state.validCrewID)
}
const getCompanyDataList = async (times) => {
let params = {
"ServiceType": "getParkPersonnelByUserInfo",
"ServiceData": {
examineeName: state.personalInfo.examineeName,
idNo: state.personalInfo.queuerIdentificationCode,
mobileNo: state.personalInfo.queuerMobileNo,
appletProjectMenuItemID: state.menuItemID,
mod: state.mod,
token: store.token
}
};
await post(
"/hlcloud-yms-app/webServiceReport/adapter", params
).then((res) => {
if (res.data.code == 'S') {
state.belongComponentList = res.data.data.operateEntityList
state.opentityIdAndParkPersonnelIdMap = res.data.data.opentityIdAndParkPersonnelIdMap
if (state.mod == 'QUR') {
console.log(res)
qurMod(state.belongComponentList[0], res.data.data.resourceServQueuerID)
} else if (state.mod == 'PPS') {
confirmVisitCompany(state.belongComponentList[0])
}
} else {
Toast.fail({
duration: 0,
closeOnClick: true,
message: res.data.msg,
icon: 'close',
});
}
})
}
const confirmVisitCompany = (action) => {
state.belongCompany = false
console.log(action)
state.personalInfo.belongComponent = action?.opentityname;
state.personalInfo.belongComponentCode = action?.opentityid;
state.showVisitType = false;
Object.keys(state.opentityIdAndParkPersonnelIdMap).forEach((key) => {
if (key == action.opentityid) {
state.parkPersonnelId = state.opentityIdAndParkPersonnelIdMap[key]
}
})
console.log("映射:" + state.parkPersonnelId)
state.pkExamScheme = ''
state.pkExamPaper = ''
state.examInfo = null
getElseParam()
}
const changeInfo = () => {
if (state.personalInfo.examineeName) {
state.personalInfo.examineeName = state.personalInfo.examineeName.split(/[\t\r\f\n\s]*/g).join('')
}
console.log(state.personalInfo.examineeName)
state.personalInfo.belongComponent = ''
state.personalInfo.belongComponentCode = ''
state.belongComponentList = []
state.opentityIdAndParkPersonnelIdMap = {}
state.parkPersonnelId = ''
state.pkExamScheme = ''
state.pkExamPaper = ''
state.examInfo = null
if (state.personalInfo.examineeName && state.personalInfo.queuerMobileNo
&& state.validPhone) {
if (state.routerMode != 'express') {
getCompanyDataList()
} else {
getExamInfo()
}
}
}
const getElseParam = async () => {
let personnelId = {}
if (state.mod == 'PPS') {
personnelId = {
parkPersonnelId: state.parkPersonnelId
}
} else if (state.mod == 'QUR') {
personnelId = {
resourceServQueuerID: state.parkPersonnelId
}
}
let params = {
"ServiceType": "getExamUrlByParkPersonnel",
"ServiceData": {
...personnelId,
mod: state.mod,
appletCode: '',
token: store.token,
appletProjectMenuItemID: state.menuItemID
}
};
await post(
"/hlcloud-yms-app/webServiceReport/adapter", params
).then((res) => {
if (res.data.code == "S") {
let info = res.data.data.split('?')[1]
let returnParams = getSearchParams(info)
console.log(returnParams)
state.getInfoLink = returnParams
sessionStorage.setItem("applyGetInfoLink", JSON.stringify(state.getInfoLink));
getExamInfo()
} else {
Toast.fail({
duration: 0,
closeOnClick: true,
message: '查询失败,请稍后重试',
icon: 'close',
});
}
})
}
const getExamInfo = async () => {
let toast = null;
toast = Toast.loading({
duration: 0,
forbidClick: true,
loadingType: "spinner",
});
let params = {
token: store.token,
mod: state.mod,
examBizType: state.getInfoLink ? state.getInfoLink.examBizType : '',
softProdCode: 'YMS',
objectType: state.getInfoLink ? state.getInfoLink.objectType : '',
objectId: state.getInfoLink ? state.getInfoLink.objectId : '',
examRecognizeId: state.getInfoLink ? state.getInfoLink.examRecognizeId : '',
ddParkBizType: state.getInfoLink ? state.getInfoLink.ddParkBizType : '',
personnelType: state.getInfoLink ? state.getInfoLink.personnelType : '',
opEntityId: state.personalInfo.belongComponentCode,
opEntityName: state.personalInfo.belongComponent
}
await getExamSchemeRelationInfo(
"/hlcloud-oes-app/examScene/getExamSchemeRelationInfoByExamScene", params
).then((res) => {
console.log(res)
toast.clear()
res = res.data
if (res.code == "S") {
state.pkExamScheme = res.data.pkExamScheme
state.pkExamPaper = res.data.examPaperVoUse.pkExamPaper
state.examInfo = res.data
state.examRecognizeId = res.data.examRecognizeId
sessionStorage.setItem("examRecognizeId", state.examRecognizeId);
res.data.examSchemeLinkOpVoList.forEach(item => {
if (item.ddOperationType == 'VDO') {
state.videoUrl = item.operationUrl
}
})
} else {
Toast.fail({
duration: 0,
closeOnClick: true,
message: res.msg,
icon: 'close',
});
}
});
}
const getRelationInfoToExamInfo = async (pkExamSchemeId, pkExamineeId) => {
let toast = null;
toast = Toast.loading({
duration: 0,
forbidClick: true,
loadingType: "spinner",
});
let params = {
token: store.token,
mod: state.mod,
pkExamScheme: state.onceMoreInfo?.pkExamScheme,
pkExaminee: state.onceMoreInfo?.pkExaminee,
examBizType: state.getInfoLink ? state.getInfoLink.examBizType : '',
softProdCode: state.getInfoLink ? state.getInfoLink.softProdCode : '',
objectType: state.getInfoLink ? state.getInfoLink.objectType : '',
objectId: state.getInfoLink ? state.getInfoLink.objectId : '',
opEntityId: state.personalInfo.belongComponentCode,
opEntityName: state.personalInfo.belongComponent
}
await getRelationInfoToExam(
"/hlcloud-oes-app/examScheme/getExamSchemeRelationInfoToExam", params
).then((res) => {
console.log(res)
toast.clear()
res = res.data
if (res.code == "S") {
state.pkExamScheme = res.data.pkExamScheme
state.pkExamPaper = res.data.examPaperVoUse.pkExamPaper
state.examInfo = res.data
} else {
Toast.fail({
duration: 0,
closeOnClick: true,
message: res.msg,
icon: 'close',
})
}
});
}
const startExam = async () => {
sessionStorage.removeItem('onceMoreInfo')
let params = {
token: store.token,
mod: state.mod,
fkExamScheme: state.pkExamScheme,
ddExamineeType: state.getInfoLink ? state.getInfoLink.ddExamineeType : '',
examRecognizeId: state.examRecognizeId,
fkBizUnit: state.getInfoLink ? state.getInfoLink.fkBizUnit : '',
objectType: state.getInfoLink ? state.getInfoLink.objectType : '',
objectId: state.getInfoLink ? state.getInfoLink.objectId : '',
examineeName: state.personalInfo.examineeName,
idNo: state.personalInfo.queuerIdentificationCode,
mobileNo: state.personalInfo.queuerMobileNo,
opEntityId: state.personalInfo.belongComponentCode,
opEntityName: state.personalInfo.belongComponent,
}
if (state.pkExamScheme) {
await startToExam(
"/hlcloud-oes-app/examinee/addExaminee", params
).then((res) => {
console.log(res)
res = res.data
if (res.code == "S") {
state.pkExaminee = res.data.pkExaminee,
state.remainingExamTimes = res.data.remainingExamTimes
startAnswerSheetInfo()
sessionStorage.setItem("personalInfo", JSON.stringify(state.personalInfo));
} else {
Toast.fail({
duration: 0,
closeOnClick: true,
message: res.msg,
icon: 'close',
})
}
});
} else {
Toast.fail({
duration: 0,
closeOnClick: true,
message: '暂无可用考试方案',
icon: 'close',
})
}
}
const startAnswerSheetInfo = async () => {
let params = {
token: store.token,
fkExamPaper: state.pkExamPaper,
fkExaminee: state.pkExaminee,
userIdExaminee: "",
fkBizUnit: state.getInfoLink ? state.getInfoLink.fkBizUnit : '',
mod: state.mod,
}
await startAnswerSheet(
"/hlcloud-oes-app/answerSheet/startAnswerSheet", params
).then((res) => {
console.log(res)
res = res.data
if (res.code == "S") {
sessionStorage.setItem('personalInfo', JSON.stringify(state.personalInfo))
let examInfo = {
duration: state.examInfo.examPaperVoUse.duration,
pkExamScheme: state.pkExamScheme,
pkExamPaper: state.pkExamPaper,
pkExaminee: state.pkExaminee,
remainingExamTimes: state.remainingExamTimes,
pkAnswerSheet: res.data.pkAnswerSheet,
mod: state.mod,
fkBizUnit: state.getInfoLink ? state.getInfoLink.fkBizUnit : '',
}
sessionStorage.setItem('examInfo', JSON.stringify(examInfo))
if (state.videoUrl) {
sessionStorage.setItem('videoUrl', state.videoUrl)
router.push(
{
name: 'trainVedio',
}
)
} else {
router.push(
{
name: 'onlineTest',
}
)
}
} else {
Toast.fail({
duration: 0,
closeOnClick: true,
message: res.msg,
icon: 'close',
})
}
});
}
</script>
<template>
<div class="new_booking">
<!-- 园区信息 -->
<div class="info_position">
<NoticeBar style="opacity:0" left-icon="volume-o" text="1123123123123" background="#f5f5f5" />
<Popover v-if="state.parkPositons.length > 1" v-model:show="state.showParkPopover" :actions="state.parkPositons"
@select="handleSelectPark" placement="bottom-end">
<template #reference>
<p class="title_link">
<Icon :name="parkLoc" size="14" />
<p>
<span>{{ state.parkName }}</span>
</p>
</p>
</template>
</Popover>
<p v-else class="title_link">
<Icon :name="parkLoc" size="14" />
<span>{{ state.parkName }}</span>
</p>
</div>
<div>
<!-- 考生信息 -->
<div class="vehicle_info personal_info">
<p class="info_title ft-bold">考生信息</p>
<div class="info_desc">
<!-- 考生姓名 -->
<div class="desc_item">
<span class="label ft-bold">考生姓名</span>
<span class="label">*</span>
<div class="item_input item_personal ">
<input type="text" class="input_name" v-model="state.personalInfo.examineeName" placeholder="请输入姓名"
@change="changeInfo" :disabled="state.readOnly">
<span v-show="state.showPreferenceIcon">
<Popover v-model:show="state.showPreference" placement="bottom-end">
<div class="personal_prefer">
<div class="prefer_item" v-for="(ite, ind) in state.preferInfoList" :key="ind"
@click="handleSelectPreference(ite)">
<span>{{ ite.driverName }}</span>
<span>{{ ite.queuerMobileNo }}</span>
</div>
<div class="no_prefer" v-if="state.preferInfoList.length == 0">
<img src="@/assets/icons/no_data.png" alt="">
<p class="nodata_title ft-bold">暂无偏好信息</p>
</div>
</div>
<template #reference>
<img :src="personIcon" alt="">
</template>
</Popover>
</span>
</div>
</div>
<!-- 手机号码 -->
<div class="desc_item">
<span class="label ft-bold">手机号码</span>
<span class="label">*</span>
<div class="item_input">
<div class="select_item">
<input pattern="[0-9]*" class="input_name" v-model="state.personalInfo.queuerMobileNo"
@input="changeInput('phone')" placeholder="请输入手机号" @change="changeInfo" :disabled="state.readOnly" />
<Icon :style="state.personalInfo.queuerMobileNo ? '' : { opacity: 0 }" class="select_icon"
@click="!state.validPhone ? state.personalInfo.queuerMobileNo = '' : ''; changeInput('phone')"
:name="state.validPhone ? passIcon : errorIcon" color="#606266" />
</div>
</div>
</div>
<!-- 身份证号 -->
<div class="desc_item">
<span class="label ft-bold">身份证号</span>
<!-- 5-8号 赵佳楠让把身份证号和所属公司设置为不必填 -->
<span class="label"></span>
<div class="item_input">
<div class="select_item">
<input class="input_name" v-model="state.personalInfo.queuerIdentificationCode"
@input="changeInput('queuerIdentificationCode')" placeholder="请输入证件号" @change="changeInfo"
:disabled="state.readOnly" />
<Icon :style="state.personalInfo.queuerIdentificationCode ? '' : { opacity: 0 }" class="select_icon"
@click="!state.validCrewID ? state.personalInfo.queuerIdentificationCode = '' : ''; changeInput('queuerIdentificationCode')"
:name="state.validCrewID ? passIcon : errorIcon" color="#606266" />
</div>
</div>
</div>
<!-- <div class="desc_item">
<span class="label ft-bold">所属公司</span>
<span class="label"></span>
<div class="item_input">
<div class="select_item">
<input type="text" class="input_name" v-model="state.personalInfo.belongComponent" placeholder="请输入所属公司"
@change="changeInfo">
</div>
</div>
</div> -->
<div class="desc_item">
<span class="label ft-bold">所属公司</span>
<span class="label" v-show="state.mod != 'QUR'"></span>
<div class="item_input">
<div class="select_item" @click="state.belongCompany = true">
<span v-if="state.personalInfo.belongComponent">{{ state.personalInfo.belongComponent == 'null' ? '' :
state.personalInfo.belongComponent }}</span>
<span v-else style="color:#888;fontWeight:normal">请选择所属公司</span>
</div>
</div>
<Popup v-model:show="state.belongCompany" position="bottom">
<Picker :columns="state.belongComponentList" :columns-field-names="{ text: 'opentityname' }"
@cancel="state.belongCompany = false" @confirm="confirmVisitCompany">
</Picker>
</Popup>
</div>
</div>
</div>
<!-- 考试信息 -->
<div class="vehicle_info personal_info info_last" v-if="state.examInfo">
<p class="info_title ft-bold">考试信息</p>
<div class="info_desc">
<div class="desc_item">
<span class="label ft-bold">试卷方案</span>
<span class="label"></span>
<div class="item_input">
<div class="select_item">
<!-- <span>入园安全考试</span> -->
<span>{{ state.examInfo.examSchemeName }}</span>
</div>
</div>
</div>
<div class="desc_item">
<span class="label ft-bold">考试时间</span>
<span class="label"></span>
<div class="item_input">
<div class="select_item">
<!-- <span>45分钟(不含视频学习时间)</span> -->
<span>{{
state.examInfo.examPaperVoUse ? state.examInfo.examPaperVoUse.duration + '分钟(不含视频学习时间)' : ''
}}</span>
</div>
</div>
</div>
<div class="desc_item">
<span class="label ft-bold">通过分数</span>
<span class="label"></span>
<div class="item_input">
<div class="select_item">
<!-- <span>90分</span> -->
<span>{{ state.examInfo.passScore + '分' }}</span>
</div>
</div>
</div>
<div class="desc_item">
<span class="label ft-bold">可考次数</span>
<div class="item_input">
<div class="select_item">
<!-- <span>2次</span> -->
<span>{{ state.examInfo.remainingExamTimes }}</span>
</div>
</div>
</div>
<div class="note">
<span class="label">*</span>开始考试即消耗考试次数,无法暂停,若因网络波动或其他原因造成中途退出或无法交卷系统不记录成绩,需要重新考试,考试时请确保网络及手机可靠。
</div>
</div>
</div>
</div>
<div class="next_step">
<Button @click="startExam" :color="state.pkExamScheme ? '#007EF5' : '#ccc'" type="primary" round
size="small">开始考试</Button>
</div>
</div>
</template>
<style lang="scss" scoped>
.new_booking {
overflow: auto;
width: 100%;
height: 100%;
font-weight: normal;
background-color: #fff;
// 园区信息
.info_position {
position: relative;
display: flex;
justify-content: space-between;
height: 30px;
line-height: 30px;
margin: 0 12px;
text-align: right;
font-size: 12px;
color: #333;
z-index: 0;
:deep(.van-notice-bar__left-icon) {
text-align: left;
}
:deep(.van-notice-bar__wrap) {
margin: 0 5px 0 0;
}
:deep(.van-notice-bar) {
width: 100%;
height: 30px;
padding: 0;
}
.title_link {
display: flex;
align-items: center;
width: auto;
height: 30px;
&>p {
white-space: nowrap;
&>span {
border-bottom: 1px solid #333;
margin-left: 4px;
}
}
&>span {
white-space: nowrap;
margin-left: 4px;
}
}
}
.vehicle_info {
padding: 0 12px;
margin-bottom: 16px;
.info_title {
font-size: 16px;
color: #474747;
}
.info_desc {
// height:130px;
margin: 10px 0;
border: 1px solid #f4f4f4;
border-radius: 6px;
position: relative;
// 车牌号码
.desc_item {
padding: 8px 12px;
display: flex;
align-items: center;
// height: 28px;
// margin-bottom: 12px;
border-bottom: 1px solid #f4f4f4;
&:last-child {
margin-bottom: 0;
}
.label:nth-child(1) {
width: 22%;
color: #888888;
// font-weight: 500;
font-weight: bold;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility;
font-size: 14px;
font-family: 'Microsoft YaHei', 'PingFangSC-Light', 'PingFang SC', 'STHeitiSC-Light', 'Helvetica-Light', 'Arial', 'sans-serif';
}
.label:nth-child(2) {
width: 5%;
color: red;
}
// 输入框
.item_input {
position: relative;
display: flex;
align-items: center;
width: 77%;
height: 100%;
.belong {
width: 6%;
color: #007ef5;
font-weight: 600;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility;
font-size: 14px;
margin-right: 4px;
}
.arrow_icon {
width: 5%;
}
.input_detail {
width: 75%;
border: none;
margin-left: 4px;
font-weight: bold;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility;
// text-indent: 10px;
// &:focus {
// border-bottom: 1px solid #f4f4f4;
// }
&::-webkit-input-placeholder {
font-weight: normal;
font-size: 14px;
}
}
.input_trailer {
position: absolute;
right: 50%;
top: 0;
font-weight: bold;
color: #6f6f6f;
line-height: 28px;
font-size: 14px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility;
}
.valid_icon {
display: flex;
flex-direction: row-reverse;
width: 16%;
font-size: 14px;
padding-right: 11px;
// margin-left: 1px;
}
// 下拉
.select_item {
display: flex;
flex-direction: row;
align-items: center;
// flex-direction: row-reverse;
justify-content: space-between;
width: 100%;
height: 100%;
// padding: 0 10px;
// border: 1px solid #f4f4f4;
border-radius: 4px;
font-size: 14px;
font-weight: bold;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-text-rendering: optimizeLegibility;
-moz-text-rendering: optimizeLegibility;
text-rendering: optimizeLegibility;
}
}
// 展开样式
&.y_unfold {
color: #98999c;
display: flex;
// height: 100%;
justify-content: space-between !important;
padding-right: 10px !important;
font-size: 13px;
.label:nth-child(1) {
padding: 0 !important;
width: 40% !important;
text-align: center;
}
.van-icon-home-o:before {
transform: rotate(180deg);
vertical-align: 1px;
}
}
}
.desc_item:last-child {
border-bottom: none;
padding: 12px;
}
}
}
.info_last {
.info_desc {
.desc_item {
padding: 12px;
}
}
.note {
padding: 12px;
font-size: 12px;
color: #6f6f6f;
line-height: 16px;
.label {
width: 5%;
color: red;
}
}
}
// 人员信息
.personal_info {
.input_name {
width: 86%;
border: none;
padding-left: 0;
&::-webkit-input-placeholder {
font-weight: normal;
color: #888888;
padding-left: -1px;
}
}
// 司机姓名
.item_personal {
&>input {
width: 80%;
height: 100%;
border: 1px solid transparent;
// padding: 0 14px;
font-size: 14px;
&:disabled {
background: none !important;
;
}
}
&>span {
width: 20%;
height: 80%;
text-align: right;
img {
position: relative;
left: -5px;
width: 80%;
}
}
}
}
// 提交
.next_step {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 60px;
padding: 0 10px;
background-color: #fff;
z-index: 998;
font-size: 15px;
font-weight: 600;
:deep(.van-button--round) {
width: 100%;
height: 36px;
border-radius: 14px;
}
:deep(.van-button__content) {
padding: 10px 14px;
}
}
}
input {
&:disabled {
background: none !important;
;
}
}
</style>
<style lang="scss">
.item_input {
.van-uploader__preview {
width: 30%;
height: 55px;
margin-right: 2px !important;
}
.van-uploader__upload {
margin-right: 0 !important;
}
.van-field__control {
&::-webkit-input-placeholder {
font-weight: normal;
color: #888888;
padding-left: -1px;
}
}
}
.info_desc {
.van-swipe-cell__right {
right: -1px !important;
}
}
</style>