“a307420929” 2 年之前
父节点
当前提交
ad326b3a15

+ 8 - 2
src/views/menu5/menu5-2/index.vue

@@ -420,19 +420,25 @@ export default {
           },
           {
             id: "2",
-            label: "试卷数量",
+            label: "参考人数",
             prop: "student_amount",
             show: true,
           },
           {
             id: "3",
+            label: "已上传人数",
+            prop: "uploaded_amount",
+            show: true,
+          },
+          {
+            id: "4",
             label: "状态",
             prop: "status",
             filter: "upload_status",
             show: true,
           },
           {
-            id: "4",
+            id: "5",
             label: "创建时间",
             prop: "created_at",
             show: true,

+ 91 - 22
src/views/menu5/menu5-3/index.vue

@@ -47,23 +47,24 @@
         <template slot="tableBtn">
           <div class="tableInfo">
             <span>试卷名称:</span>
-            <span>{{taskInfo.name}}(T{{taskInfo.id}}-{{taskInfo.pno}})</span>
+            <span
+              >{{ taskInfo.name }}(T{{ taskInfo.id }}-{{ taskInfo.pno }})</span
+            >
           </div>
           <div class="tableInfo">
             <span>学校:</span>
-            <span>{{taskInfo.school_name}}</span>
+            <span>{{ taskInfo.school_name }}</span>
           </div>
           <div class="tableInfo">
             <span>年级:</span>
-            <span>{{taskInfo.grade_name}}</span>
+            <span>{{ taskInfo.grade_name }}</span>
           </div>
           <div class="tableInfo">
             <span>班级:</span>
-            <span>{{taskInfo.class_name}}</span>
+            <span>{{ taskInfo.class_name }}</span>
           </div>
           <div class="previewBox" id="XScannerContainer">
-            
-            <img v-if="imgSrc" style="width:100%" :src="imgSrc" alt="">
+            <img v-if="imgSrc" style="width: 100%" :src="imgSrc" alt="" />
             <div v-else>
               <img
                 style="position: absolute; top: 40%; left: 46%"
@@ -71,21 +72,30 @@
                 alt=""
               />
               <span style="position: absolute; top: 15%; color: #999999"
-              >等待扫描中</span>
+                >等待扫描中</span
+              >
             </div>
           </div>
         </template>
         <template slot="scanStatus" slot-scope="scope">
-          <span v-if="scope.row.status==2" style="color:#2BA245;">已上传</span>
-          <span v-if="scope.row.status==1" style="color:#e6a23c;">上传中...</span>
-          <span v-if="scope.row.status==0">待上传</span>
+          <span v-if="scope.row.status == 2" style="color: #2ba245"
+            >已上传</span
+          >
+          <span v-if="scope.row.status == 1" style="color: #e6a23c"
+            >上传中...</span
+          >
+          <span v-if="scope.row.status == 0">待上传</span>
         </template>
       </cloudTable>
       <div class="newForm" v-if="status == 1">
         <el-form ref="newForm" :model="newForm" label-width="110px">
           <el-form-item label="试卷名称">
             <el-col :span="8">
-              <el-select v-model="newForm.pid" placeholder="请选择试卷" filterable>
+              <el-select
+                v-model="newForm.pid"
+                placeholder="请选择试卷"
+                filterable
+              >
                 <el-option
                   v-for="item in paperList"
                   :key="item.id"
@@ -174,6 +184,55 @@
             ></el-input>
           </div>
           <div class="cloudSearch-item">
+            <div class="form-label">学校:</div>
+            <el-select
+              v-model="listQuery.sid"
+              placeholder="请选择学校"
+              @change="Schange"
+            >
+              <el-option
+                v-for="item in metaData['schools']"
+                :key="item.value"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+          <div class="cloudSearch-item">
+            <div class="form-label">年级:</div>
+            <el-select
+              v-model="listQuery.gid"
+              placeholder="请选择年级"
+              @change="Gchange"
+              :disabled="!listQuery.sid"
+            >
+              <el-option
+                v-for="item in metaData['grades']"
+                :key="item.value"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+          <div class="cloudSearch-item">
+            <div class="form-label">班级:</div>
+            <el-select
+              v-model="listQuery.cid"
+              placeholder="请选择班级"
+              :disabled="!listQuery.gid"
+            >
+              <el-option
+                v-for="item in metaData['classes']"
+                :key="item.value"
+                :label="item.name"
+                :value="item.id"
+              >
+              </el-option>
+            </el-select>
+          </div>
+          <div class="cloudSearch-item">
             <div class="form-label">状态:</div>
             <el-select v-model="listQuery.status" placeholder="请选择状态">
               <el-option label="待上传" :value="0"></el-option>
@@ -232,13 +291,13 @@ export default {
   data() {
     var token = this.Cookies.get("www-authenticate");
     return {
-      taskInfo:{
-        id:"",
-        name:"",
-        pno:"",
-        school_name:"",
-        grade_name:"",
-        class_name:""
+      taskInfo: {
+        id: "",
+        name: "",
+        pno: "",
+        school_name: "",
+        grade_name: "",
+        class_name: "",
       },
       status: 0,
       curID: "0",
@@ -298,7 +357,7 @@ export default {
             label: "状态",
             prop: "status",
             show: true,
-            custom:"scanStatus"
+            custom: "scanStatus",
           },
         ],
         data: [],
@@ -347,21 +406,28 @@ export default {
             prop: "year",
             show: true,
           },
+
           {
             id: "2",
-            label: "学生数量",
+            label: "参考人数",
             prop: "student_amount",
             show: true,
           },
           {
             id: "3",
+            label: "已上传人数",
+            prop: "uploaded_amount",
+            show: true,
+          },
+          {
+            id: "4",
             label: "状态",
             prop: "status",
             filter: "upload_status",
             show: true,
           },
           {
-            id: "4",
+            id: "5",
             label: "创建时间",
             prop: "created_at",
             show: true,
@@ -499,7 +565,7 @@ export default {
       let params = {
         name: data ? data.name : "",
         ctgid: data.id,
-        ptype:"exam"
+        ptype: "exam",
       };
       this.newForm.ctgid = params.ctgid;
       paperApi.getPapers(params).then((res) => {
@@ -593,12 +659,15 @@ export default {
         this.metaData["grades"] = res.data;
         this.$set(this.newForm, "gid", "");
         this.$set(this.newForm, "cid", "");
+        this.$set(this.listQuery, "gid", "");
+        this.$set(this.listQuery, "cid", "");
       });
     },
     Gchange(e, from) {
       DictsApi.classes({ gid: e }).then((res) => {
         this.metaData["classes"] = res.data;
         this.$set(this.newForm, "cid", "");
+        this.$set(this.listQuery, "cid", "");
       });
     },
 

+ 75 - 44
src/views/menu5/menu5-4/index.vue

@@ -1,7 +1,7 @@
 <template>
   <el-row class="menu5-1" :gutter="10" v-loading="loading">
     <!-- <el-col :span="5" class="left"> -->
-      <!-- <el-row :gutter="20">
+    <!-- <el-row :gutter="20">
         <el-col :span="12">
           <el-select v-model="leftQuery.period" placeholder="请选择学段">
             <el-option
@@ -23,10 +23,10 @@
           </el-select>
         </el-col>
       </el-row> -->
-      <!-- <el-row style="padding: 20px 6px 0; text-align: right">
+    <!-- <el-row style="padding: 20px 6px 0; text-align: right">
         <el-button class="add" size="small" @click="open1">新增</el-button>
       </el-row> -->
-      <!-- <div class="tree" ref="tree">
+    <!-- <div class="tree" ref="tree">
         <el-tree
           ref="treeInner"
           :data="treeData"
@@ -75,6 +75,14 @@
         <template v-slot:customOpt="data">
           <el-button
             class="operation"
+            :disabled="data.row.uploaded ? false : true"
+            :style="data.row.cut || data.row.uploaded ? '' : 'color:#E8EBF3'"
+            @click="answerPaper(data.row)"
+          >
+            答题卡
+          </el-button>
+          <el-button
+            class="operation"
             :disabled="data.row.cut || data.row.uploaded ? false : true"
             :style="data.row.cut || data.row.uploaded ? '' : 'color:#E8EBF3'"
             @click="setScore(data.row)"
@@ -152,6 +160,26 @@
         label-width="80px"
         :rules="dialogFormRules"
       >
+        <el-form-item label="科目" prop="subject">
+          <el-select v-model="dialogForm.subject" placeholder="请选择科目">
+            <el-option
+              v-for="item in metaData['subjects']"
+              :key="item.name"
+              :label="item.name"
+              :value="item.name"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="试卷大小" prop="size">
+          <el-select v-model="dialogForm.subject" placeholder="请选择试卷大小">
+            <el-option
+              v-for="item in ['A3', 'A4']"
+              :key="item"
+              :label="item"
+              :value="item"
+            ></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="试卷名称" prop="name">
           <el-input
             v-model="dialogForm.name"
@@ -182,6 +210,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
+
         <!-- 
         <el-form-item label="年份">
           <el-date-picker v-model="dialogForm.year" type="year" value-format="yyyy" placeholder="请输入年份">
@@ -277,7 +306,7 @@ import axios from "axios";
 import Clickoutside from "element-ui/src/utils/clickoutside";
 export default {
   name: "menu5-1",
-  metaDataType: ["periodsR", "subjectsR", "regions"],
+  metaDataType: ["periodsR", "subjectsR", "regions", "subjects"],
   directives: { Clickoutside },
   computed: {},
   data() {
@@ -328,20 +357,21 @@ export default {
             prop: "score",
             show: true,
           },
-          {
-            id: "4",
-            label: "标准卷上传状态",
-            prop: "uploaded",
-            show: true,
-            filter: "boolean",
-          },
-          {
-            id: "5",
-            label: "标准卷切割状态",
-            prop: "cut",
-            show: true,
-            filter: "boolean",
-          },
+         
+          // {
+          //   id: "4",
+          //   label: "标准卷上传状态",
+          //   prop: "uploaded",
+          //   show: true,
+          //   filter: "boolean",
+          // },
+          // {
+          //   id: "5",
+          //   label: "标准卷切割状态",
+          //   prop: "cut",
+          //   show: true,
+          //   filter: "boolean",
+          // },
           {
             id: "6",
             label: "电子版试卷上传状态",
@@ -358,13 +388,13 @@ export default {
           label: "操作",
           width: "280",
           data: [
-            {
-              id: "1",
-              label: "切割",
-              FunName: "cutPaper",
-              size: "mini",
-              show: true,
-            },
+            // {
+            //   id: "1",
+            //   label: "答题卡",
+            //   FunName: "answerPaper",
+            //   size: "mini",
+            //   show: true,
+            // },
             {
               id: "2",
               label: "编辑",
@@ -455,6 +485,7 @@ export default {
       },
 
       dialogFormRules: {
+        subject: [{ required: true, message: "请选择科目", trigger: "change" }],
         name: [{ required: true, message: "请输入名称", trigger: "blur" }],
         pno: [{ required: true, message: "请输入编号", trigger: "blur" }],
         pages: [{ required: true, message: "请输入试卷页数", trigger: "blur" }],
@@ -660,7 +691,7 @@ export default {
         ctgid: this.curID,
         page: this.dataTable.paginationOpt.pageIndex,
         size: this.dataTable.paginationOpt.pageRows,
-        ptype:'exam'
+        ptype: "exam",
       };
       paperApi.getPapers(params).then((res) => {
         this.dataTable.data = res.data;
@@ -690,7 +721,7 @@ export default {
       let params = {
         ctgid: 0,
         ctype: "exam",
-        ptype:'exam'
+        ptype: "exam",
         // imgs: this.dialogForm.imgs,
       };
       this.$refs.dialog.open((cancel) => {
@@ -713,14 +744,14 @@ export default {
         "http://osscache.scxjc.club/static/say365/eques_template.docx";
       link.click();
     },
+    answerPaper() {
+      this.$message({
+        type: "info",
+        message: "功能待开发!",
+      });
+    },
     handle(name, index, row) {
       switch (name) {
-        case "cutPaper":
-          this.$router.push({
-            path: "cutPage",
-            query: { paperId: row.id },
-          });
-          break;
         case "edit":
           this.$refs.dialog.config.title = "编辑试卷信息";
           row.ctype = "work";
@@ -740,25 +771,25 @@ export default {
               // this.dialogForm.imgs = this.dialogForm.imgs.map((item) =>
               //   item.url ? item.url : item
               // );
-              this.$refs["dialogForm"].validate((valid)=>{
-                if(valid){
+              this.$refs["dialogForm"].validate((valid) => {
+                if (valid) {
                   paperApi.edit(this.dialogForm).then((res) => {
-                    if(res.mess=="success"){
+                    if (res.mess == "success") {
                       this.$message({
-                        type:"success",
-                        message:"修改成功"
-                      })
+                        type: "success",
+                        message: "修改成功",
+                      });
                       this.getItems(this.curTree);
                       cancel();
-                    }else{
+                    } else {
                       Message({
-                        type:"error",
-                        message:res.message
-                      })
+                        type: "error",
+                        message: res.message,
+                      });
                     }
                   });
                 }
-              })
+              });
             });
           });
           break;

+ 13 - 6
src/views/menu6/menu6-1/index.vue

@@ -105,6 +105,14 @@
         >
           <li v-for="(item, index) in resList" class="list-item" :key="index">
             <el-row>
+              <el-col style="padding: 20px 20px 0">
+                <span>来源:{{item.task_type=='work'?'作业 ':'考试 '}}</span>
+                <span>学校:{{item.school_name}}</span>
+                <span>年级:{{item.grade_name}}</span>
+                <span>班级:{{item.class_name}}</span>
+                <span>名称:{{item.task_name}}</span>
+                </el-col
+              >
               <el-col :span="18">
                 <div class="tm" v-exchangeHtml:foo="item.stem"></div>
                 <!-- <div class="tm">{{ item.stem }}</div> -->
@@ -115,7 +123,7 @@
                   <span>D.xxxxxxxxxxxxxxxxxx</span> -->
                 </div>
                 <div class="ly">
-                  <span style="color: #999999">{{ item.task_name }}</span>
+                  <!-- <span style="color: #999999">{{ item.task_name }}</span> -->
                   <span style="color: #999999">答案:{{ item.answer }}</span>
                   <span
                     style="color: #52c4ff; cursor: pointer"
@@ -124,10 +132,9 @@
                   >
                 </div>
                 <div class="tj">
-                  <span style="color: #fa0a2f"
-                    >错题率:{{ item.error_ratio }}</span
-                  >
-                  <span
+                  <span style="float: right">
+                    <span style="margin-right: 20px; color: #fa0a2f"
+                      >错题率:{{ item.error_ratio }}</span
                     ><span style="margin-right: 20px"
                       >总人数:{{ item.student_count }}</span
                     >
@@ -507,7 +514,7 @@ export default {
               border-bottom: 1px solid #ededed;
             }
             .tj {
-              display: flex;
+              display: block;
               padding-top: 10px;
               justify-content: space-between;
               width: 100%;

+ 15 - 5
src/views/menu6/menu6-2/index.vue

@@ -109,31 +109,41 @@ export default {
             show: true,
           },
           {
-            id: "1",
             label: "学号",
             prop: "student_sno",
             show: true,
           },
           {
-            id: "2",
+            label: "学校",
+            prop: "school_name",
+            show: true,
+          },
+          {
+            label: "年级",
+            prop: "grade_name",
+            show: true,
+          },
+          {
+            label: "班级",
+            prop: "class_name",
+            show: true,
+          },
+          {
             label: "错题数",
             prop: "total_errors",
             show: true,
           },
           {
-            id: "3",
             label: "作业错题",
             prop: "work_error_count",
             show: true,
           },
           {
-            id: "4",
             label: "考试错题",
             prop: "exam_error_count",
             show: true,
           },
           {
-            id: "5",
             label: "综合错题率",
             prop: "error_ratio",
             show: true,