Pārlūkot izejas kodu

提交最新代码

TheLittlePrince 6 gadi atpakaļ
vecāks
revīzija
4a0b919bdd

+ 4 - 0
src/axios/index.js

@@ -4,10 +4,12 @@ import util from '@/js/util'
 import { TIME_OUT } from '@/config'
 import router from '@/router';
 import { Message } from 'element-ui'
+import { showLoading, hideLoading } from './loading';
 
 // 网络请求前拦截器
 axios.interceptors.request.use(resquest => {
     console.log(resquest)
+    showLoading();
 //   if(resquest && resquest.data && typeof (resquest.data) === 'object'){
     // 若每个接口需要添加时间戳时
     // resquest.data.currentDateTime = util.getFormatDate('yyyy-mm-dd hh:mm:ss')
@@ -22,6 +24,7 @@ axios.interceptors.request.use(resquest => {
 // 响应拦截器
 axios.interceptors.response.use(
     response => {
+        hideLoading();
         if (response && response.status === 200 || response && response.status === 304) {
             return Promise.resolve(response);
         } else {
@@ -30,6 +33,7 @@ axios.interceptors.response.use(
     },
     // 服务器状态码不是200的情况
     error => {
+        hideLoading();
         if (error.response.status) {
             switch (error.response.status) {
                 // 401: 未登录

+ 33 - 0
src/axios/loading.js

@@ -0,0 +1,33 @@
+import { Loading } from 'element-ui';
+
+let loadingCount = 0;
+let loading;
+
+const startLoading = () => {
+  loading = Loading.service({
+    lock: true,
+    text: '加载中……',
+    background: 'rgba(0, 0, 0, 0.7)'
+  });
+};
+
+const endLoading = () => {
+  loading.close();
+};
+
+export const showLoading = () => {
+  if (loadingCount === 0) {
+    startLoading();
+  }
+  loadingCount += 1;
+};
+
+export const hideLoading = () => {
+  if (loadingCount <= 0) {
+    return;
+  }
+  loadingCount -= 1;
+  if (loadingCount === 0) {
+    endLoading();
+  }
+};

+ 2 - 2
src/components/SuperComponent.vue

@@ -15,9 +15,9 @@
         class="lineStyle"
         :class="{superactive:index == checkindex,menu_item:true}"
       >{{item.name}}</span>
-      <!-- <div class="box" v-if="index==1||index==3">
+      <div class="box" v-if="index==1||index==3">
             <span class="box-text">{{index==1?2+'项任务':3+'份作业'}}</span>
-      </div>-->
+      </div>
     </el-col>
 
     <el-col :span="4" class="aside-right">

+ 21 - 8
src/pages/home/SchoolManager.vue

@@ -20,7 +20,7 @@
               <div class="main-header-item displayBox">在线:{{monitorTeacherList.onlineCount}}人</div>
               <div class="main-header-item displayBox">离线:{{monitorTeacherList.offlineCount}}人</div>
               <div class="main-header-item displayBox">
-                <span>平均响应时间:{{monitorTeacherList.unCorrectCount}}/份</span>
+                <span>平均响应时间:{{monitorTeacherList.avgreSpeed}}/份</span>
               </div>
               <div class="main-header-item displayBox">
                 <span>分配未批改作业:{{monitorTeacherList.unCorrectCount}}份</span>
@@ -208,13 +208,17 @@
                     >{{v.spendTime}}</div>
                     <div class="tr-seconds width40" style="width: 10%">{{v.subject}}</div>
                     <div class="tr-seconds width40" style="width: 10%">{{v.grade}}</div>
-                    <div v-if="v.status === 1" class="tr-seconds width40" style="width: 10%">未批改</div>
+                    <div v-if="v.status === 1" class="tr-seconds width40" style="width: 10%">未批改
+                      (<span>{{v.feedbackCount}}/{{v.picTotal}}</span>)
+                    </div>
                     <div
                       v-if="v.status === 2"
                       class="tr-seconds width40"
                       style="color:#FFC303;width: 10%"
-                    >批改中</div>
-                    <div v-if="v.status === 3" class="tr-seconds width40" style="width: 10%">已批改</div>
+                    >批改中
+                     (<span>{{v.feedbackCount}}/{{v.picTotal}}</span>)
+                    </div>
+                    <div v-if="v.status === 3" class="tr-seconds width40" style="width: 10%">已批改 (<span>{{v.feedbackCount}}/{{v.picTotal}}</span>)</div>
                     <div class="tr-sw180" v-if="v.status === 2" style="width: 25%"></div>
                     <div class="tr-sw180" v-if="v.status === 1" style="width: 25%">
                       <el-button
@@ -330,8 +334,11 @@
                 <div>头像</div>
                 <div>姓名</div>
                 <div>被报错</div>
+                 <div>纠正次数</div>
                 <div>科目</div>
                 <div>批改有效总张数</div>
+                 <div>正确率</div>
+                  <div>家长满意度</div>
                 <div style="width:240px;">平均批改时间</div>
                 <div>出勤</div>
               </div>
@@ -344,8 +351,11 @@
                   <div>{{v.name}}</div>
                   <div v-if="v.wrongCount == 0">{{v.wrongCount}}次</div>
                   <div style="color:red;" v-if="v.wrongCount > 0">{{v.wrongCount}}次</div>
+                     <div class="tr-active">{{v.correctNums}}次</div>
                   <div class="tr-active">{{v.subject}}</div>
                   <div>{{v.homeworkPicCount}}/张</div>
+                   <div>{{v.accuracyRate}}</div>
+                    <div>{{v.satisfactionDegree}}</div>
                   <div style="width:240px;">{{v.avgTime}}</div>
                   <div>{{v.attendance}}</div>
                   <!-- <div v-if="v.attendance == 正常">{{v.attendance}}</div>
@@ -422,7 +432,7 @@
             <div class="main-header-item">批改平均时间:{{MothTeacherList.totalAvgTime}}</div>
           </el-col>
           <el-col :span="4">
-            <div class="main-header-item">平均满意度:{{MothTeacherList.totalSatisfactionDegree}}</div>
+            <div class="main-header-item">家长满意度:{{MothTeacherList.totalSatisfactionDegree}}</div>
           </el-col>
           <el-col :span="4">
             <div class="main-header-item">正确率:{{MothTeacherList.totalAccuracyRate}}</div>
@@ -435,10 +445,11 @@
                 <div>头像</div>
                 <div>姓名</div>
                 <div>被报错</div>
+                 <div>纠正次数</div>
                 <div>科目</div>
                 <div>批改有效总张数</div>
                 <div>正确率</div>
-                <div>满意度</div>
+                <div>家长满意度</div>
                 <div style="width:240px;">平均批改时间</div>
                 <div>出勤率</div>
               </div>
@@ -451,6 +462,7 @@
                   <div>{{v.name}}</div>
                   <div v-if="v.wrongCount == 0">{{v.wrongCount}}次</div>
                   <div style="color:red;" v-if="v.wrongCount > 0">{{v.wrongCount}}次</div>
+                     <div class="tr-active">{{v.correctNums}}次</div>
                   <div class="tr-active">{{v.subject}}</div>
                   <div>{{v.homeworkPicCount}}/张</div>
                   <div>{{v.accuracyRate}}</div>
@@ -738,8 +750,8 @@
           <div class="model-items-other">手机号 : {{GetTeacherDetail.phone}}</div>
           <div class="model-items-other model-active">上次登录时间 : {{GetTeacherDetail.lastOnlineTime}}</div>
           <div class="model-items-other">批改正确率 : {{GetTeacherDetail.accuracyRate}}</div>
-          <div class="model-items-other model-active">被报错总次数 : {{GetTeacherDetail.wrongCount}}</div>
-          <div class="model-items-other">纠正次数 : {{GetTeacherDetail.accuracyRate}}</div>
+          <div class="model-items-other model-active">被报错总次数 : <span style="color:red;">{{GetTeacherDetail.wrongCount}}次</span></div>
+          <div class="model-items-other">纠正次数 : {{GetTeacherDetail.correctNums}}次</div>
           <div
             class="model-items-other model-active"
           >家长满意度 : {{GetTeacherDetail.satisfactionDegree}}</div>
@@ -783,6 +795,7 @@
 <script>
 import { IMG_BASE_URL, APPOR_BASE_URL } from "@/ImgConfig";
 import { mapGetters, mapActions } from "vuex";
+import { Loading } from 'element-ui';
 export default {
   components: {},
   name: "actvResolveLabel",

+ 76 - 10
src/pages/super/CheckTeacherAudit.vue

@@ -32,26 +32,47 @@
             </template>
           </el-table-column>
           <el-table-column
-            prop="school"
+            prop=""
             label="学校"
             header-align="center"
           >
+           <template slot-scope="scope">
+                <div :class="{activetype:scope.row.updateFieldList.indexOf('school')>0}">
+                    <div>{{scope.row.school}}</div>
+                </div>
+              </template>
           </el-table-column>
           <el-table-column
-            prop="subject"
+            prop=""
             label="批改科目"
             header-align="center"
-          ></el-table-column>
-          <el-table-column
+          >
+           <template slot-scope="scope">
+                <div :class="{activetype:scope.row.updateFieldList.indexOf('subject')>0}">
+                    <div>{{scope.row.subject}}</div>
+                </div>
+              </template>
+          </el-table-column>
+           <el-table-column
             prop=""
             label="批改年级"
             header-align="center">
               <template slot-scope="scope">
-                <div >
+                <div :class="{activetype:scope.row.updateFieldList.indexOf('grade')>0}">
                     <div v-for="(v, k) of scope.row.gradeList" :key=k v-show="v">{{v}}</div>
                 </div>
               </template>
           </el-table-column>
+           <el-table-column
+            prop=""
+            label="	所属管理员"
+            header-align="center">
+              <template slot-scope="scope">
+                <div :class="{activetype:scope.row.updateFieldList.indexOf('myManager')>0}">
+                     <div>{{scope.row.myManager}}</div>
+                </div>
+              </template>
+          </el-table-column>
           <el-table-column
             prop=""
             label="可批改时间"
@@ -59,16 +80,31 @@
             width="445"
           >
             <template slot-scope="scope">
-                  <div>
-                    <el-button type="info" round v-for="(v, k) of scope.row.periodList" :key=k v-show="v">{{v}}</el-button>
+                 <div class="buttonAppoval">
+               <div class="TeacherApporTime" v-for="(v, k) of scope.row.periodList" :key=k v-show="v">
+                  <span>{{v}}</span>
                 </div>
+            </div>
+                  <!-- <div>
+                    <el-button type="info" round v-for="(v, k) of scope.row.periodList" :key=k v-show="v">{{v}}</el-button>
+                </div> -->
             </template>
           </el-table-column>
-
+            <el-table-column
+            prop=""
+            label="老师类型"
+            header-align="center">
+              <template slot-scope="scope">
+                <div >
+                  <div  :class="{activetype:scope.row.updateFieldList.indexOf('type')>0}" v-if="scope.row.type == 8">批改老师</div>
+                  <div  :class="{activetype:scope.row.updateFieldList.indexOf('type')>0}" v-if="scope.row.type == 13">匹配知识点老师</div>
+                </div>
+              </template>
+          </el-table-column>
           <el-table-column prop="status" label="" header-align="center" width="250">
             <template slot-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>
+              <el-button type="success" @click="isShow(1,scope.row.teacherId,scope.row.name)">通过</el-button>
             </template>
           </el-table-column>
 
@@ -305,14 +341,19 @@
           for (let i in res) {
             var arr = [];
             arr = res[i].period.split(',')
+                var updateFieldarr = [];
+                updateFieldarr = res[i].updateField.split(',')
             d.push( {
               gradeList: res[i].grade.split(','),
               periodList: arr,
+              updateFieldList:updateFieldarr,
               imgUrl: res[i].imgUrl,
               name: res[i].name,
               school:res[i].school,
               teacherId:res[i].teacherId,
-              subject:res[i].subject
+              subject:res[i].subject,
+              type:res[i].type,
+              myManager:res[i].myManager,
             })
           }
           return d
@@ -569,6 +610,31 @@
     min-height: 200px;
     padding: 15px;
   }
+  .TeacherApporTime {
+  text-align:center;
+  display: inline-block;
+  height: 30px;
+  width: 60px;
+  color: #706f6f;
+  background: #b6b6b6;
+  border-color: #929492;
+  border-radius: 20px;
+  font-size: 14px;
+  line-height: 30px;
+  cursor: pointer;
+  margin:0 5px;
+}
+.TeacherApporTime:hover{
+    color: #fff;
+    background-color: #909399;
+    border-color: #909399;
+}
+.buttonAppoval {
+  display: inline-block;
+}
+.activetype{
+  color:#52cc60;
+}
   /*.all_pagination{*/
     /*text-align: center !important;*/
   /*}*/

+ 30 - 1
src/pages/super/CheckTeacherPay.vue

@@ -17,7 +17,12 @@
                 @change="GetTeacherSalaryList()">
               </el-date-picker>
             </div>
-          </div></el-col>
+          </div>
+          </el-col>
+          <el-col :span="6"  :offset="3">
+            <!-- <div  @click="handApor()" :class="{superactive:Activeindex == false,ApporStyles:true}" >手动批改</div>
+            <div  @click="AutoApor()"  :class="{superactive:Activeindex == true,ApporStyles:true}" >自动批改</div> -->
+          </el-col>
           <el-col :span="4" :offset="16">
             <div class="main-header-item">
               <i class="el-icon-printer"></i>
@@ -114,6 +119,7 @@
     props: {},
     data() {
       return {
+        Activeindex:false,
           BASE_URL:IMG_BASE_URL,
         selMonth:'',
         hiddenModel:false,
@@ -201,6 +207,14 @@
           }
         }
       },
+      // 手动批改
+      handApor(){
+        this.Activeindex = false;
+      },
+         // 自动批改
+      AutoApor(){
+         this.Activeindex = true;
+      },
       //弹框
       isShow(str){
         let _this = this;
@@ -426,4 +440,19 @@
     margin-left: 18px;
     text-align: left;
   }
+  .ApporStyles{
+    display:inline-block;
+    width: 100px;
+    height: 30px;
+    line-height:30px;
+    background-color: #fff;
+    border-radius:15px;
+    font-size: 14px;
+    color:#7C819D;
+    cursor: pointer;
+  }
+  .superactive{
+    background-color: #52CC60;
+    color:#fff;
+  }
 </style>

+ 4 - 1
src/pages/super/HomeworkTotally.vue

@@ -9,7 +9,7 @@
             <h5 class="tiplog">作业统计表</h5>
           </el-col>
           <el-col :span="16" class :offset="4">
-            <div class="block">
+            <div class="block clickTime">
               <span class="demonstration">选择时间</span>
               <el-date-picker
                 @change="FindSubjectChartsInfo"
@@ -204,4 +204,7 @@ el-table {
 .block {
   margin-top: 40px;
 }
+.clickTime{
+text-align:left;
+}
 </style>

+ 19 - 13
src/pages/super/SchoolManager.vue

@@ -19,7 +19,7 @@
               <div class="main-header-item displayBox">在线:{{monitorTeacherList.onlineCount}}人</div>
               <div class="main-header-item displayBox">离线:{{monitorTeacherList.offlineCount}}人</div>
               <div class="main-header-item displayBox">
-                <span>平均响应时间:{{monitorTeacherList.unCorrectCount}}/份</span>
+                <span>平均响应时间:{{monitorTeacherList.avgreSpeed}}/份</span>
               </div>
               <div class="main-header-item displayBox">
                 <span>分配未批改作业:{{monitorTeacherList.unCorrectCount}}份</span>
@@ -206,13 +206,15 @@
                     >{{v.spendTime}}</div>
                     <div class="tr-seconds width40" style="width: 10%">{{v.subject}}</div>
                     <div class="tr-seconds width40" style="width: 10%">{{v.grade}}</div>
-                    <div v-if="v.status === 1" class="tr-seconds width40" style="width: 10%">未批改</div>
+                    <div v-if="v.status === 1" class="tr-seconds width40" style="width: 10%">未批改
+                        (<span>{{v.feedbackCount}}/{{v.picTotal}}</span>)
+                    </div>
                     <div
                       v-if="v.status === 2"
                       class="tr-seconds width40"
                       style="color:#FFC303;width: 10%"
-                    >批改中</div>
-                    <div v-if="v.status === 3" class="tr-seconds width40" style="width: 10%">已批改</div>
+                    >批改中  (<span>{{v.feedbackCount}}/{{v.picTotal}}</span>)</div>
+                    <div v-if="v.status === 3" class="tr-seconds width40" style="width: 10%">已批改  (<span>{{v.feedbackCount}}/{{v.picTotal}}</span>)</div>
                     <div class="tr-sw180" v-if="v.status === 2" style="width: 25%"></div>
                     <div class="tr-sw180" v-if="v.status === 1" style="width: 25%">
                       <!-- <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> -->
@@ -326,9 +328,11 @@
                 <div>头像</div>
                 <div>姓名</div>
                 <div>被报错</div>
+                <div>纠正次数</div>
                 <div>科目</div>
-                <div>批改总份数</div>
-                <div>批改总张数</div>
+                <div>批改有效总张数</div>
+                  <div>正确率</div>
+                  <div>家长满意度</div>
                 <div style="width:240px;">平均批改时间</div>
                 <div>出勤</div>
               </div>
@@ -341,9 +345,11 @@
                   <div>{{v.name}}</div>
                   <div v-if="v.wrongCount == 0">{{v.wrongCount}}次</div>
                   <div style="color:red;" v-if="v.wrongCount > 0">{{v.wrongCount}}次</div>
+                   <div class="tr-active">{{v.correctNums}}次</div>
                   <div class="tr-active">{{v.subject}}</div>
-                  <div>{{v.homeworkCount}}</div>
                   <div>{{v.homeworkPicCount}}/张</div>
+                  <div>{{v.accuracyRate}}</div>
+                  <div>{{v.satisfactionDegree}}</div>
                   <div style="width:240px;">{{v.avgTime}}</div>
                   <div>{{v.attendance}}</div>
                   <!-- <div v-if="v.attendance == 正常">{{v.attendance}}</div>
@@ -424,7 +430,7 @@
             <div class="main-header-item">批改平均时间:{{MothTeacherList.totalAvgTime}}</div>
           </el-col>
           <el-col :span="4">
-            <div class="main-header-item">平均满意度:{{MothTeacherList.totalSatisfactionDegree}}</div>
+            <div class="main-header-item">家长满意度:{{MothTeacherList.totalSatisfactionDegree}}</div>
           </el-col>
           <el-col :span="4">
             <div class="main-header-item">正确率:{{MothTeacherList.totalAccuracyRate}}</div>
@@ -437,11 +443,11 @@
                 <div>头像</div>
                 <div>姓名</div>
                 <div>被报错</div>
+                <div>纠正次数</div>
                 <div>科目</div>
-                <div>批改总份数</div>
                 <div>批改总张数</div>
                 <div>正确率</div>
-                <div>满意度</div>
+                <div>家长满意度</div>
                 <div style="width:240px;">平均批改时间</div>
                 <div>出勤率</div>
               </div>
@@ -454,8 +460,8 @@
                   <div>{{v.name}}</div>
                   <div v-if="v.wrongCount == 0">{{v.wrongCount}}次</div>
                   <div style="color:red;" v-if="v.wrongCount > 0">{{v.wrongCount}}次</div>
+                  <div class="tr-active">{{v.correctNums}}次</div>
                   <div class="tr-active">{{v.subject}}</div>
-                  <div>{{v.homeworkCount}}</div>
                   <div>{{v.homeworkPicCount}}/张</div>
                   <div>{{v.accuracyRate}}</div>
                   <div>{{v.satisfactionDegree}}</div>
@@ -683,8 +689,8 @@
           <div class="model-items-other">手机号 : {{GetTeacherDetail.phone}}</div>
           <div class="model-items-other model-active">上次登录时间 : {{GetTeacherDetail.lastOnlineTime}}</div>
           <div class="model-items-other">批改正确率 : {{GetTeacherDetail.accuracyRate}}</div>
-          <div class="model-items-other model-active">被报错总次数 : {{GetTeacherDetail.wrongCount}}</div>
-           <div class="model-items-other">纠正次数 : {{GetTeacherDetail.satisfactionDegree}}</div>
+          <div class="model-items-other model-active">被报错总次数 : <span style="color:red;">{{GetTeacherDetail.wrongCount}}次</span></div>
+           <div class="model-items-other">纠正次数 : {{GetTeacherDetail.correctNums}}次</div>
           <div class="model-items-other model-active">家长满意度 : {{GetTeacherDetail.satisfactionDegree}}</div>
           <div style="display:inline-block">
              <div class="UpTeacherID" style="width:80px"   @click="isShow(GetTeacherDetail,8)">

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

@@ -18,6 +18,7 @@
           <!--</el-col>-->
           <!--<el-col :span="4">-->
             <div class="main-header-item">活跃用户数:{{getManagerList.activeUserCount}}人</div>
+             <div class="main-header-item">上周新增用户数{{getManagerList.increaseUser}}人</div>
           <!--</el-col>-->
         </el-row>
         <el-table
@@ -415,7 +416,7 @@
     /*vertical-align: middle;*/
     text-align: center;
     display: inline-block;
-    width: 20%;
+    width: 15%;
   }
 
   .input-with-select .el-input-group__prepend {