mo 5 gadi atpakaļ
vecāks
revīzija
64a5406f5d

+ 9 - 0
src/api/buildTeam.js

@@ -698,3 +698,12 @@ export function deteleAllCourse (data) {
     params: data
   })
 }
+
+// 修改密码
+export function resetPassword (data) {
+  return request({
+    url: `/api-auth/user/updatePassword`,
+    method: 'POST',
+    data: qs.stringify(data)
+  })
+}

+ 117 - 2
src/layout/components/Navbar.vue

@@ -33,9 +33,62 @@
             <span style="display:block;"
                   @click="logout">退出</span>
           </el-dropdown-item>
+          <el-dropdown-item>
+            <span style="display:block;"
+                  @click="resetPassWord">修改密码</span>
+          </el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
     </div>
+    <el-dialog title="修改密码"
+               width="500px"
+               append-to-body
+               :visible.sync="resetVisible">
+      <el-form :model="resetForm"
+               label-position='right'
+               label-width="100px"
+               ref='pwdForm'>
+        <el-form-item label="手机号"
+                      prop="phone"
+                      :rules="[{ required: true, message: '手机号不能为空',trigger: 'blur'},{pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号',trigger: 'blur' }]">
+          <el-input v-model="resetForm.phone"
+                    style="width:180px"
+                    autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="新密码"
+                      :rules="[{ required: true, message: '密码不能为空',trigger: 'blur'},{pattern:/^[\w]{6,20}$/,message:'密码为6-20位',trigger: 'blur'}]"
+                      prop="password">
+          <el-input v-model="resetForm.password"
+                    type='password'
+                    style="width:180px"
+                    autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="再次输入"
+                      :rules="[{ required: true, message: '密码不能为空',trigger: 'blur'},{pattern:/^[\w]{6,20}$/,message:'密码为6-20位',trigger: 'blur'}]"
+                      prop="password2">
+          <el-input v-model="resetForm.password2"
+                    type='password'
+                    style="width:180px"
+                    autocomplete="off"></el-input>
+        </el-form-item>
+        <el-form-item label="验证码"
+                      :rules="[{ required: true, message: '验证码不能为空',trigger: 'blur'}]"
+                      prop="authCode"
+                      style="">
+          <el-input v-model="resetForm.authCode"
+                    style="width:180px"
+                    autocomplete="off"></el-input>
+          <el-button :disabled="isDisable"
+                     @click="getCode">{{ btnName }}</el-button>
+        </el-form-item>
+      </el-form>
+      <div slot="footer"
+           class="dialog-footer">
+        <el-button @click="resetVisible = false">取 消</el-button>
+        <el-button type="primary"
+                   @click="submitResetPassWord">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -43,12 +96,22 @@
 import { mapGetters } from "vuex";
 // import Breadcrumb from '@/components/Breadcrumb'
 // import Hamburger from '@/components/Hamburger'
-
+import { resetPassword } from '@/api/buildTeam'
 export default {
   data () {
     return {
       username: '',
-      organName: this.$store.getters.organName
+      organName: this.$store.getters.organName,
+      resetVisible: false,
+      resetForm: {
+        phone: '',
+        authCode: '',
+        password: '',
+        password2: ''
+      },
+      isDisable: false, // 是否允许发送验证码
+      timerCount: 60,
+      btnName: '获取验证码'
     }
   },
   components: {
@@ -75,6 +138,58 @@ export default {
     },
     gotoRecode () {
       this.$router.push('/journal/journal')
+    },
+    resetPassWord () {
+      this.resetVisible = true;
+    },
+    submitResetPassWord () {
+      if (this.resetForm.password !== this.resetForm.password2) {
+        this.$message.error('两次密码必须相同')
+        return
+      }
+      this.$refs['pwdForm'].validate(res => {
+        if (res) {
+          // 发请求
+          resetPassword({ authCode: this.resetForm.authCode, mobile: this.resetForm.phone, newPassword: this.resetForm.password }).then(res => {
+            if (res.code == 200) {
+              // 修改成功
+              this.$message.success('修改成功')
+              this.logout()
+            }
+          })
+        }
+      })
+    },
+    getCode () {
+      // 获取验证码
+      if (!this.isDisable) {
+        this.isDisable = true;
+        // 发请求成功后开启定时器
+        // 发送验证码 
+        let timer = setInterval(res => {
+          if (this.timerCount <= 0) {
+            clearInterval(timer)
+            this.isDisable = false;
+            this.btnName = '获取验证码';
+            this.timerCount = 60;
+          } else {
+            this.timerCount--;
+            this.btnName = `${this.timerCount}s后重试`
+          }
+        }, 1000)
+      }
+    }
+  },
+  watch: {
+    resetVisible (val) {
+      if (!val) {
+        this.resetForm = {
+          phone: '',
+          authCode: '',
+          password: '',
+          password2: ''
+        }
+      }
     }
   }
 };

+ 14 - 16
src/views/teamBuild/teamSeting/components/coursePlan.vue

@@ -104,14 +104,14 @@
              style='float:right'
              @click="multipleReset">批量修改</div>
         <el-table :data='tableList'
-                  style="width: 100%"
+                  style="width: 1160px"
                   :header-cell-style="{background:'#EDEEF0',color:'#444'}"
                   @selection-change="handleSelectionChange">
           <el-table-column type="selection"
                            width="55">
           </el-table-column>
           <el-table-column label="课次"
-                           width="180">
+                           width="55">
             <template slot-scope="scope">
               <div>
                 {{ scope.$index+1 }}
@@ -119,15 +119,16 @@
             </template>
           </el-table-column>
           <el-table-column prop="classDate"
-                           label="日期"
-                           width="180">
+                           align="center"
+                           label="日期">
           </el-table-column>
           <el-table-column prop="week"
-                           label="星期"
-                           width="180">
+                           align="center"
+                           label="星期">
           </el-table-column>
           <el-table-column label="课程类型"
-                           width="180">
+                           align="center">
+
             <template slot-scope="scope">
               <div>
                 {{scope.row.type |coursesType }}
@@ -135,8 +136,8 @@
             </template>
           </el-table-column>
           <el-table-column prop="name"
-                           label="合奏班名称"
-                           width="180">
+                           align="center"
+                           label="合奏班名称">
           </el-table-column>
           <!-- <el-table-column prop="classTime"
                            label="上课时间"
@@ -503,8 +504,8 @@ export default {
     },
     // 批量修改
     multipleReset () {
-      if (this.activeList.length <= 1) {
-        this.$message.error('请选至少2已上课时')
+      if (this.activeList.length < 1) {
+        this.$message.error('请至少选择一节已上课时')
         return
       }
       this.isMultiple = true;
@@ -884,7 +885,7 @@ export default {
 }
 .course-container {
   // border-bottom: 1px solid #ccc;
-  height: 600px;
+  // height: 600px;
   overflow-y: auto;
 
   background-color: #fff;
@@ -938,14 +939,11 @@ export default {
     }
   }
   .right {
-    // width: 1160px;
+    width: 1160px;
 
     .is-selected {
       color: #1989fa;
     }
-    .el-calendar {
-      max-width: 950px;
-    }
     .btnWrap {
       display: flex;
       flex-direction: row;

+ 46 - 5
src/views/teamBuild/teamSeting/components/salarySet.vue

@@ -1,17 +1,20 @@
 <template>
   <div class='salary-container'>
-    <!-- <el-form :inline="true"
+    <el-form :inline="true"
+             v-if="hasDate"
              :model="searchForm">
       <el-form-item label="课酬结算标准">
         <el-select v-model="searchForm.salary"
                    @change="changeSalary">
-          <el-option label="课时默认结算"
+          <el-option label="默认课酬"
                      value="TEACHER_DEFAULT"></el-option>
-          <el-option label="课时梯度结算"
+          <el-option label="3.0课酬"
                      value="GRADIENT_SALARY"></el-option>
+          <el-option label="课堂课课酬"
+                     value="CLASSROOM_SALARY"></el-option>
         </el-select>
       </el-form-item>
-    </el-form> -->
+    </el-form>
     <div class="tableWrap"
          v-if='searchForm.salary == "TEACHER_DEFAULT" || searchForm.salary =="CLASSROOM_SALARY"'>
       <el-table :data="defaultTableList"
@@ -140,7 +143,8 @@ export default {
       defaultTableList: [],
       gradientTableList: [],
       subList: [],
-      isok: true
+      isok: true,
+      hasDate: false
     }
   },
   mounted () {
@@ -148,6 +152,9 @@ export default {
     getTeamDetail({ musicGroupId: this.teamid }).then(res => {
       if (res.code == 200) {
         this.searchForm.salary = res.data.settlementType;
+        if (!res.data.settlementType) {
+          this.hasDate = true;
+        }
         if (this.searchForm.salary == 'TEACHER_DEFAULT') {
           findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'TEACHER_DEFAULT' }).then(res => {
             if (res.code == 200) {
@@ -229,6 +236,8 @@ export default {
       })
     },
     changeSalary (val) {
+      this.searchForm.salary = val;
+      this.getList()
       return
       if (val == 'TEACHER_DEFAULT') {
         for (let i in this.defaultTableList) {
@@ -253,6 +262,38 @@ export default {
           }
         }
       }
+    },
+    getList () {
+      getTeamDetail({ musicGroupId: this.teamid }).then(res => {
+        if (res.code == 200) {
+          this.searchForm.salary = res.data.settlementType;
+          if (!res.data.settlementType) {
+            this.hasDate = true;
+          }
+          if (this.searchForm.salary == 'TEACHER_DEFAULT') {
+            findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'TEACHER_DEFAULT' }).then(res => {
+              if (res.code == 200) {
+                this.defaultTableList = res.data;
+                // this.changeSalary(this.searchForm.salary);
+              }
+            })
+          } else if (this.searchForm.salary == 'GRADIENT_SALARY') {
+            findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'GRADIENT_SALARY' }).then(res => {
+              if (res.code == 200) {
+                this.gradientTableList = res.data;
+                // this.changeSalary(this.searchForm.salary);
+              }
+            })
+          } else if (this.searchForm.salary == 'CLASSROOM_SALARY') {
+            findMusicGroupClassTeacherSalary({ musicGroupId: this.teamid, type: 'CLASSROOM_SALARY' }).then(res => {
+              if (res.code == 200) {
+                this.defaultTableList = res.data;
+                // this.changeSalary(this.searchForm.salary);
+              }
+            })
+          }
+        }
+      })
     }
   },
 }

+ 1 - 1
src/views/vipClass/vipDetail/components/vipStudentList.vue

@@ -131,7 +131,7 @@ export default {
     },
     reset () {
       this.rules.page = 1;
-      this.rules.search = null;
+      this.maskForm.search = null;
       this.activeStudent = '';
       this.getList();
     },

+ 2 - 2
vue.config.js

@@ -16,11 +16,11 @@ const name = defaultSettings.title || '大雅后台管理系统' // page title
 // const port = process.env.port || process.env.npm_config_port || 9528 // dev port
 // http://47.99.212.176:8000 
 // 
-let target = 'http://192.168.3.27:8000' // 箭河
+// let target = 'http://192.168.3.27: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://192.168.3.48:8000' // 乔
+let target = 'http://192.168.3.48:8000' // 乔
 // All configuration item explanations can be find in https://cli.vuejs.org/config/
 module.exports = {
   /**