Sfoglia il codice sorgente

Merge branch 'beta'

SanHQin 1 settimana fa
parent
commit
7932c64a0f

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.a2b714d6186042ff2e0e903a255cd7e0.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.b7212920b6e58d14a873.js></script><script type=text/javascript src=./static/js/app.72fcfc0ea66c2a914a04.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.379faa5383b4896a656d08199686812a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.161e82026ac2ae03ab6f.js></script><script type=text/javascript src=./static/js/vendor.b7212920b6e58d14a873.js></script><script type=text/javascript src=./static/js/app.14d370fd6a32cd0c3c73.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.379faa5383b4896a656d08199686812a.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.379faa5383b4896a656d08199686812a.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.14d370fd6a32cd0c3c73.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.14d370fd6a32cd0c3c73.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 65 - 6
src/components/pages/liyuan/page/teadTest.vue

@@ -23,7 +23,10 @@
                             </el-tooltip>
                         </div>
                         <div class="state">
-                            <span :class="{ is: item.array.length > 0, no: !item.array.length }">{{ item.array.length > 0 ? "已完成" : "未完成" }}</span>
+                            <span :class="{ is: isOK(item.array) == '已完成', no: isOK(item.array) == '待办' }">
+                                {{ isOK(item.array) }}
+                                <!-- {{ item.array.length > 0 ? "已完成" : "未完成" }} -->
+                            </span>
                         </div>
                         <div class="time">
                             <span v-if="item.overtime" :class="{isDead: isDeadlinePassed(item.overtime)}">截止时间:{{ item.overtime }}</span>
@@ -50,6 +53,7 @@
                                 <div class="time">
                                     <span v-if="!test.editName && !test.name">提交记录{{item.array.length - index}}</span>
                                     <span v-if="!test.editName && test.name">{{test.name}}</span>
+                                    <el-input :ref="`changeName_${test.id}`" v-if="test.editName" v-model="test.name"  @blur="changeNameUpdate(test.courseid,test.id)" @keyup.enter.native="changeNameUpdate(test.courseid,test.id)"></el-input>
                                 </div>
                                 <div class="testType">
                                     <span :class="`typeStatus_${test.type}`">{{ typeStatusList[test.type] }}</span>
@@ -57,13 +61,16 @@
                                 <div class="utime">
                                     <span>{{ test.utime }}</span>
                                 </div>
-                                <div class="mask">
+                                <div class="mask" v-if="!test.isReview">
                                     <div @click="doTest(test.courseid, test.id)">
                                         <span>编辑</span>
                                     </div>
                                     <div @click="deleteTest(test.id)" class="delete">
                                         <span>删除</span>
                                     </div>
+                                    <div @click="changeName(test.courseid,test.id)">
+                                        <span>重命名</span>
+                                    </div>
                                 </div>
                             </div>
                         </div>
@@ -125,6 +132,25 @@ export default {
         };
     },
     computed: {
+        isOK(){
+            return function (array) {
+                // console.log('array',array);
+                let result = ''
+                if (array.length > 0) {
+                    let k = array.filter(e => e.type == 1 || e.type == 4)
+                   if (k.length) {
+                        result = '待办'
+                   }else{
+                        result = '已完成'
+                   }
+                    
+                }else{
+                    result = '待办'
+                }
+                
+                return result;
+            };
+        },
         getNum() {
             return function (array) {
                 let _array = JSON.parse(array);
@@ -654,10 +680,43 @@ export default {
             return res.data[0]
         },
         changeShowType(value){
-            console.log('changeShowType',value);
-            
-            this.checkTypeValue = value;
-            this.getWorks();
+          this.checkTypeValue = value;
+          this.getWorks();
+        },
+        changeName(courseId,testId){
+          let array = this.worksArray.find(i=>i.courseid == courseId);
+          if(array){
+            array = array.array;
+            array.find(i=>i.id==testId).editName = true;
+            this.$forceUpdate();
+            this.$nextTick(()=>{
+              console.log(this.$refs[`changeName_${testId}`])
+              this.$refs[`changeName_${testId}`][0].focus();
+            })
+          }
+        },
+        changeNameUpdate(courseId,testId){
+          let array = this.worksArray.find(i=>i.courseid == courseId);
+          if(array){
+            array = array.array;
+            array.find(i=>i.id==testId).editName = false;
+            this.$forceUpdate();
+            let data = array.find(i=>i.id==testId);
+            let params = [{
+              uid:this.userid,
+              testId:testId,
+              newName:data.name,
+            }]
+
+            this.ajax.post(this.$store.state.api+"update_testCourseWorksNameById",params).then(res=>{
+              if(res.data == 1){
+                this.$message.success("修改成功")
+              }else{
+                this.$message.error("修改失败")
+                array.find(i=>i.id==testId).name = "";
+              }
+            })
+          }
         }
     },
     mounted() {

+ 1 - 0
src/components/pages/noticeCenter/component/received.vue

@@ -12,6 +12,7 @@
           style="width: 250px;"
           placeholder="请输入关键词"
           v-model="searchValue"
+          @keyup.enter.native="getData()"
         >
           <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer;font-size: 18px;color: #000;" @click="getData()"></i>
         </el-input>

+ 3 - 0
src/components/pages/noticeCenter/dialog/noticeDetailDialog.vue

@@ -221,6 +221,7 @@ export default {
 .b_m_t_title{
   font-size: 3em;
   margin-bottom: 30px;
+  color: #000;
 }
 
 .b_m_top>div{
@@ -243,5 +244,7 @@ export default {
   font-size: 18px;
   padding: 10px;
   box-sizing: border-box;
+  white-space:pre-line;
+  color: #000;
 }
 </style>

+ 56 - 29
src/components/pages/test/check/index.vue

@@ -1588,7 +1588,7 @@
                     @click="returnTest(scope.row)"
                     type="primary"
                     size="small"
-                   v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'"
+                    v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'"
                     >退回</el-button
                   >
                   <!-- v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'" -->
@@ -2051,6 +2051,7 @@
       @changeCover="changeCover"
     />
     <checkFileListDialog ref="checkFileListDialogRef" @checkFile="checkFile" @downloadFile="downloadFile"/>
+    <returnTestDialog ref="returnTestDialogRef" :title="testJson.title" @success="getData"/>
   </div>
 </template>
 
@@ -2082,6 +2083,9 @@ import docxTemplateDialog from "./docxTemplateDialog";
 //查看文件
 import checkFileListDialog from "./checkFileListDialog.vue";
 
+//退回弹窗
+import returnTestDialog from "./returnTestDialog.vue";
+
 const getFile = (url) => {
   return new Promise((resolve, reject) => {
     var credentials = {
@@ -2138,7 +2142,8 @@ export default {
     wordcloud,
     aiBoxRight,
     docxTemplateDialog,
-    checkFileListDialog
+    checkFileListDialog,
+    returnTestDialog
   },
   data() {
     return {
@@ -2484,9 +2489,13 @@ export default {
           let kpl = this.tableWorksArray[kin].array
           // console.log('kpl',this.tableWorksArray[kin]);
 
-          for (let index = 0; index < kpl.length; index++) {
+           for (let index = 0; index < kpl.length; index++) {
               if (kpl[index].type == 3 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
-                userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
+                if (kpl[index].json.answer2) {
+                  userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)   
+                }else{
+                  userWork.push(kpl[index].json.title +':'+ '')   
+                }
               }
               if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
                 if (kpl[index].json.file && kpl[index].json.file[0].url) {
@@ -2495,13 +2504,19 @@ export default {
                 userWork.push(kpl[index].json.title+':' + _fileid.join('、'))
               }
               if (kpl[index].type == 7 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
-                userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
+                if (kpl[index].json.answer2) {
+                  userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
+                }else{
+                  userWork.push(kpl[index].json.title+':'+'')
+                }
               }
               if (kpl[index].type == 1 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
                 let kk = []
-                kpl[index].json.answer2.forEach((e)=>{
-                  kk.push(kpl[index].json.array[e].option)
-                })
+                if (kpl[index].json && kpl[index].json.answer2 && kpl[index].json.answer2.length) {
+                  kpl[index].json.answer2.forEach((e)=>{
+                    kk.push(kpl[index].json.array[e].option)
+                  })
+                }
                 userWork.push(kpl[index].json.title+':' +kk.join(','))
               }
           }
@@ -2689,7 +2704,11 @@ ${JSON.stringify(forAllList)}
 
           for (let index = 0; index < kpl.length; index++) {
               if (kpl[index].type == 3 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
-                userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)
+                if (kpl[index].json.answer2) {
+                  userWork.push(kpl[index].json.title +':'+ kpl[index].json.answer2)   
+                }else{
+                  userWork.push(kpl[index].json.title +':'+ '')   
+                }
               }
               if (kpl[index].type == 5 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
                 if (kpl[index].json.file && kpl[index].json.file[0].url) {
@@ -2698,13 +2717,19 @@ ${JSON.stringify(forAllList)}
                 userWork.push(kpl[index].json.title+':' + _fileid.join('、'))
               }
               if (kpl[index].type == 7 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
-                userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
+                if (kpl[index].json.answer2) {
+                  userWork.push(kpl[index].json.title+':'+kpl[index].json.answer2)
+                }else{
+                  userWork.push(kpl[index].json.title+':'+'')
+                }
               }
               if (kpl[index].type == 1 && this.cueWord.fieldList.includes(kpl[index].json.title)) {
                 let kk = []
-                kpl[index].json.answer2.forEach((e)=>{
-                  kk.push(kpl[index].json.array[e].option)
-                })
+                if (kpl[index].json && kpl[index].json.answer2 && kpl[index].json.answer2.length) {
+                  kpl[index].json.answer2.forEach((e)=>{
+                    kk.push(kpl[index].json.array[e].option)
+                  })
+                }
                 userWork.push(kpl[index].json.title+':' +kk.join(','))
               }
           }
@@ -2915,11 +2940,11 @@ ${JSON.stringify(forAllList)}
       let scoArr = []
       // 新添加的评分
       const ids1 = this.scoList.map(item => item.id);
-      console.log('ids1',ids1);
+      // console.log('ids1',ids1);
 
       // jiu评分
       scoArr = this.scoListCopy.filter(item => !ids1.includes(item.id));
-      console.log('scoArr',JSON.parse(JSON.stringify('scoArr')));
+      // console.log('scoArr',JSON.parse(JSON.stringify('scoArr')));
       
 
       scoArr = [...this.scoList,...scoArr]
@@ -3437,6 +3462,7 @@ ${JSON.stringify(forAllList)}
                 name: this.works[i].username ? this.works[i].username : "匿名",
                 time: this.works[i].time,
                 array: _json2,
+                testName:this.works[i].testName,
                 isReview:this.works[i].isReview,
                 cut: 0,
                 uteaName: this.works[i].uteaName,
@@ -4929,20 +4955,21 @@ ${JSON.stringify(item.array)}
     returnTest(row){
       if(row.type=='1')return this.$message.info("该表单未提交")
       if(row.type=='4')return this.$message.info("该表单已退回")
-      let params = [{
-        id:row.id,
-        type:"4"
-      }];
-
-      this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
-        if(res.data==1){
-          this.getData();
-          // this.tableWorksArray = this.tableWorksArray.filter(i=>i.id!==row.id);
-          this.$message.success("表单退回成功");
-        }
-      }).catch(e=>{
-        console.log(e);
-      })
+      this.$refs.returnTestDialogRef.open(row)
+      // let params = [{
+      //   id:row.id,
+      //   type:"4"
+      // }];
+
+      // this.ajax.post(this.$store.state.api+"update_testCourseWorks_typeById",params).then(res=>{
+      //   if(res.data==1){
+      //     this.getData();
+      //     // this.tableWorksArray = this.tableWorksArray.filter(i=>i.id!==row.id);
+      //     this.$message.success("表单退回成功");
+      //   }
+      // }).catch(e=>{
+      //   console.log(e);
+      // })
 
     },
   },

+ 8 - 6
src/components/pages/test/examine/conpoments/personPage.vue

@@ -63,7 +63,7 @@
           label="自评总分"
         >
         </el-table-column>
-        <el-table-column align="center" label="一级指标评分" >
+        <!-- <el-table-column align="center" label="一级指标评分" >
           <template slot-scope="scope">
             <div class= "scoreBox" v-for="item, index in scope.row.json" :key="index">
               <el-tooltip :content="item.name" placement="top" effect="dark">
@@ -80,7 +80,7 @@
           align="center"
           label="考核总分"
         >
-        </el-table-column>
+        </el-table-column> -->
 
 
         <el-table-column
@@ -123,6 +123,7 @@
           <div class="teaLis">
             <div
               class="teal"
+              v-if="digType==2"
               @click="cutPage(2)"
               :class="[digType == 2 ? 'Tbor' : '']"
             >
@@ -131,6 +132,7 @@
             <div
               class="teal"
               @click="cutPage(1)"
+               v-if="digType == 1"
               :class="[digType == 1 ? 'Tbor' : '']"
             >
               班主任考核
@@ -548,7 +550,7 @@ export default {
      var XLSX = require("xlsx");
      let data = [
       ...headers,
-      ...this.PageBaseData.flatMap(parent => 
+      ...this.PageBaseData.flatMap(parent =>
         parent.children.map(child => [
           parent.name, // 一级指标
           child.name,  // 二级指标
@@ -564,7 +566,7 @@ export default {
     const wb = XLSX.utils.book_new(); //创建一个新的工作簿对象
     // 创建一个Worksheet对象
     let ws = XLSX.utils.aoa_to_sheet(data);
-    
+
 
 
 
@@ -876,11 +878,11 @@ ws['!rows'] = [
     remindExamine() {
       this.remDig = true;
     },
-  
+
     // 下载excel
     getExcel() {
       var res = this.tableData;
-      
+
       // console.log('导出数据',res);
       //如果value的json字段的key值和想要的headers值不一致时,可做如下更改
       //将和下面的Object.fromEntries结合,将json字段的key值改变为要求的excel的header值

+ 1 - 1
src/components/pages/test/examine/index.vue

@@ -63,7 +63,7 @@
           </el-select>
         </div>
         <div
-          v-if="cutTable == 1"
+          v-if="cutTable == 1 && false"
           class="remindBtn"
           style="margin-right: 20px;"
           @click="excelBtn"

+ 24 - 2
src/components/pages/testPerson/test/test.vue

@@ -36,7 +36,10 @@
                         </el-tooltip>
                     </div>
                     <div class="state">
-                        <span :class="{ is: item.array.length > 0, no: !item.array.length }">{{ item.array.length > 0 ? "已完成" : "未完成" }}</span>
+                        <span :class="{ is: isOK(item.array) == '已完成', no: isOK(item.array) == '待办' }">
+                            {{ isOK(item.array) }}
+                            <!-- {{ item.array.length > 0 ? "已完成" : "未完成" }} -->
+                        </span>
                     </div>
                     <div class="time">
                         <span v-if="item.overtime" :class="{isDead: isDeadlinePassed(item.overtime)}">截止时间:{{ item.overtime }}</span>
@@ -73,7 +76,7 @@
                             <div class="utime">
                                 <span>{{ test.utime }}</span>
                             </div>
-                            <div class="mask">
+                            <div class="mask" v-if="!test.isReview">
                                 <div @click="doTest(test.courseid, test.id)">
                                     <span>编辑</span>
                                 </div>
@@ -166,6 +169,25 @@ export default {
         };
     },
     computed: {
+        isOK(){
+            return function (array) {
+                // console.log('array',array);
+                let result = ''
+                if (array.length > 0) {
+                    let k = array.filter(e => e.type == 1 || e.type == 4)
+                   if (k.length) {
+                        result = '待办'
+                   }else{
+                        result = '已完成'
+                   }
+                    
+                }else{
+                    result = '待办'
+                }
+                
+                return result;
+            };
+        },
         getNum() {
             return function (array) {
                 let _array = JSON.parse(array);

Some files were not shown because too many files changed in this diff