|
@@ -33,7 +33,7 @@
|
|
|
<el-button @click="confirmBegin" type="primary" :disabled="BeginState" :loading="BeginState"
|
|
<el-button @click="confirmBegin" type="primary" :disabled="BeginState" :loading="BeginState"
|
|
|
v-if="FinishClass == 3">确认上课
|
|
v-if="FinishClass == 3">确认上课
|
|
|
</el-button>
|
|
</el-button>
|
|
|
- <el-button @click="confirmClose" type="danger" :disabled="!BeginState" >关闭课程</el-button>
|
|
|
|
|
|
|
+ <el-button @click="confirmClose" type="danger" :disabled="!BeginState">关闭课程</el-button>
|
|
|
<el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
|
|
<el-button @click="addFinish" type="primary" v-if="FinishClass == 2">确认下课</el-button>
|
|
|
<el-button @click="addFinishMember">添加上课会员</el-button>
|
|
<el-button @click="addFinishMember">添加上课会员</el-button>
|
|
|
<el-button @click="addTempMember" type="warning">添加临时会员</el-button>
|
|
<el-button @click="addTempMember" type="warning">添加临时会员</el-button>
|
|
@@ -128,17 +128,17 @@
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<!--正式会员-->
|
|
<!--正式会员-->
|
|
|
<div v-if="scope.row.IsTmpUser != 1">
|
|
<div v-if="scope.row.IsTmpUser != 1">
|
|
|
- <el-select v-model="scope.row.group_no"
|
|
|
|
|
- filterable
|
|
|
|
|
- :disabled="FinishClass == 2 && scope.row.DpId != 0"
|
|
|
|
|
- placeholder="请选团队">
|
|
|
|
|
- <el-option
|
|
|
|
|
- v-for="item in panel.groupList"
|
|
|
|
|
- :key="item.value"
|
|
|
|
|
- :label="item.label"
|
|
|
|
|
- :value="item.value">
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
|
|
+ <el-select v-model="scope.row.group_no"
|
|
|
|
|
+ filterable
|
|
|
|
|
+ :disabled="FinishClass == 2 && scope.row.DpId != 0"
|
|
|
|
|
+ placeholder="请选团队">
|
|
|
|
|
+ <el-option
|
|
|
|
|
+ v-for="item in panel.groupList"
|
|
|
|
|
+ :key="item.value"
|
|
|
|
|
+ :label="item.label"
|
|
|
|
|
+ :value="item.value">
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="scope.row.IsTmpUser == 1">
|
|
<div v-if="scope.row.IsTmpUser == 1">
|
|
|
<el-select v-model="scope.row.group_no"
|
|
<el-select v-model="scope.row.group_no"
|
|
@@ -165,6 +165,7 @@
|
|
|
<el-select v-model="scope.row.BindId"
|
|
<el-select v-model="scope.row.BindId"
|
|
|
@change="bindSensorToUser(scope.row)"
|
|
@change="bindSensorToUser(scope.row)"
|
|
|
@focus="getSelectHrSensors(scope.row)"
|
|
@focus="getSelectHrSensors(scope.row)"
|
|
|
|
|
+ :disabled="scope.row.isOnline == 1"
|
|
|
filterable
|
|
filterable
|
|
|
v-if="!scope.row.BindId" placeholder="请选心率带">
|
|
v-if="!scope.row.BindId" placeholder="请选心率带">
|
|
|
<el-option
|
|
<el-option
|
|
@@ -173,16 +174,18 @@
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
:value="item.HrId">
|
|
:value="item.HrId">
|
|
|
<!--私有的-->
|
|
<!--私有的-->
|
|
|
- <span v-if="item.HrType == 1" style="background: #409eff;color: #fff">
|
|
|
|
|
|
|
+ <span v-if="item.HrType == 1" style="background: #409eff;color: #fff">
|
|
|
{{ item.label }}
|
|
{{ item.label }}
|
|
|
</span>
|
|
</span>
|
|
|
<!--共有的-->
|
|
<!--共有的-->
|
|
|
- <span v-else>
|
|
|
|
|
|
|
+ <span v-else>
|
|
|
{{ item.label }}
|
|
{{ item.label }}
|
|
|
</span>
|
|
</span>
|
|
|
</el-option>
|
|
</el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
- <el-button @click="takeBack(scope.row)" :type="scope.row.IsPrivate == 1 ?'primary':'danger'" v-if="scope.row.BindId"
|
|
|
|
|
|
|
+ <el-button @click="takeBack(scope.row)" :type="scope.row.IsPrivate == 1 ?'primary':'danger'"
|
|
|
|
|
+ v-if="scope.row.BindId"
|
|
|
|
|
+ :disabled="scope.row.isOnline == 1"
|
|
|
icon="el-icon-cpu">
|
|
icon="el-icon-cpu">
|
|
|
{{ scope.row.Sn }} {{scope.row.IsPrivate == 1 ? '私有':''}}
|
|
{{ scope.row.Sn }} {{scope.row.IsPrivate == 1 ? '私有':''}}
|
|
|
设备收回
|
|
设备收回
|
|
@@ -211,6 +214,17 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
+ <el-table-column
|
|
|
|
|
+ prop="isOnline"
|
|
|
|
|
+ label="是否网课"
|
|
|
|
|
+ width="120"
|
|
|
|
|
+ sortable
|
|
|
|
|
+ >
|
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
|
+ <el-checkbox label="网课" v-model="scope.row.isOnline" name="type"
|
|
|
|
|
+ @change="showOrDiss(scope.row)"></el-checkbox>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
prop="Status"
|
|
prop="Status"
|
|
|
label="状态"
|
|
label="状态"
|
|
@@ -322,7 +336,8 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="dialogFooter">
|
|
<div class="dialogFooter">
|
|
|
- <el-button type="primary" size="small" :disabled="BtnAcrossConfirmMember" :loading="BtnAcrossConfirmMember"
|
|
|
|
|
|
|
+ <el-button type="primary" size="small" :disabled="BtnAcrossConfirmMember"
|
|
|
|
|
+ :loading="BtnAcrossConfirmMember"
|
|
|
@click="AcrossConfirmMember">确定
|
|
@click="AcrossConfirmMember">确定
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button size="small" @click="dialogAcrossVisible = false">取消</el-button>
|
|
<el-button size="small" @click="dialogAcrossVisible = false">取消</el-button>
|
|
@@ -357,24 +372,24 @@
|
|
|
|
|
|
|
|
import Global from '../Global.js'
|
|
import Global from '../Global.js'
|
|
|
import {
|
|
import {
|
|
|
- ClassDetailQuery,
|
|
|
|
|
- ClassOverDetailListQuery,
|
|
|
|
|
- VipUserSimpleQuery,
|
|
|
|
|
- ClassOverDetailAdd,
|
|
|
|
|
- ClassDetailAndSnAdd,
|
|
|
|
|
- ClassOverDetailStatusEdit,
|
|
|
|
|
- ClassOverDetailDel,
|
|
|
|
|
- SelectHrSensors,
|
|
|
|
|
- BindHrSensorsToUser,
|
|
|
|
|
- UnBindHrSensorsToUser,
|
|
|
|
|
- ClassStartConfirm,
|
|
|
|
|
- ShopManagerListQuery,
|
|
|
|
|
- ClassOverConfirm,
|
|
|
|
|
- TmpUserQuery,
|
|
|
|
|
- ClassOverTmpDetailAdd,
|
|
|
|
|
- ClassTmpUserOverDetailDel,
|
|
|
|
|
- BindHrSensorsToTempUser,
|
|
|
|
|
- AcrossUserSimpleQuery, ClassGiveUpConfirm,
|
|
|
|
|
|
|
+ ClassDetailQuery,
|
|
|
|
|
+ ClassOverDetailListQuery,
|
|
|
|
|
+ VipUserSimpleQuery,
|
|
|
|
|
+ ClassOverDetailAdd,
|
|
|
|
|
+ ClassDetailAndSnAdd,
|
|
|
|
|
+ ClassOverDetailStatusEdit,
|
|
|
|
|
+ ClassOverDetailDel,
|
|
|
|
|
+ SelectHrSensors,
|
|
|
|
|
+ BindHrSensorsToUser,
|
|
|
|
|
+ UnBindHrSensorsToUser,
|
|
|
|
|
+ ClassStartConfirm,
|
|
|
|
|
+ ShopManagerListQuery,
|
|
|
|
|
+ ClassOverConfirm,
|
|
|
|
|
+ TmpUserQuery,
|
|
|
|
|
+ ClassOverTmpDetailAdd,
|
|
|
|
|
+ ClassTmpUserOverDetailDel,
|
|
|
|
|
+ BindHrSensorsToTempUser,
|
|
|
|
|
+ AcrossUserSimpleQuery, ClassGiveUpConfirm,
|
|
|
} from "../api/getApiRes";
|
|
} from "../api/getApiRes";
|
|
|
|
|
|
|
|
let qs = require('qs');
|
|
let qs = require('qs');
|
|
@@ -499,6 +514,15 @@
|
|
|
this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
|
|
this.title = this.$route.query.ClassName + ' ' + this.$route.query.BeginStr + '-' + this.$route.query.EndStr;
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 禁用或启用绑定心率带
|
|
|
|
|
+ showOrDiss(row) {
|
|
|
|
|
+ console.log(row);
|
|
|
|
|
+ // if (row.isOnline == 1) {
|
|
|
|
|
+ // row.isOnline = 0
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // row.isOnline = 1
|
|
|
|
|
+ // }
|
|
|
|
|
+ },
|
|
|
// 请选心率带
|
|
// 请选心率带
|
|
|
bindSensorToUser(row) {
|
|
bindSensorToUser(row) {
|
|
|
let that = this;
|
|
let that = this;
|
|
@@ -619,11 +643,11 @@
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- takeTempBack(row){
|
|
|
|
|
- let that = this;
|
|
|
|
|
- if(this.FinishClass == 2){
|
|
|
|
|
|
|
+ takeTempBack(row) {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ if (this.FinishClass == 2) {
|
|
|
that.$message.error('请删除临时会员后重新添加');
|
|
that.$message.error('请删除临时会员后重新添加');
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
that.$message.error('临时会员无法替换心率带');
|
|
that.$message.error('临时会员无法替换心率带');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -740,7 +764,8 @@
|
|
|
let that = this;
|
|
let that = this;
|
|
|
// 没绑心率带不能开课,预约未到的不管他
|
|
// 没绑心率带不能开课,预约未到的不管他
|
|
|
for (var i = 0; i < this.tableData.length; i++) {
|
|
for (var i = 0; i < this.tableData.length; i++) {
|
|
|
- if (this.tableData[i].Sn == 0 && this.tableData[i].Status != 2) {
|
|
|
|
|
|
|
+ console.log(this.tableData[i].isOnline);
|
|
|
|
|
+ if (this.tableData[i].Sn == 0 && this.tableData[i].Status != 2 && this.tableData[i].isOnline != 1) {
|
|
|
that.$message.error("会员" + this.tableData[i].Name + '没绑心率带,不能开课');
|
|
that.$message.error("会员" + this.tableData[i].Name + '没绑心率带,不能开课');
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
@@ -787,6 +812,7 @@
|
|
|
birthday: row.Birthday,
|
|
birthday: row.Birthday,
|
|
|
is_tmp_user: row.IsTmpUser,
|
|
is_tmp_user: row.IsTmpUser,
|
|
|
is_private: row.IsPrivate,
|
|
is_private: row.IsPrivate,
|
|
|
|
|
+ isOnline: row.isOnline,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 确认上课
|
|
// 确认上课
|
|
@@ -824,53 +850,53 @@
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- //关闭课程
|
|
|
|
|
- confirmClose(){
|
|
|
|
|
- this.$confirm('您确认要关闭课程?', '提示', {
|
|
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- this.getConfirmClassClose()
|
|
|
|
|
- }).catch(() => {
|
|
|
|
|
- this.$message({
|
|
|
|
|
- type: 'info',
|
|
|
|
|
- message: '已取消'
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
- //确认执行关闭课程
|
|
|
|
|
- getConfirmClassClose(){
|
|
|
|
|
- let that = this;
|
|
|
|
|
- let param = {
|
|
|
|
|
- token: localStorage.token,
|
|
|
|
|
- stdId: this.$route.query.StdId,
|
|
|
|
|
- };
|
|
|
|
|
- let postdata = qs.stringify(param);
|
|
|
|
|
- ClassGiveUpConfirm(postdata).then(res => {
|
|
|
|
|
- let json = res;
|
|
|
|
|
- if (json.Code == 0) {
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '课程关闭成功!',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- // 返回课程管理
|
|
|
|
|
- that.$router.push({
|
|
|
|
|
- path: '/courses', query: {}
|
|
|
|
|
|
|
+ //关闭课程
|
|
|
|
|
+ confirmClose() {
|
|
|
|
|
+ this.$confirm('您确认要关闭课程?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ this.getConfirmClassClose()
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+ this.$message({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: '已取消'
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
+ },
|
|
|
|
|
+ //确认执行关闭课程
|
|
|
|
|
+ getConfirmClassClose() {
|
|
|
|
|
+ let that = this;
|
|
|
|
|
+ let param = {
|
|
|
|
|
+ token: localStorage.token,
|
|
|
|
|
+ stdId: this.$route.query.StdId,
|
|
|
|
|
+ };
|
|
|
|
|
+ let postdata = qs.stringify(param);
|
|
|
|
|
+ ClassGiveUpConfirm(postdata).then(res => {
|
|
|
|
|
+ let json = res;
|
|
|
|
|
+ if (json.Code == 0) {
|
|
|
|
|
+ that.$message({
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: '课程关闭成功!',
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ });
|
|
|
|
|
+ // 返回课程管理
|
|
|
|
|
+ that.$router.push({
|
|
|
|
|
+ path: '/courses', query: {}
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
- } else {
|
|
|
|
|
- that.$message({
|
|
|
|
|
- showClose: true,
|
|
|
|
|
- message: '课程关闭失败',
|
|
|
|
|
- type: 'success'
|
|
|
|
|
- });
|
|
|
|
|
- that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ that.$message({
|
|
|
|
|
+ showClose: true,
|
|
|
|
|
+ message: '课程关闭失败',
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ });
|
|
|
|
|
+ that.$message.error(json.Memo + ' 错误码:' + json.Code);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ },
|
|
|
// 添加下课会员
|
|
// 添加下课会员
|
|
|
addFinishMember() {
|
|
addFinishMember() {
|
|
|
let that = this;
|
|
let that = this;
|
|
@@ -882,7 +908,7 @@
|
|
|
let std = [];
|
|
let std = [];
|
|
|
if (this.tableData) {
|
|
if (this.tableData) {
|
|
|
this.tableData.map(function (item) {
|
|
this.tableData.map(function (item) {
|
|
|
- if(item.IsTmpUser != 1){
|
|
|
|
|
|
|
+ if (item.IsTmpUser != 1) {
|
|
|
std.push(item.UserId)
|
|
std.push(item.UserId)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -936,7 +962,7 @@
|
|
|
let std = [];
|
|
let std = [];
|
|
|
if (this.tableData) {
|
|
if (this.tableData) {
|
|
|
this.tableData.map(function (item) {
|
|
this.tableData.map(function (item) {
|
|
|
- if(item.IsTmpUser == 1){
|
|
|
|
|
|
|
+ if (item.IsTmpUser == 1) {
|
|
|
std.push(item.UserId)
|
|
std.push(item.UserId)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -953,7 +979,7 @@
|
|
|
let std = [];
|
|
let std = [];
|
|
|
if (this.tableData) {
|
|
if (this.tableData) {
|
|
|
this.tableData.map(function (item) {
|
|
this.tableData.map(function (item) {
|
|
|
- std.push(item.UserId)
|
|
|
|
|
|
|
+ std.push(item.UserId)
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
that.dialogAcrossValue = std;
|
|
that.dialogAcrossValue = std;
|