Browse Source

1128 20:42

111
mo 5 years ago
parent
commit
f7deedac3c

+ 12 - 3
src/views/studentManager/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="m-container">
     <h2>
-      <el-page-header @back="onCancel" content="学员详情"></el-page-header>
+      <el-page-header @back="onCancel"
+                      content="学员详情"></el-page-header>
     </h2>
     <div class="m-core">
       <!-- navMenu -->
@@ -65,9 +66,17 @@ export default {
       // acitveStatus: [true, false, false, false, false, false, false]
     }
   },
+  mounted () {
+    if (this.$route.query.search) {
+      this.Fsearch = this.$route.query.search;
+    }
+    if (this.$route.query.rules) {
+      this.Frules = this.$route.query.rules
+    }
+  },
   methods: {
-    onCancel() {
-      this.$router.push('/business/studentList')
+    onCancel () {
+      this.$router.push({ path: '/business/studentList', query: { rules: this.Frules, search: this.Fsearch } })
     },
     handleClick (val) {
       this.activeIndex = val.name

+ 8 - 1
src/views/studentManager/studentList.vue

@@ -69,7 +69,8 @@
                            label="操作">
             <template slot-scope="scope">
               <router-link style="color:#409EFF"
-                           :to="`/business/studentDetail?userId=${scope.row.userId}`">查看</router-link>
+                           :to="{path:`/business/studentDetail?userId=${scope.row.userId}`,query:{search:JSON.stringify(searchForm),rules:JSON.stringify(pageInfo)}}">查看</router-link>
+
             </template>
           </el-table-column>
         </el-table>
@@ -111,6 +112,12 @@ export default {
     }
   },
   mounted () {
+    if (this.$route.query.search) {
+      this.$route.query.search instanceof Object ? this.searchForm = this.$route.query.search : this.searchForm = JSON.parse(this.$route.query.search);
+    }
+    if (this.$route.query.rules) {
+      this.$route.query.rules instanceof Object ? this.pageInfo = this.$route.query.rules : this.pageInfo = JSON.parse(this.$route.query.rules);
+    }
     getEmployeeOrgan().then(res => {
       if (res.code == 200) {
         this.organList = res.data;

+ 33 - 15
src/views/teacherManager/teacherDetail/index.vue

@@ -1,39 +1,46 @@
 <template>
   <div class='m-container'>
     <h2>
-      <el-page-header @back="onCancel" 
-      :content="teacherName"></el-page-header>
+      <el-page-header @back="onCancel"
+                      :content="teacherName"></el-page-header>
     </h2>
     <div class="m-core">
       <!-- navMenu -->
       <el-tabs v-model="activeName"
                type="card"
                @tab-click="handleClick">
-        <el-tab-pane label="基本信息" v-if="permissionList.teacherInfo"
+        <el-tab-pane label="基本信息"
+                     v-if="permissionList.teacherInfo"
                      name="0">
           <teacherInfo v-if="activeName == 0" />
         </el-tab-pane>
-        <el-tab-pane label="乐团课" v-if="permissionList.musicGroup"
+        <el-tab-pane label="乐团课"
+                     v-if="permissionList.musicGroup"
                      name="1">
           <courseInfo v-if="activeName == 1" />
         </el-tab-pane>
-        <el-tab-pane label="VIP课" v-if="permissionList.VipCourse"
+        <el-tab-pane label="VIP课"
+                     v-if="permissionList.VipCourse"
                      name="2">
           <courseInfo1 v-if="activeName == 2" />
         </el-tab-pane>
-        <el-tab-pane label="试听课" v-if="permissionList.domeCourse"
+        <el-tab-pane label="试听课"
+                     v-if="permissionList.domeCourse"
                      name="3">
           <courseInfo2 v-if="activeName == 3" />
         </el-tab-pane>
-        <el-tab-pane label="课表详情" v-if="permissionList.teacherRecord"
+        <el-tab-pane label="课表详情"
+                     v-if="permissionList.teacherRecord"
                      name="4">
           <teacherRecord v-if="activeName == 4" />
         </el-tab-pane>
-        <el-tab-pane label="请假记录" v-if="permissionList.leaveRecord"
+        <el-tab-pane label="请假记录"
+                     v-if="permissionList.leaveRecord"
                      name="5">
           <leaveRecord v-if="activeName == 5" />
         </el-tab-pane>
-        <el-tab-pane label="上课结算列表" v-if="permissionList.settlement"
+        <el-tab-pane label="上课结算列表"
+                     v-if="permissionList.settlement"
                      name="6">
           <settlement v-if="activeName == 6" />
         </el-tab-pane>
@@ -51,9 +58,9 @@ import courseInfo2 from '@/views/teacherManager/teacherDetail/components/courseI
 import settlement from '@/views/teacherManager/teacherDetail/components/settlement'
 import { permission } from '@/utils/directivePage'
 export default {
-  components: { teacherRecord, 
-  leaveRecord, teacherInfo, 
-  courseInfo, courseInfo1, courseInfo2, settlement},
+  components: {    teacherRecord,
+    leaveRecord, teacherInfo,
+    courseInfo, courseInfo1, courseInfo2, settlement  },
   name: 'teacherDetail',
   data () {
     return {
@@ -68,7 +75,17 @@ export default {
         teacherRecord: permission('/teacherDetail/teacherRecord'),
         leaveRecord: permission('/teacherDetail/leaveRecord'),
         settlement: permission('/teacherDetail/settlement')
-      }
+      },
+      Fsearch: null,
+      Frules: null
+    }
+  },
+  created () {
+    if (this.$route.query.search) {
+      this.Fsearch = this.$route.query.search;
+    }
+    if (this.$route.query.rules) {
+      this.Frules = this.$route.query.rules
     }
   },
   methods: {
@@ -76,8 +93,9 @@ export default {
       this.activeName = val.name
       // this.activeStatus[val.name] = true
     },
-    onCancel() {
-      this.$router.push('/business/teacherList')
+    onCancel () {
+      console.log(this.Frules, this.Fsearch)
+      this.$router.push({ path: '/business/teacherList', query: { rules: this.Frules, search: this.Fsearch } })
     }
   }
 }

+ 27 - 8
src/views/teacherManager/teacherList.vue

@@ -1,8 +1,11 @@
 <template>
   <div class="m-container">
-    <h2><div class="squrt"></div>老师列表</h2>
+    <h2>
+      <div class="squrt"></div>老师列表
+    </h2>
     <div class="m-core">
-      <div class="newBand" v-permission="'/teacherOperationAdd'"
+      <div class="newBand"
+           v-permission="'/teacherOperationAdd'"
            @click="onTeacher('create')">老师新增</div>
       <!-- 搜索标题 -->
       <el-form :inline="true"
@@ -124,11 +127,16 @@
           <el-table-column align='center'
                            label="操作">
             <template slot-scope="scope">
-              <router-link style="color:#409EFF" v-permission="'/teacherDetail'"
-                           :to="`/business/teacherDetail?teacherId=${scope.row.id}&teacherName=${scope.row.realName}`">查看</router-link>
-              <el-button v-permission="'/teacherIperationUpdate'" @click="onTeacher('update', scope.row)"
+              <!--   let search = JSON.stringify(this.searchForm)
+      let rules = JSON.stringify(this.pageInfo) -->
+              <router-link style="color:#409EFF"
+                           v-permission="'/teacherDetail'"
+                           :to="{path:`/business/teacherDetail?teacherId=${scope.row.id}&teacherName=${scope.row.realName}`,query:{search:JSON.stringify(searchForm),rules:JSON.stringify(pageInfo)}}">查看</router-link>
+              <el-button v-permission="'/teacherIperationUpdate'"
+                         @click="onTeacher('update', scope.row)"
                          type="text">修改</el-button>
-              <el-button v-permission="'employee/employeeOperate'" @click="onStaffOperation('LOCK_UNLOCK', scope.row)"
+              <el-button v-permission="'employee/employeeOperate'"
+                         @click="onStaffOperation('LOCK_UNLOCK', scope.row)"
                          type="text">{{ scope.row.lockFlag == 1 ? '解冻' : '冻结' }}</el-button>
             </template>
           </el-table-column>
@@ -180,6 +188,12 @@ export default {
     }
   },
   mounted () {
+    if (this.$route.query.search) {
+      this.$route.query.search instanceof Object ? this.searchForm = this.$route.query.search : this.searchForm = JSON.parse(this.$route.query.search);
+    }
+    if (this.$route.query.rules) {
+      this.$route.query.rules instanceof Object ? this.pageInfo = this.$route.query.rules : this.pageInfo = JSON.parse(this.$route.query.rules);
+    }
     this.__init()
     this.getList()
   },
@@ -229,14 +243,19 @@ export default {
       })
     },
     onTeacher (type, row) {
+      let search = JSON.stringify(this.searchForm)
+      let rules = JSON.stringify(this.pageInfo)
+      console.log(search, rules)
       let params = {
-        type: type
+        type: type,
+        search,
+        rules
       }
       if (row) {
         params.teacherId = row.id
       }
       let path = '/business/teacherOperation'
-      if(type == 'update') {
+      if (type == 'update') {
         path = '/business/teacherOperationUpdate'
       }
       this.$router.push({

+ 49 - 33
src/views/teacherManager/teacherOperation/index.vue

@@ -1,17 +1,25 @@
 <template>
   <div class='m-container'>
-    <h2><el-page-header @back="onCancel" :content="'老师' + (pageType == 'create' ? '新增' : '修改')"></el-page-header></h2>
+    <h2>
+      <el-page-header @back="onCancel"
+                      :content="'老师' + (pageType == 'create' ? '新增' : '修改')"></el-page-header>
+    </h2>
     <div class="m-core">
       <el-tabs v-model="activeName"
                type="card"
                @tab-click="handleClick">
-        <el-tab-pane label="基本信息"  :disabled="isCreate"
+        <el-tab-pane label="基本信息"
+                     :disabled="isCreate"
                      name="0">
-          <teacherOperation @onTeacher="onTeacher" v-if="activeStatus[0]" />
+          <teacherOperation @onTeacher="onTeacher"
+                            v-if="activeStatus[0]" />
         </el-tab-pane>
-        <el-tab-pane label="课酬设置" v-if="salaryStatus"
-                    name="1" :disabled="isTeacher">
-          <salarySet :teacherId="teacherId" v-if="activeStatus[1]" />
+        <el-tab-pane label="课酬设置"
+                     v-if="salaryStatus"
+                     name="1"
+                     :disabled="isTeacher">
+          <salarySet :teacherId="teacherId"
+                     v-if="activeStatus[1]" />
         </el-tab-pane>
         <!-- v-permission="pageType == 'create' ? '/teacherAdd/salarySeting' : '/teacherUpdate/saraySeting'" -->
       </el-tabs>
@@ -27,49 +35,57 @@ export default {
   name: 'vipDetail',
   data () {
     return {
-        pageType: this.$route.query.type,
-        baseInfoStatus: true, // 权限显示,基本信息
-        salaryStatus: true, // 权限显示 课酬设置
-        teacherId: this.$route.query.teacherId,
-        activeName: '0',
-        activeStatus: [true, false],
-        isTeacher: true,
-        isCreate: false
+      pageType: this.$route.query.type,
+      baseInfoStatus: true, // 权限显示,基本信息
+      salaryStatus: true, // 权限显示 课酬设置
+      teacherId: this.$route.query.teacherId,
+      activeName: '0',
+      activeStatus: [true, false],
+      isTeacher: true,
+      isCreate: false,
+      Fsearch: null,
+      Frules: null
     }
   },
   mounted () {
-      if(this.teacherId) {
-          this.isTeacher = false
-      }
+    if (this.$route.query.search) {
+      this.Fsearch = this.$route.query.search;
+    }
+    if (this.$route.query.rules) {
+      this.Frules = this.$route.query.rules
+    }
+    if (this.teacherId) {
+      this.isTeacher = false
+    }
 
-      this.salaryStatus = permission(this.pageType == 'create' ? '/teacherAdd/salarySeting' : '/teacherUpdate/saraySeting')
-      this.baseInfoStatus = permission(this.pageType == 'create' ? '/teacherAdd/baseInfo' : '/teacherUpdate/baseInfo')
+    this.salaryStatus = permission(this.pageType == 'create' ? '/teacherAdd/salarySeting' : '/teacherUpdate/saraySeting')
+    this.baseInfoStatus = permission(this.pageType == 'create' ? '/teacherAdd/baseInfo' : '/teacherUpdate/baseInfo')
   },
   methods: {
     handleClick (val) {
       this.activeName = val.name
       this.activeStatus[val.name] = true
     },
-    onCancel() {
-      this.$router.push('/business/teacherList')
+    onCancel () {
+      this.$router.push({ path: '/business/teacherList', query: { rules: this.Frules, search: this.Fsearch } })
     },
-    onTeacher(id) {
-        let type = this.$route.query.type
-        if(type == 'update') {
+    onTeacher (id) {
+      let type = this.$route.query.type
+      if (type == 'update') {
+        this.activeName = "1"
+        this.activeStatus[1] = true
+      } else {
+        if (id) {
+          this.isCreate = true // 当保存课酬时基本信息不能点
+          this.isTeacher = false
+          this.teacherId = id
           this.activeName = "1"
           this.activeStatus[1] = true
-        } else {
-          if(id) {
-            this.isCreate = true // 当保存课酬时基本信息不能点
-            this.isTeacher = false
-            this.teacherId = id
-            this.activeName = "1"
-            this.activeStatus[1] = true
-        }
         }
+      }
     }
   },
-  
+
 }
 </script>
 <style lang="scss">

+ 2 - 2
vue.config.js

@@ -18,9 +18,9 @@ const name = defaultSettings.title || '大雅后台管理系统' // page title
 // 
 // let target = 'http://testadm.dayaedu.com/' //勇哥迁库
 // let target = 'http://192.168.3.27:8000' // 箭河
-// let target = 'http://192.168.3.28:8000' //邹璇
+let target = 'http://192.168.3.28:8000' //邹璇
 // let target = 'http://192.168.3.8:8000' //勇哥
-let target = 'http://47.99.212.176:8000' // 测试服
+// let target = 'http://47.99.212.176:8000' // 测试服
 // let target = 'http://192.168.3.48:8080' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {