|
@@ -13,16 +13,12 @@ import { ElMessage } from 'element-plus';
|
|
const userInfo = userInfoStore();
|
|
const userInfo = userInfoStore();
|
|
const menuStatus = menuStatusStore();
|
|
const menuStatus = menuStatusStore();
|
|
menuStatus.saveActiveIndex('4')
|
|
menuStatus.saveActiveIndex('4')
|
|
-
|
|
|
|
-
|
|
|
|
//标志 设置--方法是否结束的标志
|
|
//标志 设置--方法是否结束的标志
|
|
const isFinshed = ref<boolean>(false)
|
|
const isFinshed = ref<boolean>(false)
|
|
-
|
|
|
|
//定义计划列表数据
|
|
//定义计划列表数据
|
|
const planList = ref<any>([
|
|
const planList = ref<any>([
|
|
|
|
|
|
])
|
|
])
|
|
-
|
|
|
|
//时间格式化 1000 60 60
|
|
//时间格式化 1000 60 60
|
|
// const formatterTi = (val: number) => {
|
|
// const formatterTi = (val: number) => {
|
|
// let mill = Math.floor(val / 1000)
|
|
// let mill = Math.floor(val / 1000)
|
|
@@ -34,6 +30,74 @@ const planList = ref<any>([
|
|
// }
|
|
// }
|
|
//点击了开始测试--跳转到测试页面
|
|
//点击了开始测试--跳转到测试页面
|
|
const startPlan = (val: any) => {
|
|
const startPlan = (val: any) => {
|
|
|
|
+ let nextFlag = '';
|
|
|
|
+ let type = '';
|
|
|
|
+ if (val.scaleList.length > 0) {
|
|
|
|
+ //循环判断是否都完成了
|
|
|
|
+ for (let i = 0; i < val.scaleList.length; i++) {
|
|
|
|
+ if (val.scaleList[i].isCompleted != '1') {
|
|
|
|
+ nextFlag = val.scaleList[i].flag;
|
|
|
|
+ type = val.scaleList[i].contentType;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //当标志是空的时候证明所有量表的问答测试都已经完成了
|
|
|
|
+ //接下就需要判断认知任务的完成情况了
|
|
|
|
+ if (nextFlag == '') {
|
|
|
|
+ //那就需要判断是否是 认知任务是否做完了
|
|
|
|
+ for (let i = 0; i < val.taskList.length; i++) {
|
|
|
|
+ if (val.taskList[i].isCompleted !== '1') {
|
|
|
|
+ nextFlag = val.taskList[i].flag;
|
|
|
|
+ type = val.taskList[i].contentType;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ //那就需要
|
|
|
|
+ //假如没做完的---判断是flag 是否是scl90
|
|
|
|
+ if (nextFlag == "20210617140713") {
|
|
|
|
+ //设置---
|
|
|
|
+ //判断scl 90 的完成状态是0还是2
|
|
|
|
+ for (let i = 0; i < val.scaleList.length; i++) {
|
|
|
|
+ if (val.scaleList[i].flag == '20210617140713') {
|
|
|
|
+ if (val.scaleList[i].isCompleted == '0') {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if (val.scaleList[i].isCompleted == '2') {
|
|
|
|
+ //如果是2的话
|
|
|
|
+ //几个量表
|
|
|
|
+ //拿到
|
|
|
|
+ //需要--找到下一个需要做的不展示但是需要必测的
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //如果是量表就开始跳转到量表页面
|
|
|
|
+ //判断是type 0还是1
|
|
|
|
+ //如果是0的话,需要跳转到量表中间页面
|
|
|
|
+ if (type == '0') {
|
|
|
|
+ //跳转量表中间页
|
|
|
|
+ //传输
|
|
|
|
+ router.push({
|
|
|
|
+ name: 'scaleDetail', params: {
|
|
|
|
+ planId: val.id,
|
|
|
|
+ planName: val.planName,
|
|
|
|
+ flag: nextFlag,
|
|
|
|
+ type: type
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ //跳转到认知任务中间页
|
|
|
|
+ }
|
|
|
|
+ //如果是1的话,需要跳转到认知任务中间页面
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //先判断量表接口中是否都完成了
|
|
|
|
+ //如果量表接口都完成了
|
|
|
|
+ //则开始循环认知任务接口
|
|
|
|
+ debugger;
|
|
let a = true
|
|
let a = true
|
|
if (a) {
|
|
if (a) {
|
|
ElMessage({
|
|
ElMessage({
|
|
@@ -107,23 +171,7 @@ const startPlan = (val: any) => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
- //开始跳转页面
|
|
|
|
- //带上计划编号--计划名称
|
|
|
|
- //以及flag
|
|
|
|
}
|
|
}
|
|
- //取到当前计划的下变的字段
|
|
|
|
- //然后循环查看是该做第几个了
|
|
|
|
-
|
|
|
|
- //点击了开始跳转到量表测试页面
|
|
|
|
- // if (val == 1) {
|
|
|
|
- // router.push({ name: 'scale' })
|
|
|
|
- // } else if (val == 2) {
|
|
|
|
- // router.push({ name: 'cognize', params: { id: 2 } })
|
|
|
|
- // } else {
|
|
|
|
- // router.push({ name: 'cognize', params: { id: 3 } })
|
|
|
|
- // }
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
const planNumGet = async () => {
|
|
const planNumGet = async () => {
|
|
@@ -139,7 +187,6 @@ const planNumGet = async () => {
|
|
//调用根据用户查询计划的API
|
|
//调用根据用户查询计划的API
|
|
let res: any = await userPlanApi(userNo)
|
|
let res: any = await userPlanApi(userNo)
|
|
|
|
|
|
-
|
|
|
|
userInfo.savePlanCurrentNum(res.data.length)
|
|
userInfo.savePlanCurrentNum(res.data.length)
|
|
planList.value = res.data
|
|
planList.value = res.data
|
|
|
|
|
|
@@ -152,7 +199,61 @@ const planNumGet = async () => {
|
|
let temp: any = await userPlanDetailApi(params)
|
|
let temp: any = await userPlanDetailApi(params)
|
|
planList.value[i].list = temp.data
|
|
planList.value[i].list = temp.data
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //-------------处理SCL90的完成状态----------------
|
|
|
|
+ for (let i = 0; i < planList.value.length; i++) {
|
|
|
|
+ //
|
|
|
|
+
|
|
|
|
+ if (planList.value[i].list.length > 0) {
|
|
|
|
+ planList.value[i].scaleList = []
|
|
|
|
+ planList.value[i].taskList = []
|
|
|
|
+ //判断是否有----不显示必做但是必做未完成的
|
|
|
|
+ let flag = false
|
|
|
|
+ for (let j = 0; j < planList.value[i].list.length; j++) {
|
|
|
|
+ //
|
|
|
|
+ //不需要展示--但是必做--且含有未完成的
|
|
|
|
+ if (planList.value[i].list[j].isDisplayed == '0'
|
|
|
|
+ && planList.value[i].list[j].isAvailable == '1'
|
|
|
|
+ && planList.value[i].list[j].isCompleted == '0') {
|
|
|
|
+ flag = true
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //判断是否是SCL90的flag
|
|
|
|
+ //如果是SCL的Flag则判断其完成状态
|
|
|
|
+ //如果完成状态是0则正常开始
|
|
|
|
+ //如果完成状态为1,则判断后边的到底有没有必做不显示但是其中有未完成的
|
|
|
|
+ //如果完成状态为1,则判断后边的到底有没有必做不显示但是其中有未完成的
|
|
|
|
+ }
|
|
|
|
+ for (let j = 0; j < planList.value[i].list.length; j++) {
|
|
|
|
+ //不需要展示--但是必做--且含有未完成的
|
|
|
|
+ if (flag) {
|
|
|
|
+ if (planList.value[i].list[j].flag == "20210617140713" && planList.value[i].list[j].isCompleted == "1") {
|
|
|
|
+ //如果满足以上条件则scl90的状态切换为2 --也是未完成--但是预示着后边还有需要做的
|
|
|
|
+ planList.value[i].list[j].isCompleted = '2'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (planList.value[i].list[j].contentType == '0' && planList.value[i].list[j].isAvailable == '1') {
|
|
|
|
+ console.log(planList.value[i].list[j])
|
|
|
|
+ planList.value[i].scaleList.push(planList.value[i].list[j])
|
|
|
|
+ }
|
|
|
|
+ if (planList.value[i].list[j].contentType == '1' && planList.value[i].list[j].isAvailable == '1') {
|
|
|
|
+ console.log(planList.value[i].list[j])
|
|
|
|
+ planList.value[i].taskList.push(planList.value[i].list[j])
|
|
|
|
+ }
|
|
|
|
+ //判断是否是SCL90的flag
|
|
|
|
+ //如果是SCL的Flag则判断其完成状态
|
|
|
|
+ //如果完成状态是0则正常开始
|
|
|
|
+ //如果完成状态为1,则判断后边的到底有没有必做不显示但是其中有未完成的
|
|
|
|
+ //如果完成状态为1,则判断后边的到底有没有必做不显示但是其中有未完成的
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log("planList.value")
|
|
console.log(planList.value)
|
|
console.log(planList.value)
|
|
|
|
+ //数据格式改变抽出需要展示的量表、、放入数组
|
|
|
|
+ //抽出需要展示的认知任务--放入数组
|
|
|
|
+
|
|
}
|
|
}
|
|
isFinshed.value = true
|
|
isFinshed.value = true
|
|
}
|
|
}
|
|
@@ -186,23 +287,17 @@ onUnmounted(() => {
|
|
<div class="kply">
|
|
<div class="kply">
|
|
<div class="kply_inner">
|
|
<div class="kply_inner">
|
|
<div>
|
|
<div>
|
|
- <!-- <div style="padding: 20px 40px;" v-show="planList.length == 0 && isFinshed">
|
|
|
|
- <div style="padding:10% 20% ;" v-show="planList.length == 0 && isFinshed">
|
|
|
|
- <img width="60%" style="margin-left: 20%;" src="../assets/planNo.png">
|
|
|
|
- </div>
|
|
|
|
- </div> -->
|
|
|
|
<div>
|
|
<div>
|
|
-
|
|
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
- <div class="test_record_out" v-for="item in 4">
|
|
|
|
|
|
+ <div class="test_record_out" v-for="item in planList">
|
|
<div class="record_tip">
|
|
<div class="record_tip">
|
|
- <span class="record_tip_out"><span class="record_tip_inner">创建时间:</span>2024/07/26</span>
|
|
|
|
- <span><span class="record_tip_inner">结束时间:</span>2024/07/26</span>
|
|
|
|
|
|
+ <span class="record_tip_out"><span class="record_tip_inner">创建时间:</span>{{ item.createTime
|
|
|
|
+ }}</span>
|
|
|
|
+ <span><span class="record_tip_inner">结束时间:</span>{{ item.planEndTime }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="test_record">
|
|
<div class="test_record">
|
|
<img src="../assets/kepu/task_1.png" />
|
|
<img src="../assets/kepu/task_1.png" />
|
|
- <span>2024年度春季学期计算机与人工智能学院、软件学院测评</span>
|
|
|
|
|
|
+ <span>{{ item.planName }}</span>
|
|
</div>
|
|
</div>
|
|
<div class="test_time">
|
|
<div class="test_time">
|
|
<span>请根据您最近一个月的实际情况,选择最符合自己的选项。所有陈述都无正确和错误之分。所以请您不要再三思考,要根据第一反应诚实作答。</span>
|
|
<span>请根据您最近一个月的实际情况,选择最符合自己的选项。所有陈述都无正确和错误之分。所以请您不要再三思考,要根据第一反应诚实作答。</span>
|
|
@@ -210,47 +305,38 @@ onUnmounted(() => {
|
|
</div>
|
|
</div>
|
|
<div class="content_out">
|
|
<div class="content_out">
|
|
<div class="content_inner">
|
|
<div class="content_inner">
|
|
- <div>
|
|
|
|
|
|
+ <div class="task_out">
|
|
<div class="content_title">1.问答测试</div>
|
|
<div class="content_title">1.问答测试</div>
|
|
- <div class="content_one">
|
|
|
|
- <div class="content_single">
|
|
|
|
- <img style="width: 80px;height: 80px;" src="../assets/kepu/xlwht_active.png"
|
|
|
|
- alt="">
|
|
|
|
- <div class="content_detail">
|
|
|
|
- <div class="title">SCL90</div>
|
|
|
|
- <div class="des">描述</div>
|
|
|
|
|
|
+ <div class="task_inner">
|
|
|
|
+
|
|
|
|
+ <div class="task_inner_single" v-for="subItem in item.scaleList"
|
|
|
|
+ :key="subItem.id">
|
|
|
|
+ <div class="task_inner_one">
|
|
|
|
+ <img style="width: 80px;height: 80px"
|
|
|
|
+ src="../assets/kepu/xlwht_active.png" alt="">
|
|
|
|
+ <div class="task_content">
|
|
|
|
+ <div class="title">{{ subItem.name }}</div>
|
|
|
|
+ <div class="des">预计用时{{ subItem.expectTime }}</div>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-
|
|
|
|
<div class="task_out">
|
|
<div class="task_out">
|
|
<div class="content_title">2.认知评估</div>
|
|
<div class="content_title">2.认知评估</div>
|
|
<div class="task_inner">
|
|
<div class="task_inner">
|
|
- <div class="task_inner_single">
|
|
|
|
|
|
+ <div class="task_inner_single" v-for="subItem in item.taskList">
|
|
<div class="task_inner_one">
|
|
<div class="task_inner_one">
|
|
<img style="width: 80px;height: 80px"
|
|
<img style="width: 80px;height: 80px"
|
|
src="../assets/kepu/xlwht_active.png" alt="">
|
|
src="../assets/kepu/xlwht_active.png" alt="">
|
|
<div class="task_content">
|
|
<div class="task_content">
|
|
- <div class="title">冲动掌控大师</div>
|
|
|
|
- <div class="des">描述</div>
|
|
|
|
|
|
+ <div class="title">{{ subItem.name }}</div>
|
|
|
|
+ <div class="des">预计用时{{ subItem.expectTime }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
- <div class="task_inner_single">
|
|
|
|
- <div class="task_inner_one">
|
|
|
|
- <img style="width: 80px;height: 80px;"
|
|
|
|
- src="../assets/kepu/xlwht_active.png" alt="">
|
|
|
|
- <div class="task_content">
|
|
|
|
- <div class="title">情绪波动探测器</div>
|
|
|
|
- <div class="des">描述</div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -651,7 +737,7 @@ onUnmounted(() => {
|
|
padding: 20px 40px;
|
|
padding: 20px 40px;
|
|
|
|
|
|
.content_title {
|
|
.content_title {
|
|
- margin-bottom: 10px;
|
|
|
|
|
|
+ margin-bottom: 0px;
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
font-size: 18px;
|
|
font-size: 18px;
|
|
}
|
|
}
|
|
@@ -706,9 +792,10 @@ onUnmounted(() => {
|
|
flex-direction: row;
|
|
flex-direction: row;
|
|
|
|
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
|
.task_inner_single {
|
|
.task_inner_single {
|
|
-
|
|
|
|
|
|
+ margin-top: 20px;
|
|
height: 100px;
|
|
height: 100px;
|
|
border-radius: 20px;
|
|
border-radius: 20px;
|
|
width: 45%;
|
|
width: 45%;
|