|
|
@@ -75,26 +75,26 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="Status" label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
+ <!--未上课的-->
|
|
|
<el-button type="primary" round size="mini" v-if="scope.row.finish_class == 0"
|
|
|
- @click="showDialogClassOn(scope.row)"> 上课
|
|
|
+ @click="showDialogClassOn(scope.row)">
|
|
|
+ 上课
|
|
|
</el-button>
|
|
|
- <el-button type="primary" round size="mini"
|
|
|
- v-if="scope.row.finish_class == 3 || scope.row.finish_class == 2"
|
|
|
- @click="classManage(scope.row)">
|
|
|
- 管理
|
|
|
- </el-button>
|
|
|
- <!--修改区域 todo-->
|
|
|
- <el-button type="primary" round plain size="mini" v-if="scope.row.finish_class == 3"
|
|
|
+ <!--准备上课的才能看编辑-->
|
|
|
+ <el-button type="primary" round plain size="mini" v-if="scope.row.finish_class == 1"
|
|
|
@click="classEdit(scope.row)">
|
|
|
编辑
|
|
|
</el-button>
|
|
|
+ <!--准备上课和上课中的-->
|
|
|
+ <el-button type="primary" round size="mini" v-if="scope.row.finish_class == 2"
|
|
|
+ @click="classManage(scope.row)">
|
|
|
+ 管理
|
|
|
+ </el-button>
|
|
|
<!--已完成才能看详情-->
|
|
|
- <el-button type="primary" round plain size="mini"
|
|
|
- v-if="scope.row.finish_class == 1 || scope.row.finish_class == 4"
|
|
|
+ <el-button type="primary" round plain size="mini" v-if="scope.row.finish_class == 4"
|
|
|
@click="classDetail(scope.row)">
|
|
|
详情
|
|
|
</el-button>
|
|
|
-
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -109,7 +109,7 @@
|
|
|
<el-form ref="form" :model="form" label-width="160px">
|
|
|
<!--选教练,非必选-->
|
|
|
<el-form-item label="上课教练">
|
|
|
- <el-select v-model="coachValue" filterable placeholder="请选择">
|
|
|
+ <el-select v-model="form.coachValue" filterable placeholder="请选择">
|
|
|
<el-option v-for="item in form.coachData" :key="item.key" :label="item.label"
|
|
|
:value="item.value">
|
|
|
</el-option>
|
|
|
@@ -146,19 +146,18 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<!--选择区域-->
|
|
|
- <el-form-item label="区域" :required="true">
|
|
|
+ <el-form-item label="上课区域" :required="true">
|
|
|
<el-select v-model="form.svId" filterable placeholder="请选择" @change="changeLocationValue">
|
|
|
- <el-option v-for="item in form.svList" :key="item.SvId" :label="item.Name"
|
|
|
- :value="item.SvId">
|
|
|
+ <el-option v-for="item in form.svList" :key="item.key" :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!--显示设备-->
|
|
|
- <el-form-item label="显示设备">
|
|
|
- <el-checkbox-group v-model="form.equipList">
|
|
|
- <el-checkbox label="复选框 A"></el-checkbox>
|
|
|
- <el-checkbox label="复选框 B"></el-checkbox>
|
|
|
- <el-checkbox label="复选框 C"></el-checkbox>
|
|
|
+ <el-form-item label="显示设备" v-if="form.svId">
|
|
|
+ <el-checkbox-group v-model="form.equipShow">
|
|
|
+ <el-checkbox v-for="item in form.equipList" :key="item.value" :label="item.label"
|
|
|
+ :value="item.value"></el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
<!--上课方式-->
|
|
|
@@ -170,7 +169,7 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<!--分队方式-->
|
|
|
- <el-form-item label="分队方式" v-if="form.classLabel == 2">
|
|
|
+ <el-form-item label="分队方式" v-if="form.classType == 2">
|
|
|
<el-select v-model="form.pkNum" filterable placeholder="请选择">
|
|
|
<el-option v-for="item in form.PKTypeOptions" :key="item.value" :label="item.label"
|
|
|
:value="item.value">
|
|
|
@@ -182,12 +181,10 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="dialogFooter">
|
|
|
- <el-button type="primary" size="small" v-if="form.btnType == 0" :disabled="PrepareBtnStatus"
|
|
|
- @click="getClassStartPrepare()">确定
|
|
|
- </el-button>
|
|
|
- <el-button type="primary" size="small" v-if="form.btnType == 1" @click="getClassStartPrepareForEdit()">
|
|
|
- 确定
|
|
|
+ <el-button size="small" type="primary" v-if="form.btnType == 0" @click="classStatOn()"
|
|
|
+ :disabled="PrepareBtnStatus">确定
|
|
|
</el-button>
|
|
|
+ <el-button size="small" type="primary" v-if="form.btnType == 1" @click="classOnEdit()">确定</el-button>
|
|
|
<el-button size="small" @click="dialogClassPrepareVisible = false">取消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -197,7 +194,6 @@
|
|
|
<script>
|
|
|
import Global from '../../Global.js'
|
|
|
import {
|
|
|
- ClassOverPrepare,
|
|
|
QueryShopVenue,
|
|
|
ClassStartPrepare,
|
|
|
DispPlanInfoEdit,
|
|
|
@@ -205,7 +201,8 @@ import {
|
|
|
} from "../../api/getApiRes";
|
|
|
|
|
|
import {
|
|
|
- StandardRequest
|
|
|
+ StandardRequest,
|
|
|
+ ManageableSimpleQueryRequest
|
|
|
} from "@/grpc/base_pb";
|
|
|
|
|
|
let qs = require('qs');
|
|
|
@@ -216,7 +213,6 @@ export default {
|
|
|
searchBtnStatus: false,
|
|
|
PrepareBtnStatus: false,
|
|
|
dialogTitle: '上课准备',
|
|
|
- coachValue: [],
|
|
|
className: '',
|
|
|
current: getNowDate(),
|
|
|
dialogValue: [],
|
|
|
@@ -246,19 +242,18 @@ export default {
|
|
|
},
|
|
|
form: {
|
|
|
svId: '',
|
|
|
- StdId: '',
|
|
|
+ stdId: '',
|
|
|
IsHr: 1,
|
|
|
IsScore: 1,
|
|
|
- svName: '',
|
|
|
- equipList: ['选中且禁用', '复选框 A'],
|
|
|
+ equipShow: [],
|
|
|
classType: 1,//课程类型
|
|
|
courseType: 1,//课程标签
|
|
|
- coach: '',
|
|
|
coachOptions: [],
|
|
|
pkNum: 2,
|
|
|
btnType: 0,//0新建,1编辑
|
|
|
svList: [],//区域列表
|
|
|
- coachData: [],//穿梭已选
|
|
|
+ coachData: [],
|
|
|
+ equipList: [],
|
|
|
courseTypeOptions: [
|
|
|
{value: 1, label: '室内课'},
|
|
|
{value: 2, label: '户外课'},
|
|
|
@@ -285,75 +280,203 @@ export default {
|
|
|
goType(url) {
|
|
|
this.$router.push({path: '/' + url});
|
|
|
},
|
|
|
- // 更改上课区域
|
|
|
- classEdit(row) {
|
|
|
+ //上课按钮弹出
|
|
|
+ showDialogClassOn(row) {
|
|
|
this.dialogClassPrepareVisible = true;
|
|
|
- this.form.btnType = 1;//0新建,1编辑
|
|
|
- // 读取本行信息
|
|
|
+ this.form.btnType = 0;//0新建,1编辑编辑
|
|
|
+ //清空一些值
|
|
|
+ this.form.svId = '';
|
|
|
+ this.form.svList = '';
|
|
|
+ this.form.coachValue = '';
|
|
|
+ this.form.coachData = '';
|
|
|
+ //填充一些值
|
|
|
+ this.form.stdId = row.uu_std_id;
|
|
|
+ this.form.ClassName = row.class_name;
|
|
|
+ this.form.BeginStr = row.begin_str;
|
|
|
+ this.form.EndStr = row.end_str;
|
|
|
+ this.form.FinishClass = row.finish_class;
|
|
|
+ this.form.ClassType = row.class_type;
|
|
|
+ this.form.courseType = row.course_type;
|
|
|
+ this.form.PkNum = row.pk_num;
|
|
|
this.className = row.class_name + ' ' + row.begin_str + ' - ' + row.end_str;
|
|
|
- this.form.StdId = row.std_id;
|
|
|
+ this.getCoachOption();
|
|
|
this.getQueryShopVenue();
|
|
|
- this.form.svId = row.sv_id;
|
|
|
- this.form.classType = row.class_type;
|
|
|
- this.form.courseType = row.course_type;
|
|
|
- this.form.pkNum = row.pk_num;
|
|
|
+ },
|
|
|
+ // 获取教练选项
|
|
|
+ getCoachOption() {
|
|
|
+ let that = this;
|
|
|
+ let paraRequest = new ManageableSimpleQueryRequest();
|
|
|
+ paraRequest.setShopid(localStorage.shopId);
|
|
|
+ paraRequest.setRoleid(0);
|
|
|
+ that.client.manageableSimpleQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
|
|
|
+ if (err == null) {
|
|
|
+ console.log(StandardReply);
|
|
|
+ let res = JSON.parse(StandardReply);
|
|
|
+ that.form.coachData = turnResToOptionByCoach(res);
|
|
|
+ } else {
|
|
|
+ let res = err;
|
|
|
+ that.form.coachData = [];
|
|
|
+ that.$message.error(res.message + ',错误代码:' + res.code);
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取区域列表
|
|
|
+ getQueryShopVenue() {
|
|
|
+ let that = this;
|
|
|
+ const jsonStr = {
|
|
|
+ shopId: localStorage.shopId
|
|
|
+ };
|
|
|
+ let paraRequest = new StandardRequest();
|
|
|
+ paraRequest.setShopid(localStorage.shopId);
|
|
|
+ paraRequest.setJsonstr(JSON.stringify(jsonStr));
|
|
|
+ paraRequest.setSign(getSignStr(jsonStr));
|
|
|
+ console.log(paraRequest);
|
|
|
+ that.client.shopVenueQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
|
|
|
+ if (err == null) {
|
|
|
+ console.log(StandardReply.getJsonrst());
|
|
|
+ let res = JSON.parse(StandardReply);
|
|
|
+ if (res.code === 0) {
|
|
|
+ if (res.rs) {
|
|
|
+ that.form.svList = turnResToOptionByShopRegion(res.rs);
|
|
|
+ } else {
|
|
|
+ that.regionList = [];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.memo + ',错误代码:' + res.code);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let res = err;
|
|
|
+ that.$message.error(res.message + ',错误代码:' + res.code);
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 获取select的label
|
|
|
+ changeLocationValue() {
|
|
|
+ let that = this;
|
|
|
+
|
|
|
+ const jsonStr = {
|
|
|
+ UUSvId: that.form.svId,
|
|
|
+ UUStdId: that.form.stdId,
|
|
|
+ shopId: localStorage.shopId,
|
|
|
+ eqType: 1
|
|
|
+ };
|
|
|
+
|
|
|
+ let paraRequest = new StandardRequest();
|
|
|
+ paraRequest.setShopid(localStorage.shopId);
|
|
|
+ paraRequest.setJsonstr(JSON.stringify(jsonStr));
|
|
|
+ paraRequest.setSign(getSignStr(jsonStr));
|
|
|
+ console.log(paraRequest);
|
|
|
+ that.client.eqSimpleQuery(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
|
|
|
+ if (err == null) {
|
|
|
+ console.log(StandardReply.getJsonrst());
|
|
|
+ let res = JSON.parse(StandardReply);
|
|
|
+ if (res.code === 0) {
|
|
|
+ if (res.rs) {
|
|
|
+ that.form.equipList = turnResToOptionByRegionDev(res.rs);
|
|
|
+ } else {
|
|
|
+ that.form.equipList = [];
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.memo + ',错误代码:' + res.code);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let res = err;
|
|
|
+ that.$message.error(res.message + ',错误代码:' + res.code);
|
|
|
+ console.log(res);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
// 准备上课
|
|
|
- getClassStartPrepare() {
|
|
|
+ classStatOn() {
|
|
|
let that = this;
|
|
|
+ if (!that.form.courseType) {
|
|
|
+ that.$message.error('课程类型不能为空');
|
|
|
+ return false
|
|
|
+ }
|
|
|
if (!that.form.svId) {
|
|
|
that.$message.error('上课区域不能为空');
|
|
|
return false
|
|
|
}
|
|
|
+ if (!that.form.classType) {
|
|
|
+ that.$message.error('上课方式不能为空');
|
|
|
+ return false
|
|
|
+ }
|
|
|
that.PrepareBtnStatus = true;
|
|
|
- // 不是竞技pk的时候为0
|
|
|
- let uppkNum = that.form.classType == 2 ? that.form.pkNum : 0;
|
|
|
- let tid = that.coachValue.toString();
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- stdId: that.form.StdId,
|
|
|
- svId: that.form.svId,
|
|
|
- svName: that.form.svName,
|
|
|
- classType: that.form.classType,
|
|
|
- pkNum: uppkNum,
|
|
|
- tid: tid,//教练id
|
|
|
- };
|
|
|
that.searchBtnStatus = true;
|
|
|
let totalTime = 2;
|
|
|
- let clock = window.setInterval(() => {
|
|
|
+ window.setInterval(() => {
|
|
|
totalTime--;
|
|
|
if (totalTime < 0) {
|
|
|
totalTime = 2;
|
|
|
that.searchBtnStatus = false;
|
|
|
}
|
|
|
}, 1000);
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- ClassStartPrepare(postdata).then(res => {
|
|
|
+ const jsonStr = {
|
|
|
+ shopId: localStorage.shopId,
|
|
|
+ UUStdId: that.form.stdId,
|
|
|
+ tid: that.form.coachValue,
|
|
|
+ isHr: that.form.IsHr ? 1 : 0,
|
|
|
+ courseType: that.form.courseType,
|
|
|
+ hrClassType: that.form.classType,
|
|
|
+ hrPkNum: that.form.pkNum,
|
|
|
+ hrUUSvId: that.form.svId,
|
|
|
+ hrUUeqIdList: that.form.equipShow,
|
|
|
+ isScore: that.form.IsScore ? 1 : 0,
|
|
|
+ };
|
|
|
+
|
|
|
+ let paraRequest = new StandardRequest();
|
|
|
+ paraRequest.setShopid(localStorage.shopId);
|
|
|
+ paraRequest.setJsonstr(JSON.stringify(jsonStr));
|
|
|
+ paraRequest.setSign(getSignStr(jsonStr));
|
|
|
+ console.log(paraRequest);
|
|
|
+ that.client.classStartPrepare(paraRequest, {"Token": localStorage.token}, (err, StandardReply) => {
|
|
|
that.PrepareBtnStatus = false;
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- this.$router.push({
|
|
|
- path: '/classEdit',
|
|
|
- query: {
|
|
|
- StdId: that.form.StdId,
|
|
|
- ClassName: that.form.ClassName,
|
|
|
- BeginStr: that.form.BeginStr,
|
|
|
- EndStr: that.form.EndStr,
|
|
|
- FinishClass: 3,
|
|
|
- ClassType: that.form.classType,
|
|
|
- PkNum: uppkNum,
|
|
|
- }
|
|
|
- });
|
|
|
- that.dialogClassPrepareVisible = false;
|
|
|
- this.getTableQuery();
|
|
|
+ if (err == null) {
|
|
|
|
|
|
+ console.log(StandardReply.getJsonrst());
|
|
|
+ let res = JSON.parse(StandardReply);
|
|
|
+ if (res.code === 0) {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/classEdit',
|
|
|
+ query: {
|
|
|
+ StdId: that.form.stdId,
|
|
|
+ ClassName: that.form.ClassName,
|
|
|
+ BeginStr: that.form.BeginStr,
|
|
|
+ EndStr: that.form.EndStr,
|
|
|
+ ClassType: that.form.courseType,
|
|
|
+ PkNum: that.form.pkNum,
|
|
|
+ FinishClass: 3
|
|
|
+ }
|
|
|
+ });
|
|
|
+ that.dialogClassPrepareVisible = false;
|
|
|
+ this.getTableQuery();
|
|
|
+ } else {
|
|
|
+ that.$message.error(res.memo + ',错误代码:' + res.code);
|
|
|
+ }
|
|
|
} else {
|
|
|
- that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
+ let res = err;
|
|
|
+ that.$message.error(res.message + ',错误代码:' + res.code);
|
|
|
+ console.log(res);
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 更改上课区域
|
|
|
+ classEdit(row) {
|
|
|
+ this.dialogClassPrepareVisible = true;
|
|
|
+ this.form.btnType = 1;//0新建,1编辑
|
|
|
+ // 读取本行信息
|
|
|
+ this.className = row.class_name + ' ' + row.begin_str + ' - ' + row.end_str;
|
|
|
+ this.form.stdId = row.std_id;
|
|
|
+ this.getQueryShopVenue();
|
|
|
+ this.form.svId = row.sv_id;
|
|
|
+ this.form.classType = row.class_type;
|
|
|
+ this.form.courseType = row.course_type;
|
|
|
+ this.form.pkNum = row.pk_num;
|
|
|
},
|
|
|
- // 编辑
|
|
|
- getClassStartPrepareForEdit() {
|
|
|
+ //上课编辑
|
|
|
+ classOnEdit() {
|
|
|
let that = this;
|
|
|
if (!that.form.svId) {
|
|
|
that.$message.error('上课区域不能为空');
|
|
|
@@ -364,7 +487,7 @@ export default {
|
|
|
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- stdId: that.form.StdId,
|
|
|
+ stdId: that.form.stdId,
|
|
|
svId: that.form.svId,
|
|
|
svName: that.form.svName,
|
|
|
classType: that.form.classType,
|
|
|
@@ -382,6 +505,8 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+
|
|
|
+ //查看课程详情
|
|
|
classDetail(row) {
|
|
|
this.$router.push({
|
|
|
path: '/classInfoDetail', query: {
|
|
|
@@ -392,6 +517,7 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ //查看课程管理
|
|
|
classManage(row) {
|
|
|
this.$router.push({
|
|
|
path: '/classEdit', query: {
|
|
|
@@ -405,165 +531,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 关课
|
|
|
- closeLesson(row) {
|
|
|
- that.$message.error('功能未上线,请耐心等候');
|
|
|
- return false;
|
|
|
- let that = this;
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- hrId: row.HrId,
|
|
|
- status: 9,//
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- this.$confirm('此操作将永久关闭当前课程, 是否继续?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(() => {
|
|
|
- HrSensorsStatusEdit(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '选中的课程已关闭!',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- // 重载列表
|
|
|
- that.getTableQuery();
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
- }
|
|
|
- });
|
|
|
- }).catch(() => {
|
|
|
- this.$message({
|
|
|
- type: 'info',
|
|
|
- message: '已取消关课'
|
|
|
- });
|
|
|
- });
|
|
|
- },
|
|
|
- // 获取select的label
|
|
|
- changeLocationValue(val) {
|
|
|
- //locations是v-for里面的也是datas里面的值
|
|
|
- let obj = {};
|
|
|
- obj = this.form.svList.find((item) => {
|
|
|
- return item.SvId === val;
|
|
|
- });
|
|
|
- this.form.svName = obj.Name;
|
|
|
- },
|
|
|
- // 获取区域列表
|
|
|
- getQueryShopVenue() {
|
|
|
- let that = this;
|
|
|
- let param = {
|
|
|
- key: localStorage.ServiceKey,
|
|
|
- shopId: localStorage.ServiceId,
|
|
|
- };
|
|
|
- if (!localStorage.ServiceKey) {
|
|
|
- that.$message.error('还未与心率系统对接,请联系管理员');
|
|
|
- return false
|
|
|
- }
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- QueryShopVenue(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- that.form.svList = json.Rs;
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- vipSelect(stdId) {
|
|
|
- let that = this;
|
|
|
- // 筛选相同的stdid的classId
|
|
|
- that.form.stdList.map(function (item) {
|
|
|
- if (item.value == stdId) {
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- // classId: item.classId
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- // VipUserListQuery
|
|
|
- VipUserSimpleQuery(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- that.form.userId = '';
|
|
|
- that.form.userList = turnResToOptionBySimViper(json.Rs);
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- //上课按钮弹出框
|
|
|
- showDialogClassOn(row) {
|
|
|
- this.dialogClassPrepareVisible = true;
|
|
|
- this.form.btnType = 0;//0新建,1编辑编辑
|
|
|
- // clear
|
|
|
- this.form.svList = "";
|
|
|
- this.form.StdId = row.std_id;
|
|
|
- this.form.ClassName = row.class_name;
|
|
|
- this.form.BeginStr = row.begin_str;
|
|
|
- this.form.EndStr = row.end_str;
|
|
|
- this.form.FinishClass = row.finish_class;
|
|
|
- this.form.ClassType = row.class_type;
|
|
|
- this.form.courseType = row.course_type;
|
|
|
- this.form.PkNum = row.pk_num;
|
|
|
- this.className = row.class_name + ' ' + row.begin_str + ' - ' + row.end_str;
|
|
|
- this.form.StdId = row.std_id;
|
|
|
- this.getCoachOption();
|
|
|
- this.getQueryShopVenue();
|
|
|
- },
|
|
|
- // 获取教练选项
|
|
|
- getCoachOption() {
|
|
|
- let that = this;
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- name: this.panel.name,//
|
|
|
- phone: this.panel.phone,//
|
|
|
- shopId: localStorage.ShopId,//
|
|
|
- adminType: 4,//
|
|
|
- start: 1,//
|
|
|
- tableMax: 299,//
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- ShopManagerListQuery(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- that.form.coachData = turnResToOptionByUsers(json.Rs);
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- // 检测当前课是否处于可改变状态
|
|
|
- // 固定下当前已预约人数列表
|
|
|
- checkClassOverPrepare(row) {
|
|
|
- let that = this;
|
|
|
- let param = {
|
|
|
- token: localStorage.token,
|
|
|
- stdId: row.std_id,
|
|
|
- };
|
|
|
- let postdata = qs.stringify(param);
|
|
|
- ClassOverPrepare(postdata).then(res => {
|
|
|
- let json = res;
|
|
|
- if (json.Code == 0) {
|
|
|
- that.goFinish(row);
|
|
|
- } else {
|
|
|
- that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
- goFinish(row) {
|
|
|
- this.$router.push({
|
|
|
- path: '/classFinishDetail', query: {
|
|
|
- id: row.std_id,
|
|
|
- classId: row.ClassId,
|
|
|
- ClassName: row.class_name,
|
|
|
- BeginTime: row.begin_time,
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
@@ -635,7 +602,6 @@ export default {
|
|
|
// 分页属性
|
|
|
let that = this;
|
|
|
that.pagination.total = that.recordsTotal;
|
|
|
-
|
|
|
// 默认分页
|
|
|
that.tableData = that.allTableData.filter((item, index) => {
|
|
|
return index < that.pagination.pageItem;
|
|
|
@@ -659,7 +625,7 @@ export default {
|
|
|
let nums = that.pagination.pageItem * pageIndex;
|
|
|
// 容器
|
|
|
let tables = [];
|
|
|
- for (var i = index; i < nums; i++) {
|
|
|
+ for (let i = index; i < nums; i++) {
|
|
|
if (that.allTableData[i]) {
|
|
|
tables.push(that.allTableData[i])
|
|
|
}
|
|
|
@@ -670,7 +636,6 @@ export default {
|
|
|
},
|
|
|
// 过滤时间
|
|
|
filterFmtDate(value, row, column) {
|
|
|
- let that = this;
|
|
|
return nonTfmtDate(column, 11);
|
|
|
},
|
|
|
},
|