Browse Source

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

name 6 years ago
parent
commit
7348e1b347

+ 7 - 1
src/api/index.js

@@ -40,6 +40,10 @@ const ApplyOperate = urlFn('/api/kmt/correctSys/applyOperate')
 const GetTeacherSalaryList = urlFn('/api/kmt/correctSys/getTeacherSalaryList')
 // 处理在线批改老师(升级或封号或解封)
 const DealCorrectTeacher = urlFn('/api/kmt/correctSys/dealCorrectTeacher')
+// 可分配小组管理员列表
+const GetAllotManagerList = urlFn('/api/kmt/correctSys/getAllotManagerList')
+// 分配老师到管理员名下
+const AllotTeacherToManager = urlFn('/api/kmt/correctSys/allotTeacherToManager')
 export {
     GET_TOKEN,
     GET_UUIONID_TOKEN,
@@ -59,5 +63,7 @@ export {
     SuperApplyTeacherList,
     ApplyOperate,
     GetTeacherSalaryList,
-    DealCorrectTeacher
+    DealCorrectTeacher,
+    GetAllotManagerList,
+    AllotTeacherToManager
 }

+ 3 - 3
src/components/MenuComponent.vue

@@ -154,9 +154,9 @@ export default {
   margin-left: 125px;
 }
 .userstyle {
-  width: 26px;
-  height: 26px;
-  border-radius: 15px;
+   width:50px;
+  height:50px;
+  border-radius: 25px;
 }
 .lineStyle {
   color: #999999;

+ 3 - 3
src/components/SuperComponent.vue

@@ -136,9 +136,9 @@ export default {
   margin-left:125px;
 }
 .userstyle{
-  width:26px;
-  height:26px;
-  border-radius: 15px;
+  width:50px;
+  height:50px;
+  border-radius: 25px;
 }
   .lineStyle{
     color: #999999;

+ 0 - 424
src/pages/home/CheckTeacherAudit.vue

@@ -1,424 +0,0 @@
-<!-- 活动解析 -->
-<template>
-  <div>
-    <!-- table 表格 -->
-    <el-row :gutter="20" class="main-items" >
-
-      <!--数据监控-->
-      <el-col :span="20" class="main" :offset="2">
-
-        <el-table
-          :data="applyTeacherList.list"
-          highlight-current-row
-          size="medium"
-          border
-          stripe
-        >
-          <el-table-column
-            label="注册老师"
-            header-align="center"
-          >
-            <template scope="scope">
-              <img :src='BASE_URL+scope.row.imgUrl' alt="" class="table-img" v-if="scope.row.imgUrl">
-              <img src="../../assets/img/user.jpg" alt="" v-if="!scope.row.imgUrl" class="table-img">
-              <span class="scope-name">{{scope.row.name}}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="school"
-            label="学校"
-            header-align="center"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="subject"
-            label="批改科目"
-            header-align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="grade"
-            label="批改年级"
-            header-align="center">
-          </el-table-column>
-          <el-table-column
-            prop=""
-            label="可批改时间"
-            header-align="center"
-          >
-            <template scope="scope">
-              <el-button type="info" round>{{scope.row.period}}</el-button>
-            </template>
-          </el-table-column>
-
-          <el-table-column prop="status" label="" header-align="center" width="250">
-            <template scope="scope">
-              <el-button type="danger" @click="isShow(2,scope.row.teacherId,scope.row.name)">不通过</el-button>
-              <el-button type="primary" @click="isShow(1,scope.row.teacherId,scope.row.name)">通过</el-button>
-            </template>
-          </el-table-column>
-
-        </el-table>
-        <!-- 分页显示 -->
-        <div class="page-block">
-          <el-pagination
-            background
-            class="all_pagination"
-            @size-change="handleSizeChange"
-            @current-change="pageChange"
-            :page-sizes="[10, 20, 30, 40]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-          >
-          </el-pagination>
-        </div>
-      </el-col>
-
-
-    </el-row>
-
-    <!--是否通过-->
-    <div class='showModel' @click="allShowModel(1)" v-if="hiddenModel"></div>
-    <div class='model' v-if="hiddenModel">
-      <div class='model-text'>
-        <div class="model-text-items">
-          <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(1)" class="model-text-items-close"></div>
-          <div>是否要通过{{userName}}老师的注册申请?</div>
-        </div>
-        <div class="model-btn">
-          <div class="model-btn-items main-gay" @click="ApplyOperate()">是</div>
-          <div class="model-btn-items model-grdeen" @click="allShowModel(1)">否</div>
-        </div>
-      </div>
-    </div>
-    <!--是否驳回-->
-    <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>是否要驳回{{userName}}老师的注册申请?</div>
-        </div>
-        <div class="model-btn">
-          <div class="model-btn-items main-gay" @click="ApplyOperate()">是</div>
-          <div class="model-btn-items model-grdeen" @click="allShowModel(2)">否</div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-  import { mapGetters, mapActions } from "vuex";
-  export default {
-    components: { },
-    name: "actvResolveLabel",
-    props: {},
-    data() {
-      return {
-        BASE_URL:'https://xt.sharingschool.com/upload/',
-        hiddenModel:false,
-        applicantId:'',
-        operate:'',
-        isPigai:false,
-        options: [
-          {
-            value: "0",
-            label: "一年级"
-          },
-          {
-            value: "1",
-            label: "二年级"
-          },
-          {
-            value: "2",
-            label: "三年级"
-          },
-          {
-            value: "3",
-            label: "四年级"
-          },
-          {
-            value: "4",
-            label: "五年级"
-          },
-          {
-            value: "5",
-            label: "六年级"
-          }
-        ],
-        grades: [
-          {
-            value: "0",
-            label: "语文"
-          },
-          {
-            value: "1",
-            label: "数学"
-          },
-          {
-            value: "2",
-            label: "英语"
-          }
-        ],
-        ItemList: [
-          {
-            text:'数据监控'
-          },
-          {
-            text:'当天'
-          },
-          {
-            text:'当月'
-          },
-        ],
-        filters: {
-          actvNm: "",
-          actvCrtUserId: "",
-          actvType: "",
-          actvSmallType: "",
-          // 排序
-          MaxtimeValue:'',
-          pageNo: 1,
-          pageSize: 10,
-          count: 0,
-          orderField: "",
-          orderAD: ""
-        }
-      };
-    },
-    watch: {},
-    computed: {
-      ...mapGetters(["getUser","applyTeacherList"])
-    },
-    methods: {
-      ...mapActions(["setUser"]),
-
-      isShow(str,res,ts){
-        let _this = this;
-        console.log(str)
-        _this.operate = str;
-        _this.applicantId = res;
-        _this.userName = ts
-        if (str == 1){
-          _this.hiddenModel = true;
-          _this.isPigai = false;
-        } else if (str == 2){
-          _this.isPigai = true;
-          _this.hiddenModel = false;
-        }
-
-      },
-      //关闭弹框
-      allShowModel(str) {
-        let _this = this;
-
-        if (str == 1){
-          _this.hiddenModel = false;
-        } else if (str == 2){
-          _this.isPigai = false;
-        }
-      },
-      //查看申请老师列表
-      async SuperApplyTeacherList() {
-        this.$store.dispatch("SuperApplyTeacherList", {
-          maxCreateTime: this.formatDate(),
-          pageNo: this.filters.pageNo,
-          pageSize: this.filters.pageSize
-        });
-        console.log(applyTeacherList)
-      },
-      //申请审批操作
-      async ApplyOperate() {
-        this.$store.dispatch("ApplyOperate", {
-          applicantId: this.applicantId,
-          operate: this.operate,
-        });
-        this.allShowModel(this.operate)
-      },
-      //时间封装
-      formatDate: function () {
-        let date = new Date();
-        let y = date.getFullYear();
-        let MM = date.getMonth() + 1;
-        MM = MM < 10 ? ('0' + MM) : MM;
-        let d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        let h = date.getHours();
-        h = h < 10 ? ('0' + h) : h;
-        let m = date.getMinutes();
-        m = m < 10 ? ('0' + m) : m;
-        let s = date.getSeconds();
-        s = s < 10 ? ('0' + s) : s;
-        return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
-      },
-      // 分页
-      pageChange(val) {
-        this.filters.pageNo = val;
-        this.SuperApplyTeacherList();
-      },
-      changeDateSlot(dateSlot) {
-        if (dateSlot) {
-          this.filters.startDate = dateSlot[0];
-          this.filters.endDate = dateSlot[1];
-        } else {
-          this.filters.startDate = null;
-          this.filters.endDate = null;
-        }
-      },
-      actvTypeChange(typeList) {
-        switch (typeList.length) {
-          case 1:
-            this.filters.actvType = typeList[0];
-            this.filters.actvSmallType = null;
-            break;
-          case 2:
-            this.filters.actvType = null;
-            this.filters.actvSmallType = typeList[1];
-            break;
-          default:
-            this.filters.actvType = null;
-            this.filters.actvSmallType = null;
-            break;
-        }
-      },
-      handleSizeChange(val) {
-        console.log(val)
-        this.filters.pageSize = val;
-        this.SuperApplyTeacherList();
-      },
-      // 排序
-      sortChange(sort) {
-        this.filters.orderField = sort.prop;
-        this.filters.orderAD = sort.order != null ? sort.order : "";
-        this.itemListReshow();
-      },
-      clearSearch() {
-        this.filters.actvNm = null;
-        this.filters.actvCrtUserId = null;
-        this.filters.actvType = null;
-        this.filters.actvSmallType = null;
-        this.filtersActvType = [];
-        this.createDateSlot = null;
-      },
-
-    },
-    mounted() {
-      this.SuperApplyTeacherList();
-
-      // for (let j in applyTeacherList) {
-      //   applyTeacherList[j] = (res => {
-      //     const d = []
-      //     console.log(res)
-      //     // for (let i in res) {
-      //     //   d.push({ gradeList: res[i].homeworkPictureUrl, isVague: res[i].isVague})
-      //     // }
-      //     return d
-      //   })(applyTeacherList)
-      // }
-    }
-  };
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped>
-
-  .main{
-    background-color: #fff;
-    margin-top: 16px;
-    padding: 0 !important;
-    border: 1px solid #E1E1E1;
-    min-height: 980px;
-  }
-
-  el-table{
-    color: #999999;
-    font-size: 18px;
-  }
-  .scope-name{
-    margin-left: 13px;
-  }
-  .main-items{
-    color: #393939;
-    text-align: center;
-    line-height: 80px;
-  }
-
-  .input-with-select .el-input-group__prepend {
-    background-color: #fff;
-  }
-
-  .table-img{
-    width:36px;
-    height:36px;
-    border-radius:6px;
-  }
-  .showModel{
-    width: 100%;
-    height: 100%;
-    position: fixed;
-    top: 0;
-    left: 0;
-    background: #000000;
-    opacity: 0.2;
-    overflow: hidden;
-    z-index: 1000;
-    color: #fff;
-
-  }
-  .model{
-    z-index: 1001;
-    width:40%;
-    height:auto;
-    position: fixed;
-    top: 30%;
-    left: 30%;
-    margin:auto;
-    background: #fff;
-    border-radius:10px;
-    text-align: center;
-  }
-
-  .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-text-items-close{
-    position: absolute;
-    top: 10px;
-    right: 15px;
-  }
-  .model-text-items{
-    position: relative;
-    color: #000000;
-    font-size: 24px;
-    text-align: center;
-    padding: 40px 0 50px 0;
-  }
-  .page-block{
-    text-align: center;
-  }
-  /*.all_pagination{*/
-  /*text-align: center !important;*/
-  /*}*/
-</style>

+ 0 - 405
src/pages/home/CheckTeacherPay.vue

@@ -1,405 +0,0 @@
-<!-- 活动解析 -->
-<template>
-  <div>
-    <!-- table 表格 -->
-    <el-row :gutter="20" class="main-items" >
-
-      <!--数据监控-->
-      <el-col :span="20" class="main" :offset="2">
-        <el-row :gutter="20" class="main-header">
-          <el-col :span="3" :offset="1"><div class="main-header-item" >
-            <div class="block" >
-              <el-date-picker
-                v-model="selMonth"
-                type="month"
-                placeholder="选择月" @change="allclick()">
-              </el-date-picker>
-            </div>
-          </div></el-col>
-          <el-col :span="4" :offset="16">
-            <div class="main-header-item">
-              <i class="el-icon-printer"></i>
-              <span @click="excel()">导出表格</span>
-            </div>
-          </el-col>
-        </el-row>
-        <el-table
-          :data="getTeacherSalaryList.list"
-          highlight-current-row
-          size="medium"
-          border
-          stripe
-        >
-          <el-table-column
-            label="注册老师"
-            header-align="center"
-          >
-            <template scope="scope">
-              <img :src="BASE_URL+scope.row.imgUrl" alt="" class="table-img">
-              <span class="scope-name">{{scope.row.name}}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="lowGradeCount"
-            label="1~2年级0.6元/份"
-            header-align="center"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="middleGradeCount"
-            label="3~4年级0.8元/份"
-            header-align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="highGradeCount"
-            label="5~6年级1.2元/份"
-            header-align="center">
-          </el-table-column>
-          <el-table-column
-            prop="total"
-            label="总计"
-            header-align="center"
-            width="450"
-          >
-          </el-table-column>
-        </el-table>
-        <!-- 分页显示 -->
-        <div class="page-block">
-          <el-pagination
-            background
-            class="all_pagination"
-            @size-change="handleSizeChange"
-            @current-change="pageChange"
-            :page-sizes="[10, 20, 30, 40]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-          >
-          </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>
-        <div class="model-btn">
-          <div class="model-btn-items main-gay">是</div>
-          <div class="model-btn-items model-grdeen">否</div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-  import { mapGetters, mapActions } from "vuex";
-  export default {
-    components: { },
-    name: "actvResolveLabel",
-    props: {},
-    data() {
-      return {
-        BASE_URL:'https://xt.sharingschool.com/upload/',
-        selMonth:'',
-        hiddenModel:false,
-        isPigai:false,
-        ItemList: [
-          {
-            text:'数据监控'
-          },
-          {
-            text:'当天'
-          },
-          {
-            text:'当月'
-          },
-        ],
-        filters: {
-          actvNm: "",
-          actvCrtUserId: "",
-          actvType: "",
-          actvSmallType: "",
-          // 排序
-          MaxtimeValue:'',
-          oneMonth:'',
-          pageNo: 1,
-          pageSize: 10,
-          count: 0,
-          orderField: "",
-          orderAD: ""
-        }
-      };
-    },
-    watch: {},
-    computed: {
-      ...mapGetters(["getUser","getTeacherSalaryList"])
-    },
-    methods: {
-      ...mapActions(["setUser"]),
-      //表格导出
-      excel(){
-        try {
-          //var curTbl = document.getElementById(tableId);
-          //var lenRow = curTbl.rows.length;
-          var curTbl = $('.el-table')[0];
-          var lenRow = curTbl.rows.length;
-          //创建AX对象excel
-          var oXL = new ActiveXObject("Excel.Application");
-          //获取workbook对象
-          var oWB = oXL.Workbooks.Add();
-          var oSheet = oWB.ActiveSheet;
-
-          //取得表格行数
-          for (var i = 0; i < lenRow; i++) {
-            var lenCol = curTbl.rows(i).cells.length;
-            //取得每行的列数
-            for (var j = 0; j < lenCol; j++)
-            {
-              oSheet.Cells(i + 1, j + 1).value = curTbl.rows(i).cells(j).innerText;
-
-            }
-          }
-          oXL.Visible = true; //设置excel可见属性
-          //oXL.UserControl = true;
-          //oXL=null
-        } catch (e) {
-          if ((!+'\v1')) { //ie浏览器
-            alert("无法启动Excel,请确保电脑中已经安装了Excel!")
-          } else {
-            let arr = this.getTeacherSalaryList.list;
-            let str = '注册老师,1~2年级0.6元/份,3~4年级0.8元/份,5~6年级1.2元/份,总计/元';
-            for (let i = 0; i < arr.length; i++) {
-              str += "\n" + arr[i].name + ',' + arr[i].lowGradeCount + ',' + arr[i].middleGradeCount + ',' + arr[i].highGradeCount
-            }
-            var uri = 'data:text/csv;charset=utf-8,' + encodeURIComponent(str);
-            var downloadLink = document.createElement("a");
-            downloadLink.href = uri;
-            downloadLink.download = "export.csv";
-
-            document.body.appendChild(downloadLink);
-            downloadLink.click();
-            document.body.removeChild(downloadLink);
-          }
-        }
-      },
-      //弹框
-      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;
-        }
-
-      },
-      //关闭弹框
-      allShowModel(str) {
-        let _this = this;
-        if (str == 1){
-          _this.hiddenModel = false;
-        } else if (str == 2){
-          _this.isPigai = false;
-        }
-      },
-      //时间封装
-      formatDate: function () {
-        let date = new Date();
-        let y = date.getFullYear();
-        let MM = date.getMonth() + 1;
-        MM = MM < 10 ? ('0' + MM) : MM;
-        let d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        let h = date.getHours();
-        h = h < 10 ? ('0' + h) : h;
-        let m = date.getMinutes();
-        m = m < 10 ? ('0' + m) : m;
-        let s = date.getSeconds();
-        s = s < 10 ? ('0' + s) : s;
-        return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
-      },
-      // 老师薪酬列表
-      async GetTeacherSalaryList() {
-        this.$store.dispatch("GetTeacherSalaryList", {
-          pageNo: this.filters.pageNo,
-          pageSize: this.filters.pageSize,
-          oneMonth:this.filters.oneMonth,
-          maxCreateTime: this.formatDate()
-        });
-      },
-      //选择月
-      allclick(){
-        var year = this.selMonth.getFullYear();
-        var month = this.selMonth.getMonth() + 1;
-        month = (month < 10 ? "0" + month : month);
-        var mydate = (year.toString() + '-' + month.toString());
-        this.filters.oneMonth = mydate;
-        this.GetTeacherSalaryList()
-      },
-
-      // 分页
-      pageChange(val) {
-        this.filters.pageNo = val;
-        this.GetTeacherSalaryList();
-      },
-      changeDateSlot(dateSlot) {
-        if (dateSlot) {
-          this.filters.startDate = dateSlot[0];
-          this.filters.endDate = dateSlot[1];
-        } else {
-          this.filters.startDate = null;
-          this.filters.endDate = null;
-        }
-      },
-      actvTypeChange(typeList) {
-        switch (typeList.length) {
-          case 1:
-            this.filters.actvType = typeList[0];
-            this.filters.actvSmallType = null;
-            break;
-          case 2:
-            this.filters.actvType = null;
-            this.filters.actvSmallType = typeList[1];
-            break;
-          default:
-            this.filters.actvType = null;
-            this.filters.actvSmallType = null;
-            break;
-        }
-      },
-      handleSizeChange(val) {
-        this.filters.pageSize = val;
-        this.GetTeacherSalaryList();
-      },
-      // 排序
-      sortChange(sort) {
-        this.filters.orderField = sort.prop;
-        this.filters.orderAD = sort.order != null ? sort.order : "";
-        this.itemListReshow();
-      },
-      clearSearch() {
-        this.filters.actvNm = null;
-        this.filters.actvCrtUserId = null;
-        this.filters.actvType = null;
-        this.filters.actvSmallType = null;
-        this.filtersActvType = [];
-        this.createDateSlot = null;
-      },
-
-    },
-    mounted() {
-      this.GetTeacherSalaryList()
-    }
-  };
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped>
-
-  .main{
-    background-color: #fff;
-    margin-top: 16px;
-    padding: 0 !important;
-    border: 1px solid #E1E1E1;
-    min-height: 980px;
-  }
-
-  el-table{
-    color: #999999;
-    font-size: 18px;
-  }
-  .main-items{
-    color: #393939;
-    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{
-    width: 100%;
-    height: 100%;
-    position: fixed;
-    top: 0;
-    left: 0;
-    background: #000000;
-    opacity: 0.2;
-    overflow: hidden;
-    z-index: 1000;
-    color: #fff;
-
-  }
-  .model{
-    z-index: 1001;
-    width:40%;
-    height:auto;
-    position: fixed;
-    top: 30%;
-    left: 30%;
-    margin:auto;
-    background: #fff;
-    border-radius:10px;
-    text-align: center;
-  }
-  .scope-name{
-    margin-left: 13px;
-  }
-
-  .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-text-items-close{
-    position: absolute;
-    top: 10px;
-    right: 15px;
-  }
-  .model-text-items{
-    position: relative;
-    color: #000000;
-    font-size: 24px;
-    text-align: center;
-    padding: 40px 0 50px 0;
-  }
-</style>

+ 11 - 4
src/pages/home/SchoolManager.vue

@@ -146,7 +146,7 @@
                     <div v-if="v.status === 2" class="tr-seconds" style="color:#FFC303">批改中</div>
                     <div v-if="v.status === 3" class="tr-seconds">已批改</div>
                     <div class="tr-s" v-if="v.status === 1">
-                      <el-button type="success" plain>去批改</el-button>
+                     <el-button type="" plain><a style="text-decoration:none;color:#52cc60;" :href="'https://kmt.sharingschool.com/aijia/kmt/index.html?homeworkId='+v.homeworkId+'&accessToken='+accessToken+'&state='+1">去批改</a></el-button>
                       <el-button @click="isShow(v,1)" type="success">去分配</el-button>
                     </div>
                     <div class="tr-s" v-if="v.status === 3 && v.isCheck ===1">
@@ -154,7 +154,7 @@
                       <span style="color:red;font-size:12px;">报错{{v.wrongCount}}</span>
                     </div>
                     <div class="tr-s" v-if="v.status === 3 && v.isCheck ===0">
-                      <el-button type="warning" plain>去检查</el-button>
+                     <el-button type="warning" plain><a style="text-decoration:none;color:#52cc60;" :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&accessToken='+accessToken+'&state='+2">去检查</a></el-button>
                     </div>
                   </div>
                      <!-- 分页显示 -->
@@ -559,6 +559,7 @@ export default {
   props: {},
   data() {
     return {
+      accessToken:localStorage.getItem("accessToken"), //token
       managerId:"",// 超级管理员登陆ID
       // BASE_URL:'https://img.sharingschool.com',
       BASE_URL: "https://xt.sharingschool.com/upload/",
@@ -694,7 +695,11 @@ export default {
     const managerId = this.$route.query.managerId
     this.managerId = managerId
   },
-  watch: {},
+  watch:{
+        getTeacherIdStatus(val, oldVal){ //普通的watch监听
+         this.InfoWatch();
+        },
+    },
   computed: {
     ...mapGetters([
       "getUser",
@@ -706,7 +711,8 @@ export default {
       "MothTeacherList",
       "UnallotHomeworkInfo",
       "GetTeacherDetail",
-      "GetStudentDetail"
+      "GetStudentDetail",
+      "getTeacherIdStatus"
     ])
   },
   methods: {
@@ -823,6 +829,7 @@ export default {
       });
       v.type = 1;
       this.$set(this.TeacherAllotList.list, k, v);
+      this.hiddenModel = false
     },
      // 查看老师详情信息
     async GetTeacherInfo(v) {

+ 0 - 474
src/pages/home/SuperAdmin.vue

@@ -1,474 +0,0 @@
-<!-- 活动解析 -->
-<template>
-  <div>
-    <!-- table 表格 -->
-    <el-row :gutter="20" class="main-items" >
-
-      <!--数据监控-->
-      <el-col :span="20" class="main" :offset="2">
-        <el-row :gutter="20" class="main-header">
-          <el-col :span="3"><div class="main-header-item" >注册老师数:{{getManagerList.registerTeacherCount}}人</div></el-col>
-          <el-col :span="3"><div class="main-header-item">活跃老师数:{{getManagerList.activeTeacherCount}}人</div></el-col>
-          <el-col :span="4"><div class="main-header-item">注册用户数:{{getManagerList.registerUserCount}}人</div></el-col>
-          <el-col :span="4"><div class="main-header-item">活跃用户数:{{getManagerList.activeUserCount}}人</div></el-col>
-        </el-row>
-        <el-table
-          :data="getManagerList.list"
-          highlight-current-row
-          size="medium"
-          border
-          stripe
-        >
-          <el-table-column
-            label="小组管理员"
-            header-align="center"
-          >
-            <template scope="scope">
-              <img :src="BASE_URL +scope.row.imgUrl" alt="" class="table-img">
-              <span class="scope-name">{{scope.row.name}}</span>
-            </template>
-          </el-table-column>
-          <el-table-column
-            prop="groupCount"
-            label="小组人数"
-            header-align="center"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="attendanceRate"
-            label="老师出勤率"
-            header-align="center"
-          ></el-table-column>
-          <el-table-column
-            prop="homeworkCount"
-            label="作业批改总份数"
-            header-align="center">
-          </el-table-column>
-          <el-table-column
-            prop="homeworkPicCount"
-            label="作业批改总张数"
-            header-align="center"
-          >
-          </el-table-column>
-          <el-table-column
-            prop="avgTime"
-            label="批改平均用时"
-            header-align="center"></el-table-column>
-          <el-table-column
-            prop="avgMark"
-            label="家长平均评分"
-            header-align="center"></el-table-column>
-          <el-table-column
-            prop="status"
-            label="是否在线"
-            header-align="center"></el-table-column>
-          <el-table-column prop="status" label="" header-align="center" width="250">
-            <template scope="scope">
-              <el-button type="success" plain >小组详情</el-button>
-              <el-button type="success" @click="isShow(1,scope.row.managerId)">管理员详情</el-button>
-            </template>
-          </el-table-column>
-
-        </el-table>
-        <!-- 分页显示 -->
-        <div class="page-block">
-          <el-pagination
-            background
-            class="all_pagination"
-            @size-change="handleSizeChange"
-            @current-change="pageChange"
-            :page-sizes="[10, 20, 30, 40]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-          >
-          </el-pagination>
-        </div>
-      </el-col>
-
-    </el-row>
-
-    <!--可分配老师-->
-    <div class='showModel' @click="allShowModel(1)" v-if="hiddenModel"></div>
-    <div class='model' v-if="hiddenModel">
-      <div class='model-text'>
-        <div class="model-manager">
-          <div>校区管理员</div>
-          <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(1)"></div>
-        </div>
-        <div class="model-items">
-          <div class="model-items-first">
-            <div>
-              <img :src="BASE_URL+getManagerDetail.imgUrl" alt="" class="model-items-first-img">
-              <div class="model-items-first-left">
-                <div>{{getManagerDetail.name}}({{getManagerDetail.status}})</div>
-                <div class="model-items-first-left-down">{{getManagerDetail.school}}</div>
-              </div>
-            </div>
-            <div>
-              <el-button type="danger" plain round @click="isShow(2,getManagerDetail.name)"><i class="el-icon-bottom"></i><span>降级</span></el-button>
-            </div>
-          </div>
-          <div class="model-items-other model-active">批改科目 : {{getManagerDetail.subject}}</div>
-          <div class="model-items-other">批改年级 : <span v-for="(v, k) of arrGrade" :key=k class="scope-name">{{v}}</span></div>
-          <div class="model-items-other model-active">可批改时间:<el-button type="info" round v-for="(v, k) of arrPeriod" :key=k>{{v}}</el-button></div>
-          <div class="model-items-other">手机号 : {{getManagerDetail.phone}}</div>
-          <div class="model-items-other model-active-last">上次登录时间 : {{getManagerDetail.lastOnlineTime}}</div>
-        </div>
-
-      </div>
-    </div>
-    <!--所有未批改作业-->
-    <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>是否要将{{superName}}老师降级为普通批改老师?</div>
-        </div>
-        <div class="model-btn">
-          <div class="model-btn-items main-gay" @click="Downgrade()">是</div>
-          <div class="model-btn-items model-grdeen" @click="allShowModel(2)">否</div>
-        </div>
-      </div>
-    </div>
-  </div>
-</template>
-<script>
-  import { mapGetters, mapActions } from "vuex";
-  export default {
-    components: { },
-    name: "actvResolveLabel",
-    props: {},
-    data() {
-      return {
-        BASE_URL:'https://xt.sharingschool.com/upload/',
-        hiddenModel:false,
-        isPigai:false,
-        managerId:'',
-        superName:'',
-        count:0,
-        arrPeriod:[],
-        arrGrade:[],
-        ItemList: [
-          {
-            text:'数据监控'
-          },
-          {
-            text:'当天'
-          },
-          {
-            text:'当月'
-          },
-        ],
-
-        filters: {
-          actvNm: "",
-          actvCrtUserId: "",
-          actvType: "",
-          actvSmallType: "",
-          // 排序
-          MaxtimeValue:"",
-          pageNo: 1,
-          pageSize: 10,
-          count: 0,
-          orderField: "",
-          orderAD: ""
-        }
-      };
-    },
-    watch: {},
-    computed: {
-      ...mapGetters(["getUser","getManagerList","getManagerDetail"])
-    },
-    methods: {
-      ...mapActions(["setUser"]),
-
-      isShow(str,res){
-        let _this = this;
-        console.log(str,res)
-        if (str == 1){
-          _this.hiddenModel = true;
-          _this.isPigai = false;
-          _this.managerId = res;
-          _this.GetManagerDetail(res)
-        } else if (str == 2){
-          _this.isPigai = true;
-          _this.hiddenModel = false;
-          _this.superName = res
-        }
-
-      },
-      //关闭弹框
-      allShowModel(str) {
-        let _this = this;
-        if (str == 1){
-          _this.hiddenModel = false;
-        } else if (str == 2){
-          _this.isPigai = false;
-        }
-      },
-      //时间封装
-      formatDate: function () {
-        let date = new Date();
-        let y = date.getFullYear();
-        let MM = date.getMonth() + 1;
-        MM = MM < 10 ? ('0' + MM) : MM;
-        let d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        let h = date.getHours();
-        h = h < 10 ? ('0' + h) : h;
-        let m = date.getMinutes();
-        m = m < 10 ? ('0' + m) : m;
-        let s = date.getSeconds();
-        s = s < 10 ? ('0' + s) : s;
-        return y + '-' + MM + '-' + d + ' ' + h + ':' + m + ':' + s;
-      },
-      // 获取超级管理员数据
-      async SuperManagerList() {
-        this.$store.dispatch("SuperManagerList", {
-          maxCreateTime: this.formatDate(),
-          pageNo: this.filters.pageNo,
-          pageSize: this.filters.pageSize
-        });
-      },
-      // 查看校区管理员详情
-      async GetManagerDetail(str) {
-        this.$store.dispatch("GetManagerDetail", {
-          managerId: str
-        });
-        var arr = this.getManagerDetail.grade.split(',');
-        this.arrPeriod = this.getManagerDetail.period.split(';');
-        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年级')
-          }
-        }
-        this.arrGrade = this.uniq(arrList);
-      },
-      //校区管理员降级
-      async Downgrade() {
-        this.$store.dispatch("Downgrade", {
-          managerId: this.managerId
-        });
-        this.allShowModel(2)
-      },
-      // 分页
-      pageChange(val) {
-        this.filters.pageNo = val;
-        this.SuperManagerList();
-      },
-      changeDateSlot(dateSlot) {
-        if (dateSlot) {
-          this.filters.startDate = dateSlot[0];
-          this.filters.endDate = dateSlot[1];
-        } else {
-          this.filters.startDate = null;
-          this.filters.endDate = null;
-        }
-      },
-      actvTypeChange(typeList) {
-        switch (typeList.length) {
-          case 1:
-            this.filters.actvType = typeList[0];
-            this.filters.actvSmallType = null;
-            break;
-          case 2:
-            this.filters.actvType = null;
-            this.filters.actvSmallType = typeList[1];
-            break;
-          default:
-            this.filters.actvType = null;
-            this.filters.actvSmallType = null;
-            break;
-        }
-      },
-      handleSizeChange(val) {
-        this.filters.pageSize = val;
-        this.SuperManagerList();
-      },
-      // 排序
-      sortChange(sort) {
-        this.filters.orderField = sort.prop;
-        this.filters.orderAD = sort.order != null ? sort.order : "";
-        this.itemListReshow();
-      },
-      clearSearch() {
-        this.filters.actvNm = null;
-        this.filters.actvCrtUserId = null;
-        this.filters.actvType = null;
-        this.filters.actvSmallType = null;
-        this.filtersActvType = [];
-        this.createDateSlot = null;
-      },
-      // 数组去重
-      uniq(array){
-        var temp = []; //一个新的临时数组
-        for (var i = 0; i < array.length; i++){
-          if (temp.indexOf(array[i]) == -1) {
-            temp.push(array[i]);
-          }
-        }
-        return temp;
-      }
-    },
-    mounted() {
-      this.SuperManagerList()
-      // this.count = this.getManagerList.pages;
-
-    }
-  };
-</script>
-
-<!-- Add "scoped" attribute to limit CSS to this component only -->
-<style scoped>
-
-  .main{
-    background-color: #fff;
-    margin-top: 16px;
-    padding: 0 !important;
-    border: 1px solid #E1E1E1;
-    min-height: 980px;
-  }
-
-  el-table{
-    color: #999999;
-    font-size: 18px;
-  }
-  .main-items{
-    color: #393939;
-    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{
-    width: 100%;
-    height: 100%;
-    position: fixed;
-    top: 0;
-    left: 0;
-    background: #000000;
-    opacity: 0.2;
-    overflow: hidden;
-    z-index: 1000;
-    color: #fff;
-
-  }
-  .model{
-    z-index: 1001;
-    width:40%;
-    height:auto;
-    position: fixed;
-    top: 30%;
-    left: 30%;
-    margin:auto;
-    background: #fff;
-    border-radius:10px;
-    text-align: center;
-  }
-
-  .model-items-first{
-    padding: 0 34px;
-    display: flex;
-    justify-content: space-between;
-  }
-  .model-items-first-img{
-    width: 68px;
-    height: 68px;
-    border-radius: 8px;
-    position: relative;
-    bottom: 20px;
-  }
-  .model-items-first-left{
-    display: inline-block;
-    color: #393939;
-    font-size: 24px;
-    margin-left: 14px;
-    text-align: left;
-  }
-  .model-items-first-left-down{
-    color: #7E7E7E;
-    font-size: 18px;
-  }
-  .model-text{
-    background:rgba(255,255,255,1);
-    border-radius:10px;
-  }
-  .model-items-other{
-    height: 60px;
-    line-height: 60px;
-    color: #393939;
-    font-size: 20px;
-    text-align: left;
-    padding: 0 34px;
-
-  }
-  .model-active{
-    background-color: #F6F7FB;
-  }
-  .model-active-last{
-    border-radius:0 0 30px 30px;
-    background-color: #F6F7FB;
-  }
-
-  .model-manager{
-    display: flex;
-    justify-content: space-between;
-    margin: 30px;
-    color: #393939;
-    font-size: 24px;
-  }
-  .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-text-items-close{
-    position: absolute;
-    top: 10px;
-    right: 15px;
-  }
-  .model-text-items{
-    position: relative;
-    color: #000000;
-    font-size: 24px;
-    text-align: center;
-    padding: 40px 0 50px 0;
-  }
-  .scope-name{
-    margin-left: 13px;
-  }
-</style>

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

@@ -42,7 +42,9 @@
             label="批改年级"
             header-align="center">
               <template scope="scope">
-                <div v-for="(v, k) of scope.row.gradeList" :key=k v-if="v">{{v}}</div>
+                <div v-if="v">
+                    <div v-for="(v, k) of scope.row.gradeList" :key=k>{{v}}</div>
+                </div>
               </template>
           </el-table-column>
           <el-table-column
@@ -51,7 +53,9 @@
             header-align="center"
           >
             <template scope="scope">
-              <el-button type="info" round v-for="(v, k) of scope.row.periodList" :key=k v-if="v">{{v}}</el-button>
+                  <div v-if="v">
+                    <el-button type="info" round v-for="(v, k) of scope.row.periodList" :key=k>{{v}}</el-button>
+                </div>
             </template>
           </el-table-column>
 

+ 157 - 20
src/pages/super/SchoolManager.vue

@@ -60,7 +60,6 @@
               <el-button @click="InfoWatch" slot="append" icon="el-icon-search"></el-button>
             </el-input>
           </el-col>
-
           <!--<div class="block">-->
           <!--<el-date-picker-->
           <!--v-model="filters.MaxtimeValue"-->
@@ -85,7 +84,7 @@
               </div>
               <div class="tr" v-for="(v, k) of monitorTeacherList.list" :key="k">
                 <!-- 在线 -->
-                <div v-if="v.status == '在线'" class="tr-first">
+                <div v-if="v.status == '1'" class="tr-first">
                   <div>
                     <i
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-top']"
@@ -98,10 +97,10 @@
                   <div class="tr-active">{{v.maxWaitTime}}</div>
                   <div>{{v.totalCorrectTime}}</div>
                   <div>{{v.respSpeed}}/份</div>
-                  <div>{{v.status}}</div>
+                  <div>在线</div>
                 </div>
                 <!-- 离线 -->
-                <div v-if="v.status == '离线'" style="color:#BEBEBE" class="tr-first">
+                <div v-if="v.status == '2'" style="color:#BEBEBE" class="tr-first">
                   <div>
                     <i
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-top']"
@@ -114,10 +113,10 @@
                   <div>{{v.maxWaitTime}}</div>
                   <div>{{v.totalCorrectTime}}</div>
                   <div>{{v.respSpeed}}/份</div>
-                  <div>{{v.status}}</div>
+                  <div>离线</div>
                 </div>
                 <!-- 封号 -->
-                <div v-if="v.status == '已封号'" style="color:#FF6767" class="tr-first">
+                <div v-if="v.status == '3'" style="color:#FF6767" class="tr-first">
                   <div>
                     <i
                       :class="[isDown && isDownindex === k?'el-icon-caret-bottom':'el-icon-caret-top']"
@@ -130,7 +129,7 @@
                   <div>{{v.maxWaitTime}}</div>
                   <div>{{v.totalCorrectTime}}</div>
                   <div>{{v.respSpeed}}/份</div>
-                  <div>{{v.status}}</div>
+                  <div>已封号</div>
                 </div>
                 <div v-if="isDownindex === k && isDown">
                   <div class="tr-second" v-for="(v, k) of TeacherHomeworkList.list" :key="k">
@@ -146,7 +145,7 @@
                     <div v-if="v.status === 2" class="tr-seconds" style="color:#FFC303">批改中</div>
                     <div v-if="v.status === 3" class="tr-seconds">已批改</div>
                     <div class="tr-s" v-if="v.status === 1">
-                      <el-button type="success" plain>去批改</el-button>
+                      <!-- <el-button type="" plain><a style="text-decoration:none;color:#52cc60;" :href="'https://kmt.sharingschool.com/aijia/kmt/index.html?homeworkId='+v.homeworkId+'&accessToken='+accessToken+'&state='+1">去批改</a></el-button> -->
                       <el-button @click="isShow(v,1)" type="success">去分配</el-button>
                     </div>
                     <div class="tr-s" v-if="v.status === 3 && v.isCheck ===1">
@@ -154,7 +153,7 @@
                       <span style="color:red;font-size:12px;">报错{{v.wrongCount}}</span>
                     </div>
                     <div class="tr-s" v-if="v.status === 3 && v.isCheck ===0">
-                      <el-button type="warning" plain>去检查</el-button>
+                      <el-button type="warning" plain><a style="text-decoration:none;color:#52cc60;" :href="'http://120.77.207.0:8081/kmt/index.html?homeworkId='+v.homeworkId+'&accessToken='+accessToken+'&state='+2">去检查</a></el-button>
                     </div>
                   </div>
                   <!-- 分页显示 -->
@@ -525,18 +524,21 @@
                 class="model-items-first-img"
               >
               <div class="model-items-first-left" style="display:inline-block">
-                  <div class="Onlinename">李小花</div>
+                  <!-- <div class="Onlinename">李小花</div>
                 <div class="Online">(在线)</div>
-                <div class="model-items-first-left-down">南方科技大学</div>
-                <!-- <div class="Onlinename">{{GetTeacherDetail.name}}</div>
+                <div class="model-items-first-left-down">南方科技大学</div> -->
+                <div class="Onlinename">{{GetTeacherDetail.name}}</div>
                 <div v-if="GetTeacherDetail.status ===1" class="Online">(在线)</div>
                 <div v-if="GetTeacherDetail.status ===0" class="Online">(离线)</div>
-                <div class="model-items-first-left-down">{{GetTeacherDetail.school}}</div> -->
+                <div class="model-items-first-left-down">{{GetTeacherDetail.school}}</div>
               </div>
-              <div style="display:inline-block">
+              <div style="display:inline-block" v-if="this.TeacherIdStatus ==1 || 2 && this.TeacherIdStatus !==3">
               <el-button type="danger" icon="el-icon-close" plain round @click="isShow(GetTeacherDetail,6)"><i class="el-icon-bottom"></i><span>封号</span></el-button>
                <el-button type="success" icon="el-icon-upload2" plain round @click="isShow(GetTeacherDetail,5)"><i class="el-icon-bottom"></i><span>升级</span></el-button>
             </div>
+                <div style="display:inline-block"  v-if="this.TeacherIdStatus ==3">
+              <el-button type="success" icon="el-icon-unlock" plain round @click="isShow(GetTeacherDetail,7)"><i class="el-icon-bottom"></i><span>解封</span></el-button>
+            </div>
             </div>
           </div>
           <div class="model-items-other model-active">批改科目 : {{GetTeacherDetail.subject}}</div>
@@ -553,6 +555,9 @@
           <div class="model-items-other">批改正确率 : {{GetTeacherDetail.accuracyRate}}</div>
           <div class="model-items-other model-active-last">被报错总次数 : {{GetTeacherDetail.wrongCount}}</div>
           <div class="model-items-other">满意度 : {{GetTeacherDetail.satisfactionDegree}}</div>
+            <div style="display:inline-block">
+              <el-button type="success" icon="el-icon-user-solid" plain round @click="isShow(GetTeacherDetail,8)"><i class="el-icon-bottom"></i><span>重新分配组</span></el-button>
+            </div>
         </div>
       </div>
     </div>
@@ -610,6 +615,69 @@
         </div>
       </div>
     </div>
+        <!-- 解封校区管理员弹框 -->
+      <div class='showModel' @click="allShowModel(7)" v-if="OpenID"></div>
+     <div class='modelspec' v-if="OpenID">
+      <div class='model-text'>
+        <div class="model-text-items">
+          <div><img src="../../assets/img/del@2x.png" alt="" @click="allShowModel(7)" class="model-text-items-close"></div>
+          <div>是否要对{{TeacherName}}老师进行解封?</div>
+        </div>
+        <div class="model-btn">
+          <div class="model-btn-items main-gay" @click="OPenTeacherId()">是</div>
+          <div class="model-btn-items model-grdeen" @click="allShowModel(7)">否</div>
+        </div>
+      </div>
+    </div>
+       <!--可分配小组管理员列表弹框-->
+    <div class="showModel" @click="allShowModel(8)" v-if="AllotManagerModel"></div>
+    <div class="model" style="width:60%" v-if="AllotManagerModel">
+      <div class="model-text">
+        <div class="model-text-head">
+          <div>可分配小组</div>
+        </div>
+        <div class="model-items" v-for="(v, k) in getAllotManagerList.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">
+                  <div style="font-size: 24px">{{v.name}}</div>
+                  <div class="model-items-left-top-number">老师数量:{{v.teacherCount}}</div>
+                </div>
+              </div>
+              <div>
+                <el-button v-show="v.type && v.type === 1" disabled type="info">已分配</el-button>
+                <el-button
+                  v-show="!v.type || v.type !== 1"
+                  @click="GOAllotTeacherToManager(v,k)"
+                  type="success"
+                >分配</el-button>
+              </div>
+            </div>
+          </div>
+        </div>
+        <el-pagination
+          background
+          @size-change="handleSizeChange5"
+          @current-change="pageChange5"
+          :page-sizes="[10]"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="parseInt(getAllotManagerList.pages)"
+        ></el-pagination>
+      </div>
+    </div>
   </div>
 </template>
 <script>
@@ -620,20 +688,27 @@ export default {
   props: {},
   data() {
     return {
+      accessToken:localStorage.getItem("accessToken"), //token
       managerId: "", // 超级管理员登陆ID
       // BASE_URL:'https://img.sharingschool.com',
       BASE_URL: "https://xt.sharingschool.com/upload/",
+      CS_URL: "http://120.77.207.0:8081/kmt/index.html", //作业批改测环境
+      PRO_URL: "https://kmt.sharingschool.com/aijia/kmt/index.html", //作业批改生产环境
       isDownindex: "",
       modelindex: 0,
       TeacherIds:"", //封号,升级,解封
+      teacherClickId:"",
+      TeacherIdStatus:"",
        TeacherName:"", //封号,升级,解封
       values: [],
       arrGrade: [],
+      OpenID:false, //解封校区管理员弹框
       closeID:false, //封号校区管理员弹框
       rePush:false, //升级校区管理员弹框
       hiddenModel: false, //分配老师弹框
       isPigai: false, //未批改作业弹框
       ModelAppor: false, //批改老师详情信息弹框
+      AllotManagerModel:false, //可分配小组管理员列表弹框
       ModelStudet: false, //学生详情弹框
       isDown: false,
       options: [
@@ -752,6 +827,10 @@ export default {
         pageSize: 10,
         homeworkId: ""
       },
+      AllotManagerList:{
+        pageNo: 1,
+        pageSize: 10,
+      },
       AllotButton: ""
     };
   },
@@ -759,7 +838,6 @@ export default {
     const managerId = this.$route.query.managerId;
     this.managerId = managerId;
   },
-  watch: {},
   computed: {
     ...mapGetters([
       "getUser",
@@ -771,12 +849,14 @@ export default {
       "MothTeacherList",
       "UnallotHomeworkInfo",
       "GetTeacherDetail",
-      "GetStudentDetail"
+      "GetStudentDetail",
+      "getTeacherIdStatus",
+      "getAllotManagerList"
+
     ])
   },
   methods: {
     ...mapActions(["setUser"]),
-
     // 点击下拉
     dropDown(v, k) {
       this.isDown = !this.isDown;
@@ -891,18 +971,28 @@ export default {
     },
        // 封号
     async CloseTeacherId() {
-      this.$store.dispatch("DealCorrectTeacher", {
+      this.closeID = false
+      this.$store.dispatch("CloseIdTeacher", {
         teacherId: this.TeacherIds,
        operate: 2
       });
     },
        // 升级
     async RepushTeacherAcess() {
-      this.$store.dispatch("DealCorrectTeacher", {
+      this.rePush = false
+      this.$store.dispatch("RepushTeacher", {
         teacherId: this.TeacherIds,
         operate: 1
       });
     },
+      // 解封
+    async OPenTeacherId() {
+      this.OpenID = false
+      this.$store.dispatch("OpenIdTeacher", {
+        teacherId: this.TeacherIds,
+        operate: 3
+      });
+    },
     // 查看老师详情信息
     async GetTeacherInfo(v) {
       this.$store.dispatch("GetTeacherDetail", {
@@ -928,6 +1018,24 @@ export default {
         vipId: v.vipId
       });
     },
+     // 可分配小组列表
+    async GetAllotManagerInfo() {
+      this.$store.dispatch("GetAllotManagerList", {
+        maxCreateTime: this.filters.MaxtimeValue,
+        pageNo: this.AllotManagerList.pageNo,
+        pageSize: this.AllotManagerList.pageSize
+      });
+    },
+      // 分配老师到管理员名下
+    async GOAllotTeacherToManager(v, k) {
+      this.$store.dispatch("AllotTeacherToManager", {
+        managerId: v.managerId,
+        teacherId:  this.TeacherIds
+      });
+      v.type = 1;
+      this.$set(this.getAllotManagerList.list, k, v);
+       this.AllotManagerModel = false
+    },
     selectTitle(k) {
       this.modelindex = k;
       if (k === 0) {
@@ -954,6 +1062,7 @@ export default {
         _this.isPigai = true;
         this.UnallotHomework();
       } else if (str == 3) {
+          this.TeacherIdStatus = v.status;
          this.TeacherIds = v.teacherId;
          this.TeacherName = v.name;
         _this.ModelAppor = true;
@@ -970,6 +1079,15 @@ export default {
         _this.closeID = true;
         _this.ModelAppor = false;
       }
+       else if (str == 7) {
+        _this.OpenID = true;
+        _this.ModelAppor = false;
+      }
+       else if (str == 8) {
+        _this.AllotManagerModel = true;
+        _this.ModelAppor = false;
+        this.GetAllotManagerInfo()
+      }
     },
     //关闭弹框
     allShowModel(str) {
@@ -987,6 +1105,12 @@ export default {
       } else if (str == 6) {
         _this.closeID = false;
       }
+       else if (str == 7) {
+        _this.OpenID = false;
+      }
+       else if (str == 8) {
+        _this.AllotManagerModel = false;
+      }
     },
     // 数组去重
     uniq(array) {
@@ -1058,6 +1182,10 @@ export default {
       this.allotList.pageSize = val;
       this.TeacherAllotfy();
     },
+      handleSizeChange5(val) {
+      this.AllotManagerList.pageSize = val;
+      this.GetAllotManagerInfo();
+    },
     // 分页
     pageChange(val) {
       this.filters.pageNo = val;
@@ -1079,6 +1207,10 @@ export default {
       this.allotList.pageNo = val;
       this.TeacherAllotfy();
     },
+      pageChange5(val) {
+      this.AllotManagerList.pageNo = val;
+      this.GetAllotManagerInfo();
+    },
     // 排序
     sortChange(sort) {
       this.filters.orderField = sort.prop;
@@ -1100,7 +1232,12 @@ export default {
     // this.getsetDictByType2();
     // this.getUserNameList();
     // this.itemListReshow();
-  }
+  },
+     watch:{
+        getTeacherIdStatus(val, oldVal){ //普通的watch监听
+         this.InfoWatch();
+        },
+    }
 };
 </script>
 

+ 3 - 3
src/pages/super/SuperAdmin.vue

@@ -116,9 +116,9 @@
               <el-button type="danger" plain round @click="isShow(2,getManagerDetail.name)"><i class="el-icon-bottom"></i><span>降级</span></el-button>
             </div>
           </div>
-          <div class="model-items-other model-active">批改科目 : {{getManagerDetail.subject}}</div>
-          <div class="model-items-other">批改年级 : <span v-for="(v, k) of arrGrade" :key=k class="scope-name" v-if="k>=0">{{v}}</span></div>
-          <div class="model-items-other model-active">可批改时间:<span v-if="v"><el-button type="info" round v-for="(v, k) of arrPeriod" :key=k  v-if="k>=0">{{v}}</el-button></span></div>
+          <div class="model-items-other model-active">批改科目 : {{getManagerDetail.subject}}</div> 
+          <div class="model-items-other">批改年级 :<div v-if="k>=0"> <span v-for="(v, k) of arrGrade" :key=k class="scope-name">{{v}}</span></div></div>
+          <div class="model-items-other model-active">可批改时间: <div v-if="k>=0"><span v-if="v"><el-button type="info" round v-for="(v, k) of arrPeriod" :key=k >{{v}}</el-button></span></div></div>
           <div class="model-items-other">手机号 : {{getManagerDetail.phone}}</div>
           <div class="model-items-other model-active-last">上次登录时间 : {{getManagerDetail.lastOnlineTime}}</div>
         </div>

+ 1 - 1
src/router/index.js

@@ -112,7 +112,7 @@ export const constantRouterMap =
            path: "TeacherApporval",
            name: "TeacherApporval",
            component: TeacherApporval,
-           meta: { title: '教师审核', roles: ['2'] }
+           meta: { title: '在线批改老师', roles: ['2'] }
          },
          {
            path: "TeacherPay",

+ 3 - 0
src/store/getters.js

@@ -21,5 +21,8 @@ const getters = {
   applyTeacherList: state => state.user.applyTeacherList,
   applyOperate: state => state.user.applyOperate,
   getTeacherSalaryList: state => state.user.getTeacherSalaryList,
+  getTeacherIdStatus: state => state.user.getTeacherIdStatus,
+  getAllotManagerList: state => state.user.getAllotManagerList,
+  
 }
 export default getters

+ 91 - 9
src/store/modules/user.js

@@ -2,7 +2,8 @@ import { GET_UUIONID_TOKEN,GET_TOKEN,GetInfo,InfoWatch,InfoWatchDay,
   InfoWatchMoth,TeacherHomeworkList,TeacherAllotList,
   TeacherAllot,UnallotHomeworkList,GetTeacherDetail,
   GetStudentDetail,GetManagerDetail,Downgrade,SuperManagerList,
-  SuperApplyTeacherList,ApplyOperate,GetTeacherSalaryList,DealCorrectTeacher
+  SuperApplyTeacherList,ApplyOperate,GetTeacherSalaryList,DealCorrectTeacher,
+  GetAllotManagerList,AllotTeacherToManager
   } from '@/api'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 import axios from '@/axios'
@@ -26,7 +27,9 @@ const user = {
     getManagerList:[],
     getManagerDetail:{},
     applyTeacherList:[],
-    getTeacherSalaryList:[]
+    getTeacherSalaryList:[],
+    getTeacherIdStatus:"",
+    getAllotManagerList:""
   },
 
   mutations: {
@@ -87,6 +90,12 @@ const user = {
     SET_TEACHER_SALARY_LIST:(state,getTeacherSalaryList) => {
       state.getTeacherSalaryList = getTeacherSalaryList
     },
+    SET_CLOSE_OR_OPENID:(state,getTeacherIdStatus) => {
+      state.getTeacherIdStatus = getTeacherIdStatus
+    },
+    SET_MANAGERLIST_ALLOTIST:(state,getAllotManagerList) => {
+      state.getAllotManagerList = getAllotManagerList
+    },
   },
 
   actions: {
@@ -103,7 +112,7 @@ const user = {
                    dispatch('GetInfo').then(res => { // 拉取用户信息
                         const roles = res.data.role 
                         if (roles == 1) {
-                          router.push("/Onteacher");
+                          window.open('https://kmt.sharingschool.com/aijia/kmt/index.html');
                         }
                         if (roles == 2) {
                           router.push("/home");
@@ -133,6 +142,9 @@ const user = {
                     Message.success('登录成功')
                    dispatch('GetInfo').then(res => { // 拉取用户信息
                         const roles = res.data.role 
+                        if (roles == 1) {
+                          window.open('https://kmt.sharingschool.com/aijia/kmt/index.html');
+                        }
                         if (roles == 2) {
                           router.push("/home");
                         }
@@ -223,6 +235,34 @@ const user = {
           })
         })
       },
+       // 查看可分配小组列表
+       GetAllotManagerList({ commit, state }, data) {
+        return new Promise((resolve, reject) => {
+          axios.post(GetAllotManagerList, data).then(response => {
+            const data = response.data || {}
+            commit('SET_MANAGERLIST_ALLOTIST', data);
+            resolve(response)
+          }).catch(error => {
+            reject(error)
+          })
+        })
+      },
+          // 分配老师到管理员名下
+          AllotTeacherToManager({ commit, state }, data) {
+            return new Promise((resolve, reject) => {
+              axios.post(AllotTeacherToManager, data).then(response => {
+                const data = response || {}
+                if (data.code === "999"){
+                  // debugger
+                  commit('SET_CLOSE_OR_OPENID', new Date());
+                  Message.success('分配成功')
+                }
+                // resolve(response)
+              }).catch(error => {
+                reject(error)
+              })
+            })
+          },
         // 未批改作业列表
         UnallotHomeworkList({ commit, state }, data) {
           return new Promise((resolve, reject) => {
@@ -263,8 +303,8 @@ const user = {
          toTeacherAllot({ commit, state }, data) {
           return new Promise((resolve, reject) => {
             axios.post(TeacherAllot, data).then(response => {
-              const data = response.data || {}
-              if (data.code === 999){
+              const data = response || {}
+              if (data.code === '999'){
                 Message.success('分配成功')
               }
             }).catch(error => {
@@ -297,12 +337,54 @@ const user = {
         })
       })
     },
-    // 处理在线批改老师(升级或封号或解封)
-    DealCorrectTeacher({ commit, state }, data) {
+    // 处理在线批改老师(解封)
+    OpenIdTeacher({ commit, state }, data) {
       return new Promise((resolve, reject) => {
         axios.post(DealCorrectTeacher, data).then(response => {
-          const data = response.data
-          commit('SET_DOWNGRADE', data);
+          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)
+        })
+      })
+    },
+      // 处理在线批改老师(升级)
+      RepushTeacher({ commit, state }, data) {
+        return new Promise((resolve, reject) => {
+          axios.post(DealCorrectTeacher, data).then(response => {
+            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)
+          })
+        })
+      },
+        // 处理在线批改老师(封号)
+    CloseIdTeacher({ commit, state }, data) {
+      return new Promise((resolve, reject) => {
+        axios.post(DealCorrectTeacher, data).then(response => {
+          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)