浏览代码

10/04

建团完成 列表部分完成
mo 5 年之前
父节点
当前提交
f6e4b2b9f2

+ 57 - 2
src/api/buildTeam.js

@@ -24,7 +24,14 @@ export function getCooperation (data) {
     params: qs.stringify(data)
   })
 }
-
+// 获取教学地点
+export function getAddress (data) {
+  return request({
+    url: '/web-server/school/queryPage',
+    method: 'get',
+    params: qs.stringify(data)
+  })
+}
 // 获取所有老师信息
 export function getTeacher (data) {
   return request({
@@ -42,6 +49,15 @@ export function getSubject (data) {
     params: qs.stringify(data)
   })
 }
+// 查询付费主体
+export function getPayMaster (data) {
+  return request({
+    url: '/web-server/musicGroupPaymentEntities/queryPage',
+    method: 'get',
+    params: data
+
+  })
+}
 
 // 根据收费类型获取默认科目
 export function getDefaultSubject (data) {
@@ -60,4 +76,43 @@ export function getGoods (data) {
     method: 'get',
     params: data
   })
-}
+}
+// 创建乐团
+export function createTeam (data) {
+  return request({
+    url: '/web-server/musicGroup/createGroup',
+    method: 'post',
+    data
+  })
+}
+
+// 查询乐团招生情况
+export function getTeamRecruit (data) {
+  return request({
+    url: `/web-server/musicGroupSubjectPlan/get/${data}`,
+    method: 'get',
+    // params: qs.stringify(data)
+
+  })
+}
+
+// 查询乐团分班情况
+export function getintoClass (data) {
+  return request({
+    url: '/web-server/musicGroupSubjectPlan/getMusicSubjectClass',
+    method: 'get',
+    params: data
+
+  })
+}
+
+// 获取学生列表
+export function getStudentList (data) {
+  return request({
+    url: '/web-server/studentRegistration/queryStudentApplyDetail',
+    method: 'get',
+    params: data
+
+  })
+}
+

+ 11 - 0
src/api/teamServer.js

@@ -0,0 +1,11 @@
+import request from '@/utils/request'
+import qs from 'qs'
+
+// 获取分部
+export function getTeamList (data) {
+  return request({
+    url: '/web-server/musicGroup/queryPage',
+    method: 'get',
+    params: qs.stringify(data)
+  })
+}

+ 29 - 1
src/router/index.js

@@ -106,7 +106,10 @@ export const constantRoutes = [
         path: 'sigupList',
         name: 'sigupList',
         component: () => import('@/views/teamBuild/signupList'),
-        meta: { title: '乐团报名' }
+        meta: { title: '乐团报名' },
+        alwaysShow: false,
+        hidden: true
+
       },
       {
         path: 'teamSeting',
@@ -204,6 +207,31 @@ export const constantRoutes = [
       component: () => import('@/views/formManager/index')
     }]
   },
+  {
+    path: '/teamDetail', // 乐团详情
+    component: Layout,
+    meta: { title: '乐团详情' },
+    children: [
+      {
+        path: 'teamList',
+        name: 'teamList',
+        component: () => import('@/views/teamDetail/teamList'),
+        meta: { title: '乐团列表' },
+      },
+      {
+        path: 'studentSignin',
+        name: 'studentSignin',
+        component: () => import('@/views/teamDetail/components/studentSignin'),
+        meta: { title: '学生点名' }
+      },
+      {
+        path: 'teacherSignin',
+        name: 'teacherSignin',
+        component: () => import('@/views/teamDetail/components/teacherSignin'),
+        meta: { title: '老师上课记录' }
+      }
+    ]
+  },
   // {
   //   path: '/business',
   //   component: Layout,

+ 1 - 1
src/store/modules/permission.js

@@ -48,7 +48,7 @@ function recursionRouter (arr) {
     let newArr = arr.map(item => {
       let obj = {};
       obj.component = item.component;
-      obj.hidden = false;
+      item.hidden ? obj.hidden = item.hidden : obj.hidden = false
       obj.path = item.path;
       obj.meta = { 'title': item.name, 'icon': item.icon }
       if (item.sysMenus && item.sysMenus.length > 0) {

+ 46 - 37
src/views/teamBuild/components/teamBaseInfo.vue

@@ -40,6 +40,17 @@
                        :value="item.id"></el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="教学地点"
+                      prop="address"
+                      :rules="[{ required: true, message: '教学地点不能为空'},]">
+          <el-select v-model="topFrom.address"
+                     clearable>
+            <el-option v-for="(item,index) in addList"
+                       :key='index'
+                       :label="item.name"
+                       :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="乐团名称"
                       prop='name'
                       :rules="[{ required: true, message: '乐团名称不能为空'},]">
@@ -73,6 +84,7 @@
                       :rules="[{ required: true, message: '请输入报名截止时间'},]">
           <el-date-picker v-model="topFrom.time"
                           type="date"
+                          value-format="yyyy-MM-dd"
                           placeholder="选择日期">
           </el-date-picker>
         </el-form-item>
@@ -165,36 +177,9 @@
         </div>
         <div class="head noMargin">付费方式:</div>
         <div class="checkRow">
-          <el-checkbox label="学校"
-                       class='classCheckBox'
-                       v-model="payList.school.ischeck"></el-checkbox>
-          <div class="chioseList">
-            <div class="chioseItem"
-                 :class="payList.school.chiose == 'ONE_OFF'?'active':''"
-                 @click="payList.school.chiose = 'ONE_OFF'">一次性</div>
-            <div class="chioseItem"
-                 :class="payList.school.chiose == 'MONTHLY'?'active':''"
-                 @click="payList.school.chiose='MONTHLY'">一个月</div>
-            <div class="chioseItem "
-                 :class="payList.school.chiose == 'TERM'?'active':''"
-                 @click="payList.school.chiose='TERM'">一学期</div>
-            <div class="chioseItem"
-                 :class="payList.school.chiose == 'YEAR'?'active':''"
-                 @click="payList.school.chiose='YEAR'">一学年</div>
-          </div>
-          <div class="inputWrap">
-            预计收费: <input type="textarea"
-                   placeholder="请输入"
-                   v-model="payList.school.price">
-          </div>
-          <div class="inputWrap">
-            备注: <input type="textarea"
-                   placeholder="请输入">
-          </div>
-        </div>
-        <div class="checkRow">
           <el-checkbox label="公司"
-                       class='classCheckBox'></el-checkbox>
+                       class='classCheckBox'
+                       v-model="payList.company.ischeck"></el-checkbox>
           <div class="chioseList">
             <div class="chioseItem"
                  :class="payList.company.chiose == 'ONE_OFF'?'active':''"
@@ -221,14 +206,14 @@
         <div class="checkRow">
           <el-checkbox label="学员"
                        class='classCheckBox'
-                       v-model="payList.student.ischeck"></el-checkbox>
+                       v-model="student.ischeck"></el-checkbox>
           <div class="chioseList">
             <div class="chioseItem"
-                 :class="payList.student.chiose == 'ONE_OFF'?'active':''"
-                 @click="payList.student.chiose='ONE_OFF'">一次性</div>
+                 :class="student.chiose == 'ONE_OFF'?'active':''"
+                 @click="student.chiose='ONE_OFF'">一次性</div>
             <div class="chioseItem"
-                 :class="payList.student.chiose == 'loop'?'active':''"
-                 @click="payList.student.chiose='loop'">周期循环</div>
+                 :class="student.chiose == 'loop'?'active':''"
+                 @click="student.chiose='loop'">周期循环</div>
           </div>
         </div>
       </div>
@@ -286,7 +271,7 @@
   </div>
 </template>
 <script>
-import { getSection, getType, getCooperation, getTeacher } from '@/api/buildTeam'
+import { getSection, getType, getCooperation, getTeacher, getAddress, getPayMaster } from '@/api/buildTeam'
 import { scrollTo } from '@/utils/scroll-to'
 export default {
   data () {
@@ -300,6 +285,7 @@ export default {
         boss: '', // 运营主管
         time: '', // 报名截止时间
         startClass: '', // 招生年级起始
+        address: '' // 教学地点
       },
       checkList: {
         soundInfo: { // 声部
@@ -333,6 +319,7 @@ export default {
       typeList: [], // 收费类型列表
       cooperationList: [], // 教学点列表
       teacherList: [], // 获取老师列表
+      addList: [], // 教学地点列表
       payList: {
         school: {
           ischeck: false,
@@ -350,6 +337,10 @@ export default {
           ischeck: true,
           chiose: 'loop'
         }
+      },
+      student: {
+        ischeck: true,
+        chiose: 'loop'
       }
     }
   },
@@ -367,7 +358,7 @@ export default {
         this.typeList = res.data.rows;
       }
     })
-    // 3.获取教学点选项卡
+    // 3.获取合作单位选项卡
     getCooperation({ 'rows': 1000 }).then(res => {
       if (res.code == 200) {
         this.cooperationList = res.data.rows;
@@ -379,6 +370,23 @@ export default {
         this.teacherList = res.data.rows;
       }
     })
+    // 5.获取教学地点选项卡
+    getAddress({ 'rows': 1000 }).then(res => {
+      if (res.code == 200) {
+        this.addList = res.data.rows;
+      }
+    })
+    // 6.
+    getPayMaster({ 'rows': 1000 }).then(res => {
+      console.log(res);
+      if (res.code == 200) {
+        this.payList = res.data.map(item => {
+          let obj = {};
+          obj.id = item.id;
+          obj.ischios
+        })
+      }
+    })
   },
   methods: {
     gotoNext () {
@@ -396,7 +404,8 @@ export default {
           this.$store.dispatch('checkinfo', this.checkList);
           this.$store.dispatch('getpayInfo', this.payList);
           // checkinfo getpayInfo
-          this.$emit('chioseTab', 1);
+
+          this.$emit('chiosetab', 1);
 
         }
       })

+ 141 - 27
src/views/teamBuild/components/teamSoundMoney.vue

@@ -8,24 +8,24 @@
                          fill="#14928A"
                          text-color='#474747'>
 
-        <el-checkbox label="一月"></el-checkbox>
-        <el-checkbox label="二月"></el-checkbox>
-        <el-checkbox label="三月"></el-checkbox>
-        <el-checkbox label="四月"></el-checkbox>
-        <el-checkbox label="五月"></el-checkbox>
-        <el-checkbox label="六月"></el-checkbox>
-        <el-checkbox label="七月"></el-checkbox>
-        <el-checkbox label="八月"></el-checkbox>
-        <el-checkbox label="九月"></el-checkbox>
-        <el-checkbox label="十月"></el-checkbox>
-        <el-checkbox label="十一月"></el-checkbox>
-        <el-checkbox label="十二月"></el-checkbox>
+        <el-checkbox label="1">一月</el-checkbox>
+        <el-checkbox label="2">二月</el-checkbox>
+        <el-checkbox label="3">三月</el-checkbox>
+        <el-checkbox label="4">四月</el-checkbox>
+        <el-checkbox label="5">五月</el-checkbox>
+        <el-checkbox label="6">六月</el-checkbox>
+        <el-checkbox label="7">七月</el-checkbox>
+        <el-checkbox label="8">八月</el-checkbox>
+        <el-checkbox label="9">九月</el-checkbox>
+        <el-checkbox label="10">十月</el-checkbox>
+        <el-checkbox label="11">十一月</el-checkbox>
+        <el-checkbox label="12">十二月</el-checkbox>
       </el-checkbox-group>
     </div>
 
     <div class="topMsg">
-      <p>当前选择声部数(个):20</p>
-      <p style='margin-left:30px;'>计划招生人数(个):80</p>
+      <p>当前选择声部数(个):{{chioseSoundNum}}</p>
+      <p style='margin-left:30px;'>计划招生人数(个):{{PlannedCount}}</p>
     </div>
     <div class="listWrap">
       <el-table :data='activeSoundList'
@@ -281,25 +281,30 @@
              @click="generates">确定</div>
       </div>
     </el-dialog>
+    <div class="btnWrap">
+      <div class="PrevBtn"
+           @click="goback">上一步</div>
+      <div class="submitBtn"
+           @click="submitInfo">提交</div>
+    </div>
   </div>
 </template>
 <script>
 import store from '@/store'
-import { getSubject, getDefaultSubject, getGoods } from '@/api/buildTeam'
+import { getSubject, getDefaultSubject, getGoods, createTeam } from '@/api/buildTeam'
 export default {
   data () {
     return {
-      markList: [], // 测试
-      dialogTableVisible: true,
+      dialogTableVisible: false,
       soundList: [],
       soundLists: [], // 存储选中项的声部id 记录变量
       activeSoundList: [], // 记录存储后的所选中的声部列表
-      checkList: [],
+      checkList: [1],
       multipleSelection: [], // 列表选择的集合
       isLoop: '', // 是否显示周期循环
-      tableRowData: {
-
-      } // 添加一行数据的模板
+      payfor: {},
+      topfor: {},
+      checkfor: {}
     }
   },
   methods: {
@@ -401,6 +406,95 @@ export default {
     // 点击保存或编辑
     savecolumn (row) {
       row.type == 1 ? row.type = 2 : row.type = 1
+    },
+    // 返回上一步
+    goback () {
+      this.$emit('chiosetab', 0);
+    },
+    submitInfo () {
+      // 整理数据提交
+      let obj = {};
+      this.payfor.student.chiose == 'loop' ? obj.months = this.checkList : obj.months = [];
+      console.log(JSON.stringify(this.checkfor));
+      obj.musicGroup = {
+        applyExpireDate: this.topfor.time + ' 00:00:01',
+        chargeTypeId: this.topfor.type,
+        cooperationOrganId: this.topfor.school,
+        teamTeacherId: this.topfor.boss,
+        educationalTeacherId: this.topfor.teacher,
+        enrollClasses: this.topfor.startClass.join(','),
+        name: this.topfor.name,
+        organId: this.topfor.section,
+        // paymentMonths:obj.months  有待确认
+        schoolId: this.topfor.address,
+        courseForm: JSON.stringify(this.checkfor)
+      }
+      obj.musicGroupPaymentEntities = []
+      // 添加学校主体付费方式
+      console.log(this.payfor.company.ischeck)
+      if (this.payfor.school.ischeck) {
+
+        obj.musicGroupPaymentEntities.push({
+          'amount': this.payfor.school.price,
+          'memo': this.payfor.school.value,
+          'paymentMethod': this.payfor.school.chiose,
+          'name': '学校'
+        })
+      }
+      // 添加公司主体付费方式
+      if (this.payfor.company.ischeck) {
+        obj.musicGroupPaymentEntities.push({
+          'amount': this.payfor.company.price,
+          'memo': this.payfor.company.value,
+          'paymentMethod': this.payfor.company.chiose,
+          'name': '公司'
+        })
+      }
+      // 添加商品以及教辅
+      obj.musicGroupSubjectGoodsGroups = [];
+      console.log(this.activeSoundList);
+      for (let i in this.activeSoundList) {
+        // 遍历声部里的乐器
+        let some = {};
+        some.subjectId = this.activeSoundList[i].id;
+        some.type = 'INSTRUMENT';
+        some.goodsIdList = this.activeSoundList[i].zhonglei.join(',');
+        obj.musicGroupSubjectGoodsGroups.push(some);
+      }
+      // 遍历声部里的教辅
+      for (let i in this.activeSoundList) {
+        // 遍历声部里的乐器
+        for (let j in this.activeSoundList[i].markList) {
+          let some = {};
+          some.subjectId = this.activeSoundList[i].id;
+          some.type = 'ACCESSORIES';
+          some.goodsIdList = this.activeSoundList[i].markList[j].goods.join(',');
+          some.name = this.activeSoundList[i].markList[j].name;
+          some.price = this.activeSoundList[i].markList[j].price;
+          obj.musicGroupSubjectGoodsGroups.push(some);
+        }
+
+      }
+      // 添加声部
+      obj.MusicGroupSubjectPlan = [];
+      for (let i in this.activeSoundList) {
+        let item = {};
+        item.applyStudentNum = this.activeSoundList[i].jihua;
+        item.expectedStudentNum = this.activeSoundList[i].yuji;
+        item.kitGroupPurchaseType = this.activeSoundList[i].fangshi;
+        item.subName = this.activeSoundList[i].sound;
+        item.subjectId = this.activeSoundList[i].id;
+        obj.MusicGroupSubjectPlan.push(item);
+      }
+      console.log(obj);
+      createTeam(obj).then(res => {
+        if (res.code == 200) {
+          // 成功 跳转到乐团报名详情
+          let id = 'ca2becc9-c39a-4c0b-b9e1-c3a744c10888';
+
+          this.$router.push({ path: '/teamBuild/teamSeting', query: { id } })
+        }
+      })
     }
   },
   filters: {
@@ -455,12 +549,15 @@ export default {
       }
     })
     // 拿到刚才的存储的信息
-    let payfor = this.$store.getters.payList;
-    let topfor = this.$store.getters.topinfo;
-    let checkfor = this.$store.getters.checkinfo;
-    let type = topfor.type;
-    console.log(topfor);
-    this.isLoop = payfor.student.chiose;
+    this.payfor = this.$store.getters.payList;
+    this.topfor = this.$store.getters.topinfo;
+    this.checkfor = this.$store.getters.checkinfo;
+    let type = this.topfor.type;
+
+    console.log(this.topfor);
+    console.log(this.checkfor);
+    console.log(this.payfor);
+    this.isLoop = this.payfor.student.chiose;
     // 获取存储的type值获取默认值
     getDefaultSubject({ musicGroupId: type }).then(res => {
       // console.log(res);
@@ -480,6 +577,14 @@ export default {
       }
       return num;
     },
+    // 计划招生人数
+    PlannedCount () {
+      let Count = 0;
+      for (let item in this.activeSoundList) {
+        Count += parseInt(this.activeSoundList[item].jihua)
+      }
+      return Count
+    }
   },
 }
 </script>
@@ -642,4 +747,13 @@ export default {
     cursor: pointer;
   }
 }
+.btnWrap {
+  margin-top: 40px;
+  .PrevBtn {
+    background-color: #444444;
+  }
+  .submitBtn {
+    background-color: #f85043;
+  }
+}
 </style>

+ 5 - 5
src/views/teamBuild/index.vue

@@ -18,8 +18,9 @@
         </span>
         <span class='stepspan  stepspan2'
               @click="activeIndex=1">
-          <!--  v-if="activeIndex>=1" -->
+          <!--   -->
           <div class="step2 sptep"
+               v-if="activeIndex>=1"
                :class="activeIndex >= 1?'activestep':''">
             声部费用
           </div>
@@ -32,10 +33,10 @@
       <!-- 下面显示的内容 -->
       <div class="stepcontent">
         <div v-show='activeIndex==0'>
-          <teamBaseInfo @chioseTab='chioseTab' />
+          <teamBaseInfo @chiosetab='chiosetab' />
         </div>
         <div v-if='activeIndex==1'>
-          <teamSoundMoney />
+          <teamSoundMoney @chiosetab='chiosetab' />
         </div>
       </div>
       <!-- <el-tabs type="border-card"
@@ -68,9 +69,8 @@ export default {
     }
   },
   methods: {
-    chioseTab (val) {
+    chiosetab (val) {
       this.activeIndex = val;
-      // console.log(val)
     }
   },
 }

+ 32 - 5
src/views/teamBuild/signupList.vue

@@ -8,11 +8,18 @@
         </h2>
         <div class="btnList">
           <div class='newBand close'>停止乐团</div>
-          <div class='newBand'>开始缴费</div>
+          <div class='newBand'
+               v-if="status=='APPLY'">开始缴费</div>
+          <div class='newBand'
+               v-if="status=='APPLY'">允许缴费</div>
+          <div class='newBand'
+               v-if="status=='PAY'">确认开团</div>
+          <div class='newBand'
+               v-if="status=='PAY'">延长缴费</div>
         </div>
       </div>
       <p class='msg'> <img src="@/assets/images/base/clock.png"
-             alt=""> 报名中</p>
+             alt=""> {{ status=='APPLY'?'报名中':'缴费中' }}</p>
     </div>
     <div class="searchList">
       <el-form :inline="true"
@@ -26,14 +33,16 @@
       <div class="left">
         <el-table :data='leftList'
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-          <el-table-column label="
-                  乐团声部"
+          <el-table-column label="乐团声部"
+                           prop="subName"
                            align='center'>
           </el-table-column>
           <el-table-column label="计划招生"
+                           prop="expectedStudentNum"
                            align='center'>
           </el-table-column>
           <el-table-column label="已报名"
+                           prop='applyStudentNum'
                            align='center'>
           </el-table-column>
         </el-table>
@@ -75,6 +84,7 @@
   </div>
 </template>
 <script>
+import { getTeamRecruit, getintoClass, getStudentList } from '@/api/buildTeam'
 export default {
   data () {
     return {
@@ -82,8 +92,25 @@ export default {
       rightList: [],
       searchFrom: {
         name: ''
-      }
+      },
+      status: '',
+      id: ''
     }
+  },
+  mounted () {
+    // 通过乐团状态判断显示隐藏的东西
+    this.status = this.$route.query.status;
+    // 通过乐团id 获取乐团招生状态
+    this.id = this.$route.query.id;
+    getintoClass({ musicGroupId: 1 }).then(res => {
+      if (res.code == 200) {
+        this.leftList = res.data;
+      }
+    })
+    // 通过乐团id获取乐团学生列表
+    getStudentList({ musicGroupId: this.id }).then(res => {
+      console.log(res);
+    })
   }
 }
 </script>

+ 24 - 4
src/views/teamBuild/teamSeting/components/setClass.vue

@@ -3,14 +3,15 @@
     <div class="left">
       <el-table :data='leftList'
                 :header-cell-style="{background:'#EDEEF0',color:'#444'}">
-        <el-table-column label="
-                  乐团声部"
+        <el-table-column label="乐团声部"
+                         prop="subName"
                          align='center'>
         </el-table-column>
         <el-table-column label="计划招生"
+                         prop="expectedStudentNum"
                          align='center'>
         </el-table-column>
-        <el-table-column label="已报名"
+        <el-table-column label="实际人数"
                          align='center'>
         </el-table-column>
       </el-table>
@@ -58,14 +59,33 @@
   </div>
 </template>
 <script>
+import { getTeamRecruit, getintoClass } from "@/api/buildTeam"
 export default {
+  props: {
+    teamid: {
+      type: String,
+      required: true
+    }
+  },
   data () {
     return {
       leftList: [],
       centertList: [],
       rightList: []
     }
-  }
+  },
+  mounted () {
+    console.log(this.teamid)
+    getTeamRecruit(1).then(res => {
+      console.log(res);
+    })
+    getintoClass({ musicGroupId: 1 }).then(res => {
+      if (res.code == 200) {
+        this.leftList = res.data;
+      }
+    })
+  },
+
 }
 </script>
 <style lang="scss">

+ 21 - 6
src/views/teamBuild/teamSeting/index.vue

@@ -55,16 +55,23 @@
     <!-- 下面显示的内容 -->
     <div class="stepcontent">
       <div v-show='activeIndex==0'>
-        <classSeting />
+        <classSeting :teamid='id' />
       </div>
       <div v-show='activeIndex==1'>
-        <teacherSeting />
+        <keep-alive>
+          <teacherSeting />
+        </keep-alive>
       </div>
       <div v-show='activeIndex==2'>
-        <coursePlan />
+        <keep-alive>
+          <coursePlan />
+        </keep-alive>
       </div>
       <div v-show='activeIndex==3'>
-        <salarySet />
+        <keep-alive>
+          <salarySet />
+        </keep-alive>
+
       </div>
     </div>
   </div>
@@ -83,12 +90,20 @@ export default {
   },
   data () {
     return {
-      activeIndex: '3',
+      activeIndex: '0',
       stepImgs: {
         nol: require('@/assets/images/base/step-arrow-active.png'),
         active: require('@/assets/images/base/step-arrow.png')
-      }
+      },
+      id: ''
     }
+  },
+  created () {
+    this.id = this.$route.query.id || 'ca2becc9-c39a-4c0b-b9e1-c3a744c10888'
+  },
+  mounted () {
+
+
   }
 }
 </script>

+ 63 - 12
src/views/teamDetail/teamList.vue

@@ -3,7 +3,8 @@
     <h2>乐团列表</h2>
     <div class="m-core">
       <div class="btnList">
-        <div class='newBand'>新建乐团</div>
+        <div class='newBand'
+             @click="createNewTeam">新建乐团</div>
         <div class='newBand'>声部调整</div>
         <div class='newBand'>乐团合并</div>
         <div class='newBand'>乐团加课</div>
@@ -48,18 +49,18 @@
                        value="4"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item prop='word'>
+        <!-- <el-form-item prop='word'>
           <el-input type="text"
                     placeholder="请输入搜索关键字"
                     suffix-icon="el-icon-search"
                     @focus="gotoSearch"
                     v-model="topForm.word" />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item>
           <div class='searchBtn'>搜索</div>
         </el-form-item>
       </el-form>
-      <div class="searchWrap">
+      <!-- <div class="searchWrap">
         <p>查询条件:</p>
         <div class="searchItem"
              @click="closeSearch(item)"
@@ -67,11 +68,11 @@
           {{ item.key }}
           <i class="el-icon-close"></i>
         </div>
-      </div>
+      </div> -->
       <div class="tableWrap">
         <el-table style="width: 100%"
                   :data='tableData'>
-          <el-table-column prop="num"
+          <el-table-column prop="id"
                            align='center'
                            label="乐团编号">
           </el-table-column>
@@ -80,6 +81,7 @@
                            label="乐团名称">
           </el-table-column>
           <el-table-column align='center'
+                           prop="schoolId"
                            max-width='274'
                            label="学校名称">
           </el-table-column>
@@ -87,11 +89,11 @@
                            align='center'
                            label="乐团状态">
           </el-table-column>
-          <el-table-column prop="type"
-                           align='center'
+          <el-table-column align='center'
+                           prop="chargeTypeId"
                            label="收费类型">
           </el-table-column>
-          <el-table-column prop="teacher"
+          <el-table-column prop="educationalTeacherId"
                            align='center'
                            label="教务老师">
           </el-table-column>
@@ -115,10 +117,17 @@
                            align='center'
                            label="成团时间">
           </el-table-column>
-          <el-table-column prop="handle"
-                           align='center'
+          <el-table-column align='center'
                            width='200px'
                            label="操作">
+            <template slot-scope="scope">
+              <div>
+                <el-button type="text"
+                           @click="lookTeamDetail(scope.row)">查看</el-button>
+                <el-button type="text">启动</el-button>
+                <el-button type="text">暂停</el-button>
+              </div>
+            </template>
           </el-table-column>
         </el-table>
         <!-- 分页器 -->
@@ -134,7 +143,8 @@
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-import { truncate } from 'fs';
+// import { truncate } from 'fs';
+import { getTeamList } from '@/api/teamServer'
 export default {
   name: "Main",
   data () {
@@ -183,10 +193,20 @@ export default {
   components: {
     pagination
   },
+  mounted () {
+    getTeamList().then(res => {
+      if (res.code == 200) {
+        this.tableData = res.data.rows;
+      }
+    })
+  },
   methods: {
     getList () {
 
     },
+    createNewTeam () {
+      this.$router.push({ path: '/teamBuild/teamBuild' })
+    },
     setSearchList (obj) {
       // 
       // 没有相同的key=>添加这个对象
@@ -249,6 +269,37 @@ export default {
     gotoSearch () {
       this.$refs['topForm'].resetFields();
       this.searchLsit = [];
+    },
+    lookTeamDetail (row) {
+      switch (row.status) {
+        case 'APPLY': {
+          // 报名中
+          console.log('报名中')
+          this.$router.push({ path: `/teamBuild/sigupList`, query: { status: row.status, id: row.id } })
+          break;
+        }
+        case 'PAY': {
+          // 缴费中
+          console.log('缴费中')
+          this.$router.push({ path: `/teamBuild/sigupList`, query: { status: row.status, id: row.id } })
+          break;
+        }
+        case 'PREPARE': {
+          // 筹备中
+          console.log('筹备中')
+          break;
+        }
+        case 'UNDERWAY': {
+          // 进行中
+          console.log('进行中')
+          break
+        }
+        case 'CANCELED': {
+          // 取消
+          console.log('取消')
+          break
+        }
+      }
     }
   },
   watch: {

+ 4 - 3
vue.config.js

@@ -16,9 +16,10 @@ const name = defaultSettings.title || 'vue Admin Template' // page title
 // const port = process.env.port || process.env.npm_config_port || 9528 // dev port
 // http://47.99.212.176:8000
 // http://192.168.3.28:8000
-let target = 'http://192.168.3.48:8000'
-// let target = 'http://47.99.212.176:8000'
-// let target = 'http://192.168.3.48:8000'
+
+// let target = 'http://192.168.3.8:8000' //勇哥
+// let target = 'http://47.99.212.176:8000' // 测试服
+let target = 'http://192.168.3.48:8000' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**