|
@@ -78,11 +78,15 @@ const getOption = (data: any) => {
|
|
|
* 获取项目
|
|
|
*/
|
|
|
const getExam = async () => {
|
|
|
+ let examList = device_info.value?.project_list.map((item: any) => {
|
|
|
+ return item.exam_name;
|
|
|
+ })
|
|
|
await proxy?.$http.train.projectList().then((res: any) => {
|
|
|
projectList.value = proxy?.$utils.getProject(res.exams).filter((item: any) => {
|
|
|
//只显示能开的
|
|
|
- return item.area.length > 0;
|
|
|
+ return item.area.length > 0 && examList.includes(item.key);
|
|
|
});
|
|
|
+ console.log("projectList.value", projectList.value)
|
|
|
});
|
|
|
};
|
|
|
|
|
@@ -113,7 +117,7 @@ const slideNext = () => {
|
|
|
const confirm = () => {
|
|
|
let project = projectList.value[mySwiper.value.realIndex];
|
|
|
console.log("project", project)
|
|
|
- let obj = device_info.value.project_list.find((item) => {
|
|
|
+ let obj = device_info.value.project_list.find((item: any) => {
|
|
|
return item.exam_name == project.key;
|
|
|
})
|
|
|
if (obj == undefined) {
|
|
@@ -222,10 +226,10 @@ onBeforeMount(() => {
|
|
|
if (e?.device_info) {
|
|
|
console.log("e.device_info", e.device_info)
|
|
|
device_info.value = e.device_info
|
|
|
+ getInitExam();
|
|
|
getHandWs();
|
|
|
}
|
|
|
});
|
|
|
- getInitExam();
|
|
|
})
|
|
|
onMounted(() => {
|
|
|
|
|
@@ -299,6 +303,10 @@ $waiPadding: 6.51rem;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ .swiper {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+
|
|
|
.swiper-slide {
|
|
|
transform: scale(0.8);
|
|
|
transition: all 0.3s ease-in-out;
|