|
@@ -9,11 +9,15 @@ const router = useRouter()
|
|
|
import { menuStatusStore, userInfoStore } from '@/stores'
|
|
|
import { isHaveManage } from '@/utils/test';
|
|
|
import { userPlanApi, userPlanDetailApi } from '@/api/home';
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
const userInfo = userInfoStore();
|
|
|
const menuStatus = menuStatusStore();
|
|
|
menuStatus.saveActiveIndex('4')
|
|
|
|
|
|
|
|
|
+//标志 设置--方法是否结束的标志
|
|
|
+const isFinshed = ref<boolean>(false)
|
|
|
+
|
|
|
//定义计划列表数据
|
|
|
const planList = ref<any>([
|
|
|
|
|
@@ -30,6 +34,16 @@ const planList = ref<any>([
|
|
|
// }
|
|
|
//点击了开始测试--跳转到测试页面
|
|
|
const startPlan = (val: any) => {
|
|
|
+ //判断是否登录了
|
|
|
+ console.log(userInfo.token == '')
|
|
|
+ if (userInfo.token == '') {
|
|
|
+ ElMessage({
|
|
|
+ message: '请先登录',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
let flag = ''
|
|
|
let num = 1
|
|
|
let flagName = ''
|
|
@@ -104,6 +118,7 @@ const startPlan = (val: any) => {
|
|
|
}
|
|
|
|
|
|
const planNumGet = async () => {
|
|
|
+ isFinshed.value = false
|
|
|
//如果在就是登录了
|
|
|
if (userInfo.token) {
|
|
|
let userNo = ''
|
|
@@ -129,9 +144,8 @@ const planNumGet = async () => {
|
|
|
planList.value[i].list = temp.data
|
|
|
}
|
|
|
console.log(planList.value)
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
+ isFinshed.value = true
|
|
|
}
|
|
|
//刚进入页面就将高度设置为页面需要的
|
|
|
onMounted(() => {
|
|
@@ -163,8 +177,8 @@ onUnmounted(() => {
|
|
|
<div class="kply">
|
|
|
<div class="kply_inner">
|
|
|
<div>
|
|
|
- <div style="padding: 20px 40px;" v-show="planList.length == 0">
|
|
|
- <div style="padding:10% 20% ;" v-show="planList.length == 0">
|
|
|
+ <div style="padding: 20px 40px;" v-show="planList.length == 0 && isFinshed">
|
|
|
+ <div style="padding:10% 20% ;" v-show="planList.length == 0 && isFinshed">
|
|
|
<img width="100%" src="../assets/planNo.png">
|
|
|
</div>
|
|
|
</div>
|
|
@@ -318,7 +332,7 @@ onUnmounted(() => {
|
|
|
right: 0;
|
|
|
margin: auto;
|
|
|
width: 1200px;
|
|
|
- min-height: 500px;
|
|
|
+ min-height: 600px;
|
|
|
background-color: #FAFAFA;
|
|
|
border-radius: 40px;
|
|
|
// height: 1000px;
|