11wqe1 преди 8 месеца
родител
ревизия
e86a56ad0e

+ 211 - 25
src/components/pages/test/aggregate/index.vue

@@ -1,12 +1,38 @@
 <template>
   <div class="aggregate">
-    <el-table :data="tableData" border style="width: 100%" v-loading="tabLoading" @header-click="handleHeaderClick">
-      <el-table-column fixed align="center" type="index" width="50">
+    <el-table
+      :data="tableData"
+      border
+      max-height="750px"
+      v-loading="tabLoading"
+      @header-click="handleHeaderClick"
+    >
+      <el-table-column
+        fixed
+        align="center"
+        label="序号"
+        type="index"
+        width="50"
+      >
       </el-table-column>
 
-      <el-table-column fixed align="center" prop="username" label="教师姓名" width="150">
+      <el-table-column
+        align="center"
+        prop="username"
+        label="教师姓名"
+        fixed
+        width="150"
+      >
       </el-table-column>
-      <el-table-column fixed align="center" label="教研室" width="130">
+      <el-table-column
+        :filters="TeachingOptions"
+        :filter-method="filterTea"
+        align="center"
+        prop="tea"
+        fixed
+        label="教研室"
+        width="130"
+      >
         <template slot-scope="scope">
           <div class="TabBtn" v-if="!scope.row.tea">/</div>
           <div class="TabBtn" v-else>{{ scope.row.tea }}</div>
@@ -14,15 +40,47 @@
       </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" :prop="e.courseId" :label="e.title"
-              :cell-style="{ color: '#000' }" width="130">
+            <el-table-column
+              v-if="e.typeid == item.id"
+              align="center"
+              :prop="e.courseId"
+              :label="e.title"
+              show-overflow-tooltip
+              width="130"
+            >
               <template slot-scope="scope">
-                <div v-if="e.juri2 && arrayToArray(scope.row.teaId ? scope.row.teaId.split(',') : [],e.juri2 ? e.juri2.split(',') : []).length && scope.row.works.indexOf(e.courseId) !== -1"
-                  class="yuan blacky"></div>
-                <div v-else-if="scope.row.works.indexOf(e.courseId) !== -1" class="yuan blacky"></div>
-                <div v-else-if="e.juri2 && arrayToArray(scope.row.teaId ? scope.row.teaId.split(',') : [],e.juri2 ? e.juri2.split(',') : []).length == 0" class="yuan greyy"></div>
+                <div
+                  v-if="
+                    e.juri2 &&
+                      arrayToArray(
+                        scope.row.teaId ? scope.row.teaId.split(',') : [],
+                        e.juri2 ? e.juri2.split(',') : []
+                      ).length &&
+                      scope.row.works.indexOf(e.courseId) !== -1
+                  "
+                  class="yuan blacky"
+                  @click="gotoFrom(e.courseId, scope.row.userid)"
+                ></div>
+                <div
+                  v-else-if="scope.row.works.indexOf(e.courseId) !== -1"
+                  class="yuan blacky"
+                  @click="gotoFrom(e.courseId, scope.row.userid)"
+                ></div>
+                <div
+                  v-else-if="
+                    e.juri2 &&
+                      arrayToArray(
+                        scope.row.teaId ? scope.row.teaId.split(',') : [],
+                        e.juri2 ? e.juri2.split(',') : []
+                      ).length == 0
+                  "
+                  class="yuan greyy"
+                ></div>
                 <div v-else class="yuan"></div>
               </template>
             </el-table-column>
@@ -30,6 +88,24 @@
         </el-table-column>
       </div>
     </el-table>
+
+    <!-- 查看数据来源 -->
+    <el-dialog
+      title=""
+      :visible.sync="diaIframe"
+      :append-to-body="true"
+      width="95%"
+      :before-close="handleClose2"
+      class="dialog_diy"
+    >
+      <div style="height: 100%;">
+        <iframe
+          ref="viframe"
+          style="width: 100%; height: 99%; border: none"
+          :src="ifmUrl"
+        ></iframe>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -43,15 +119,20 @@ export default {
       tableData: [],
       titList: [],
       allFrom: [],
-      tabLoading: false
+      tabLoading: false,
+      TeachingOptions: [],
+      diaIframe: false,
+      ifmUrl: ""
     };
   },
 
   mounted() {
     this.getData();
+    this.getTeaList();
   },
 
   methods: {
+    // 处理数据
     arrayToArray(arrayo, arrayt) {
       let array1 = arrayo;
       let array2 = arrayt;
@@ -67,6 +148,44 @@ export default {
       }
       return commonElements;
     },
+    gotoFrom(val, uid) {
+      // return console.log(val, uid);
+      this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/checkToTest?cid=${val}&oid=${this.oid}&org=${this.org}&type=2&role=0&peopleId=${uid}`;
+      // this.ifmUrl = `https://beta.pbl.cocorobo.cn/pbl-teacher-table/dist/#/test?userid=${this.userid}&oid=45facc0a-1211-11ec-80ad-005056b86db5&org=&role=0`;
+      this.diaIframe = true;
+    },
+    // 教研室筛选
+    filterTea(value, row, column) {
+      // console.log(value, row, column);
+      const property = column["property"];
+      return row[property].includes(value);
+    },
+    // 获取教研室
+    getTeaList() {
+      let params = {
+        oid: this.oid
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+        .then(res => {
+          // return console.log("this.TeachingOptions", res.data[0]);
+          let data = res.data[0];
+          let dataCopy = [];
+
+          data.forEach(e => {
+            let a = {};
+            a.value = e.name;
+            a.text = e.name;
+            dataCopy.push(a);
+          });
+
+          this.TeachingOptions = dataCopy;
+          // console.log("this.TeachingOptions", this.TeachingOptions);
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
     getData() {
       this.tabLoading = true;
 
@@ -89,6 +208,11 @@ export default {
               }
             });
           });
+          data.forEach(e => {
+            if (!e.tea) {
+              e.tea = "";
+            }
+          });
           this.tableData = data;
           this.tabLoading = false;
         })
@@ -96,20 +220,33 @@ export default {
           console.log(error);
         });
     },
+    // 数据来源关闭弹框
+    handleClose2(done) {
+      done();
+    },
+    // 点击表头跳转
     handleHeaderClick(column, event) {
-      // console.log("表头被点击", column, event);
-      this.$router.push(
-        "/checkToTest?cid=" +
-        column.property +
-        "&oid=" +
-        this.oid +
-        "&org=" +
-        this.org +
-        "&type=" +
-        2 +
-        "&role=" +
-        this.role
-      );
+      console.log("表头被点击", column, event);
+      if (
+        column.label == "教研室" ||
+        column.label == "教师姓名" ||
+        column.label == "序号"
+      ) {
+      } else {
+        this.$router.push(
+          "/checkToTest?cid=" +
+            column.property +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&type=" +
+            2 +
+            "&role=" +
+            this.role
+        );
+      }
+
       // 在这里处理点击事件
     }
   }
@@ -128,10 +265,59 @@ export default {
 
 .blacky {
   background-color: #000;
+  cursor: pointer;
 }
 
 .greyy {
   background-color: #eee;
   border: 1px solid #eee;
 }
+.dialog_diy >>> .el-dialog {
+  height: 95%;
+  margin: 0 auto !important;
+  margin-top: 20px !important;
+  overflow: hidden;
+  min-width: 800px !important;
+}
+
+.dialog_diy >>> .el-dialog__header {
+  background: #454545 !important;
+  padding: 25px 20px;
+}
+
+.dialog_diy >>> .el-dialog__body {
+  height: calc(100% - 50px);
+  box-sizing: border-box;
+  padding: 0px;
+}
+
+.dialog_diy >>> .el-dialog__title {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn {
+  top: 19px;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
+  color: #fff;
+}
+
+.dialog_diy >>> .el-dialog__body,
+.dialog_diy >>> .el-dialog__footer {
+  background: #fafafa;
+}
+
+.aggregate >>> .el-table th > .cell {
+  /* -webkit-line-clamp: 2;
+  display: -webkit-box;
+  -webkit-box-orient: vertical;
+  overflow: hidden;
+  text-overflow: ellipsis; */
+  /* height: 50px !important; */
+}
 </style>

+ 65 - 7
src/components/pages/test/examine/conpoments/personPage.vue

@@ -76,6 +76,7 @@
             <div style="display: flex;justify-content: center;">
               <div class="TabBtn" @click="lookScore(scope.row)">评分</div>
               <div class="TabBtn" @click="withdraw(scope.row.id)">退回</div>
+              <div class="TabBtn" @click="recordBtn(scope.row.id)">记录</div>
             </div>
           </template>
         </el-table-column>
@@ -260,13 +261,35 @@
     </el-dialog>
 
     <!-- 提醒弹框 -->
-
     <shareBox
       :remDig.sync="remDig"
       :pType="pType"
       :TeaList="TeaList"
     ></shareBox>
 
+    <el-dialog
+      title="评分记录"
+      :visible.sync="recordVisible"
+      class="recordDig"
+      :before-close="recordHandleClose"
+    >
+      <div>
+        <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
+            align="center"
+            show-overflow-tooltip
+            prop="username"
+            label="教师姓名"
+          >
+          </el-table-column>
+          <el-table-column align="center" prop="dateTime" label="评分时间">
+          </el-table-column>
+        </el-table>
+      </div>
+    </el-dialog>
+
     <!-- <el-dialog
       title="提醒"
       :visible.sync="remDig"
@@ -336,6 +359,8 @@ export default {
       digType: 2,
       diaSco: false,
       diaIframe: false,
+      recordVisible: false,
+      RecordList: [],
       ifmUrl: false,
       PageBaseData: [],
       digUserid: "", //用户id
@@ -556,12 +581,35 @@ export default {
           // });
         });
     },
+    recordBtn(val) {
+      this.RecordList = [];
+      this.recordVisible = true;
+      this.getRecordData(val);
+    },
+    // 查看记录
+    getRecordData(val) {
+      let params = {
+        tid: val,
+        type: this.pType
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectExamineOperateRecord", params)
+        .then(res => {
+          // console.log(res.data[0]);
+          this.RecordList = res.data[0];
+        })
+        .catch(err => {
+          console.error(err);
+        });
+    },
+    recordHandleClose(done) {
+      done();
+    },
     // 提醒
     remindExamine() {
       this.remDig = true;
     },
     getExcel() {
-      
       var res = this.tableData;
       // console.log('导出数据',res);
       //如果value的json字段的key值和想要的headers值不一致时,可做如下更改
@@ -582,7 +630,7 @@ export default {
         //设置每一列的宽度
         { wch: 30 },
         { wch: 30 },
-        { wch: 30 },
+        { wch: 30 }
       ];
 
       XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
@@ -632,16 +680,22 @@ export default {
 
       let params = [
         {
-          uid: this.digUserid,
+          uid: this.userid,
           tid: this.digTid,
-          json: JSON.stringify(PageBaseDataCopy)
+          typ: this.pType,
+          // json: JSON.stringify(PageBaseDataCopy)
+          json: JSON.stringify(PageBaseDataCopy),
+          rjson: JSON.stringify({
+            rjson: PageBaseDataCopy,
+            text: `按人员,进行修改`
+          })
         }
       ];
       // return console.log(params);
       this.ajax
-        .post(this.$store.state.api + "updateExamineCogData", params)
+        .post(this.$store.state.api + "updateExamineCogDataCopy", params)
         .then(res => {
-          // console.log("updateExamineCogData", res);
+          // console.log("updateExamineCogDataCopy", res);
           // this.CopDigSco();
           this.getDigData();
         })
@@ -906,6 +960,10 @@ export default {
   white-space: nowrap;
   text-overflow: ellipsis;
 }
+.recordDig >>> .el-dialog {
+  height: 600px;
+  width: 500px !important;
+}
 .remFlex {
   display: flex;
   justify-content: flex-start;

+ 27 - 7
src/components/pages/test/examine/conpoments/targetPage.vue

@@ -1419,7 +1419,7 @@ export default {
           data.forEach(e => {
             e.json = JSON.parse(e.json);
           });
-          // console.log("data", data);
+          console.log("data", data);
 
           this.tableJsonCon.forEach(a => {
             data.forEach(b => {
@@ -1654,9 +1654,11 @@ export default {
         val.cogSco = val.score;
       }
 
+      let recordTit = "";
       val.json.forEach(e => {
         e.children.forEach(i => {
           if (i.id == this.secondId) {
+            recordTit = i.name;
             i.sco2 = val.cogSco;
             i.cogSum = val.cogSummary;
           }
@@ -1667,12 +1669,17 @@ export default {
         {
           uid: this.userid,
           tid: val.id,
-          json: JSON.stringify(val.json)
+          typ: this.pType,
+          json: JSON.stringify(val.json),
+          rjson: JSON.stringify({
+            rjson: val.json,
+            text: `按指标,修改了${recordTit}分数`
+          })
         }
       ];
       // return console.log(params);
       this.ajax
-        .post(this.$store.state.api + "updateExamineCogData", params)
+        .post(this.$store.state.api + "updateExamineCogDataCopy", params)
         .then(res => {
           this.getSecondData();
         })
@@ -1685,9 +1692,12 @@ export default {
     Submit2(val) {
       this.TxtDig = true;
 
+      let recordTit = "";
+
       val.json.forEach(e => {
         e.children.forEach(i => {
           if (i.id == this.secondId) {
+            recordTit = i.name;
             i.cogSum = val.cogSummary;
           }
         });
@@ -1697,12 +1707,17 @@ export default {
         {
           uid: this.userid, //修改人id
           tid: val.id,
-          json: JSON.stringify(val.json)
+          typ: this.pType,
+          json: JSON.stringify(val.json),
+          rjson: JSON.stringify({
+            rjson: val.json,
+            text: `按指标,修改了${recordTit}概述`
+          })
         }
       ];
       // return console.log(params);
       this.ajax
-        .post(this.$store.state.api + "updateExamineCogData", params)
+        .post(this.$store.state.api + "updateExamineCogDataCopy", params)
         .then(res => {
           this.getSecondData();
         })
@@ -1759,14 +1774,19 @@ export default {
         {
           uid: this.userid,
           tid: val.id,
-          json: JSON.stringify(val.json)
+          typ: this.pType,
+          json: JSON.stringify(val.json),
+          rjson: JSON.stringify({
+            rjson: val.json,
+            text: `按指标,进行了一键保存`
+          })
         }
       ];
       // return console.log(params);
 
       return new Promise(resolve => {
         this.ajax
-          .post(this.$store.state.api + "updateExamineCogData", params)
+          .post(this.$store.state.api + "updateExamineCogDataCopy", params)
           .then(res => {
             resolve(res);
           })

+ 7 - 2
src/components/pages/test/examine/index.vue

@@ -35,7 +35,12 @@
             </el-option>
           </el-select>
         </div>
-        <div v-if="cutTable == 1" class="remindBtn" style="margin-right: 20px;" @click="excelBtn">
+        <div
+          v-if="cutTable == 1"
+          class="remindBtn"
+          style="margin-right: 20px;"
+          @click="excelBtn"
+        >
           导出
         </div>
         <div v-if="cutTable == 1" class="remindBtn" @click="personBtn">
@@ -88,7 +93,7 @@ export default {
     selectTeaName() {
       this.$refs.child.getData();
     },
-    excelBtn(){
+    excelBtn() {
       this.$refs.child.getExcel();
     },
     personBtn() {