Browse Source

修改样式及权限

lex-xin 5 năm trước cách đây
mục cha
commit
007e93e759

+ 16 - 10
src/views/resetTeaming/index.vue

@@ -67,14 +67,7 @@ export default {
     }
   },
   created () {
-    this.activeIndex = sessionStorage.getItem('resetCode') || '1';
-    this.teamid = this.$route.query.id;
-    if (this.$route.query.search) {
-      this.Fsearch = this.$route.query.search;
-    }
-    if (this.$route.query.rules) {
-      this.Frules = this.$route.query.rules
-    }
+    this.__init()
   },
   beforeDestroy () {
     sessionStorage.setItem('setStep', 0)
@@ -84,8 +77,21 @@ export default {
     let obj = {}
     obj.name = this.activeIndex
     this.handleClick(obj)
-
-  }, methods: {
+  }, 
+  activated() {
+    this.__init()
+  },
+  methods: {
+    __init() {
+      this.activeIndex = sessionStorage.getItem('resetCode') || '1';
+      this.teamid = this.$route.query.id;
+      if (this.$route.query.search) {
+        this.Fsearch = this.$route.query.search;
+      }
+      if (this.$route.query.rules) {
+        this.Frules = this.$route.query.rules
+      }
+    },
     onCancel () {
       this.$router.push({ path: '/business/teamDetail', query: { search: this.Fsearch, rules: this.Frules } })
     },

+ 5 - 13
src/views/teamBuild/components/teamBaseInfo.vue

@@ -2,7 +2,6 @@
   <div class='base-container'>
     <div class="banseLeft">
       <div class="head">乐团基本信息:</div>
-      <!-- <div class="num">乐团编号:dywh01</div> -->
       <el-form :model="topFrom"
                :inline="true"
                ref='topinfo'
@@ -144,7 +143,6 @@
                        label="高二"></el-option>
             <el-option value="12"
                        label="高三"></el-option>
-
           </el-select>
         </el-form-item>
         <el-form-item label="课酬结算标准"
@@ -322,7 +320,6 @@
           <el-checkbox-group v-model="payList.chioseMonth"
                              fill="#14928A"
                              text-color='#474747'>
-
             <el-checkbox :label="1">一月</el-checkbox>
             <el-checkbox :label="2">二月</el-checkbox>
             <el-checkbox :label="3">三月</el-checkbox>
@@ -470,10 +467,6 @@ export default {
       //          2. newTeam  新建乐团
       //          3.teamList 跨团修改
       //          4.teamDraft 乐团草稿
-      // let year = new Date().getFullYear();
-      // axios.post('/jiari/', qs.stringify({ d: year })).then(res => {
-      //   // this.holidayList = Object.keys(res.data[year])
-      // })
       this.teamStatus = this.$route.query.type;
       // 传过来的乐团信息
       this.activeTeam = this.getTeamList;
@@ -564,8 +557,8 @@ export default {
           isClass: false, //是否为课堂课
           startTime: '',
           ownershipType: 'OWN' // 合作机构类型
-        },
-          this.$refs['topinfo'].resetFields()
+        }
+        this.$refs['topinfo'].resetFields()
       }
       // 1.获取各个选项卡的数据内容
       // getSection({ 'delFlag': 0, 'rows': 1000 }).then(res => {
@@ -662,7 +655,6 @@ export default {
             this.$store.dispatch('getpayInfo', this.payList);
             this.$emit('chiosetab', num);
           }
-
         }
       })
     },
@@ -673,9 +665,9 @@ export default {
         } else {
           let status = null;
           // 1.resetTeam 乐团修改
-          //          2. newTeam  新建乐团
-          //          3.teamList 跨团修改
-          //          4.teamDraft 乐团草稿
+          // 2.newTeam 新建乐团
+          // 3.teamList 跨团修改
+          // 4.teamDraft 乐团草稿
           switch (this.teamStatus) {
             case 'resetTeam': {
               status = 'PROGRESS'

+ 5 - 4
src/views/teamBuild/components/teamSoundMoney.vue

@@ -34,7 +34,6 @@
                         size='mini'
                         v-model="scope.row.jihua"
                         placeholder="请输入"></el-input>
-              <!-- <p v-if='scope.row.type == 2'>{{scope.row.jihua}}</p> -->
             </div>
           </template>
         </el-table-column>
@@ -51,7 +50,6 @@
                         size='mini'
                         v-model="scope.row.yuji"
                         placeholder="请输入"></el-input>
-              <!-- <p v-if='scope.row.type == 2'>{{scope.row.yuji}}</p> -->
             </div>
           </template>
 
@@ -910,13 +908,16 @@ export default {
     submitInfo (type) {
       this.isNullFangshi = true
       // return;
-      let status;
+      let status
+      let titleStr = ''
       if (type == 1) {
         // 保存
         status = 'DRAFT'
+        titleStr = '确定保存?'
       } else if (type == 2) {
         // 提交
         status = 'AUDIT'
+        titleStr = '确定提交'
       }
       // 整理数据提交
       if (this.teamStatus == 'newTeam') {
@@ -1048,7 +1049,7 @@ export default {
           }
           obj.musicGroupSubjectPlans.push(item);
         })
-        this.$confirm(`确定提交?`, '提示', {
+        this.$confirm(titleStr, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'

+ 0 - 1
src/views/teamBuild/index.vue

@@ -2,7 +2,6 @@
   <div class='m-container'>
     <div class="line"></div>
     <h2>
-      <!-- <div class='squrt'></div> {{ pageName }} -->
       <el-page-header @back="goBack"
                       :content="pageName">
       </el-page-header>

+ 40 - 20
src/views/teamBuild/signupList.vue

@@ -3,12 +3,9 @@
     <div class="topWrap">
       <div>
         <h2>
-          <!-- <div class="squrt"></div> -->
           <el-page-header @back="onCancel"
                           :content="teamName + '报名详情'">
-
           </el-page-header>
-          <!-- {{ teamName }}报名详情 -->
         </h2>
         <p style="margin-bottom:15px; font-size:18px;
              font-weight:400">报名缴费截止时间:{{ applyExpireDate | formatTimer }}</p>
@@ -50,8 +47,13 @@
     <div class="searchList">
       <el-form :inline="true"
                :model="searchFrom">
-        <el-form-item label="专业">
+        <el-form-item>
+          <el-input v-model="searchFrom.name"
+            @keyup.enter.native='search' placeholder='用户名或手机号'></el-input>
+        </el-form-item>
+        <el-form-item>
           <el-select v-model="searchFrom.subject"
+                     placeholder="请选择专业"
                      filterable
                      clearable>
             <el-option v-for="(item,index) in soundList"
@@ -59,10 +61,10 @@
                        :label="item.name"
                        :value="item.id"></el-option>
           </el-select>
-
         </el-form-item>
-        <el-form-item label="是否允许调剂">
+        <el-form-item>
           <el-select v-model="searchFrom.isAllowAdjust"
+                     placeholder="是否允许调剂"
                      filterable
                      clearable>
             <el-option label="是"
@@ -71,13 +73,10 @@
                        value="0"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="用户名或手机号">
-          <el-input v-model="searchFrom.name"></el-input>
-        </el-form-item>
-        <!-- 专业actualSubjectId 调剂isAllowAdjust 手机号name -->
         <el-form-item>
-          <div class='searchBtn'
-               @click='search'>搜索</div>
+          <el-button type='danger' @click='search'>搜索</el-button>
+          <el-button type='primary'
+                     @click="onReset">重置</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -111,13 +110,11 @@
                            align='center'>
           </el-table-column>
         </el-table>
-        <div class="btnWrap"
-             style="margin-right:20px;  margin-top:20px;">
+        <div class="btnWrap" v-permission="'musicGroup/updateExpectedStudentNum'"
+             style="margin-right:20px; margin-top:20px;">
           <el-button v-if="!isEdit"
-                     v-permission="'musicGroup/updateExpectedStudentNum'"
                      @click="isEdit = true">编辑</el-button>
           <el-button v-if="isEdit"
-                     v-permission="'musicGroup/updateExpectedStudentNum'"
                      @click="saveIsEdit">保存</el-button>
         </div>
       </div>
@@ -472,9 +469,6 @@ export default {
   activated () {
     this.init()
   },
-  mounted () {
-
-  },
   methods: {
     init () {
       this.status = this.$route.query.status;
@@ -513,11 +507,26 @@ export default {
       this.rules.page = 1;
       this.getList();
     },
+    onReset() {
+      this.rules.page = 1
+      this.rules.limit = 10
+      this.searchFrom = {
+        name: null,
+        subject: null, // 专业
+        isAllowAdjust: null // 是否允许调剂
+      }
+      this.getList()
+    },
     onCancel () {
       this.$router.push({ path: '/business/teamDetail', query: { search: this.Fsearch, rules: this.Frules } })
     },
     payStart () {
       this.paymentStatus = true;
+      getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
+        if (res.code == 200) {
+          this.applyExpireDate = res.data.musicGroup.applyExpireDate;
+        }
+      })
     },
     getList () {
       let obj = {
@@ -763,6 +772,11 @@ export default {
             if (res.code == 200) {
               this.$message.success('延长缴费成功')
               this.extendPaymentStatus = false
+              getTeamBaseInfo({ musicGroupId: this.id }).then(res => {
+                if (res.code == 200) {
+                  this.applyExpireDate = res.data.musicGroup.applyExpireDate;
+                }
+              })
             } else {
               this.$message.error(res.msg);
             }
@@ -836,7 +850,7 @@ export default {
   }
 }
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
 .sigup-container {
   margin-left: 12px;
   .topWrap {
@@ -965,4 +979,10 @@ export default {
     padding: 15px 15px 0 15px;
   }
 }
+.newBand {
+  margin-bottom: 0;
+}
+/deep/.el-button--danger {
+  background: #f85043;
+}
 </style>

+ 2 - 56
src/views/teamDetail/components/baseInfo.vue

@@ -11,34 +11,18 @@
           <el-form-item label="教务老师">
             <el-input v-model="topForm.teacher"
                       disabled></el-input>
-            <!-- <el-select>
-              <el-option label="啦啦啦"
-                         value="1"></el-option>
-            </el-select> -->
           </el-form-item>
           <el-form-item label="所属分部">
             <el-input v-model="topForm.section"
                       disabled></el-input>
-            <!-- <el-select v-model="topForm.section">
-              <el-option label="啦啦啦"
-                         value="1"></el-option>
-            </el-select> -->
           </el-form-item>
           <el-form-item label="乐队指导">
             <el-input v-model="topForm.boss"
                       disabled></el-input>
-            <!-- <el-select v-model="topForm.boss">
-              <el-option label="啦啦啦"
-                         value="1"></el-option>
-            </el-select> -->
           </el-form-item>
           <el-form-item label="合作单位">
             <el-input v-model="topForm.cooperate"
                       disabled></el-input>
-            <!-- <el-select v-model="topForm.cooperate">
-              <el-option label="啦啦啦"
-                         value="1"></el-option>
-            </el-select> -->
           </el-form-item>
           <el-form-item label="上课地点">
             <el-input v-model="topForm.add"
@@ -48,19 +32,7 @@
           <el-form-item label="收费类型">
             <el-input v-model="topForm.type"
                       disabled></el-input>
-            <!-- <el-select v-model="topForm.type">
-              <el-option label="啦啦啦"
-                         value="1"></el-option>
-            </el-select> -->
           </el-form-item>
-          <!-- <el-form-item label="课酬结算标准">
-            <el-select v-model="topForm.salary">
-              <el-option label="课时默认结算"
-                         value="TEACHER_DEFAULT"></el-option>
-              <el-option label="课时梯度结算"
-                         value="GRADIENT_SALARY"></el-option>
-            </el-select>
-          </el-form-item> -->
         </el-form>
         <el-button type="text"
                    v-permission="'order/musicalListExport'"
@@ -73,28 +45,16 @@
         <ul>
           <li v-for="(item,index) in processList"
               :key='index'>{{ item.createTime}} {{ item.realName }} {{item.event}}</li>
-
         </ul>
       </div>
     </div>
-    <!-- <div class="baseBottom">
-      <div class="qrcode code"
-           ref="qrCodeUrl"></div>
-      <a href="#">www.baidu.com</a>
-    </div> -->
   </div>
 </template>
 <script>
-import {
-  getMusicGroup,
-  getMusicGroupProcess
-} from '@/api/buildTeam'
-import QRCode from 'qrcodejs2'
+import { getMusicGroup, getMusicGroupProcess } from '@/api/buildTeam'
 import axios from 'axios'
 import qs from 'qs'
-import {
-  getToken
-} from '@/utils/auth'
+import { getToken } from '@/utils/auth'
 export default {
   name: "tbaseInfo",
   props: ['teamid'],
@@ -116,9 +76,6 @@ export default {
     }
   },
   created () {
-    // 获取乐团基本信息
-    // let teamid = '191014135135001';
-    // this.creatQrCode();
     this.init()
   },
   activated () {
@@ -131,7 +88,6 @@ export default {
       }).then(res => {
         if (res.code == 200) {
           this.topForm.num = res.data.id;
-          // this.topForm.teacher = res.data.teamTeacherName;
           this.topForm.teacher = res.data.educationalTeacherName;
           this.topForm.boss = res.data.directorUserName;
           this.topForm.cooperate = res.data.schoolName;
@@ -152,16 +108,6 @@ export default {
         }
       })
     },
-    creatQrCode () {
-      var qrcode = new QRCode(this.$refs.qrCodeUrl, {
-        text: 'http://www.baidu.com',
-        width: 300,
-        height: 300,
-        colorDark: '#000000',
-        colorLight: '#ffffff',
-        correctLevel: QRCode.CorrectLevel.H
-      })
-    },
     musicalListExport () { // 报表导出
       let url = '/api-web/order/musicalListExport'
       let data = {}

+ 2 - 2
src/views/teamDetail/components/resetClass.vue

@@ -8,9 +8,9 @@
     <div class="m-core">
       <el-form :inline="true"
                :model="topForm">
-        <el-form-item label="班级类型">
+        <el-form-item>
           <el-select v-model="topForm.classType"
-                     clearable
+                     clearable placeholder="请选择班级类型"
                      filterable
                      @change="changeMixClass">
             <el-option v-for='(item,index) in classTypeList'

+ 6 - 0
src/views/teamDetail/components/salaryList.vue

@@ -55,6 +55,7 @@
           <template slot-scope="scope">
             <div>
               <el-button type='text'
+                         v-if="permission('courseSchedule/queryTeacherSalary')"
                          @click="setCourseInfo(scope.row)">课酬调整</el-button>
             </div>
           </template>
@@ -89,6 +90,7 @@
           <template slot-scope="scope">
             <div>
               <el-button type='text'
+                         v-if="permission('courseSchedule/updateTeacherCoursesSalary')"
                          @click="resetTeacher(scope.row)">操作</el-button>
             </div>
           </template>
@@ -134,6 +136,7 @@
 import pagination from '@/components/Pagination/index'
 import { getCourseList, getTeacherSalary } from '@/api/buildTeam'
 import { updateTeacherCoursesSalary } from '@/api/teacherManager'
+import { permission } from '@/utils/directivePage'
 export default {
   name: 'tsalaryList',
   props: ['teamid'],
@@ -207,6 +210,9 @@ export default {
     this.getList()
   },
   methods: {
+    permission(str) {
+      return permission(str)
+    },
     search () {
       this.rules.page = 1;
       this.getList();

+ 10 - 2
src/views/teamDetail/components/studentList.vue

@@ -15,6 +15,7 @@
       </div>
       <div class="right">
         <div class="newStudent"
+             v-permission="'studentRegistration/insertStudent'"
              style="margin-bottom:10px;"
              @click="addStudentVisible = true">新增学员</div>
         <div class="newStudent"
@@ -240,16 +241,19 @@
               </el-popover> -->
 
               <el-button type="text"
+                         v-if="permission('studentManage/queryStudentClassGroup')"
                          @click="lookClass(scope.row)">查看班级</el-button>
               <el-button type="text"
-                         v-if="!scope.row.isLock"
+                         v-if="!scope.row.isLock && permission('studentManage/updateStudentFeeIsLock')"
                          @click="lockStudent(scope.row)">锁定</el-button>
-              <el-button v-else
+              <el-button v-if="scope.row.isLock && permission('studentManage/updateStudentFeeIsLock')"
                          type="text"
                          @click="lockStudent(scope.row)">解锁</el-button>
               <el-button type="text"
+                         v-if="permission('studentManage/updateStudentFee')"
                          @click="resetPay(scope.row)">修改缴费</el-button>
               <el-button type='text'
+                         v-if="permission('musicGroupQuit/directQuitMusicGroup')"
                          @click="quieTeamMask(scope.row)">退团</el-button>
 
             </div>
@@ -623,6 +627,7 @@ import { vaildStudentUrl } from '@/utils/validate'
 import QRCode from 'qrcodejs2'
 import axios from 'axios'
 import { getToken } from '@/utils/auth'
+import { permission } from '@/utils/directivePage'
 export default {
   name: "tstudentList",
   props: ['teamid'],
@@ -825,6 +830,9 @@ export default {
         }
       })
     },
+    permission (str) {
+      return permission(str)
+    },
     onInstrumentChange() { // 乐器切换时
       // let tempkitType = this.maskForm.kitGroupPurchaseType
       // if(tempkitType == 'GROUP') {

+ 8 - 23
src/views/teamDetail/components/teacherList.vue

@@ -1,41 +1,26 @@
 <template>
   <div class='t-container'>
     <!-- 头部展示 -->
-    <div class="headWrap"
-         style="padding:0;">
-      <!-- <div class="left">
-        <div class="headItem">
-          <p>教学主管: <span> 张三,李四</span></p>
-        </div>
-      </div> -->
-      <div></div>
-      <div class="right newBand"
-           @click="gotoRecord">
-        上课记录
-      </div>
-    </div>
+    <!-- <div class="headWrap" style="padding:0;">
+      
+    </div> -->
 
     <!-- 搜索类型 -->
     <el-form :inline="true"
              class="searchForm"
              v-model="searchForm">
-      <!-- <el-form-item>
-        <el-select v-model="searchForm.status"
-                   placeholder="合奏班">
-          <el-option v-for='(item,index) in mixCourseList'
-                     :key="index"
-                     :value="item.id"
-                     :label="item.name"></el-option>
-        </el-select>
-      </el-form-item> -->
       <el-form-item>
-        <el-input placeholder="老师姓名 编号 手机号"
+        <el-input placeholder="老师姓名/编号/手机号"
+                  @keyup.enter.native="search"
                   v-model="searchForm.search"></el-input>
       </el-form-item>
       <el-form-item>
         <div class="searchBtn"
              @click="search">搜索</div>
       </el-form-item>
+      <el-form-item style="float: right;">
+        <div class="right newBand" style="margin-bottom: 0;" @click="gotoRecord"> 上课记录 </div>
+      </el-form-item>
     </el-form>
 
     <!-- 列表 -->

+ 16 - 8
src/views/teamDetail/components/teamTeacherRecord.vue

@@ -19,7 +19,11 @@
                      :label="item.name"></el-option>
         </el-select>
       </el-form-item> -->
-
+      <el-form-item>
+        <el-input v-model="searchForm.teacher"
+                  @keyup.enter.native='search'
+                  placeholder="请输入老师姓名"></el-input>
+      </el-form-item>
       <el-form-item>
         <el-date-picker v-model="searchForm.timer"
                         style="width:420px;"
@@ -31,13 +35,8 @@
         </el-date-picker>
       </el-form-item>
       <el-form-item>
-        <el-input v-model="searchForm.teacher"
-                  @keyup.enter.native='search'
-                  placeholder="请输入老师姓名"></el-input>
-      </el-form-item>
-      <el-form-item>
-        <div class="searchBtn"
-             @click="search">搜索</div>
+        <el-button type="danger" @click="search">搜索</el-button>
+        <el-button type='primary' @click="reset">重置</el-button>
       </el-form-item>
     </el-form>
     <div class="tableList">
@@ -144,6 +143,15 @@ export default {
       this.rules.page = 1;
       this.getList();
     },
+    reset() {
+      this.rules.page = 1
+      this.rules.limit = 10
+      this.searchForm = {
+        teacher: '',
+        timer: []
+      }
+      this.getList()
+    },
     getList () {
       //musicGroupId: this.teamId
       this.searchForm.timer = this.searchForm.timer || [];

+ 10 - 1
src/views/teamDetail/index.vue

@@ -20,27 +20,32 @@
                type="card"
                @tab-click="handleClick">
         <el-tab-pane label="基本信息"
+                     v-if="permission('/teamDetails/baseInfo')"
                      name="1">
           <baseinfo v-if="activeIndex == '1'"
                     :teamid='teamid'
                     @getname='getname' />
         </el-tab-pane>
         <el-tab-pane label="老师列表"
+                     v-if="permission('/teamDetails/teacherList')"
                      name="2">
           <teacherList v-if="activeIndex == '2'"
                        :teamid='teamid' />
         </el-tab-pane>
         <el-tab-pane label="学员列表"
+                     v-if="permission('/teamDetails/studentList')"
                      name="3">
           <studentList v-if="activeIndex == '3'"
                        :teamid='teamid' />
         </el-tab-pane>
         <el-tab-pane label="班级详情"
+                     v-if="permission('/teamDetails/classList')"
                      name="4">
           <classList v-if="activeIndex == '4'"
                      :teamid='teamid' />
         </el-tab-pane>
         <el-tab-pane label="课表详情"
+                     v-if="permission('/teamDetails/courseList')"
                      name="5">
           <courseList v-if="activeIndex == '5'"
                       :teamid='teamid' />
@@ -50,6 +55,7 @@
           <salaryList v-if="activeIndex == 6" />
         </el-tab-pane> -->
         <el-tab-pane label="课酬调整"
+                     v-if="permission('/teamDetails/salaryList')"
                      name="7">
           <salaryList v-if="activeIndex == '7'"
                       :teamid='teamid' />
@@ -65,7 +71,7 @@ import courseList from '@/views/teamDetail/components/courseList'
 import classList from '@/views/teamDetail/components/classList'
 import salaryList from '@/views/teamDetail/components/salaryList'
 import baseinfo from '@/views/teamDetail/components/baseInfo'
-// import { getMusicGroup } from '@/api/buildTeam'
+import { permission } from '@/utils/directivePage'
 export default {
   name: 'teamDetail',
   data () {
@@ -94,6 +100,9 @@ export default {
 
   },
   methods: {
+    permission(str) {
+      return permission(str)
+    },
     init () {
       // let teamInfo = this.$route.query;
       this.status = this.$route.query.status;

+ 0 - 6
src/views/teamDetail/teamList.vue

@@ -59,14 +59,10 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <!-- <div class='searchBtn'
-               @click="search"></div> -->
           <el-button type='danger'
                      @click="search">搜索</el-button>
         </el-form-item>
         <el-form-item>
-          <!-- <div class='searchBtn'
-               @click="search"></div> -->
           <el-button type='primary'
                      @click="reset">重置</el-button>
         </el-form-item>
@@ -80,7 +76,6 @@
                            :selectable="checkSelectable"
                            width="50">
           </el-table-column>
-
           <el-table-column prop="id"
                            width="100"
                            align='center'
@@ -236,7 +231,6 @@
 </template>
 <script>
 import pagination from '@/components/Pagination/index'
-// import { truncate } from 'fs';
 import { getTeamList, getPayType } from '@/api/teamServer'
 import { getCooperation, cancelMusicGroup, startTeam, getEmployeeOrgan, pauseMusicGroup, resumeMusicGroup } from '@/api/buildTeam'
 import { musicGroupStatus } from '@/utils/searchArray'