ソースを参照

Merge branch 'master' of http://47.112.200.206:3000/aijia/kmt

TheLittlePrince 6 年 前
コミット
9e33065227

+ 5 - 5
src/components/SuperComponent.vue

@@ -54,11 +54,11 @@ export default {
     name: "批改老师薪酬表",
     href: "CheckTeacherPay",
   },
-          // {
-          //   id: "4",
-          //   name: "作业回收站",
-          //   href: "HomeworkRecycle",
-          // },
+          {
+            id: "4",
+            name: "作业回收站",
+            href: "HomeworkRecycle",
+          },
  ],
       checkindex:0
     };

+ 48 - 6
src/pages/super/CheckTeacherAudit.vue

@@ -175,6 +175,46 @@
           label: "英语"
         }
       ],
+        // applyTeacherList:{
+        // list: [
+        //   {
+        //     "grade": "",
+        //     "imgUrl": "/userimg/2019/03/12/aabe48b1-b9dc-4d5b-9597-b28db80503f3.jpg",
+        //     "name": "刘灿",
+        //     "period": "",
+        //     "school": "",
+        //     "subject": "语文;数学;英语",
+        //     "teacherId": "29bcf766-94f7-4d95-bf49-890e2f5cd45b"
+        //   },
+        //   {
+        //     "grade": "一年级,二年级,三年级,四年级,五年级,六年级,七年级,八年级,九年级,高一,高二,高三",
+        //     "imgUrl": "/userimg/2019/03/12/aabe48b1-b9dc-4d5b-9597-b28db80503f3.jpg",
+        //     "name": "刘灿",
+        //     "period": "周一,周二",
+        //     "school": "南方科技大学",
+        //     "subject": "语文;数学;英语",
+        //     "teacherId": "29bcf766-94f7-4d95-bf49-890e2f5cd45b"
+        //   },
+        //   {
+        //     "grade": "",
+        //     "imgUrl": "",
+        //     "name": "almond flavour",
+        //     "period": "周一",
+        //     "school": "",
+        //     "subject": "语文",
+        //     "teacherId": "d17c7419-7345-45e4-ba0b-c5e960add8ed"
+        //   },
+        //   {
+        //     "grade": "",
+        //     "imgUrl": "",
+        //     "name": "颜佳雪语文",
+        //     "period": "",
+        //     "school": "",
+        //     "subject": "",
+        //     "teacherId": "c9fa8b2f-dec6-4da8-b07c-2fdf014457c4"
+        //   }
+        // ],
+        // },
         ItemList: [
           {
             text:'数据监控'
@@ -199,10 +239,12 @@
           count: 0,
           orderField: "",
           orderAD: ""
-        }
+        },
+
       };
     },
     watch: {},
+    //
     computed: {
       ...mapGetters(["getUser","applyTeacherList"])
     },
@@ -249,9 +291,11 @@
         this.applyTeacherList.list = (res => {
           const d = []
           for (let i in res) {
+            var arr = [];
+            arr = res[i].period.split(',')
             d.push( {
               gradeList: this.gradeBag(i),
-              periodList: res[i].period.split(','),
+              periodList: arr,
               imgUrl: res[i].imgUrl,
               name: res[i].name,
               school:res[i].school,
@@ -262,7 +306,7 @@
           return d
         })(this.applyTeacherList.list)
         this.list = this.applyTeacherList.list;
-        // console.log(this.list)
+        console.log(this.list)
       },
       //申请审批操作
       async ApplyOperate() {
@@ -274,7 +318,7 @@
         });
         this.allShowModel(this.operate);
         setTimeout(function () {
-          _that.SuperApplyTeacherList()
+          // _that.SuperApplyTeacherList()
           window.location.reload();
         }, 1000);
       },
@@ -378,8 +422,6 @@
     mounted() {
       sessionStorage.setItem('tabIndex',1);
       this.SuperApplyTeacherList();
-
-      // console.log(this.list)
     }
   };
 </script>

+ 166 - 95
src/pages/super/HomeworkRecycle.vue

@@ -8,7 +8,7 @@
       <el-col :span="20" class="main" :offset="2">
 
         <el-table
-          :data="homeworkRecoveryList"
+          :data="homeworkRecoveryList.list"
           :header-cell-class-name="tableheaderClassName"
           :header-cell-style="{
           'color': '#999999',
@@ -45,7 +45,7 @@
             header-align="center"
           >
             <template slot-scope="scope">
-              <span class="allocation">{{scope.row.ownReplenish==1?'有':'无'}}</span>
+              <span >{{scope.row.ownReplenish==1?'有':'否'}}</span>
             </template>
           </el-table-column>
           <el-table-column
@@ -54,38 +54,77 @@
             header-align="center"
             width="450"
           >
-            <template slot-scope="">
-                <span class="allocation">去分配</span>
+            <template slot-scope="scope">
+                <span class="allocation" @click="isShow(scope.row.grade,scope.row.subject,scope.row.homeworkId)">去分配</span>
             </template>
           </el-table-column>
         </el-table>
         <!-- 分页显示 -->
-        <!--<div class="page-block" v-if="parseInt(homeworkRecoveryList.pages) > 0">-->
-          <!--<el-pagination-->
-            <!--background-->
-            <!--@size-change="handleSizeChange"-->
-            <!--@current-change="pageChange"-->
-            <!--:page-sizes="[10]"-->
-            <!--layout="total, sizes, prev, pager, next, jumper"-->
-            <!--:total= parseInt(homeworkRecoveryList.pages)-->
-          <!--&gt;</el-pagination>-->
-        <!--</div>-->
+        <div class="page-block" v-if="parseInt(homeworkRecoveryList.pages) > 0">
+          <el-pagination
+            background
+            @size-change="handleSizeChange1"
+            @current-change="pageChange1"
+            :page-sizes="[10]"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total= parseInt(homeworkRecoveryList.pages)
+          ></el-pagination>
+        </div>
       </el-col>
 
     </el-row>
 
 
     <!--弹框-->
-    <div class='showModel' @click="allShowModel(2)" v-if="isPigai"></div>
-    <div class='model' v-if="isPigai">
-      <div class='model-text'>
-        <div class="model-text-items">
-          <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(2)" class="model-text-items-close"></div>
-          <div>是否导出表格?</div>
+    <!--所有未批改可分配老师列表弹框-->
+    <div class="showModel" @click="allShowModel(2)" v-if="isPigai"></div>
+    <div class="model" style="width:50%" v-if="isPigai">
+      <div class="model-text" style="padding: 0 30px">
+        <div class="model-manager">
+          <div>作业可分配老师</div>
+          <div>
+            <img src="../../assets/img/del@2x.png" alt @click="allShowModel(2)">
+          </div>
+        </div>
+        <div class="allocation-items" v-for="(v, k) in TeacherAllotList.list" :key="k" >
+          <div class="model-items-left">
+            <div class="model-items-left-top">
+              <div>
+                <img
+                  :src="BASE_URL + v.imgUrl"
+                  v-if="v.imgUrl"
+                  alt
+                  class="model-items-left-top-img"
+                >
+                <img
+                  src="../../assets/img/user.jpg"
+                  v-if="!v.imgUrl"
+                  alt
+                  class="model-items-left-top-img"
+                >
+                <div style="display: inline-block;text-align: left;">
+                  <div style="font-size: 24px;margin-left: 10px">{{v.name}}</div>
+                  <div class="model-items-left-top-number">等待学生:{{v.waitCount}}</div>
+                </div>
+              </div>
+              <div>
+                <el-button
+                  @click="GOtoTeacherAllot(v)"
+                  type="success"
+                >分配</el-button>
+              </div>
+            </div>
+          </div>
         </div>
-        <div class="model-btn">
-          <div class="model-btn-items main-gay">是</div>
-          <div class="model-btn-items model-grdeen">否</div>
+        <div class="pages">
+          <el-pagination
+            background
+            @size-change="handleSizeChange"
+            @current-change="pageChange"
+            :page-sizes="[10]"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="parseInt(TeacherAllotList.pages)"
+          ></el-pagination>
         </div>
       </div>
     </div>
@@ -104,7 +143,19 @@
         selMonth:'',
         hiddenModel:false,
         isPigai:false,
-        list:[],
+        // homeworkRecoveryList:{
+        //   list:[
+        //     {
+        //       createTime:1111,
+        //       subject:'英语',
+        //       studentName:4621,
+        //       ownReplenish:888,
+        //       uncorrectedCount:1,
+        //       grade:'一年级',
+        //       homeworkId:'1545623108745210'
+        //     },
+        //   ],
+        // },
         filters: {
           actvNm: "",
           actvCrtUserId: "",
@@ -118,12 +169,21 @@
           count: 0,
           orderField: "",
           orderAD: ""
+        },
+        allotList:{
+          pageNo: 1,
+          pageSize: 10,
+          count: 0,
+          grade:'',
+          subject:'',
+          homeworkId:''
         }
       };
     },
     watch: {},
+  // ,'homeworkRecoveryList'
     computed: {
-      ...mapGetters(["getUser",'homeworkRecoveryList'])
+      ...mapGetters(["getUser",'homeworkRecoveryList','TeacherAllotList'])
     },
     methods: {
       ...mapActions(["setUser"]),
@@ -132,17 +192,12 @@
         return "table-head-th";
       },
       //弹框
-      isShow(str){
-        let _this = this;
-        console.log(str)
-        if (str == 1){
-          _this.hiddenModel = true;
-          _this.isPigai = false;
-        } else if (str == 2){
-          _this.isPigai = true;
-          _this.hiddenModel = false;
-        }
-
+      isShow(str,t,id){
+          this.isPigai = true;
+          this.allotList.grade = str;
+          this.allotList.subject = t;
+          this.allotList.homeworkId = id
+          this.TeacherAllot()
       },
       //关闭弹框
       allShowModel(str) {
@@ -177,11 +232,32 @@
           maxCreateTime: this.formatDate()
         });
       },
-
+      // 可分配老师列表
+      async TeacherAllot() {
+        this.$store.dispatch("TeacherAllotList", {
+          grade: this.allotList.grade,
+          subject: this.allotList.subject,
+          maxCreateTime: this.formatDate(),
+          pageNo: this.allotList.pageNo,
+          pageSize: this.allotList.pageSize
+        });
+      },
+      // 分配老师
+      async GOtoTeacherAllot(v) {
+        this.$store.dispatch("toTeacherAllot", {
+          teacherId: v.teacherId,
+          homeworkId: this.allotList.homeworkId
+        });
+        this.isPigai = false
+      },
       // 分页
       pageChange(val) {
+        this.allotList.pageNo = val;
+        this.TeacherAllot();
+      },
+      pageChange1(val) {
         this.filters.pageNo = val;
-        this.GetTeacherSalaryList();
+        this.HomeworkRecoveryList();
       },
       changeDateSlot(dateSlot) {
         if (dateSlot) {
@@ -209,8 +285,12 @@
         }
       },
       handleSizeChange(val) {
+        this.allotList.pageSize = val;
+        this.TeacherAllot();
+      },
+      handleSizeChange1(val) {
         this.filters.pageSize = val;
-        this.GetTeacherSalaryList();
+        this.HomeworkRecoveryList();
       },
       // 排序
       sortChange(sort) {
@@ -255,21 +335,13 @@
     text-align: center;
     line-height: 80px;
   }
-  .main-header-item{
-    font-size: 16px;
-    color: #7E7E7E;
-  }
+
 
   .input-with-select .el-input-group__prepend {
     background-color: #fff;
   }
 
-  .table-img{
-    width:36px;
-    height:36px;
-    border-radius:6px;
-  }
-  .showModel{
+  .showModel {
     width: 100%;
     height: 100%;
     position: fixed;
@@ -280,75 +352,74 @@
     overflow: hidden;
     z-index: 1000;
     color: #fff;
-
   }
-  .model{
-    z-index: 1001;
-    width:40%;
-    height:auto;
+  .model {
+    z-index: 10000;
+    width: 60%;
+    height: auto;
     position: fixed;
-    top: 30%;
+    top: 15%;
     left: 30%;
-    margin:auto;
+    margin: auto;
     background: #fff;
-    border-radius:10px;
+    border-radius: 10px;
     text-align: center;
   }
-  .scope-name{
-    margin-left: 13px;
-  }
 
-  .model-text{
-    background:rgba(255,255,255,1);
-    border-radius:10px;
+  .model-text {
+    background: rgba(255, 255, 255, 1);
+    border-radius: 10px;
   }
 
-  .model-btn{
-    display: flex;
-    justify-content: space-around;
-    margin-bottom: 44px;
-  }
-  .model-btn-items{
-    width:154px;
-    height:50px;
-    line-height: 50px;
-    text-align: center;
-    font-size: 18px;
-    border-radius:4px;
-  }
-  .main-gay{
-    background:rgba(246,247,251,1);
-    color: #7E7E7E;
-  }
-  .model-grdeen{
-    background-color: #52CC60;
-    color: #fff;
+  .model-items-left {
+    width: 100%;
+    color: #393939;
+    font-size: 24px;
   }
-  .model-text-items-close{
-    position: absolute;
-    top: 10px;
-    right: 15px;
+  .model-items-left-top {
+    display: flex;
+    justify-content: space-between;
   }
-  .model-text-items{
+
+  .model-items-left-top-img {
+    width: 68px;
+    height: 68px;
+    border-radius: 8px;
     position: relative;
-    color: #000000;
-    font-size: 24px;
-    text-align: center;
-    padding: 40px 0 50px 0;
+    bottom: 25px;
   }
-  .page-block{
-    text-align: center !important;
-    margin-top: 15px;
+  .model-items-left-top-number {
+    color: #7e7e7e;
+    font-size: 18px;
+    margin-left: 10px;
   }
+
   .el-table .table-head-th{
     background-color:#F6F7FB;
     font-size: 16px !important;
     color: #393939;
 
   }
+  .model-manager {
+    display: flex;
+    justify-content: space-between;
+    margin: 30px;
+    color: #393939;
+    font-size: 24px;
+  }
+  .allocation-items{
+    width: 45%;
+    display: inline-block;
+    margin-right: 20px;
+    margin-bottom:30px;
+  }
   .allocation{
     color: #52CC60;
     font-size: 20px;
     text-decoration: underline;
+    cursor: pointer;
+  }
+  .pages{
+    margin: 15px 0;
   }
 </style>

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

@@ -1127,6 +1127,7 @@ export default {
       this.$store.dispatch("GetTeacherDetail", {
         teacherId: v.teacherId
       });
+      console.log(v.teacherId,this.GetTeacherDetail)
       var arr = this.GetTeacherDetail.grade.split(",");
       this.arrPeriod = this.GetTeacherDetail.period.split(",");
       console.log(this.arrPeriod)

+ 12 - 19
src/pages/super/SuperAdmin.vue

@@ -198,7 +198,7 @@
 
       isShow(str,res){
         let _this = this;
-        // console.log(str,res)
+        console.log(str,res)
         if (str == 1){
           _this.hiddenModel = true;
           _this.isPigai = false;
@@ -250,28 +250,20 @@
         this.$store.dispatch("GetManagerDetail", {
           managerId: str
         });
-        var arr = [];
-        if (this.getManagerDetail.grade) {
-           arr = this.getManagerDetail.grade.split(',');
-        } else {
-           arr = []
-        }
-        if (this.getManagerDetail.period) {
-          this.arrPeriod = this.getManagerDetail.period.split(';');
-        } else {
-          this.arrPeriod = [];
-        }
+        console.log(this.getManagerDetail)
+        var arr = this.getManagerDetail.grade.split(",");
+        this.arrPeriod = this.getManagerDetail.period.split(",");
+        console.log(this.arrPeriod)
         var arrList = [];
         for (var i in arr) {
-          if (arr[i] == '一年级' || arr[i] == '二年级') {
-            arrList.push('1-2年级')
-          } else if (arr[i] == '三年级' || arr[i] == "四年级") {
-            arrList.push('3-4年级')
-          } else if (arr[i] == '五年级' || arr[i] == "六年级") {
-            arrList.push('5-6年级')
+          if (arr[i] == "一年级" || arr[i] == "二年级") {
+            arrList.push("1-2年级");
+          } else if (arr[i] == "三年级" || arr[i] == "四年级") {
+            arrList.push("3-4年级");
+          } else if (arr[i] == "五年级" || arr[i] == "六年级") {
+            arrList.push("5-6年级");
           }
         }
-        console.log(this.arrPeriod)
         this.arrGrade = this.uniq(arrList);
       },
       //校区管理员降级
@@ -363,6 +355,7 @@
       }
     },
     mounted() {
+      sessionStorage.setItem('tabIndex',0)
       this.SuperManagerList()
 
     }

+ 14 - 3
src/store/modules/user.js

@@ -26,7 +26,7 @@ const user = {
     GetTeacherDetail:[],
     GetStudentDetail:[],
     getManagerList:[],
-    getManagerDetail:{},
+    getManagerDetail:[],
     applyTeacherList:[],
     getTeacherSalaryList:[],
     getTeacherIdStatus:"",
@@ -97,6 +97,9 @@ const user = {
     SET_TEACHER_SALARY_LIST:(state,getTeacherSalaryList) => {
       state.getTeacherSalaryList = getTeacherSalaryList
     },
+    SET_HOMEWORK_RECOVERY_LIST:(state,homeworkRecoveryList) => {
+      state.homeworkRecoveryList = homeworkRecoveryList
+    },
     SET_CLOSE_OR_OPENID:(state,getTeacherIdStatus) => {
       state.getTeacherIdStatus = getTeacherIdStatus
     },
@@ -526,9 +529,17 @@ const user = {
     ApplyOperate({ commit, state }, data) {
       return new Promise((resolve, reject) => {
         axios.post(ApplyOperate, data).then(response => {
-          const data = response.data
-          commit('SET_APPLY_OPERATE', data);
+          // const data = response.data
+          // commit('SET_APPLY_OPERATE', data);
           // debugger
+          const data = response || {}
+          if (data.code === "999"){
+            commit('SET_CLOSE_OR_OPENID', new Date());
+            Message.success(data.msg)
+          }
+          else {
+            Message.error("出错了")
+          }
           resolve(response)
         }).catch(error => {
           reject(error)