Переглянути джерело

创建分支提交最新代码

TheLittlePrince 6 роки тому
батько
коміт
188a6abbd0

+ 128 - 35
src/components/SeacherHomewrokStatus.vue

@@ -12,8 +12,6 @@
           @click="AutoApor()"
           :class="{Apporvalactive:Activeindex == true,ApporStyles:true}"
         >匹配知识点老师</div>
-        <!-- <span class="bank-active" @click="isShow(2)">查看</span>
-        <span class="bank-active" @click="groupPicture()">作业原图</span> -->
       </el-col>
       <el-col :span="14" :offset="0">
         <div class="teach-block">
@@ -24,10 +22,7 @@
               v-model="filters.inputValue"
               class="miniorinput-with-Allot"
             />
-            <span   
-              @click="UnallotHomework()"
-              class="miinorSeachIcon el-icon-search"
-            ></span>
+            <span @click="UnallotHomework()" class="miinorSeachIcon el-icon-search"></span>
           </div>
         </div>
       </el-col>
@@ -56,36 +51,87 @@
       <el-table-column prop="picNums" label="张数" header-align="center"></el-table-column>
       <el-table-column prop="status" label="状态" header-align="center" v-if="Activeindex == false">
         <template slot-scope="scope">
-          <span v-if="scope.row.status ==1 " >未分配</span>
-          <span v-if="scope.row.status ==2 " >已分配未批改</span>
-          <span v-if="scope.row.status ==3 " >批改中</span>
+          <span v-if="scope.row.status ==1 ">未分配</span>
+          <span v-if="scope.row.status ==2 ">已分配未批改</span>
+          <span v-if="scope.row.status ==3 ">批改中</span>
         </template>
       </el-table-column>
       <el-table-column prop="status" label="状态" header-align="center" v-if="Activeindex == true">
-         <template slot-scope="scope">
-          <span v-if="scope.row.status ==1 " >未分配</span>
-          <span v-if="scope.row.status ==2 " >已分配未匹配</span>
-          <span v-if="scope.row.status ==3 " >匹配中</span>
+        <template slot-scope="scope">
+          <span v-if="scope.row.status ==1 ">未分配</span>
+          <span v-if="scope.row.status ==2 ">已分配未匹配</span>
+          <span v-if="scope.row.status ==3 ">匹配中</span>
+        </template>
+      </el-table-column>
+
+      <el-table-column prop="waitTime" label="等待时长" header-align="center">
+        <template slot-scope="scope">
+          <span
+            :class="[timeFn(scope.row.waitTime) >= 600 ?'date-time-red':'']"
+          >{{scope.row.waitTime}}</span>
+          <!-- @click="isShow(3,scope.row)" -->
         </template>
       </el-table-column>
-      <el-table-column prop="waitTime" label="等待时长" header-align="center"></el-table-column>
       <el-table-column prop label="批改老师" header-align="center" width="200">
         <template slot-scope="scope">
-          <span class="bank-active" >{{scope.row.teacherName}}</span>
+          <span class="bank-active">{{scope.row.teacherName}}</span>
           <!-- @click="isShow(3,scope.row)" -->
         </template>
       </el-table-column>
       <el-table-column prop="statusTime" label="状态时间" header-align="center"></el-table-column>
       <el-table-column prop label="作业图片" header-align="center" width="200">
         <template slot-scope="scope">
-          <span style="color:#67c23a" class="bank-active" @click="GetStudentHomeworkDetail(scope.row)">查看</span>
+          <span
+            style="color:#67c23a"
+            class="bank-active"
+            @click="GetStudentHomeworkDetail(scope.row)"
+          >查看</span>
         </template>
       </el-table-column>
-      <el-table-column prop="status" label header-align="left" width="200">
+      <!-- 校区管理员批改/分配按钮 -->
+      <el-table-column prop="status" label header-align="left" width="400" v-if="SchoolData ==1">
         <template slot-scope="scope">
-          <div v-if="scope.row.status !==3 " class="UpTeacherIDiNfo" @click="isShow(1,scope.row)">
+          <!-- SchoolData -->
+          <!-- 校区管理员批改/分配按钮 -->
+          <el-button
+            v-if="scope.row.canCorrect ==1 && Activeindex == false"
+            type="success"
+            plain
+            @click="AllToAppovalOline(scope.row)"
+          >
+            <span>去批改</span>
+          </el-button>
+          <el-button
+            v-if="scope.row.canAllot ==1"
+            type="success"
+            plain
+            @click="isShow(1,scope.row)"
+          >
             <span>分配</span>
-          </div>
+          </el-button>
+        </template>
+      </el-table-column>
+      <!-- 超级管理员批改按钮 -->
+      <el-table-column prop="status" label header-align="left" width="400" v-if="SchoolData ==0">
+        <template slot-scope="scope">
+          <!-- SchoolData -->
+          <el-button
+            v-if="scope.row.canCorrect ==1 && SchoolData ==0"
+            type="success"
+            plain
+            @click="AllToAppovalOline(scope.row)"
+          >
+            <span v-if="Activeindex == false">去批改</span>
+            <span v-if="Activeindex == true">去匹配</span>
+          </el-button>
+          <el-button
+            v-if="scope.row.canAllot ==1"
+            type="success"
+            plain
+            @click="isShow(1,scope.row)"
+          >
+            <span>分配</span>
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -94,8 +140,7 @@
       background
       @size-change="handleSizeChange"
       @current-change="pageChange"
-      :page-sizes="[10, 20, 30, 40]"
-      layout="total, sizes, prev, pager, next, jumper"
+      layout="total, prev, pager, next, jumper"
       :total="parseInt(StudentHomeworkNoFeedbackList.pages)"
     ></el-pagination>
     <!--可分配老师-->
@@ -429,15 +474,21 @@
 </template>
 <script>
 import { mapGetters, mapActions } from "vuex";
-import { IMG_BASE_URL } from "@/config";
+import { IMG_BASE_URL, APPOR_BASE_URL } from "@/config";
 export default {
   components: {},
   name: "actvResolveLabel",
-  props: {},
+  props: ["SchoolData"],
   data() {
     return {
+      D: new Date().getDate() + " ",
+      Nowyear: new Date().getFullYear(),
+      Nowmonth: new Date().getMonth() + 1,
+      unionid: localStorage.getItem("unionid"),
       BASE_URL: IMG_BASE_URL,
       hiddenModel: false,
+      ApporhomeworkId: "",
+      TeacherApporvalStyle: 1,
       OpenID: false, //解封校区管理员弹框
       closeID: false, //封号校区管理员弹框
       rePush: false, //升级校区管理员弹框
@@ -473,15 +524,34 @@ export default {
   created() {},
   watch: {
     BeforetoTeacherstatues(val, oldVal) {
-     this.UnallotHomework();
+      this.UnallotHomework();
     },
-        InfoTeacherstatues(val, oldVal) {
+    InfoTeacherstatues(val, oldVal) {
       this.pesiorFun();
     },
-      ApporingTeacherstatues(val, oldVal) {
-         this.hiddenModel = false;
-     this.UnallotHomework();
+    ApporingTeacherstatues(val, oldVal) {
+      this.hiddenModel = false;
+      this.UnallotHomework();
     },
+    NewstudentBeforetoTeacherAllotCode(val, oldVal) {
+      //去批改前的watch监听
+      // debugger
+      console.log(111111111111111111111111111111111);
+      console.log(this.ApporhomeworkId);
+      console.log(this.homeworkLIst.teacherId);
+      console.log(111111111111111111111111111111111);
+      window.open(
+        APPOR_BASE_URL +
+          "?homeworkId=" +
+          this.ApporhomeworkId +
+          "&unionid=" +
+          this.unionid +
+          "&teacherId=" +
+          this.homeworkLIst.teacherId +
+          "&state=" +
+          this.TeacherApporvalStyle
+      );
+    }
   },
   computed: {
     ...mapGetters([
@@ -490,8 +560,9 @@ export default {
       "GetTeacherDetail",
       "getAllotManagerList",
       "StudentHomeworkNoFeedbackList",
-       "InfoTeacherstatues",
-       "ApporingTeacherstatues"
+      "InfoTeacherstatues",
+      "ApporingTeacherstatues",
+      "NewstudentBeforetoTeacherAllotCode"
     ])
   },
   methods: {
@@ -556,7 +627,24 @@ export default {
         _this.ModelAppor = false;
       }
     },
-      async pesiorFun() {
+    timeFn(d1) {
+      const hour = d1.split(":")[0];
+      const min = d1.split(":")[1];
+      const sec = d1.split(":")[2];
+       const s = Number(hour * 3600) + Number(min * 60) + Number(sec);
+      return s;
+    },
+    // 所有未批改去批改前分配老师
+    async AllToAppovalOline(v) {
+      this.ApporhomeworkId = v.homeworkId;
+      this.homeworkLIst.teacherId = v.teacherId;
+      this.$store.dispatch("NewStudentBeforetoTeacherAllot", {
+        teacherId: localStorage.getItem("userId"),
+        homeworkId: v.homeworkId,
+        originTeacherId: v.teacherId
+      });
+    },
+    async pesiorFun() {
       var arr = this.GetTeacherDetail.grade.split(",");
       this.arrPeriod = this.GetTeacherDetail.period.split(",");
       var arrList = [];
@@ -576,17 +664,17 @@ export default {
       // debugger
       this.$store.dispatch("GetStudentHomeworkDetail", {
         teacherId: v.teacherId,
-        homeworkId:v.homeworkId,
-         type: this.TeacherType
+        homeworkId: v.homeworkId,
+        type: this.TeacherType
       });
-        this.$router.push({
+      this.$router.push({
         path: "/Super/HomeWorkPictrue"
       });
     },
     // 查看老师详情信息
     async GetTeacherInfo() {
       this.$store.dispatch("GetTeacherDetail", {
-        teacherId:this.TeacherIds
+        teacherId: this.TeacherIds
       });
     },
     // 封号
@@ -630,12 +718,14 @@ export default {
       this.Activeindex = false;
       this.TeacherType = 8;
       this.filters.inputValue = "";
+      this.TeacherApporvalStyle = 1;
       this.UnallotHomework();
     },
     // 匹配知识点老师
     AutoApor() {
       this.Activeindex = true;
       this.TeacherType = 13;
+      this.TeacherApporvalStyle = 3;
       this.filters.inputValue = "";
       this.UnallotHomework();
     },
@@ -1122,4 +1212,7 @@ el-table {
   border-radius: 0 0 30px 30px;
   background-color: #f6f7fb;
 }
+.date-time-red {
+  color: red;
+}
 </style>

+ 12 - 12
src/config/index.js

@@ -13,21 +13,21 @@ if (process.env.NODE_ENV === 'development') {
      APPOR_BASE_URL = 'https://xtkmt.sharingschool.com/kmt/index.html#/' //测试环境作业批改地址
 } else {
 // 1.测试环境配置
-             BASE_URL = 'https://xt.sharingschool.com/sz' //测试环境服务器地址
-             APP_ID = "wx3d4605f43beda11a"//测试环境AppId
-             RESET_URL = "https://xtkmt.sharingschool.com/manager/index.html#/" //测试环境微信重定向页面
-             TYPE = 0
-             IMG_BASE_URL = 'https://xtimg.sharingschool.com/' //测试环境图片地址
-             APPOR_BASE_URL = 'https://xtkmt.sharingschool.com/kmt/index.html#/' //测试环境作业批改地址
+            //  BASE_URL = 'https://xt.sharingschool.com/sz' //测试环境服务器地址
+            //  APP_ID = "wx3d4605f43beda11a"//测试环境AppId
+            //  RESET_URL = "https://xtkmt.sharingschool.com/manager/index.html#/" //测试环境微信重定向页面
+            //  TYPE = 0
+            //  IMG_BASE_URL = 'https://xtimg.sharingschool.com/' //测试环境图片地址
+            //  APPOR_BASE_URL = 'https://xtkmt.sharingschool.com/kmt/index.html#/' //测试环境作业批改地址
 
 //  -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  // 2.正式环境配置(Kmt)
-    //       BASE_URL = 'https://t.sharingschool.com/sz'; //正式环境地址 
-    //       APP_ID = "wxd18ca9555a939281"//正式环境
-    //       RESET_URL = "https://kmt.sharingschool.com/aijia/manager/index.html#/" //正式环境微信重定向页面
-    //       TYPE = 0
-    //       IMG_BASE_URL = 'https://img.sharingschool.com'; //正式环境图片地址;
-    //       APPOR_BASE_URL = 'https://kmt.sharingschool.com/aijia/kmt/index.html#/'; //正式环境作业批改地址地址;
+          BASE_URL = 'https://t.sharingschool.com/sz'; //正式环境地址 
+          APP_ID = "wxd18ca9555a939281"//正式环境
+          RESET_URL = "https://kmt.sharingschool.com/aijia/manager/index.html#/" //正式环境微信重定向页面
+          TYPE = 0
+          IMG_BASE_URL = 'https://img.sharingschool.com'; //正式环境图片地址;
+          APPOR_BASE_URL = 'https://kmt.sharingschool.com/aijia/kmt/index.html#/'; //正式环境作业批改地址地址;
 
 // -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  // 3.OSS正式环境(aiKmt)

+ 16 - 2
src/pages/Qualityinspector/checkListInfo.vue

@@ -201,7 +201,7 @@
                       <span>{{v.checkCount}}/{{v.feedbackCount}}</span>)
                     </div>
 
-                    <div class="ApporTeacher" style="width: 25%">
+                    <div v-if="v.checkCount < v.feedbackCount" class="ApporTeacher" style="width: 25%">
                       <el-button type="warning" @click="CheackHomeworkStatus(v)">
                         <span href style="text-decoration:none;color:#ffffff;">去质检</span>
                       </el-button>
@@ -214,6 +214,20 @@
                         style="color:#fbfbfb;font-size:12px;"
                       >报错{{v.wrongCount}}</span>
                     </div>
+                    
+                    <div v-if="v.checkCount = v.feedbackCount" class="ApporTeacher" style="width: 25%">
+                      <el-button type="info" @click="CheackHomeworkStatus(v)">
+                        <span href style="text-decoration:none;color:#ffffff;">已质检</span>
+                      </el-button>
+                      <span
+                        v-if="v.wrongCount > 0"
+                        style="color:red;font-size:12px;"
+                      >报错{{v.wrongCount}}</span>
+                      <span
+                        v-if="v.wrongCount == 0"
+                        style="color:#fbfbfb;font-size:12px;"
+                      >报错{{v.wrongCount}}</span>
+                    </div>
                   </div>
                   <!-- 分页显示 -->
 
@@ -341,8 +355,8 @@
 </template>
 <script>
 import { mapGetters, mapActions } from "vuex";
-import { IMG_BASE_URL, APPOR_BASE_URL } from "@/ImgConfig";
 
+import { IMG_BASE_URL, APPOR_BASE_URL } from "@/config";
 export default {
   components: {},
   name: "actvResolveLabel",

+ 10 - 2
src/pages/home/SchoolManager.vue

@@ -677,6 +677,9 @@
       <TeamWorkLists v-if="modelindex == 3"></TeamWorkLists>
       <!-- 组内排班 -->
       <TeamworkScheduling v-if="this.modelindex == 4"></TeamworkScheduling>
+        <el-col :span="18" class="main" :offset="0" v-if="modelindex == 5">
+        <SeacherHomewrokStatus :SchoolData="SchoolData"></SeacherHomewrokStatus>
+      </el-col>
     </el-row>
     <!--可分配老师-->
     <div class="showModel" @click="allShowModel(1)" v-if="hiddenModel"></div>
@@ -1018,17 +1021,18 @@
 // import { IMG_BASE_URL, APPOR_BASE_URL } from "@/ImgConfig";
 import { IMG_BASE_URL, APPOR_BASE_URL } from "@/config";
 import { mapGetters, mapActions } from "vuex";
+import SeacherHomewrokStatus from "@/components/SeacherHomewrokStatus";
 import TeamworkScheduling from "@/components/TeamworkScheduling";
 import TeamWorkLists from "@/components/TeamWorkLists";
 import HomeworkTotalList from "@/components/HomeworkTotalList";
 import { Loading } from "element-ui";
 export default {
-  components: { TeamWorkLists, TeamworkScheduling, HomeworkTotalList },
+  components: { TeamWorkLists, TeamworkScheduling, HomeworkTotalList,SeacherHomewrokStatus },
   name: "actvResolveLabel",
   props: {},
   data() {
     return {
-      chartData1: {},
+      SchoolData: "1",
       unionid: localStorage.getItem("unionid"),
       accessToken: localStorage.getItem("accessToken"), //token
       managerId: "", // 超级管理员登陆ID
@@ -1172,6 +1176,9 @@ export default {
         },
         {
           text: "组内排班"
+        },
+          {
+          text: "未批改/匹配作业"
         }
       ],
       filters: {
@@ -1291,6 +1298,7 @@ export default {
     },
     BeforetoTeacherstatues(val, oldVal) {
       //普通的watch监听
+      // debugger
       // 查看老师批改作业列表
       this.$store.dispatch("TeacherHomeworkList", {
         teacherId: this.homeworkLIst.teacherId,

+ 4 - 4
src/pages/super/HomeWorkPictrue.vue

@@ -10,9 +10,9 @@
               <span class="studentName">{{StudentHomeworkDetail.name}}同学/{{StudentHomeworkDetail.subject}}作业</span>
               <span v-if="StudentHomeworkDetail.status ==1" style="color:#52cc60;">/未分配</span>
                <span v-if="StudentHomeworkDetail.status ==2" style="color:#52cc60;">/已分配未批改</span>
-             <span v-if="StudentHomeworkDetail.status ==2" style="color:#52cc60;">/批改中</span>
+             <span v-if="StudentHomeworkDetail.status ==3" style="color:#52cc60;">/批改中</span>
               <br />
-              <span class="timeInfo">{{StudentHomeworkDetail.statusTime}}开始匹配</span>
+              <span class="timeInfo">{{StudentHomeworkDetail.statusTime}}</span>
             </div>
           
           </el-col>
@@ -61,7 +61,7 @@
                   <!-- 补拍 -->
                   <img v-if="v.type ==2" class="logoPic" src="../../assets/img/ReCamrea (1).png" />
                   <!-- 不批改 -->
-                  <img v-if="v.type ==10" class="logoPic" src="../../assets/img/NoReset (1).png" />-->
+                  <img v-if="v.type ==10" class="logoPic" src="../../assets/img/NoReset (1).png" />
                 </li>
               </ul>
             </div>
@@ -151,7 +151,7 @@ export default {
   background: #000000;
   text-align: center;
   line-height: 30px;
-  opacity: 0.6;
+  opacity: 0.4;
   color: #ffff;
   font-size: 8px;
 }

+ 2 - 1
src/pages/super/SchoolManager.vue

@@ -1335,7 +1335,8 @@ export default {
         },
         {
           text: "组内排班"
-        }
+        },
+
       ],
       filters: {
         //超级管理员的当天数据

+ 2 - 1
src/pages/super/SuperAdmin.vue

@@ -120,7 +120,7 @@
         </div>
       </el-col>
       <el-col :span="17" class="main" :offset="0" v-if="modelindex == 1">
-        <SeacherHomewrokStatus></SeacherHomewrokStatus>
+        <SeacherHomewrokStatus :SchoolData="SchoolData"></SeacherHomewrokStatus>
       </el-col>
     </el-row>
 
@@ -259,6 +259,7 @@ export default {
   props: {},
   data() {
     return {
+       SchoolData: "0",
       BASE_URL: IMG_BASE_URL,
       hiddenModel: false,
       isPigai: false,

+ 2 - 0
src/store/getters.js

@@ -26,6 +26,7 @@ const getters = {
   getAllotManagerList: state => state.user.getAllotManagerList  || {},
   homeworkRecoveryList: state => state.user.homeworkRecoveryList,
   BeforetoTeacherAllotCode: state => state.user.BeforetoTeacherAllotCode,
+  NewstudentBeforetoTeacherAllotCode:state => state.user.NewstudentBeforetoTeacherAllotCode,
   SuperBeforetoTeacherAllotCode :state => state.user.SuperBeforetoTeacherAllotCode,
   BeforetoTeacherstatues :state => state.user.BeforetoTeacherstatues,
   errorWarningList :state => state.user.errorWarningList,
@@ -44,6 +45,7 @@ const getters = {
   AllTeacherInfoList:state => state.user.AllTeacherInfoList,
   StudentHomeworkDetail:state => state.scheduling.StudentHomeworkDetail,
   StudentHomeworkNoFeedbackList:state => state.scheduling.StudentHomeworkNoFeedbackList,
+
   // 排班系统
   FindCalendarList:state => state.scheduling.FindCalendarList,
   FindHaveTeacherList:state => state.scheduling.FindHaveTeacherList,

+ 24 - 1
src/store/modules/user.js

@@ -49,7 +49,8 @@ const user = {
     FindSubjectEngCharts:[],
     AllFindSubjectEngCharts:[],
     GetKnowledgeTeacherSalaryList:[],
-		AllTeacherInfoList:[]
+    AllTeacherInfoList:[],
+    NewstudentBeforetoTeacherAllotCode:""
   },
 
   mutations: {
@@ -122,6 +123,9 @@ const user = {
     SET_GET_SUCCESS_CODE:(state,BeforetoTeacherAllotCode) => {
       state.BeforetoTeacherAllotCode = BeforetoTeacherAllotCode
     },
+    SET_NEW_STUDENT_SUCCESS_CODE:(state,NewstudentBeforetoTeacherAllotCode) => {
+      state.NewstudentBeforetoTeacherAllotCode = NewstudentBeforetoTeacherAllotCode
+    },
     SET_GET_SUCCESS_TEACHER:(state,BeforetoTeacherstatues) => {
       state.BeforetoTeacherstatues = BeforetoTeacherstatues
     },
@@ -702,6 +706,25 @@ const user = {
                 })
               })
             },
+              // 新增页面管理员去批改前分配老师
+              NewStudentBeforetoTeacherAllot({ commit, state }, data) {
+                return new Promise((resolve, reject) => {
+                  axios.post(TeacherAllot, data).then(response => {
+                    const data = response || {}
+                    if (data.code === '999'){
+                      commit('SET_NEW_STUDENT_SUCCESS_CODE',new Date());
+                      // Message.success('分配成功')
+                    }
+                    if (response.code === '000'){
+                      Message.error(response.msg)
+                        commit('SET_APPORING_STATUS',new Date());
+                      resolve(response)
+                    }
+                  }).catch(error => {
+                    reject(error)
+                  })
+                })
+              },
     // 登出
     // 查看超级管理员校区列表
     SuperManagerList({ commit, state }, data) {