瀏覽代碼

提交测试

1
mo 4 年之前
父節點
當前提交
734ca9ab26
共有 4 個文件被更改,包括 121 次插入58 次删除
  1. 9 0
      src/views/childrensDay/api.js
  2. 62 27
      src/views/childrensDay/detail.vue
  3. 48 29
      src/views/childrensDay/index.vue
  4. 2 2
      vue.config.js

+ 9 - 0
src/views/childrensDay/api.js

@@ -13,3 +13,12 @@ export function getMusicGroupGradeList(data) {
     params: data
     params: data
   })
   })
 }
 }
+
+// 获取活动详情列表
+export function getMusicGroupDetail(data) {
+  return request2({
+    url: api + '/childrenReserve/queryStatisticsDetailPage',
+    method: 'get',
+    params: data
+  })
+}

+ 62 - 27
src/views/childrensDay/detail.vue

@@ -2,9 +2,11 @@
 <!--  -->
 <!--  -->
 <template>
 <template>
   <div class="m-container">
   <div class="m-container">
-       <h2>
-      <el-page-header @back="onCancel"
-                      :content="'对外分部'"></el-page-header>
+    <h2>
+      <el-page-header
+        @back="onCancel"
+        :content="musicGroupName"
+      ></el-page-header>
     </h2>
     </h2>
     <div class="m-core">
     <div class="m-core">
       <save-form
       <save-form
@@ -12,14 +14,17 @@
         :model="searchForm"
         :model="searchForm"
         @submit="search"
         @submit="search"
         @reset="onReSet"
         @reset="onReSet"
+        ref='searchForm'
       >
       >
         <el-form-item prop="organId">
         <el-form-item prop="organId">
-          <el-input v-model="searchForm.search" placeholder="学员姓名/编号/手机号"></el-input>
+          <el-input
+            v-model="searchForm.search"
+            placeholder="学员姓名/编号/手机号"
+          ></el-input>
         </el-form-item>
         </el-form-item>
-        <el-form-item>
+        <el-form-item prop="isReserve">
           <el-select
           <el-select
-            v-model.trim="searchForm.school"
-            :disabled="!searchForm.organId"
+            v-model.trim="searchForm.isReserve"
             filterable
             filterable
             clearable
             clearable
             placeholder="是否预约"
             placeholder="是否预约"
@@ -28,10 +33,9 @@
             <el-option value="1" label="是"></el-option>
             <el-option value="1" label="是"></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-        <el-form-item prop="school">
+        <el-form-item prop="subjectId">
           <el-select
           <el-select
-            v-model.trim="searchForm.school"
-            :disabled="!searchForm.organId"
+            v-model.trim="searchForm.subjectId"
             filterable
             filterable
             clearable
             clearable
             placeholder="声部"
             placeholder="声部"
@@ -47,7 +51,6 @@
         <el-form-item>
         <el-form-item>
           <el-select
           <el-select
             v-model.trim="searchForm.school"
             v-model.trim="searchForm.school"
-            :disabled="!searchForm.organId"
             filterable
             filterable
             clearable
             clearable
             placeholder="是否参加乐器考级"
             placeholder="是否参加乐器考级"
@@ -59,7 +62,6 @@
         <el-form-item>
         <el-form-item>
           <el-select
           <el-select
             v-model.trim="searchForm.school"
             v-model.trim="searchForm.school"
-            :disabled="!searchForm.organId"
             filterable
             filterable
             clearable
             clearable
             placeholder="是否参加乐理考级"
             placeholder="是否参加乐理考级"
@@ -68,10 +70,9 @@
             <el-option value="1" label="是"></el-option>
             <el-option value="1" label="是"></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-               <el-form-item>
+        <el-form-item>
           <el-select
           <el-select
             v-model.trim="searchForm.school"
             v-model.trim="searchForm.school"
-            :disabled="!searchForm.organId"
             filterable
             filterable
             clearable
             clearable
             placeholder="是否购买VIP"
             placeholder="是否购买VIP"
@@ -80,10 +81,9 @@
             <el-option value="1" label="是"></el-option>
             <el-option value="1" label="是"></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-                     <el-form-item>
+        <el-form-item>
           <el-select
           <el-select
             v-model.trim="searchForm.school"
             v-model.trim="searchForm.school"
-            :disabled="!searchForm.organId"
             filterable
             filterable
             clearable
             clearable
             placeholder="是否购买乐理课"
             placeholder="是否购买乐理课"
@@ -132,19 +132,25 @@
         >
         >
           <el-table-column
           <el-table-column
             align="center"
             align="center"
-            prop="studentId"
+            prop="username"
             label="学员姓名"
             label="学员姓名"
           ></el-table-column>
           ></el-table-column>
           <el-table-column
           <el-table-column
             align="center"
             align="center"
-            prop="studentId"
+            prop="userId"
             label="学员编号"
             label="学员编号"
           ></el-table-column>
           ></el-table-column>
           <el-table-column
           <el-table-column
             align="center"
             align="center"
-            prop="studentId"
+            prop="isReserve"
             label="是否预约"
             label="是否预约"
-          ></el-table-column>
+          >
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.isReserve?'是':'否'}}
+            </div>
+          </template>
+          </el-table-column>
           <el-table-column
           <el-table-column
             align="center"
             align="center"
             prop="studentId"
             prop="studentId"
@@ -189,7 +195,8 @@ import axios from "axios";
 import { getToken } from "@/utils/auth";
 import { getToken } from "@/utils/auth";
 import pagination from "@/components/Pagination/index";
 import pagination from "@/components/Pagination/index";
 import load from "@/utils/loading";
 import load from "@/utils/loading";
-import { queryByOrganId, getSchool } from "@/api/systemManage";
+import { getMusicGroupDetail } from "./api";
+import { getSubject } from "@/api/buildTeam";
 import countTo from "vue-count-to";
 import countTo from "vue-count-to";
 export default {
 export default {
   components: { pagination, "count-to": countTo },
   components: { pagination, "count-to": countTo },
@@ -198,8 +205,8 @@ export default {
     return {
     return {
       searchForm: {
       searchForm: {
         search: null,
         search: null,
-        organId: null,
-        school: null,
+        isReserve: null,
+        subjectId: null,
       },
       },
 
 
       tableList: [{}],
       tableList: [{}],
@@ -213,6 +220,7 @@ export default {
         total: 0, // 总条数
         total: 0, // 总条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
         page_size: [10, 20, 40, 50], // 选择限制显示条数
       },
       },
+      musicGroupName: "",
     };
     };
   },
   },
   //生命周期 - 创建完成(可以访问当前this实例)
   //生命周期 - 创建完成(可以访问当前this实例)
@@ -224,15 +232,32 @@ export default {
     this.init();
     this.init();
   },
   },
   methods: {
   methods: {
-    init() {},
-    getList() {},
+    init() {
+      this.musicGroupName = this.$route.query.musicGroupName || "对外分部";
+      getSubject({
+      }).then((res) => {
+        if (res.code == 200) {
+          this.soundList = res.data;
+        }
+      });
+      this.getList()
+    },
+    async getList() {
+      try {
+        const res = await getMusicGroupDetail({ page: this.rules.page,
+          rows: this.rules.limit,
+          ...this.searchForm,musicGroupId:this.$route.query.musicGroupId});
+          this.tableList = res.data.rows;
+          this.rules.total = res.data.total
+      } catch {}
+    },
     search() {
     search() {
       this.rules.page = 1;
       this.rules.page = 1;
       this.getList();
       this.getList();
     },
     },
     onReSet() {},
     onReSet() {},
-    onCancel(){
-          this.$store.dispatch('delVisitedViews', this.$route)
+    onCancel() {
+      this.$store.dispatch("delVisitedViews", this.$route);
       this.$router.push({
       this.$router.push({
         path: "/childrensDay",
         path: "/childrensDay",
       });
       });
@@ -241,4 +266,14 @@ export default {
 };
 };
 </script>
 </script>
 <style lang='scss' scoped>
 <style lang='scss' scoped>
+.statistic {
+  .statistic-content > span {
+    font-size: 20px !important;
+    &:first-child {
+      font-size: 24px !important;
+      color: rgba(0, 0, 0, 0.85);
+      font-weight: bold;
+    }
+  }
+}
 </style>
 </style>

+ 48 - 29
src/views/childrensDay/index.vue

@@ -10,6 +10,7 @@
       <save-form
       <save-form
         :inline="true"
         :inline="true"
         :model="searchForm"
         :model="searchForm"
+        ref='searchForm'
         @submit="search"
         @submit="search"
         @reset="onReSet"
         @reset="onReSet"
       >
       >
@@ -30,7 +31,7 @@
             ></el-option>
             ></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-        <el-form-item prop="school">
+        <el-form-item prop="cooperationId">
           <el-select
           <el-select
             v-model.trim="searchForm.cooperationId"
             v-model.trim="searchForm.cooperationId"
             :disabled="!searchForm.organId"
             :disabled="!searchForm.organId"
@@ -47,7 +48,7 @@
             ></el-option>
             ></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
-        <el-form-item>
+        <el-form-item prop="musicGroupId">
           <el-select
           <el-select
             v-model.trim="searchForm.musicGroupId"
             v-model.trim="searchForm.musicGroupId"
             clearable
             clearable
@@ -172,7 +173,9 @@
           <el-table-column align="center" prop="studentId" label="操作">
           <el-table-column align="center" prop="studentId" label="操作">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div>
               <div>
-                <el-button type="text" @click="gotoDetail(scope.row)">详情</el-button>
+                <el-button type="text" @click="gotoDetail(scope.row)"
+                  >详情</el-button
+                >
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -198,8 +201,8 @@ import pagination from "@/components/Pagination/index";
 import qrCode from "@/components/QrCode/index";
 import qrCode from "@/components/QrCode/index";
 import { vaildStudentUrl } from "@/utils/validate";
 import { vaildStudentUrl } from "@/utils/validate";
 import load from "@/utils/loading";
 import load from "@/utils/loading";
-import { queryByOrganId, getSchool,getMusicGroup } from "@/api/systemManage";
-import { getMusicGroupGradeList } from './api'
+import { queryByOrganId, getSchool, getMusicGroup } from "@/api/systemManage";
+import { getMusicGroupGradeList } from "./api";
 import countTo from "vue-count-to";
 import countTo from "vue-count-to";
 export default {
 export default {
   components: { pagination, "count-to": countTo, qrCode },
   components: { pagination, "count-to": countTo, qrCode },
@@ -237,24 +240,31 @@ export default {
   },
   },
   methods: {
   methods: {
     init() {
     init() {
-      this.getList()
+      this.getList();
+    },
+    async getList() {
+      try {
+        const res = await getMusicGroupGradeList({
+          page: this.rules.page,
+          rows: this.rules.limit,
+          ...this.searchForm,
+        });
+        this.tableList = res.data.rows;
+        this.rules.total = res.data.total;
+      } catch (e) {}
     },
     },
-  async getList() {
-    try {
-      const res = await getMusicGroupGradeList({page:this.rules.page,rows:this.rules.limit,...this.searchForm})
-      this.tableList = res.data.rows
-      this.rules.total = res.data.total
-
-    }catch(e){
-
-    }
-
-  },
     search() {
     search() {
       this.rules.page = 1;
       this.rules.page = 1;
       this.getList();
       this.getList();
     },
     },
-    onReSet() {},
+    onReSet() {
+      this.rules = {
+        ...this.rules,
+        page: 1,
+      };
+      this.$refs.searchForm.resetFields();
+      this.search();
+    },
     onCreateQRCode(status) {
     onCreateQRCode(status) {
       if (status == "placeholder") {
       if (status == "placeholder") {
         this.codeTitle = "占位链接";
         this.codeTitle = "占位链接";
@@ -273,21 +283,30 @@ export default {
         });
         });
       }
       }
     },
     },
-    changeCooper(val){
-       this.searchForm.musicGroupId = null;
-       if(val){
-         getMusicGroup({cooperationId:val}).then(res=>{
-           this.musicList = res.data;
-         })
-       }
+    changeCooper(val) {
+      this.searchForm.musicGroupId = null;
+      if (val) {
+        getMusicGroup({ cooperationId: val }).then((res) => {
+          this.musicList = res.data;
+        });
+      }
     },
     },
-    gotoDetail(row){
-      console.log(row)
+    gotoDetail(row) {
       // query:{'musicGroupId':}
       // query:{'musicGroupId':}
-      this.$router.push({path:'/business/childrensdayDetail',})
-    }
+      this.$router.push({ path: "/business/childrensdayDetail",query:{'musicGroupId':row.musicGroupId,'musicGroupName':row.musicGroupName} });
+    },
   },
   },
 };
 };
 </script>
 </script>
 <style lang='scss' scoped>
 <style lang='scss' scoped>
+.statistic {
+  .statistic-content > span {
+    font-size: 20px !important;
+    &:first-child {
+      font-size: 24px !important;
+      color: rgba(0, 0, 0, 0.85);
+      font-weight: bold;
+    }
+  }
+}
 </style>
 </style>

+ 2 - 2
vue.config.js

@@ -20,8 +20,8 @@ const name = defaultSettings.title || '管乐迷后台管理系统' // page titl
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.139:8000' // 箭河
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.148:8000' //邹璇
 // let target = 'http://192.168.3.57:8000' //勇哥
 // let target = 'http://192.168.3.57:8000' //勇哥
-let target = 'http://dev.dayaedu.com' // 开发环境
-// let target = 'https://test.dayaedu.com' //测试环境
+// let target = 'http://dev.dayaedu.com' // 开发环境
+let target = 'https://test.dayaedu.com' //测试环境
 // let target = 'http://192.168.3.134' // 乔
 // let target = 'http://192.168.3.134' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
 module.exports = {