|
|
@@ -59,12 +59,14 @@
|
|
|
:default-sort="{prop: 'date', order: 'descending'}"
|
|
|
element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
class=""
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
+ @selection-change="handleSelectionChange" @current-change="clickChange"
|
|
|
+>
|
|
|
>
|
|
|
- <el-table-column
|
|
|
- type="selection"
|
|
|
- width="55">
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column label="选择" width="55">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-radio v-model="tableRadio" :label="scope.row"><i></i></el-radio>
|
|
|
+ </template>
|
|
|
+</el-table-column>
|
|
|
<el-table-column
|
|
|
type="index"
|
|
|
label="序号"
|
|
|
@@ -361,7 +363,8 @@
|
|
|
dialogValue: [],//穿梭已选
|
|
|
},
|
|
|
memberTypes: vipOptions(1),
|
|
|
- tableData: []
|
|
|
+ tableData: [],
|
|
|
+ tableRadio: []
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -371,6 +374,9 @@
|
|
|
this.getTableQuery();
|
|
|
},
|
|
|
methods: {
|
|
|
+ clickChange (item) {
|
|
|
+ this.tableRadio = item
|
|
|
+ },
|
|
|
// 编辑
|
|
|
editMember(row) {
|
|
|
let that = this;
|
|
|
@@ -464,29 +470,15 @@
|
|
|
this.dialogExpTime = false;
|
|
|
this.dialogLessonTable = false;
|
|
|
},
|
|
|
- // 用户禁用 todo
|
|
|
- // 用户启用 todo
|
|
|
// 有效期调整
|
|
|
ExpTimeChange() {
|
|
|
// 仅针对年费用户,使用日期格式
|
|
|
this.allDialogClose();
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
+ if(this.tableRadio.length == 0){
|
|
|
+ this.$message.error("请先选中一条记录");
|
|
|
return false
|
|
|
}
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- let row = this.multipleSelection[0];
|
|
|
+ let row = this.tableRadio;
|
|
|
if (parseInt(row.UserInfo.VipType) == 2) {
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
@@ -504,23 +496,11 @@
|
|
|
// 课时调整
|
|
|
lessonChange() {
|
|
|
this.allDialogClose();
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
+ if(this.tableRadio.length == 0){
|
|
|
+ this.$message.error("请先选中一条记录");
|
|
|
return false
|
|
|
}
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- let row = this.multipleSelection[0];
|
|
|
+ let row = this.tableRadio;
|
|
|
this.form.normalhour = row.UserInfo.RemainNormalhour;
|
|
|
this.form.newnormalhour = 0;
|
|
|
this.form.rowName = row.UserInfo.Name;
|
|
|
@@ -532,23 +512,11 @@
|
|
|
// 赠送调整
|
|
|
giftChange() {
|
|
|
this.allDialogClose();
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
+ if(this.tableRadio.length == 0){
|
|
|
+ this.$message.error("请先选中一条记录");
|
|
|
return false
|
|
|
}
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- let row = this.multipleSelection[0];
|
|
|
+ let row = this.tableRadio;
|
|
|
this.form.gifthour = row.UserInfo.RemainGifthour;
|
|
|
this.form.newgifthour = 0;
|
|
|
this.form.rowName = row.UserInfo.Name;
|
|
|
@@ -563,23 +531,11 @@
|
|
|
this.allDialogClose();
|
|
|
// 重载课程列表选项
|
|
|
this.panelSelect();
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
+ if(this.tableRadio.length == 0){
|
|
|
+ that.$message.error("请先选中一条记录");
|
|
|
return false
|
|
|
}
|
|
|
- let row = this.multipleSelection[0];
|
|
|
+ let row = this.tableRadio;
|
|
|
this.form.rowName = row.UserInfo.Name;
|
|
|
this.form.userId = row.UserInfo.Id;
|
|
|
if (row.ClassInfo) {
|
|
|
@@ -847,25 +803,11 @@
|
|
|
// 删除
|
|
|
delList() {
|
|
|
let that = this;
|
|
|
- // checkNum
|
|
|
- if (!this.multipleSelection.length) {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
+ if(this.tableRadio.length == 0){
|
|
|
+ that.$message.error("请先选中一条记录");
|
|
|
return false
|
|
|
}
|
|
|
- if (this.multipleSelection.length != 1) {
|
|
|
- that.$message({
|
|
|
- showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- return false
|
|
|
- }
|
|
|
-
|
|
|
- let detectorid = that.multipleSelection[0].UserInfo.Id;
|
|
|
+ let detectorid = this.tableRadio.UserInfo.Id;
|
|
|
|
|
|
let param = {
|
|
|
token: localStorage.token,
|