11wqe1 1 year ago
parent
commit
9498c5ede8

+ 13 - 7
src/components/pages/test/aggregate/index.vue

@@ -40,11 +40,9 @@
       </el-table-column>
 
       <div v-for="item in titList" :key="item.id">
-        <el-table-column
-          align="center"
-          :label="item.name"
-        >
+        <el-table-column align="center" :label="item.name">
           <div v-for="e in allFrom" :key="e.courseId">
+            
             <el-table-column
               v-if="e.typeid == item.id"
               align="center"
@@ -52,6 +50,7 @@
               :label="e.title"
               show-overflow-tooltip
               width="130"
+              :resizable="false"
             >
               <template slot-scope="scope">
                 <div
@@ -227,10 +226,16 @@ export default {
     // 点击表头跳转
     handleHeaderClick(column, event) {
       console.log("表头被点击", column, event);
+
+      let titData = this.titList.map(e => {
+        return e.name;
+      });
+
       if (
         column.label == "教研室" ||
         column.label == "教师姓名" ||
-        column.label == "序号"
+        column.label == "序号" ||
+        titData.includes(column.label)
       ) {
       } else {
         this.$router.push(
@@ -317,7 +322,8 @@ export default {
   display: -webkit-box;
   -webkit-box-orient: vertical;
   overflow: hidden;
-  text-overflow: ellipsis; */
-  /* height: 50px !important; */
+  text-overflow: ellipsis;
+  height: 50px !important; */
 }
+
 </style>

+ 99 - 8
src/components/pages/test/check/index.vue

@@ -63,6 +63,8 @@
               </div>
             </div>
           </div>
+
+          <!-- pc端 查看切换 isDesktop-->
           <div class="search_nav" v-if="isDesktop">
             <div class="right">
               <span :class="{ active: stype == 1 }" @click="checkDataType(1)" v-if="!peopleId">按题目查看</span>
@@ -70,7 +72,8 @@
               <span :class="{ active: stype == 3 }" @click="checkDataType(3)" v-show="false">按数量查看</span>
             </div>
             <div class="left"  v-if="isDesktop">
-              <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3">
+              <!-- <div style="margin-right: 10px;position: relative;" v-if="stype == 2 || stype == 3"> -->
+              <div style="margin-right: 10px;position: relative;">
                 <el-select v-model="TeachingValue" @change="searchCourse" placeholder="按教研室">
                   <el-option
                     label="全部"
@@ -109,6 +112,7 @@
                 <el-input v-model="courseName" class="student_input" :disabled="!(!peopleId)" placeholder="请输入需要搜索的姓名"></el-input>
                 <span class="serach_icon" @click="searchCourse" ></span>
               </div>
+              
               <div class="btnA" v-if="stype == 1 && !pdfLoading" @click="exportPDF">导出PDF</div>
               <div class="btnA" v-if="stype == 2" @mouseenter="btnDisplay = true" @mouseleave="btnDisplay = false">
                 导出数据
@@ -120,6 +124,8 @@
               <div class="btnA" v-if="stype == 3" @click="exportAllWord2">导出人员数据</div>
             </div>
           </div>
+
+          <!-- 手机端 查看切换 isDesktop-->
           <div class="search_nav" style="display:flex;justify-content:space-evenly;border: none;" v-if="!isDesktop">
             <div class="right">
               <span :class="{ active2: stype == 1 }" @click="checkDataType(1)">按题目查看</span>
@@ -128,6 +134,7 @@
             </div>
           </div>
 
+          <!-- 按题目pc端 isDesktop-->
           <div class="title_content" v-if="stype == 1 && isDesktop" v-loading="isLoading">
             <div class="title_box" v-if="!testArray.length"
               style="display: flex;align-items: center;justify-content: center;height: 500px;">
@@ -286,6 +293,7 @@
               </div>
             </div>
           </div>
+          <!-- 按题目手机端 !isDesktop-->
           <div class="title_content" v-if="stype == 1 && !isDesktop" v-loading="isLoading">
             <div class="title_box" v-if="!testArray.length"
               style="display: flex;align-items: center;justify-content: center;height: 500px;">
@@ -469,6 +477,8 @@
               </div>
             </div>
           </div>
+
+          <!-- 按人员pc端 isDesktop-->
           <div class="table_content" v-if="stype == 2 && isDesktop">
             <el-table class="el-table" ref="table" :data="worksArray" border :fit="true" :key="2" v-loading="isLoading"
               style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
@@ -534,6 +544,7 @@
               </el-table-column>
             </el-table>
           </div>
+          <!-- 按人员手机端 !isDesktop-->
           <div class="table_content" v-if="stype == 2 && !isDesktop">
 
             <div v-for="(i,index) in worksArray"  :key="i.id" class="isDesktopTable_content">
@@ -549,7 +560,7 @@
                 <div class="isDBri">
                   <div>序号:{{ i.time }}</div>
                   <div>提交时间:{{ i.time }}</div>
-                  <div>评课人:</div>
+                  <div>评课人:{{ i.uteaName }}</div>
                 </div>
                 <div style="height: 1px;background-color: #717C8D;width: 100%;margin-bottom: 10px;"></div>
                 <div>
@@ -610,7 +621,7 @@
                             <img class="IsDImg" :src="file.url" alt="" v-if="file.type == 3" />
                             <img class="IsDImg" :src="wordIcon" alt="" v-if="file.type == 4" />
                             <img class="IsDImg" :src="fileIcon" alt="" v-if="file.type == 5" />
-                            <div class="name" style="height: 30px;background-color: #ccc;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
+                            <div class="name" style="height: 30px;background-color: #f9f9f9;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">
                               <!-- <el-tooltip :content="file.name" placement="top" effect="dark"> -->
                                 {{ file.name }}
                               <!-- </el-tooltip> -->
@@ -766,6 +777,16 @@
         </div>
       </div>
     </div>
+    <div class="fileLoadDiv">
+      <el-dialog
+        title=""
+        :visible.sync="fileLoading"
+        :modal="false"
+        :before-close="fileClose">
+        <div>{{ fileLoadCount }} / {{ fileLoadNum }}</div>
+      </el-dialog>
+    </div>
+   
     <share-box :testJson="testJson" :TeachingValue="TeachingValue" :TeachName="TeachNameCpt"   :dialogVisibleShare.sync="dialogVisibleShare"></share-box>
     <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
     <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
@@ -893,7 +914,11 @@ export default {
       chapters: [],
       filterPlacement: 'bottom-end',
       pdfLoading: false,
-      btnDisplay: false
+      btnDisplay: false,
+
+      fileLoading: false,
+      fileLoadCount: 0,
+      fileLoadNum: 0,
     };
   },
   watch: {},
@@ -981,6 +1006,9 @@ export default {
 		}
   },
   methods: {
+    fileClose(done){
+      done()
+    },
     //获取教研室列表
     getClass2() {
       let params = {
@@ -1082,6 +1110,7 @@ export default {
       );
     },
     checkDataType(type) {
+      this.TeachingValue = ''
       if (this.stype != type) {
         this.stype = type
         this.courseName = ''
@@ -1155,6 +1184,7 @@ export default {
                 time: this.works[i].time,
                 array: _json,
                 cut:0,
+                uteaName: this.works[i].uteaName,
                 courseJson: JSON.parse(this.works[i].courseJson),
               })
             }
@@ -1956,6 +1986,9 @@ export default {
       this.isDesktop = this.screenWidth > 750; // 你可以根据需要调整这个阈值
     },
 		downloadFileType5(fileData,title="附件"){
+      this.fileLoading = true
+      this.fileLoadNum = 0
+      this.fileLoadCount = 0
 			let data = fileData;
 			const zip = new JSZip();
 			let downFileArray = [];
@@ -1964,6 +1997,11 @@ export default {
 				downFileArray.push({userid:i.userid,username:i.username ? i.username : '匿名',urlList:data.filter(d=>d.userid==i.userid).map(m=>m)});
 			})
 			let promises = [];
+      // console.log('downFileArray',downFileArray);
+      downFileArray.forEach(e=>{
+        this.fileLoadNum += e.urlList.length
+      })
+
 			if(downFileArray.length==1){//只有一位老师的情况
 				if(downFileArray[0].urlList.length>1){//多个文件的情况
 					const folder = zip.folder(`${downFileArray[0].username}`);
@@ -1973,8 +2011,18 @@ export default {
         	          // 下载文件, 并存成ArrayBuffer对象
         	          const file_name = i.name; // 获取文件名
 									  folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
-        	      }
+                    this.fileLoadCount += 1
+                    if (this.fileLoadCount == this.fileLoadNum) {
+                      this.fileLoading = false
+                    }
+        	      }else{
+                  this.fileLoadCount += 1
+                  if (this.fileLoadCount == this.fileLoadNum) {
+                    this.fileLoading = false
+                  }
+                }
         	  });
+           
 						promises.push(promise)
 					})
 					
@@ -1984,7 +2032,16 @@ export default {
         	      // 下载文件, 并存成ArrayBuffer对象
         	      const file_name = `${downFileArray[0].username}-${downFileArray[0].urlList[0].name}`; // 获取文件名
 								zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
-        	    }
+                this.fileLoadCount+=1
+                if (this.fileLoadCount == this.fileLoadNum) {
+                  this.fileLoading = false
+                }
+            }else{
+              this.fileLoadCount+=1
+              if (this.fileLoadCount == this.fileLoadNum) {
+                this.fileLoading = false
+              }
+            }
 					}))
 				}
 			}else if(downFileArray.length>1){//有多位老师的情况
@@ -1995,7 +2052,16 @@ export default {
         	      // 下载文件, 并存成ArrayBuffer对象
         	      const file_name = `${i.username ? i.username : '匿名'}-${i.urlList[0].name}`; // 获取文件名
 								zip.file(file_name, data.data, { binary: true }); // 逐个添加文件
-        	    }
+                this.fileLoadCount+=1
+                if (this.fileLoadCount == this.fileLoadNum) {
+                  this.fileLoading = false
+                }
+              }else{
+                this.fileLoadCount+=1
+                if (this.fileLoadCount == this.fileLoadNum) {
+                  this.fileLoading = false
+                }
+              }
 						}))
 					}else if(i.urlList.length>1){//有多个文件的
 						const folder = zip.folder(`${i.username ? i.username : '匿名'}`);
@@ -2005,7 +2071,16 @@ export default {
         	          // 下载文件, 并存成ArrayBuffer对象
         	          const file_name = ui.name; // 获取文件名
 									  folder.file(file_name, data.data, { binary: true }); // 逐个添加文件
-        	      }
+                    this.fileLoadCount+=1
+                    if (this.fileLoadCount == this.fileLoadNum) {
+                      this.fileLoading = false
+                    }
+        	      }else{
+                  this.fileLoadCount+=1
+                  if (this.fileLoadCount == this.fileLoadNum) {
+                    this.fileLoading = false
+                  }
+                }
 						  })
 							promises.push(promise)
 						})
@@ -2895,4 +2970,20 @@ export default {
 	right: 10px;
 	top: 0;
 }
+.fileLoadDiv >>> .el-dialog__header{
+  display: none;
+}
+.fileLoadDiv >>> .el-dialog__body{
+  display: flex;
+  justify-content: center;
+}
+.fileLoadDiv >>> .el-dialog{
+  margin-top: 60vh !important;
+  width: 200px !important;
+  height: 80px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-radius: 15px;
+}
 </style>

+ 41 - 12
src/components/pages/test/examine/conpoments/personPage.vue

@@ -213,10 +213,13 @@
                             :style="{
                               color: k.sco1 == k.sco2 ? '#000' : 'red'
                             }"
-                            :readonly="txtLoading"
                             @blur="
-                              saveTab(
-                                k.sco2 > k.score ? (k.sco2 = k.score) : ''
+                              saveTab(k.id,
+                                k.sco2 > k.score
+                                  ? (k.sco2 = k.score)
+                                  : '' || k.sco2 < 0
+                                  ? (k.sco2 = '')
+                                  : ''
                               )
                             "
                             type="number"
@@ -226,9 +229,8 @@
                       </div>
                       <div style="display: flex;justify-content: center;">
                         <textarea
-                          :readonly="txtLoading"
                           v-if="tableData.length > 0"
-                          @blur="saveTab()"
+                          @blur="saveTab(k.id)"
                           v-model.trim="k.cogSum"
                         />
                       </div>
@@ -274,7 +276,7 @@
       :before-close="recordHandleClose"
     >
       <div>
-        <el-table border  height="500px" :data="RecordList" style="width: 100%">
+        <el-table border height="500px" :data="RecordList" style="width: 100%">
           <el-table-column align="center" type="index" label="序号" width="80">
           </el-table-column>
           <el-table-column
@@ -381,8 +383,7 @@ export default {
       org: this.$route.query.org, //组织id
       tableData: [],
       TeachingOptions: [],
-      txtLoading: false,
-
+      PageBaseDataTwo: [],
       remDig: false
     };
   },
@@ -609,6 +610,7 @@ export default {
     remindExamine() {
       this.remDig = true;
     },
+    // 下载excel
     getExcel() {
       var res = this.tableData;
       // console.log('导出数据',res);
@@ -620,6 +622,9 @@ export default {
         _json["教师姓名"] = res[i].username;
         _json["教师账号"] = res[i].eName;
         _json["所属教研室"] = res[i].tea;
+        _json["考核进度"] = `${res[i].step}/${res[i].allStep}`;
+        _json["自评分数"] = res[i].evaSca;
+        _json["考核分数"] = res[i].cogSco;
         array.push(_json);
       }
 
@@ -628,6 +633,9 @@ export default {
       let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
       ws["!cols"] = [
         //设置每一列的宽度
+        { wch: 20 },
+        { wch: 30 },
+        { wch: 30 },
         { wch: 30 },
         { wch: 30 },
         { wch: 30 }
@@ -665,8 +673,29 @@ export default {
     // ----------------
 
     // 保存修改
-    saveTab() {
-      this.txtLoading = true;
+    saveTab(id) {
+      let a = { sco2: 0, cogSum: "" };
+      let b = { sco2: 0, cogSum: "" };
+      this.PageBaseData.forEach(e => {
+        e.children.forEach(i => {
+          if ((i.id == id)) {
+            a.sco2 = i.sco2;
+            a.cogSum = i.cogSum;
+          }
+        });
+      });
+
+      this.PageBaseDataTwo.forEach(e => {
+        e.children.forEach(i => {
+          if ((i.id == id)) {
+            b.sco2 = i.sco2;
+            b.cogSum = i.cogSum;
+          }
+        });
+      });
+
+      console.log(a,b,id);
+      if (a.sco2 == b.sco2 && JSON.stringify(a.cogSum) === JSON.stringify(b.cogSum)) return;
 
       let PageBaseDataCopy = JSON.parse(JSON.stringify(this.PageBaseData));
 
@@ -826,6 +855,7 @@ export default {
           // console.log("selectTestExamineBase", res.data[0][0]);
 
           this.PageBaseData = JSON.parse(res.data[0][0].json);
+          this.PageBaseDataTwo = JSON.parse(res.data[0][0].json);
           // 处理数据来源
           this.handleData();
           // 先获取基础模板,然后再获取用户又没有填写过,填写过就开始循环赋值给基础模板,最后提交基础模板
@@ -865,7 +895,7 @@ export default {
                 }
               });
             });
-
+            this.PageBaseDataTwo = val;
             // 弹框计算自评分数,与二级指标个数
             this.getTwoRigData();
           } else {
@@ -873,7 +903,6 @@ export default {
             this.DigSelfSco = 0;
             this.twoTarget = 0;
           }
-          this.txtLoading = false;
           this.digLoading = false;
         })
         .catch(error => {

+ 36 - 6
src/components/pages/test/examine/conpoments/targetPage.vue

@@ -238,7 +238,6 @@
               <div class="ScoreStep">
                 <input
                   type="number"
-                  :readonly="TxtDig"
                   v-if="scope.row.judge == 1"
                   style=" color :#A7AAB2;"
                   @blur="Submit(scope.row)"
@@ -266,7 +265,6 @@
               <textarea
                 @blur="Submit2(scope.row)"
                 class="tArea"
-                :readonly="TxtDig"
                 v-model.trim="scope.row.cogSummary"
               />
             </template>
@@ -292,7 +290,6 @@ export default {
       evaScoDigSvg: 0,
       evaScoDigCog: 0,
       evaScoDigPerC: 0,
-      TxtDig: false,
 
       diaIframe: false, //数据来源弹框
       diaScore: false, //查看分数弹框
@@ -1570,7 +1567,6 @@ export default {
           // 获取数据来源
           this.handleScoData();
           this.evaScoDig = false;
-          this.TxtDig = false;
         })
         .catch(error => {
           console.log(error);
@@ -1640,6 +1636,7 @@ export default {
 
     // 分数提交
     Submit(val) {
+      console.log("valvalvalvla", val);
       //#region
       // 修改了将页面上的分数也改变颜色,(方式改变,无用了)
       // this.tableData.forEach(e => {
@@ -1648,12 +1645,30 @@ export default {
       //   }
       // });
       //#endregion
-      this.TxtDig = true;
 
       if (val.cogSco > val.score) {
         val.cogSco = val.score;
+      } else if (val.cogSco < 0) {
+        val.cogSco = "";
+        this.$message.error("评分不能为负数");
       }
 
+      // 用来判断修改分数是否等于原先分数,如果相等就不提交
+      let judgeSubmit = 0;
+
+      val.json.forEach(e => {
+        if (judgeSubmit == 1) return;
+        e.children.forEach(i => {
+          if (i.id == this.secondId) {
+            if (i.sco2 == val.cogSco) {
+              judgeSubmit = 1;
+            }
+          }
+        });
+      });
+
+      if (judgeSubmit == 1) return;
+
       let recordTit = "";
       val.json.forEach(e => {
         e.children.forEach(i => {
@@ -1690,7 +1705,22 @@ export default {
 
     // 概述提交
     Submit2(val) {
-      this.TxtDig = true;
+
+      // 用来判断修改分数是否等于原先分数,如果相等就不提交
+      let judgeSubmit = 0;
+
+      val.json.forEach(e => {
+        if (judgeSubmit == 1) return;
+        e.children.forEach(i => {
+          if (i.id == this.secondId) {
+            if (i.cogSum == val.cogSummary) {
+              judgeSubmit = 1;
+            }
+          }
+        });
+      });
+
+      if (judgeSubmit == 1) return;
 
       let recordTit = "";