Browse Source

fix submit save

wolyshaw 4 years ago
parent
commit
531252cea4

+ 8 - 2
src/components/Pagination/index.vue

@@ -64,7 +64,6 @@ export default {
         return this.page
       },
       set (val) {
-        this.syncStore()
         this.$emit('update:page', val)
       }
     },
@@ -73,11 +72,18 @@ export default {
         return this.limit
       },
       set (val) {
-        this.syncStore()
         this.$emit('update:limit', val)
       }
     }
   },
+  watch: {
+    currentPage() {
+      this.syncStore()
+    },
+    pageSize() {
+      this.syncStore()
+    }
+  },
   mounted() {
     if (this.sync) {
       const searchs = new Searchs(this.$route.path)

+ 1 - 1
src/layout/components/AppMain.vue

@@ -20,7 +20,7 @@ export default {
       return this.$route.path
     },
     needKeep() {
-      return !notKeepAliveList.includes(this.$route.fullPath)
+      return !notKeepAliveList.includes(this.$route.path)
     },
     cachedViews () {
       return this.$store.state.tagsView.cachedViews

+ 1 - 0
src/router/notKeepAliveList.js

@@ -20,5 +20,6 @@ export default [
   '/business/teamDetail', // 乐团列表
   '/business/vipList', // vip列表
   '/business/studentList', // 学员管理
+  '/business/studentDetail', // 学员管理详情
   // '/operateManager/HumanResources'
 ]

+ 1 - 4
src/views/studentManager/components/studentInfo.vue

@@ -76,9 +76,6 @@ export default {
   mounted () {
     this.__init()
   },
-  activated () {
-    this.__init()
-  },
   methods: {
     __init () {
       this.userId = this.$route.query.userId
@@ -105,4 +102,4 @@ export default {
     }
   }
 }
-</style>
+</style>

+ 93 - 85
src/views/studentManager/components/teamAndcourse.vue

@@ -59,91 +59,99 @@
         </el-table-column>
       </el-table>
     </div>
-    <!-- 搜索类型 -->
-    <el-form v-if="coursesShow"
-             :inline="true"
-             class="searchForm"
-             v-model.trim="searchForm">
-      <el-form-item>
-        <el-select v-model.trim="searchForm.classGroupType"
-                   clearable
-                   filterable
-                   placeholder="课程类型">
-          <el-option v-for="(item, index) in courseArray"
-                     :key="index"
-                     :label="item.label"
-                     :value="item.value"></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-select v-model.trim="searchForm.courseStatus"
-                   clearable
-                   filterable
-                   placeholder="课程状态">
-          <el-option v-for="(item, index) in courseStatus"
-                     :key="index"
-                     :label="item.label"
-                     :value="item.value"></el-option>
-        </el-select>
-      </el-form-item>
-      <el-form-item>
-        <el-input placeholder="班级名称"
-                  @keyup.enter.native="search"
-                  v-model.trim="searchForm.classGroupName"></el-input>
-      </el-form-item>
-      <el-form-item>
-        <el-input placeholder="老师姓名"
-                  @keyup.enter.native="search"
-                  v-model.trim="searchForm.teacherName"></el-input>
-      </el-form-item>
-      <el-form-item>
-        <div @click="search"
-             class="searchBtn">搜索</div>
-      </el-form-item>
-    </el-form>
-    <!-- 查询列表 -->
-    <!-- <div v-if="coursesShow" class="searchWrap">
-      <p>查询条件:</p>
-      <div class="searchItem"
-           @click="closeSearch(item)"
-           v-for="(item,index) in searchLsit" :key="index">
-        {{ item.key }}
-        <i class="el-icon-close"></i>
-      </div>
-    </div>-->
-    <div v-if="coursesShow"
-         class="tableWrap">
-      <el-table :data="coursesInfo"
-                :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-        <el-table-column align="center"
-                         prop="classGroupId"
-                         label="编号"></el-table-column>
-        <el-table-column align="center"
-                         prop="courseDate"
-                         label="时间">
-          <template slot-scope="scope">{{ scope.row.courseDate | dateForMinFormat }}</template>
-        </el-table-column>
-        <el-table-column align="center"
-                         prop="classGroupName"
-                         label="班级名称"></el-table-column>
-        <el-table-column align="center"
-                         label="课程类型">
-          <template slot-scope="scope">{{ scope.row.classGroupType | coursesType }}</template>
-        </el-table-column>
-        <el-table-column align="center"
-                         label="课程状态">
-          <template slot-scope="scope">{{ scope.row.courseStatus | coursesStatus }}</template>
-        </el-table-column>
-        <el-table-column align="center"
-                         prop="teacherName"
-                         label="老师姓名"></el-table-column>
-      </el-table>
-      <pagination :total="pageInfo.total"
-                  :page.sync="pageInfo.page"
-                  :limit.sync="pageInfo.limit"
-                  :page-sizes="pageInfo.page_size"
-                  @pagination="getStudentCourses" />
-    </div>
+    <el-dialog
+      :visible.sync="coursesShow"
+      title="排课详情"
+      width="800px"
+    >
+    <template>
+      <!-- 搜索类型 -->
+      <el-form v-if="coursesShow"
+              :inline="true"
+              class="searchForm"
+              v-model.trim="searchForm">
+        <el-form-item>
+          <el-select v-model.trim="searchForm.classGroupType"
+                    clearable
+                    filterable
+                    placeholder="课程类型">
+            <el-option v-for="(item, index) in courseArray"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-select v-model.trim="searchForm.courseStatus"
+                    clearable
+                    filterable
+                    placeholder="课程状态">
+            <el-option v-for="(item, index) in courseStatus"
+                      :key="index"
+                      :label="item.label"
+                      :value="item.value"></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-input placeholder="班级名称"
+                    @keyup.enter.native="search"
+                    v-model.trim="searchForm.classGroupName"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-input placeholder="老师姓名"
+                    @keyup.enter.native="search"
+                    v-model.trim="searchForm.teacherName"></el-input>
+        </el-form-item>
+        <el-form-item>
+          <div @click="search"
+              class="searchBtn">搜索</div>
+        </el-form-item>
+      </el-form>
+      <!-- 查询列表 -->
+      <!-- <div v-if="coursesShow" class="searchWrap">
+        <p>查询条件:</p>
+        <div class="searchItem"
+            @click="closeSearch(item)"
+            v-for="(item,index) in searchLsit" :key="index">
+          {{ item.key }}
+          <i class="el-icon-close"></i>
+        </div>
+      </div>-->
+        <div v-if="coursesShow"
+            class="tableWrap">
+          <el-table :data="coursesInfo"
+                    :header-cell-style="{background:'#EDEEF0',color:'#444'}">
+            <el-table-column align="center"
+                            prop="classGroupId"
+                            label="编号"></el-table-column>
+            <el-table-column align="center"
+                            prop="courseDate"
+                            label="时间">
+              <template slot-scope="scope">{{ scope.row.courseDate | dateForMinFormat }}</template>
+            </el-table-column>
+            <el-table-column align="center"
+                            prop="classGroupName"
+                            label="班级名称"></el-table-column>
+            <el-table-column align="center"
+                            label="课程类型">
+              <template slot-scope="scope">{{ scope.row.classGroupType | coursesType }}</template>
+            </el-table-column>
+            <el-table-column align="center"
+                            label="课程状态">
+              <template slot-scope="scope">{{ scope.row.courseStatus | coursesStatus }}</template>
+            </el-table-column>
+            <el-table-column align="center"
+                            prop="teacherName"
+                            label="老师姓名"></el-table-column>
+          </el-table>
+          <pagination :total="pageInfo.total"
+                      :page.sync="pageInfo.page"
+                      :limit.sync="pageInfo.limit"
+                      :page-sizes="pageInfo.page_size"
+                      @pagination="getStudentCourses" />
+        </div>
+      </template>
+    </el-dialog>
   </div>
 </template>
 <script>