SanHQin 1 semana atrás
pai
commit
cd96116c3d

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.e99a3e57ab2bda7d91a40b9b2b443fbf.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.07db2e1bdbb02f7ad96d.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.fca0929001ea2e740f79121deb0a975b.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.1ced801d92d708dda35e.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.fca0929001ea2e740f79121deb0a975b.css


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/css/app.fca0929001ea2e740f79121deb0a975b.css.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.1ced801d92d708dda35e.js


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/app.1ced801d92d708dda35e.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 79 - 5
src/components/pages/test/check/index.vue

@@ -1562,7 +1562,7 @@
               </el-table-column>
               <el-table-column
                 label="操作"
-                width="250px"
+                :width="review=='1'?'150px':'250px'"
                 fixed="right"
                 v-if="isN != 1"
               >
@@ -1578,23 +1578,47 @@
                   <el-button
                     @click="editTest(scope.row)"
                     type="primary"
-                    v-if="(examineData && examineData.type == 1) || !examineData"
+                    v-if="((examineData && examineData.type == 1) || !examineData) && review !='1'"
                     size="small"
                     >编辑</el-button
                   >
 
+                  <el-button
+                    @click="returnTest(scope.row)"
+                    type="primary"
+                    size="small"
+                    v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'"
+                    >退回</el-button
+                  >
+                  <!-- v-if="((examineData && examineData.type == 1) || !examineData) && review == '1'" -->
+
+
                   <!-- <el-button @click="setWordHtml(scope.row)" type="primary" size="small">导出答题信息</el-button>
 									<el-button @click="setWordTemplate(scope.row)" type="primary" size="small">word导出</el-button> -->
                   <el-button
                     @click="deleteTest(scope.row.id)"
                     type="primary"
                     size="small"
-                     v-if="(examineData && examineData.type == 1) || !examineData"
+                    v-if="((examineData && examineData.type == 1) || !examineData) && review !='1'"
                     >删除</el-button
                   >
                 </template>
               </el-table-column>
 
+
+              <el-table-column
+                label="状态"
+                width="100px"
+                fixed="right"
+                align="center"
+                v-if="review==='1'"
+              >
+              <template slot-scope="scope">
+                <!-- v-if="review==='1'" -->
+               <span :class="`typeStatus typeStatus_${scope.row.type}`">{{ typeStatusList[scope.row.type] }}</span>
+              </template>
+              </el-table-column>
+
               <el-table-column
                 label="审核状态"
                 width="120px"
@@ -2209,7 +2233,8 @@ export default {
       timeLimit:this.$route.query.timeLimit,
       sortTime:[],
       review:this.$route.query.review,
-      defaultTimeLimit:[]
+      defaultTimeLimit:[],
+      typeStatusList:["","未提交","已提交","","已退回"]
     };
   },
   watch: {},
@@ -3179,6 +3204,7 @@ ${JSON.stringify(forAllList)}
                 cut: 0,
                 uteaName: this.works[i].uteaName,
                 courseJson: JSON.parse(this.works[i].courseJson),
+                type:this.works[i].type
               });
             // }
           }
@@ -4660,7 +4686,26 @@ ${JSON.stringify(item.array)}
       // console.log(row);
       // this.tableWorksArray.find(i=>i.id===row.id).isReview = "1";
       // this.$forceUpdate()
-    }
+    },
+    //退回表单
+    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.tableWorksArray.find(i=>i.id==row.id).type = "4";
+          this.$message.success("表单退回成功");
+        }
+      }).catch(e=>{
+        console.log(e);
+      })
+
+    },
   },
 
   beforeDestroy() {
@@ -5820,4 +5865,33 @@ ${JSON.stringify(item.array)}
   margin-right: 20px;
   font-weight:bold;
 }
+
+.typeStatus{
+  padding: 4px 8px;
+  border-radius: 4px;
+  border: solid 1px gray;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 12px;
+}
+
+.typeStatus_2{
+  background:#F0F9F2;
+  border-color: #B5E3BF;
+  color:#5FC875;
+}
+
+.typeStatus_4{
+  background:#FEF5EC;
+  border-color: #FAD0A1;
+  color:#F7933B;
+}
+
+.typeStatus_1{
+  background:#EEF3FC;
+  border-color: #0F40F5;
+  color:#0F40F5;
+}
+
 </style>

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

@@ -65,6 +65,9 @@
                                 <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>
+                            </div>
                             <!-- <img @click="deleteTest(test.id)" class="delete"
                                 src="../../../../assets/icon/test/delete.png" alt="" /> -->
                             <div class="utime">
@@ -158,7 +161,8 @@ export default {
             org: this.$route.query.org,
             role: this.$route.query.role,
             loading: false,
-            checkTypeValue:""
+            checkTypeValue:"",
+            typeStatusList:["","未提交","已提交","","已退回"]
         };
     },
     computed: {
@@ -1129,7 +1133,7 @@ export default {
     font-size: 14px;
     width: 160px;
     min-width: 160px;
-    margin: 0 30px 0 auto;
+    margin: 0 30px 0 0;
 }
 .test_add_box>.test>.mask {
     display: flex;
@@ -1226,4 +1230,38 @@ export default {
 .isDead{
     color:#EE3E3E;
 }
+
+.testType{
+  width: 60px;
+  margin: 0 45px 0 auto;
+}
+
+.testType>span{
+  padding: 6px 10px;
+  border-radius: 4px;
+  border: solid 1px gray;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 12px;
+}
+
+
+.testType>.typeStatus_2{
+  background:#F0F9F2;
+  border-color: #B5E3BF;
+  color:#5FC875;
+}
+
+.testType>.typeStatus_4{
+  background:#FEF5EC;
+  border-color: #FAD0A1;
+  color:#F7933B;
+}
+
+.testType>.typeStatus_1{
+  background:#EEF3FC;
+  border-color: #0F40F5;
+  color:#0F40F5;
+}
 </style>

+ 45 - 16
src/components/pages/testStudent/view/preview.vue

@@ -49,7 +49,7 @@
 							<!-- <el-button type="primary" :style=" isN==1? 'padding: 5px 10px;' : ''" size="small" @click="autoFill" v-if="(showAutoFillBtn && isN!=1)">智能填写</el-button> -->
               <el-button type="primary" :style=" isN==1? 'padding: 5px 10px;' : ''" size="small" @click="refresh" v-if="isReset">刷新</el-button>
               <el-button :type="isN!=1?'primary':'info'" :style=" isN==1? 'padding: 5px 10px;' : ''" size="small" @click="reset">重置</el-button>
-              <el-button type="primary" :style=" isN==1? 'padding: 5px 10px;' : ''" size="small" @click="save" v-if="(type != 3 && isN!=1)">保存</el-button>
+              <el-button type="primary" :style=" isN==1? 'padding: 5px 10px;' : ''" size="small" @click="save" v-if="isN!=1 && workType!=4">保存</el-button>
               <el-button type="primary" :style=" isN==1? 'padding: 5px 10px;' : ''" size="small" @click="publish">提交</el-button>
             </div>
           </div>
@@ -93,7 +93,8 @@ export default {
       isloading: false,
       courseid: '',
       gcourseid: this.$route.query.courseid,
-      back:this.$route.query.back
+      back:this.$route.query.back,
+      workType:''
     }
   },
 	computed:{
@@ -247,6 +248,7 @@ export default {
         .then((res) => {
           // this.cJson = JSON.parse(res.data[0][0].chapters);
           if (res.data[2].length) {
+            this.workType = res.data[2][0].type;
             this.cJson = JSON.parse(res.data[2][0].courseJson)
 
             this.$forceUpdate()
@@ -523,20 +525,47 @@ export default {
         .post(this.$store.state.api + "addTestWorks", params)
         .then((res) => {
           this.$message.success('保存成功')
-          this.goTo(
-            "/testStudent?userid=" +
-            this.userid +
-            "&oid=" +
-            this.oid +
-            "&org=" +
-            this.org +
-            "&role=" +
-            this.role +
-            "&isN=" +
-            this.isN +
-            "&tcid=" +
-            this.tcid
-          );
+          // this.goTo(
+          //   "/testStudent?userid=" +
+          //   this.userid +
+          //   "&oid=" +
+          //   this.oid +
+          //   "&org=" +
+          //   this.org +
+          //   "&role=" +
+          //   this.role +
+          //   "&isN=" +
+          //   this.isN +
+          //   "&tcid=" +
+          //   this.tcid
+          // );
+          if (this.type == 3) {
+            this.goTo(
+              "/testPerson?userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&role=" +
+              this.role
+            );
+          } else {
+            this.goTo(
+              "/testStudent?userid=" +
+              this.userid +
+              "&oid=" +
+              this.oid +
+              "&org=" +
+              this.org +
+              "&role=" +
+              this.role +
+              "&isN=" +
+              this.isN +
+              "&tcid=" +
+              this.tcid
+            );
+          }
         })
         .catch((err) => {
           this.$message.error("网络不佳");

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff