Jelajahi Sumber

01/29 15:17 运营指标 服务指标移动

1
mo 4 tahun lalu
induk
melakukan
c014f26568

+ 1 - 0
src/router/notKeepAliveList.js

@@ -86,4 +86,5 @@ export default [
   '/business/musicInspection', // 乐团巡查
   '/main/scheduleDetail',
   '/business/WithdrawalApplication', // 退团申请
+  '/business/teacherDetail',
 ]

+ 3 - 7
src/views/teacherManager/teacherDetail/components/teacherInfo.vue

@@ -206,6 +206,7 @@ import { teacherGet } from '@/api/teacherManager'
 import dayjs from 'dayjs';
 export default {
   name: 'teacherInfo',
+  props:['teacherInfo'],
   data () {
     return {
       formLabelWidth: '80px',
@@ -224,9 +225,7 @@ export default {
   },
   methods: {
     teacherGet () {
-      teacherGet({ teacherId: this.teacherId }).then(res => {
-        if (res.code == 200) {
-          let tempData = res.data
+        let tempData = this.teacherInfo
           tempData.subjectName = this.joinArray(tempData.subjectName)
           let sn = []
           tempData.teacherSchools.forEach(item => {
@@ -237,16 +236,13 @@ export default {
           tempData.jobNature = this.jobNature(tempData.jobNature)
           tempData.birthdate = this.formatTimer(tempData.birthdate)
           tempData.gender = tempData.gender ? '男' : '女'
-          this.topForm = res.data
+          this.topForm = this.teacherInfo
           if(this.topForm.demissionDate){
              this.topForm.demissionDate = dayjs(this.topForm.demissionDate).format('YYYY-MM-DD')
           }
           if(this.topForm.formalStaffDate) {
             this.topForm.formalStaffDate = dayjs(this.topForm.formalStaffDate).format('YYYY-MM-DD')
           }
-
-        }
-      })
     },
     joinArray (value, type) {
       if (!type) {

+ 40 - 6
src/views/teacherManager/teacherDetail/index.vue

@@ -1,8 +1,13 @@
 <template>
   <div class="m-container">
-    <h2>
+    <h2 class="mo-tilte">
       <el-page-header @back="onCancel"
                       :content="teacherName"></el-page-header>
+      <div>
+        <!-- 服务指标:本周 运营指标: -->
+        <el-button v-if="teacherInfo" type="text" @click="gotoOperating">运营指标:<span style="color:red">{{teacherInfo.operatingIndex}}%</span></el-button>
+        <el-button v-if="teacherInfo" type="text" @click="gotoAfterSchool">服务指标(每周):<span style="color:red">{{teacherInfo.serviceIndex}}%</span></el-button>
+      </div>
     </h2>
     <div class="m-core">
       <!-- navMenu -->
@@ -13,7 +18,7 @@
         lazy
                      v-if="permissionList.teacherInfo"
                      name="0">
-          <teacherInfo v-if="activeName == 0" />
+          <teacherInfo v-if="activeName == 0&&teacherInfo" :teacherInfo='teacherInfo'  />
         </el-tab-pane>
         <el-tab-pane label="乐团课"
         lazy
@@ -100,6 +105,7 @@ import serveStudentList from "@/views/teacherManager/teacherDetail/components/se
 import calendarList from '@/views/teacherManager/teacherDetail/components/calendarList'
 import weeklyCalendar from '@/views/teacherManager/teacherDetail/components/weeklyCalendar'
 import { permission } from "@/utils/directivePage";
+import { teacherGet } from '@/api/teacherManager'
 export default {
   components: {
     teacherRecord,
@@ -137,14 +143,23 @@ export default {
         calendarList: permission("/teacherDetail/calendarList"),
         weeklyCalendar: permission("/teacherDetail/weeklyCalendar"),
       },
+      teacherInfo:null
     };
   },
   activated () {
-    this.teacherName = this.$route.query.teacherName;
-    this.activeName = "0";
+
   },
 
   created () {
+      this.teacherName = this.$route.query.teacherName;
+        this.teacherId = this.$route.query.teacherId
+    this.activeName = "0";
+      teacherGet({ teacherId: this.teacherId }).then(res => {
+        if (res.code == 200) {
+         this.teacherInfo = res.data
+
+        }
+      })
   },
   methods: {
     handleClick (val, event) {
@@ -155,9 +170,28 @@ export default {
       this.$router.push({
         path: "/business/teacherList"
       });
-    }
+    },
+      gotoAfterSchool() {
+      // 需要的参数 id
+      this.$router.push({
+        path: "/operateManager/serverIndexList",
+        query: { teacherId:  this.teacherId, activeIndex: "2" },
+      });
+    },
+    gotoOperating() {
+      this.$router.push({
+        path: "/operateManager/operateStudent",
+        query: { teacherId:  this.teacherId, operatingTag: "1" },
+      });
+    },
   }
 };
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
+.mo-tilte {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: space-between;
+}
 </style>

+ 3 - 15
src/views/teacherManager/teacherList.vue

@@ -215,7 +215,7 @@
             }}</template>
           </el-table-column>
 
-          <el-table-column align="center" label="运营指标">
+          <!-- <el-table-column align="center" label="运营指标">
             <template slot-scope="scope">
               <el-button type="text" @click="gotoOperating(scope.row)">{{
                 scope.row.operatingIndex + "%"
@@ -228,7 +228,7 @@
                 scope.row.serviceIndex + "%"
               }}</el-button>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column align="center" label="转正日期">
             <template slot-scope="scope">
               <div>
@@ -553,19 +553,7 @@ export default {
         }
       });
     },
-    gotoAfterSchool(row) {
-      // 需要的参数 id
-      this.$router.push({
-        path: "/operateManager/serverIndexList",
-        query: { teacherId: row.id, activeIndex: "2" },
-      });
-    },
-    gotoOperating(row) {
-      this.$router.push({
-        path: "/operateManager/operateStudent",
-        query: { teacherId: row.id, operatingTag: "1" },
-      });
-    },
+
 
   },
 };