|
|
@@ -50,6 +50,7 @@
|
|
|
class=""
|
|
|
:row-class-name="tableRowClassName"
|
|
|
@selection-change="handleSelectionChange"
|
|
|
+ ref="multipleTable"
|
|
|
>
|
|
|
>
|
|
|
<el-table-column
|
|
|
@@ -166,7 +167,7 @@
|
|
|
<el-select v-model="scope.row.BindId"
|
|
|
@change="bindSensorToUser(scope.row)"
|
|
|
@focus="getSelectHrSensors(scope.row)"
|
|
|
- :disabled="scope.row.isOnline == 1"
|
|
|
+ :disabled="scope.row.IsOnline == 1"
|
|
|
filterable
|
|
|
v-if="!scope.row.BindId" placeholder="请选心率带">
|
|
|
<el-option
|
|
|
@@ -186,7 +187,7 @@
|
|
|
</el-select>
|
|
|
<el-button @click="takeBack(scope.row)" :type="scope.row.IsPrivate == 1 ?'primary':'danger'"
|
|
|
v-if="scope.row.BindId"
|
|
|
- :disabled="scope.row.isOnline == 1"
|
|
|
+ :disabled="scope.row.IsOnline == 1"
|
|
|
icon="el-icon-cpu">
|
|
|
{{ scope.row.Sn }} {{scope.row.IsPrivate == 1 ? '私有':''}}
|
|
|
设备收回
|
|
|
@@ -197,7 +198,7 @@
|
|
|
<el-select v-model="scope.row.BindId"
|
|
|
@change="bindSensorToTmepUser(scope.row)"
|
|
|
@focus="getSelectHrSensors(scope.row)"
|
|
|
- :disabled="scope.row.isOnline == 1"
|
|
|
+ :disabled="scope.row.IsOnline == 1"
|
|
|
filterable
|
|
|
v-if="!scope.row.Sn" placeholder="请选心率带">
|
|
|
<el-option
|
|
|
@@ -208,7 +209,7 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
<el-button @click="takeTempBack(scope.row)" type="danger" v-if="scope.row.Sn"
|
|
|
- :disabled="scope.row.isOnline == 1"
|
|
|
+ :disabled="scope.row.IsOnline == 1"
|
|
|
icon="el-icon-cpu">
|
|
|
{{ scope.row.Sn }}
|
|
|
临时设备收回
|
|
|
@@ -217,16 +218,20 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="isOnline"
|
|
|
+ prop="IsOnline"
|
|
|
label="是否网课"
|
|
|
- type="selection"
|
|
|
width="120"
|
|
|
sortable
|
|
|
>
|
|
|
- <!--<template slot-scope="scope">-->
|
|
|
- <!--<el-checkbox label="网课" v-model="scope.row.isOnline" name="type"-->
|
|
|
- <!--@change="showOrDiss(scope.row)"></el-checkbox>-->
|
|
|
- <!--</template>-->
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div v-if=" scope.row.HrSubmitFlag != 1">
|
|
|
+ <el-checkbox label="网课" v-model="scope.row.IsOnline" name="type"
|
|
|
+ @change="showOrDiss(scope.row)"></el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div v-if="scope.row.IsOnline == 1 && scope.row.HrSubmitFlag == 1">
|
|
|
+ 网课学员
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="Status"
|
|
|
@@ -527,10 +532,10 @@
|
|
|
handleSelectionChange(val) {
|
|
|
let row = '';
|
|
|
for (let t in this.tableData) {
|
|
|
- this.tableData[t].isOnline = 0;
|
|
|
+ this.tableData[t].IsOnline = 0;
|
|
|
}
|
|
|
for (let v in val) {
|
|
|
- val[v].isOnline = 1;
|
|
|
+ val[v].IsOnline = 1;
|
|
|
}
|
|
|
},
|
|
|
// 请选心率带
|
|
|
@@ -574,6 +579,18 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ toggleSelection(rows) {
|
|
|
+ // if(rows.IsOnline == 1){
|
|
|
+ // // 网课学生状态置入
|
|
|
+ //
|
|
|
+ // }
|
|
|
+ if (rows) {
|
|
|
+ rows.forEach(row => {
|
|
|
+ console.log(row);
|
|
|
+ this.$refs.multipleTable.toggleRowSelection(1);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
// 临时会员绑定心率带
|
|
|
bindSensorToTmepUser(row) {
|
|
|
let that = this;
|
|
|
@@ -774,8 +791,8 @@
|
|
|
let that = this;
|
|
|
// 没绑心率带不能开课,预约未到的不管他
|
|
|
for (var i = 0; i < this.tableData.length; i++) {
|
|
|
- console.log(this.tableData[i].isOnline);
|
|
|
- if (this.tableData[i].Sn == 0 && this.tableData[i].Status != 2 && this.tableData[i].isOnline != 1) {
|
|
|
+ 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 + '没绑心率带,不能开课');
|
|
|
return false
|
|
|
}
|
|
|
@@ -822,7 +839,7 @@
|
|
|
birthday: row.Birthday,
|
|
|
is_tmp_user: row.IsTmpUser,
|
|
|
is_private: row.IsPrivate,
|
|
|
- isOnline: row.isOnline,
|
|
|
+ IsOnline: row.IsOnline,
|
|
|
}
|
|
|
}
|
|
|
// 确认上课
|
|
|
@@ -1287,6 +1304,8 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
that.allTableData = json.Rs;
|
|
|
that.recordsTotal = json.Rs.length;
|
|
|
} else {
|
|
|
@@ -1404,7 +1423,8 @@
|
|
|
getClassDetailAndSnAdd(row) {
|
|
|
let begin_time = parseInt(new Date().valueOf() / 1000);
|
|
|
let duRs = [];
|
|
|
- if (!row.Sn && row.isOnline == 0) {
|
|
|
+ console.log(row);
|
|
|
+ if (!row.Sn && !row.IsOnline) {
|
|
|
this.$message.error(row.Name + '没有绑定心率带');
|
|
|
return false
|
|
|
}
|
|
|
@@ -1425,7 +1445,7 @@
|
|
|
birthday: row.Birthday,
|
|
|
is_tmp_user: row.IsTmpUser,
|
|
|
is_private: row.IsPrivate,
|
|
|
- isOnline: row.isOnline,
|
|
|
+ isOnline: row.IsOnline ? 1 : 0,
|
|
|
};
|
|
|
duRs = '{"Rs":' + JSON.stringify(duRs).toString() + '}';
|
|
|
let that = this;
|