Browse Source

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

lsc 1 ngày trước cách đây
mục cha
commit
3be7c5b7f4

+ 45 - 13
src/components/pages/components/exportDataDialog.vue

@@ -119,11 +119,9 @@
               />
             </div>
             <div class="zhBlockCon2">
-              <!-- <span>语文</span>
-              <span>数学</span>
-              <span>英语</span>
-              <span>化学</span>
-              <span>美术</span> -->
+              <div>
+               <span v-for="(i,index) in subject" :key="index">{{ i }}</span>
+              </div>
             </div>
           </div>
         </div>
@@ -273,6 +271,8 @@ export default {
       // 处理过的分组
       TeaStuInt2: [1, 3, 5, 4, 10, 13, 15],
 
+      subject:[],
+
       data3: [],
       data4: [],
       data5: [],
@@ -472,6 +472,7 @@ export default {
       });
     },
     async getData() {
+      this.subject=[]
       let params = {
         cid: this.cid,
         uid: this.worksDialogCon2.userid,
@@ -484,6 +485,9 @@ export default {
             this.cState = res.data[0][0].state;
             this.courseTit = res.data[0][0].title;
 
+            let sub = res.data[9][0].subject
+            this.subject = sub.split(',')
+
             this.imgList.forEach(e => {
               if (e.schoolId == this.oid) {
                 this.schoolImg = e;
@@ -1119,7 +1123,10 @@ export default {
         },
         xAxis: {
           type: "category",
-          data: this.stageList.map(item => item)
+          data: this.stageList.map(item => item),
+          axisTick: {
+            alignWithLabel: true // 使刻度线和标签对齐
+        }
         },
         yAxis: {
           type: "value",
@@ -1156,7 +1163,10 @@ export default {
         },
         xAxis: {
           type: "category",
-          data: this.stageList.map(item => item)
+          data: this.stageList.map(item => item),
+          axisTick: {
+            alignWithLabel: true // 使刻度线和标签对齐
+        }
         },
         yAxis: {
           type: "value",
@@ -1235,7 +1245,10 @@ export default {
         },
         xAxis: {
           type: "category",
-          data: this.stageList.map(item => item)
+          data: this.stageList.map(item => item),
+          axisTick: {
+            alignWithLabel: true // 使刻度线和标签对齐
+        }
         },
         yAxis: {
           type: "value",
@@ -1272,7 +1285,10 @@ export default {
         },
         xAxis: {
           type: "category",
-          data: this.stageList.map(item => item)
+          data: this.stageList.map(item => item),
+          axisTick: {
+            alignWithLabel: true // 使刻度线和标签对齐
+        }
         },
         yAxis: {
           type: "value",
@@ -1309,7 +1325,10 @@ export default {
         },
         xAxis: {
           type: "category",
-          data: this.stageList.map(item => item)
+          data: this.stageList.map(item => item),
+          axisTick: {
+            alignWithLabel: true // 使刻度线和标签对齐
+        }
         },
         yAxis: {
           type: "value",
@@ -1524,16 +1543,28 @@ export default {
 }
 .zhBlockCon2 {
   display: flex;
-  flex-wrap: wrap;
+  flex-direction: column;
+  justify-content: space-between;
+  /* flex-wrap: wrap; */
+  flex: 1;
   overflow: hidden;
 }
-.zhBlockCon2 > span {
+.zhBlockCon2 > div {
+
+  display: flex;
+  flex-wrap: wrap;
+
+  flex: 1;
+}
+.zhBlockCon2 > div >span{
   font-size: 8px;
   font-weight: 400;
   color: rgba(0, 0, 0, 0.9);
   background-color: rgba(243, 247, 253, 1);
   border-radius: 2px;
-  padding: 1px 4px;
+  padding: 0px 4px;
+  height: 15px;
+  line-height: 15px;
   box-sizing: border-box;
   margin-right: 4px;
   margin-bottom: 2px;
@@ -1541,6 +1572,7 @@ export default {
 .zxt {
   height: 300px;
   width: 100%;
+  border: 1px solid #ccc;
   margin: 10px 0;
   background-color: rgba(255, 255, 255, 1);
   padding: 10px 0;

+ 3 - 1
src/components/pages/components/exportWorksDialog.vue

@@ -458,7 +458,9 @@
                           v-for="(r, tarIndex) in item.data"
                           :key="tarIndex"
                         >
-                          <span> {{ r.target }}</span>
+                        <span v-if="state == 5"> {{ r.target }}</span>
+                        <span v-else> {{ r.target[r.target.length-1] }}</span>
+                          <!-- <span> {{ r.target }}</span> -->
                         </div>
                       </div>
                     </div>

+ 21 - 3
src/components/pages/components/worksDetail2.vue

@@ -1408,10 +1408,18 @@
 
                             <el-rate
                               class="rate_size"
+                              v-if="worksDetail[sIndex].state == 5"
                               style="min-width: 120px"
                               v-model="worksDetail[sIndex].rateList[item.detail]"
                               @change="getStar(sIndex)"
                             ></el-rate>
+                            <el-rate
+                              class="rate_size"
+                              v-else
+                              style="min-width: 120px"
+                              v-model="worksDetail[sIndex].rateList[item.value]"
+                              @change="getStar(sIndex)"
+                            ></el-rate>
                           </div>
                         </div>
                         <div class="worksTarget" v-if="isShow(worksDetail[sIndex].eList)"><span>目标</span></div>
@@ -2713,7 +2721,11 @@ export default {
                 result[l].eList = eList;
                 for (var i = 0; i < eList.length; i++) {
                   _ooption.push({ value: 0, name: eList[i].value });
-                  result[l].rateList[eList[i].detail] = 0;
+                  if (this.DState == 5) {
+                    result[l].rateList[eList[i].detail] = 0;                          
+                  }else{
+                    result[l].rateList[eList[i].value] = 0;                          
+                  }
                 }
                 result[l].rateList.content = "";
                 this.ooption[l] = _ooption;
@@ -2766,7 +2778,11 @@ export default {
                     
                       for (var i = 0; i < eList.length; i++) {
                         _ooption.push({ value: 0, name: eList[i].value });
-                        result[l].rateList[eList[i].detail] = 0;
+                        if (this.DState == 5) {
+                          result[l].rateList[eList[i].detail] = 0;                          
+                        }else{
+                          result[l].rateList[eList[i].value] = 0;                          
+                        }
                       }
                       result[l].rateList.content = "";
                       this.ooption[l] = _ooption;
@@ -3195,7 +3211,7 @@ export default {
     },
     updatePj() {
       for (var i = 0; i < this.worksDetail.length; i++) {
-        if (!this.worksDetail[i].eList.length) {
+        if (this.worksDetail[i].eList && !this.worksDetail[i].eList.length) {
           continue;
         }
         this.updateWorks(
@@ -3243,6 +3259,8 @@ export default {
         rate: rateList,
         uid: this.studentId,
       };
+      // return console.log('params',params);
+      
       const k = i;
       this.ajax
         .get(this.$store.state.api + "updateWorksEva", params)

+ 10 - 10
src/components/pages/works.vue

@@ -566,19 +566,19 @@ export default {
     // 一键导出pdf
     exportPdfSetAllBtn(){
 
-      // this.$confirm("是否导出全部学生报告?批量打印需要等待一会哦。", "提示", {
-      //   confirmButtonText: "确定",
-      //   cancelButtonText: "取消",
-      //   type: "warning",
-      // })
-      // .then(() => {
+      this.$confirm("是否导出全部学生报告?批量打印需要等待一会哦。", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+      .then(() => {
         this.worksDialog = true;
         this.digNum = 1
         this.exportW++
-      // })
-      // .catch(_ => {
-      //   this.$confirm.visible=false
-      // })
+      })
+      .catch(_ => {
+        this.$confirm.visible=false
+      })
      
       
     },