|
@@ -4,15 +4,13 @@
|
|
v-permission="'vipGroupCategory/add'"
|
|
v-permission="'vipGroupCategory/add'"
|
|
@click="addGroupCategory"
|
|
@click="addGroupCategory"
|
|
type="primary"
|
|
type="primary"
|
|
-
|
|
|
|
style="margin-bottom: 20px"
|
|
style="margin-bottom: 20px"
|
|
- icon="el-icon-plus"
|
|
|
|
|
|
+ icon="el-icon-plus"
|
|
>新建</el-button
|
|
>新建</el-button
|
|
>
|
|
>
|
|
<el-table
|
|
<el-table
|
|
:data="leftList"
|
|
:data="leftList"
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
:header-cell-style="{ background: '#EDEEF0', color: '#444' }"
|
|
-
|
|
|
|
>
|
|
>
|
|
<el-table-column label="课程形式" prop="name"> </el-table-column>
|
|
<el-table-column label="课程形式" prop="name"> </el-table-column>
|
|
<el-table-column label="课程类型" prop="singleClassMinutes">
|
|
<el-table-column label="课程类型" prop="singleClassMinutes">
|
|
@@ -34,7 +32,6 @@
|
|
type="text"
|
|
type="text"
|
|
v-permission="'vipGroupCategory/update'"
|
|
v-permission="'vipGroupCategory/update'"
|
|
@click="resetGroupCategory(scope.row)"
|
|
@click="resetGroupCategory(scope.row)"
|
|
-
|
|
|
|
>修改</el-button
|
|
>修改</el-button
|
|
>
|
|
>
|
|
<el-popover
|
|
<el-popover
|
|
@@ -46,19 +43,15 @@
|
|
<p>您确定删除该课程形态吗?</p>
|
|
<p>您确定删除该课程形态吗?</p>
|
|
<div style="text-align: right; margin: 0">
|
|
<div style="text-align: right; margin: 0">
|
|
<el-button
|
|
<el-button
|
|
-
|
|
|
|
type="text"
|
|
type="text"
|
|
@click="scope._self.$refs[scope.row.id].doClose()"
|
|
@click="scope._self.$refs[scope.row.id].doClose()"
|
|
>取消</el-button
|
|
>取消</el-button
|
|
>
|
|
>
|
|
- <el-button
|
|
|
|
- type="primary"
|
|
|
|
-
|
|
|
|
- @click="removeGroupCategory(scope)"
|
|
|
|
|
|
+ <el-button type="primary" @click="removeGroupCategory(scope)"
|
|
>确定</el-button
|
|
>确定</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
- <el-button type="text" slot="reference" >删除</el-button>
|
|
|
|
|
|
+ <el-button type="text" slot="reference">删除</el-button>
|
|
</el-popover>
|
|
</el-popover>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -72,12 +65,12 @@
|
|
@close="onVipStatusClose('vipStatus')"
|
|
@close="onVipStatusClose('vipStatus')"
|
|
:visible.sync="vipStatus"
|
|
:visible.sync="vipStatus"
|
|
>
|
|
>
|
|
- <el-form :model="vipStatusFrom" ref="vipStatus" >
|
|
|
|
|
|
+ <el-form :model="vipStatusFrom" ref="vipStatus">
|
|
<el-form-item
|
|
<el-form-item
|
|
label="课程形式"
|
|
label="课程形式"
|
|
prop="name"
|
|
prop="name"
|
|
:rules="[
|
|
:rules="[
|
|
- { required: true, message: '请输入课程形式', trigger: 'blur' },
|
|
|
|
|
|
+ { required: true, message: '请输入课程形式', trigger: 'blur' }
|
|
]"
|
|
]"
|
|
:label-width="formLabelWidth"
|
|
:label-width="formLabelWidth"
|
|
>
|
|
>
|
|
@@ -89,15 +82,18 @@
|
|
<el-form-item
|
|
<el-form-item
|
|
label="课程类型"
|
|
label="课程类型"
|
|
:rules="[
|
|
:rules="[
|
|
- { required: true, message: '请输入课程形式', trigger: 'blur' },
|
|
|
|
|
|
+ { required: true, message: '请输入课程形式', trigger: 'blur' }
|
|
]"
|
|
]"
|
|
:label-width="formLabelWidth"
|
|
:label-width="formLabelWidth"
|
|
prop="musicTheory"
|
|
prop="musicTheory"
|
|
>
|
|
>
|
|
- <el-select v-model="vipStatusFrom.musicTheory" style="width:100%!important">
|
|
|
|
- <el-option label="VIP" :value="false"></el-option>
|
|
|
|
- <el-option label="乐理课" :value="true"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="vipStatusFrom.musicTheory"
|
|
|
|
+ style="width:100%!important"
|
|
|
|
+ >
|
|
|
|
+ <el-option label="VIP" :value="false"></el-option>
|
|
|
|
+ <el-option label="乐理课" :value="true"></el-option>
|
|
|
|
+ </el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item
|
|
<el-form-item
|
|
label="班级人数"
|
|
label="班级人数"
|
|
@@ -108,8 +104,8 @@
|
|
required: true,
|
|
required: true,
|
|
message: '班级人数最大6人',
|
|
message: '班级人数最大6人',
|
|
trigger: 'blur',
|
|
trigger: 'blur',
|
|
- pattern: /^[0-6]$/,
|
|
|
|
- }, //辜经理要求vip人数最大6人
|
|
|
|
|
|
+ pattern: /^[0-6]$/
|
|
|
|
+ } //辜经理要求vip人数最大6人
|
|
]"
|
|
]"
|
|
:label-width="formLabelWidth"
|
|
:label-width="formLabelWidth"
|
|
>
|
|
>
|
|
@@ -126,8 +122,8 @@
|
|
{
|
|
{
|
|
required: true,
|
|
required: true,
|
|
message: '请输入课程课时',
|
|
message: '请输入课程课时',
|
|
- trigger: 'blur, change',
|
|
|
|
- },
|
|
|
|
|
|
+ trigger: 'blur, change'
|
|
|
|
+ }
|
|
]"
|
|
]"
|
|
:label-width="formLabelWidth"
|
|
:label-width="formLabelWidth"
|
|
>
|
|
>
|
|
@@ -148,29 +144,26 @@
|
|
v-model.trim="inputValue"
|
|
v-model.trim="inputValue"
|
|
ref="saveTagInput"
|
|
ref="saveTagInput"
|
|
style="width: 100px"
|
|
style="width: 100px"
|
|
-
|
|
|
|
@keyup.enter.native="handleInputConfirm"
|
|
@keyup.enter.native="handleInputConfirm"
|
|
>
|
|
>
|
|
</el-input>
|
|
</el-input>
|
|
<el-button
|
|
<el-button
|
|
v-if="!inputVisible"
|
|
v-if="!inputVisible"
|
|
class="button-new-tag"
|
|
class="button-new-tag"
|
|
-
|
|
|
|
@click="showInput"
|
|
@click="showInput"
|
|
>+ 添加</el-button
|
|
>+ 添加</el-button
|
|
>
|
|
>
|
|
<el-button
|
|
<el-button
|
|
v-if="inputVisible"
|
|
v-if="inputVisible"
|
|
class="button-new-tag"
|
|
class="button-new-tag"
|
|
-
|
|
|
|
@click="handleInputConfirm"
|
|
@click="handleInputConfirm"
|
|
>保存</el-button
|
|
>保存</el-button
|
|
>
|
|
>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button @click="vipStatus = false">取 消</el-button>
|
|
|
|
- <el-button type="primary" @click="addVipStatus('vipStatus')"
|
|
|
|
|
|
+ <el-button @click="vipStatus = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="addVipStatus('vipStatus')"
|
|
>确 定</el-button
|
|
>确 定</el-button
|
|
>
|
|
>
|
|
</div>
|
|
</div>
|
|
@@ -182,7 +175,7 @@ import {
|
|
removeVipGroupCategory,
|
|
removeVipGroupCategory,
|
|
vipGroupCategory,
|
|
vipGroupCategory,
|
|
addVipGroupCategory,
|
|
addVipGroupCategory,
|
|
- resetVipGroupCategory,
|
|
|
|
|
|
+ resetVipGroupCategory
|
|
} from "@/api/vipSeting";
|
|
} from "@/api/vipSeting";
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -196,10 +189,10 @@ export default {
|
|
num: "",
|
|
num: "",
|
|
dynamicTags: [],
|
|
dynamicTags: [],
|
|
isAdd: true,
|
|
isAdd: true,
|
|
- musicTheory:false,
|
|
|
|
- id: "",
|
|
|
|
|
|
+ musicTheory: false,
|
|
|
|
+ id: ""
|
|
}, // 弹窗内容
|
|
}, // 弹窗内容
|
|
- inputVisible: false,
|
|
|
|
|
|
+ inputVisible: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
@@ -217,13 +210,13 @@ export default {
|
|
vipStatusFrom.num = row.studentNum;
|
|
vipStatusFrom.num = row.studentNum;
|
|
vipStatusFrom.id = row.id;
|
|
vipStatusFrom.id = row.id;
|
|
vipStatusFrom.isAdd = false;
|
|
vipStatusFrom.isAdd = false;
|
|
- vipStatusFrom.musicTheory = row.musicTheory
|
|
|
|
|
|
+ vipStatusFrom.musicTheory = row.musicTheory;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
async removeGroupCategory(scope) {
|
|
async removeGroupCategory(scope) {
|
|
await removeVipGroupCategory({
|
|
await removeVipGroupCategory({
|
|
- id: scope.row.id,
|
|
|
|
- }).then((res) => {
|
|
|
|
|
|
+ id: scope.row.id
|
|
|
|
+ }).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
scope._self.$refs[scope.row.id].doClose();
|
|
scope._self.$refs[scope.row.id].doClose();
|
|
this.$message.success("删除成功");
|
|
this.$message.success("删除成功");
|
|
@@ -238,7 +231,7 @@ export default {
|
|
},
|
|
},
|
|
showInput() {
|
|
showInput() {
|
|
this.inputVisible = true;
|
|
this.inputVisible = true;
|
|
- this.$nextTick((_) => {
|
|
|
|
|
|
+ this.$nextTick(_ => {
|
|
this.$refs.saveTagInput.$refs.input.focus();
|
|
this.$refs.saveTagInput.$refs.input.focus();
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -249,7 +242,7 @@ export default {
|
|
},
|
|
},
|
|
async getVipGroupCategoryList() {
|
|
async getVipGroupCategoryList() {
|
|
// 获取默认左边参数
|
|
// 获取默认左边参数
|
|
- await vipGroupCategory().then((res) => {
|
|
|
|
|
|
+ await vipGroupCategory().then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.leftList = res.data;
|
|
this.leftList = res.data;
|
|
}
|
|
}
|
|
@@ -258,7 +251,7 @@ export default {
|
|
addVipStatus(formName) {
|
|
addVipStatus(formName) {
|
|
// 点击添加后 发送请求单独添加=> 刷新列表
|
|
// 点击添加后 发送请求单独添加=> 刷新列表
|
|
// 判断是添加还是修改
|
|
// 判断是添加还是修改
|
|
- this.$refs[formName].validate(async (valid) => {
|
|
|
|
|
|
+ this.$refs[formName].validate(async valid => {
|
|
console.log(valid);
|
|
console.log(valid);
|
|
if (valid) {
|
|
if (valid) {
|
|
const vipStatusFrom = this.vipStatusFrom;
|
|
const vipStatusFrom = this.vipStatusFrom;
|
|
@@ -267,8 +260,8 @@ export default {
|
|
name: vipStatusFrom.name,
|
|
name: vipStatusFrom.name,
|
|
singleClassMinutes: vipStatusFrom.dynamicTags.join(","),
|
|
singleClassMinutes: vipStatusFrom.dynamicTags.join(","),
|
|
studentNum: vipStatusFrom.num,
|
|
studentNum: vipStatusFrom.num,
|
|
- musicTheory:vipStatusFrom.musicTheory
|
|
|
|
- }).then((res) => {
|
|
|
|
|
|
+ musicTheory: vipStatusFrom.musicTheory
|
|
|
|
+ }).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$message.success("添加成功");
|
|
this.$message.success("添加成功");
|
|
this.getVipGroupCategoryList();
|
|
this.getVipGroupCategoryList();
|
|
@@ -281,8 +274,8 @@ export default {
|
|
singleClassMinutes: vipStatusFrom.dynamicTags.join(","),
|
|
singleClassMinutes: vipStatusFrom.dynamicTags.join(","),
|
|
studentNum: vipStatusFrom.num,
|
|
studentNum: vipStatusFrom.num,
|
|
id: vipStatusFrom.id,
|
|
id: vipStatusFrom.id,
|
|
- musicTheory:vipStatusFrom.musicTheory
|
|
|
|
- }).then((res) => {
|
|
|
|
|
|
+ musicTheory: vipStatusFrom.musicTheory
|
|
|
|
+ }).then(res => {
|
|
this.$message.success("修改成功");
|
|
this.$message.success("修改成功");
|
|
this.getVipGroupCategoryList();
|
|
this.getVipGroupCategoryList();
|
|
this.vipStatus = false;
|
|
this.vipStatus = false;
|
|
@@ -304,8 +297,8 @@ export default {
|
|
this.vipStatusFrom.dynamicTags.indexOf(tag),
|
|
this.vipStatusFrom.dynamicTags.indexOf(tag),
|
|
1
|
|
1
|
|
);
|
|
);
|
|
- },
|
|
|
|
- },
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|