فهرست منبع

修改测试温馨提示和新版本学生

plg 1 ماه پیش
والد
کامیت
35985021cc

BIN
src/assets/zs/more test@2x.png


+ 1 - 1
src/stores/modules/userInfo.ts

@@ -28,7 +28,7 @@ const userInfoStore = defineStore(
     //将通过状态改变为通过false
     const saveIspass = (flag: string) => {
       //这个是形状知觉的练习测试通过标志
-      if (flag == '') {
+      if (flag == 'SHAPE_RANDOM') {
         isPass.value = true;
       } else if (flag == 'ETB01') {
         isPassETB01.value = true;

+ 11 - 0
src/views/Cognize.vue

@@ -44,6 +44,9 @@ onMounted(() => {
     if (flag.value == 'EMOTION_STROOP') {
         isPass.value = userInfoStore().isStroop
     }
+    if (flag.value == 'SHAPE_RANDOM') {
+        isPass.value = userInfoStore().isPass
+    }
     //根据flag 查询认知任务详情
 
     //进到界面开始轮询
@@ -122,6 +125,14 @@ const startCog = (val: number) => {
                 params: { planId: planId.value, planName: planName.value, flag: flag.value, flagName: cognizeDetail.value.name, formalTest: val }
             })
     }
+    if (flag.value == 'SHAPE_RANDOM') {
+        router.push(
+            {
+                name: 'shapeIntuitionRandom',
+                params: { planId: planId.value, planName: planName.value, flag: flag.value, flagName: cognizeDetail.value.name, formalTest: val }
+            })
+    }
+
 
 
 

+ 67 - 16
src/views/Report.vue

@@ -50,6 +50,7 @@ const option = reactive({
         center: ['50%', '50%'],
         shape: 'square', //设置雷达图形状,值有circle、square,默认为方形
         splitNumber: 3, // 雷达图圈数设置
+        radius: 80,
         // shape: 'circle',
         indicator: echarts_name_list.value,
         name: { //修改indicator文字的颜色
@@ -262,26 +263,35 @@ onUnmounted(() => {
                     <div>
                         <div>
                             <div class="report_result_top">
-                                <div style="font-size: 20px;font-weight: 700;margin-bottom: 4px;"> {{ planName }}-测评结果
-                                </div>
+                                <div>
+                                    <div style="font-size: 20px;font-weight: 700;margin-bottom: 4px;"> {{ planName
+                                        }}-测评结果
+                                    </div>
 
-                                <div class="report_totol_score">
-                                    <div class="totol_result_des" v-if="reportData.length > 0">
-                                        结论:{{ reportData[0].dimensionAnalysis }}
+                                    <div class="report_totol_score">
+                                        <div class="totol_result_des" v-if="reportData.length > 0">
+                                            结论:{{ reportData[0].dimensionAnalysis }}
+                                        </div>
                                     </div>
                                 </div>
+
                                 <div class="report_echarts_out">
-                                    <div ref="echarts_ld"
-                                        style="width:300px;height:300px;background:#F7F9FB;margin-right: 10px;border-radius: 20px;"
-                                        v-show="!(goFlag == 'SHAPE_RANDOM' || goFlag == 'ETB01' || goFlag == 'FDOT' || goFlag == 'EMOTION_STROOP')">
+                                    <div
+                                        style="display: flex;flex-direction: column;background-color: #F7F9FB;border-radius: 20px;margin-right: 20px;justify-content: center;">
+
+                                        <div ref="echarts_ld"
+                                            style="width:350px;height:350px;margin-right: 10px;border-radius: 20px;"
+                                            v-show="!(goFlag == 'SHAPE_RANDOM' || goFlag == 'ETB01' || goFlag == 'FDOT' || goFlag == 'EMOTION_STROOP')">
+                                        </div>
                                     </div>
+                                    <!-- style="display: flex;flex-direction: column;align-items: center;flex: 1;height: 100%; box-sizing: border-box;padding: 10px; justify-content: space-around;background:#F7F9FB ;border-radius: 20px;" -->
                                     <div
-                                        style="display: flex;flex-direction: column;align-items: center;flex: 1;height: 300px; box-sizing: border-box;padding: 10px; justify-content: space-around;background:#F7F9FB ;border-radius: 20px;">
+                                        style="background-color: #B2EDFF;display: flex;flex-direction: column;align-items: center;flex: 1;height: 100%; box-sizing: border-box;padding: 10px; justify-content: space-around;background:#F7F9FB ;border-radius: 20px;">
                                         <div class="progress_out" v-for="item, index in echarts_name_list">
                                             <span class="progress_out_name" style="width:150px">
                                                 {{ item.name }}
                                             </span>
-                                            <!-- color="linear-gradient(to right,#4BF6AC ,#00DE7E)" -->
+
                                             <el-progress :percentage="echarts_data_list[index]" style="width:100%"
                                                 :stroke-width="18" :show-text='false' color="#FE75D8" />
                                             <span class="progress_out_score">{{ echarts_data_list[index] }}<span
@@ -289,6 +299,10 @@ onUnmounted(() => {
                                         </div>
                                     </div>
                                 </div>
+                                <!-- <div class="container">
+                                    <div class="left">Left Content</div>
+                                    <div class="right">Right Content</div>
+                                </div> -->
 
                             </div>
 
@@ -342,6 +356,32 @@ onUnmounted(() => {
 
 </template>
 <style lang="scss" scoped>
+// .container {
+//     display: flex;
+//     height: 100%;
+// }
+
+
+// .right {
+//     /* Flexbox 的默认行为会使子元素拉伸以填满父容器的高度,
+//        所以这里其实不需要显式设置 height: 100%;,
+//        但如果你想要更明确,也可以加上。 */
+//     /* height: 100%; */
+//     flex: 1;
+//     /* 这使得左右两个 div 平分父容器的宽度 */
+// }
+
+// /* 可选:添加一些样式以便更好地看到效果 */
+// .left {
+//     background-color: lightblue;
+// }
+
+// .right {
+//     height: 400px;
+//     background-color: lightcoral;
+// }
+
+
 .home_header_out {
     // position: relative;
     scroll-snap-align: center;
@@ -424,14 +464,18 @@ onUnmounted(() => {
             width: 860px;
             // min-height: 500px;   
 
-            background-color: #ffffff;
+            background-color: transparent;
             border-radius: 40px;
 
             .report_result_top {
+                background-color: #ffffff;
                 box-sizing: border-box;
                 padding: 36px 30px;
                 box-shadow: 0px 4px 32px 0px rgba(0, 0, 0, 0.09);
                 border-radius: 40px;
+                height: 100%;
+                display: flex;
+                flex-direction: column;
 
                 .report_totol_score {
                     // margin-top: 20px;
@@ -476,15 +520,21 @@ onUnmounted(() => {
 
             .report_echarts_out {
                 margin-top: 20px;
-                border-radius: 40px;
+                // border-radius: 40px;
+                // display: flex;
+                // flex-direction: row;
+                // justify-content: space-between;
+                // align-items: center;
+                // height: 100%;
+                // flex: 1;
                 display: flex;
-                flex-direction: row;
-                justify-content: space-between;
-                align-items: center;
+                height: 100%;
+                // background-color: #000000;
 
                 // height: 200px;
                 .progress_out {
-                    margin-bottom: 20px;
+                    margin-top: 10px;
+                    margin-bottom: 10px;
                     width: 100%;
                     display: flex;
                     justify-content: start;
@@ -526,6 +576,7 @@ onUnmounted(() => {
             }
 
             .report_des_out {
+                background-color: #ffffff;
                 margin-top: 5px;
                 // background-color: #F7F7F7;
                 // border: 4px solid #F7F7F7;

+ 27 - 29
src/views/Scale.vue

@@ -79,13 +79,13 @@ const topicIndex = ref<number>(1)
 //有三个储存数组分别储存
 
 //抑郁自评量表
-//抑郁自评量表flag是"20210617000138"
+//抑郁自评量表flag是"20210617020516"
 const listDepressed = ref<any>([])
 //知觉压力问卷
-//知觉压力量表flag是"20210617121646"
+//知觉压力量表flag是"20210913093250"
 const listStress = ref<any>([])
 //焦虑自评量表
-//焦虑自评量表flag是"20220515221429"
+//焦虑自评量表flag是"20210617000853"
 const listAnxiety = ref<any>([])
 
 
@@ -108,56 +108,56 @@ const nextTopic = () => {
     //已经选择的话---需要拿到当前对象---判断flag是另外三个的flag吗
     //如果是--则判断是否在数组里边--如果不在则存储
     //将抑郁自评量表的数据存储进数组
-    if (scaleList.value[topicIndex.value - 1].flag == '20210617000138' && !listDepressed.value.includes(scaleList.value[topicIndex.value - 1].id)) {
+    if (scaleList.value[topicIndex.value - 1].flag == '20210617020516' && !listDepressed.value.includes(scaleList.value[topicIndex.value - 1].id)) {
         listDepressed.value.push(scaleList.value[topicIndex.value - 1].id)
         //判断抑郁压力数组的长度是20 调用保存接口
         //循环到数组 当前中所有flag 等于抑郁自评量表的数组--然后传输给保存方法
         //判断此数组长度是多少
-        if (listDepressed.value.length == 14) {
+        if (listDepressed.value.length == 20) {
             let list = []
             for (let i = 0; i < scaleList.value.length; i++) {
-                if (scaleList.value[i].flag == '20210617000138') {
+                if (scaleList.value[i].flag == '20210617020516') {
                     list.push(scaleList.value[i])
                 }
             }
             let listTm = JSON.parse(JSON.stringify(list))
-            subScaleData(listTm, "20210617000138")
+            subScaleData(listTm, "20210617020516")
         }
 
 
     }
     //将知觉压力问卷的数据存储进数组
 
-    if (scaleList.value[topicIndex.value - 1].flag == '20210617121646' && !listStress.value.includes(scaleList.value[topicIndex.value - 1].id)) {
+    if (scaleList.value[topicIndex.value - 1].flag == '20210913093250' && !listStress.value.includes(scaleList.value[topicIndex.value - 1].id)) {
         listStress.value.push(scaleList.value[topicIndex.value - 1].id)
         //调用知觉压力数据保存接口
         //如果长度达到指定数目
-        if (listStress.value.length == 21) {
+        if (listStress.value.length == 30) {
             let list = []
             for (let i = 0; i < scaleList.value.length; i++) {
-                if (scaleList.value[i].flag == '20210617121646') {
+                if (scaleList.value[i].flag == '20210913093250') {
                     list.push(scaleList.value[i])
                 }
             }
             let listTm = JSON.parse(JSON.stringify(list))
 
-            subScaleData(listTm, "20210617121646")
+            subScaleData(listTm, "20210913093250")
         }
 
     }
     //将焦虑自评量的数据存储进数组
-    if (scaleList.value[topicIndex.value - 1].flag == '20220515221429' && !listAnxiety.value.includes(scaleList.value[topicIndex.value - 1].id)) {
+    if (scaleList.value[topicIndex.value - 1].flag == '20210617000853' && !listAnxiety.value.includes(scaleList.value[topicIndex.value - 1].id)) {
         listAnxiety.value.push(scaleList.value[topicIndex.value - 1].id)
         //调用焦虑
-        if (listAnxiety.value.length == 14) {
+        if (listAnxiety.value.length == 20) {
             let list = []
             for (let i = 0; i < scaleList.value.length; i++) {
-                if (scaleList.value[i].flag == '20220515221429') {
+                if (scaleList.value[i].flag == '20210617000853') {
                     list.push(scaleList.value[i])
                 }
             }
             let listTm = JSON.parse(JSON.stringify(list))
-            subScaleData(listTm, "20220515221429")
+            subScaleData(listTm, "20210617000853")
         }
 
     }
@@ -167,11 +167,11 @@ const nextTopic = () => {
     if (topicIndex.value == scaleList.value.length) {
         // 最后一题就进行提交了
         //判断不是这三个的话
-        if (scaleList.value[topicIndex.value - 1].flag != '20210617000138' && scaleList.value[topicIndex.value - 1].flag != '20210617121646' && scaleList.value[topicIndex.value - 1].flag != '20220515221429') {
+        if (scaleList.value[topicIndex.value - 1].flag != '20210617020516' && scaleList.value[topicIndex.value - 1].flag != '20210913093250' && scaleList.value[topicIndex.value - 1].flag != '20210617000853') {
             let listTm = JSON.parse(JSON.stringify(scaleList.value))
             subScaleData(listTm, flag.value)
         }
-        // subScaleData(listTm, "20220515221429")
+        // subScaleData(listTm, "20210617000853")
         return
     }
     topicIndex.value++
@@ -221,7 +221,7 @@ const subScaleData = async (data: any, flag: string) => {
 
     //判断当前 flag 是可选的三个吗
     //如果是的话---
-    if (flag == '20210617000138' || flag == '20210617121646' || flag == '20220515221429') {
+    if (flag == '20210617020516' || flag == '20210913093250' || flag == '20210617000853') {
         //判断是否是做完了
         if (topicIndex.value == scaleList.value.length) {
             //这时是全部的都做完了
@@ -233,11 +233,11 @@ const subScaleData = async (data: any, flag: string) => {
             router.push({ name: 'plan' })
         }
     }
-    if (flag == '20210713155333') {
+    if (flag == '20210617140713') {
 
         queryNeedScale()
         //如果是排除是其他两个则直接返回
-    } else if (flag != '20210617000138' && flag != '20210617121646' && flag != '20220515221429') {
+    } else if (flag != '20210617020516' && flag != '20210913093250' && flag != '20210617000853') {
         //此时做完需要跳转到计划页面
         ElMessage({
             message: '提交完成',
@@ -298,7 +298,7 @@ const sclIsCom = async () => {
 
         for (let i = 0; i < planObj.value.list.length; i++) {
             //先判断类型--在判断必做且不显示的---将这个写存储在数组
-            if (planObj.value.list[i].flag == '20210713155333') {
+            if (planObj.value.list[i].flag == '20210617140713') {
                 if (planObj.value.list[i].isCompleted == '1') {
                     isComplate.value = '2';
                 }
@@ -473,7 +473,7 @@ const radioFun = () => {
             }
             if (timeTotal < 1000 * 5) {
                 //需要弹出框
-                cpdmTip.value.open({ type: 1, message: '请认真答题' })
+                cpdmTip.value.open({ type: 1, message: '点击过快,请认真答题' })
                 countTime.value = 0;
                 listTime.value = []
             } else {
@@ -521,7 +521,7 @@ onMounted(async () => {
     isComplate.value = route.params.isComplate as string
     //进到界面开始轮询
     // 判断是否SCL90
-    if (flag.value == '20210713155333') {
+    if (flag.value == '20210617140713') {
         //在这里判断scl90是否是已完成
 
         await sclIsCom()
@@ -572,7 +572,6 @@ onUnmounted(() => {
 
 
 
-
 </script>
 
 <template>
@@ -594,11 +593,10 @@ onUnmounted(() => {
 
                 <div class="report_top">
                     <div class="report_jt">
-                        <span v-if="!(flag == '20210713155333' && isComplate == '2')" style="color:#30D5DD ;">{{
-                            flagName
-                            }}</span>
-                        <span v-if="flag == '20210713155333' && isComplate == '2'" style="color:#30D5DD ;">
-                            抑郁-焦虑-压力量表(附加题)</span>
+                        <span v-if="!(flag == '20210617140713' && isComplate == '2')" style="color:#30D5DD ;">{{
+                            flagName }}</span>
+                        <span v-if="flag == '20210617140713' && isComplate == '2'" style="color:#30D5DD ;">
+                            心理健康测评基础量表(附加题)</span>
                         <span v-show="!isCompleted" class="des">请根据您的表现回答下列问题,每道题请选择最符合您的情况的选项。</span>
                     </div>
                     <!-- <img v-show="!isCompleted" class="xlts_img" src="../assets/scale/scale.png" /> -->

+ 7 - 3
src/views/TestRecord.vue

@@ -92,9 +92,13 @@ const initData = async () => {
                 let scaleList = []
                 for (let j = 0; j < temp.data.length; j++) {
                     if (temp.data[j].isDisplayed == '1' && temp.data[j].contentType == '0') {
-                        if (temp.data[j].flag != '20210617140713') {
-                            scaleList.push(temp.data[j])
-                        }
+                        // if (temp.data[j].flag != '20210617140713') {
+                        //     scaleList.push(temp.data[j])
+                        // }
+                        // if (temp.data[j].flag != '20210617140713') {
+                        //     scaleList.push(temp.data[j])
+                        // }
+                        scaleList.push(temp.data[j])
                     }
                 }
                 listInit[i].scaleList = scaleList;

+ 1 - 1
src/views/shapeIntuition_random.vue

@@ -300,7 +300,7 @@ export default {
 
         if (this.userRightResponseCount / this.userTestPicList.length >= 0.8) {
           //设置状态为true
-          userInfo.saveIspass()
+          userInfo.saveIspass('SHAPE_RANDOM')
           this.$message({
             message: `练习测试通过!正确率为${this.userRightResponseCount / this.userTestPicList.length * 100}%`,
             type: "success",