|
|
@@ -27,54 +27,54 @@
|
|
|
width="50">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="name"
|
|
|
+ prop="ClassName"
|
|
|
label="课程名称"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="vipType"
|
|
|
+ prop="ClassType"
|
|
|
label="是否通用"
|
|
|
width="110"
|
|
|
align="center"
|
|
|
sortable
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.vipType == 1">是</span>
|
|
|
- <span v-if="scope.row.vipType == 0">否</span>
|
|
|
+ <span v-if="scope.row.ClassType == 1">是</span>
|
|
|
+ <span v-if="scope.row.ClassType == 0">否</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="vipType"
|
|
|
+ prop="ShopId"
|
|
|
label="课程类型"
|
|
|
width="110"
|
|
|
align="center"
|
|
|
sortable
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <span v-if="scope.row.vipType == 1">占用课时</span>
|
|
|
- <span v-if="scope.row.vipType == 0">不占课时</span>
|
|
|
+ <span v-if="scope.row.ShopId == 1">占用课时</span>
|
|
|
+ <span v-if="scope.row.ShopId == 0">不占课时</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Recovered"
|
|
|
+ prop="ConsumeHour"
|
|
|
label="消耗课时"
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Recovered"
|
|
|
+ prop="TopLimit"
|
|
|
label="建议上课人数"
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
+<!-- <el-table-column-->
|
|
|
+<!-- prop="Recovered"-->
|
|
|
+<!-- label="课程会员人数"-->
|
|
|
+<!-- sortable-->
|
|
|
+<!-- >-->
|
|
|
+<!-- </el-table-column>-->
|
|
|
<el-table-column
|
|
|
- prop="Recovered"
|
|
|
- label="课程会员人数"
|
|
|
- sortable
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="wxVisible"
|
|
|
+ prop="WxVisible"
|
|
|
label="微信可见"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -90,24 +90,24 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="color"
|
|
|
+ prop="ClassColor"
|
|
|
label="课程颜色"
|
|
|
width="110"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-color-picker v-model="scope.row.color"
|
|
|
- @change="changeColor(scope.row.color,scope.row)"></el-color-picker>
|
|
|
+ <el-color-picker v-model="scope.row.ClassColor"
|
|
|
+ @change="changeColor(scope.row.ClassColor,scope.row)"></el-color-picker>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="create"
|
|
|
+ prop="CreatedAt"
|
|
|
label="创建时间"
|
|
|
width="210"
|
|
|
sortable
|
|
|
>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="name"
|
|
|
+ prop="Memo"
|
|
|
label="备注">
|
|
|
<template slot-scope="scope">
|
|
|
<el-popover
|
|
|
@@ -115,15 +115,15 @@
|
|
|
title="标题"
|
|
|
width="200"
|
|
|
trigger="hover"
|
|
|
- :content="scope.row.name">
|
|
|
+ :content="scope.row.Memo">
|
|
|
<span slot="reference"
|
|
|
- v-if="scope.row.name.length > 6">{{scope.row.name.substr(0,6)}} ....</span>
|
|
|
+ v-if="scope.row.Memo.length > 6">{{scope.row.Memo.substr(0,6)}} ....</span>
|
|
|
</el-popover>
|
|
|
- <span v-if="scope.row.name.length <= 6">{{scope.row.name}}</span>
|
|
|
+ <span v-if="scope.row.Memo.length <= 6">{{scope.row.Memo}}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
- prop="Status"
|
|
|
+ prop="ClassId"
|
|
|
label="操作"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
@@ -147,7 +147,7 @@
|
|
|
<div class="pull-left">
|
|
|
<el-form ref="form" :model="form" label-width="160px">
|
|
|
<el-form-item label="课程名称">
|
|
|
- <el-input v-model="form.currName"></el-input>
|
|
|
+ <el-input v-model="form.className"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="消耗课时">
|
|
|
<el-input-number v-model="form.consumeHour" :min="0" :max="99999"
|
|
|
@@ -168,7 +168,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="是否占课时">
|
|
|
<el-switch
|
|
|
- v-model="form.wxvisible"
|
|
|
+ v-model="form.classType"
|
|
|
active-value="1"
|
|
|
inactive-value="0"
|
|
|
active-color="#409EFF"
|
|
|
@@ -177,7 +177,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="是否通用">
|
|
|
<el-switch
|
|
|
- v-model="form.wxvisible"
|
|
|
+ v-model="form.allUse"
|
|
|
active-value="1"
|
|
|
inactive-value="0"
|
|
|
active-color="#409EFF"
|
|
|
@@ -185,7 +185,7 @@
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="课程颜色">
|
|
|
- <el-color-picker v-model="form.currColor"></el-color-picker>
|
|
|
+ <el-color-picker v-model="form.classColor"></el-color-picker>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="备注">
|
|
|
<el-input v-model="form.memo"></el-input>
|
|
|
@@ -195,7 +195,7 @@
|
|
|
<div class="pull-right">
|
|
|
<el-form ref="form" :model="form" label-width="160px">
|
|
|
<el-form-item label="课程会员人数">
|
|
|
- <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"></el-transfer>
|
|
|
+ <el-transfer filterable v-model="form.dialogValue" :data="form.dialogdata"></el-transfer>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -211,7 +211,7 @@
|
|
|
<span>基础功能</span>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"></el-transfer>
|
|
|
+ <el-transfer filterable v-model="dialogValue" :data="form.dialogdata"></el-transfer>
|
|
|
</div>
|
|
|
<div class="dialogFooter">
|
|
|
<el-button type="primary" size="small">确定</el-button>
|
|
|
@@ -237,6 +237,9 @@
|
|
|
<script>
|
|
|
import Global from '../Global.js'
|
|
|
import {
|
|
|
+ ClassAdd,
|
|
|
+ ClassEdit,
|
|
|
+ ClassListQuery,
|
|
|
testTable,
|
|
|
testSelect
|
|
|
} from "../api/getApiRes";
|
|
|
@@ -251,6 +254,7 @@
|
|
|
dialogdata: [],
|
|
|
gridData: [],
|
|
|
dialogValue: [],
|
|
|
+ allTableData: [],
|
|
|
// panel 配置项目
|
|
|
panel: {
|
|
|
usercode: '',
|
|
|
@@ -259,12 +263,11 @@
|
|
|
keyword: '',
|
|
|
USERCODE: '',
|
|
|
taskstatus: 99,
|
|
|
-
|
|
|
+ tableData: [],
|
|
|
+ allTableData: [],
|
|
|
draw: 1,
|
|
|
start: 0,
|
|
|
recordsTotal: 0,
|
|
|
- tableData: [],
|
|
|
- allTableData: [],
|
|
|
limit: '10',
|
|
|
multipleSort: false,
|
|
|
loading: false,
|
|
|
@@ -279,11 +282,14 @@
|
|
|
time1: globalBt(),
|
|
|
},
|
|
|
form: {
|
|
|
- currName: "",
|
|
|
+ className: "",
|
|
|
consumeHour: 0,
|
|
|
topLimit: 0,
|
|
|
wxvisible: 1,
|
|
|
- currColor: "",
|
|
|
+ classType: 1,
|
|
|
+ classColor: "#ffffff",
|
|
|
+ teacherId: "",
|
|
|
+ allUse: "",
|
|
|
memo: "",
|
|
|
dialogdata: [],//穿梭待选
|
|
|
dialogValue: [],//穿梭已选
|
|
|
@@ -308,11 +314,11 @@
|
|
|
let that = this;
|
|
|
|
|
|
// checkNum
|
|
|
- if (!that.form.currName) {
|
|
|
+ if (!that.form.className) {
|
|
|
this.$message.error('错了哦,课程名称不能为空');
|
|
|
return false
|
|
|
}
|
|
|
- if (that.form.currName.length > 20) {
|
|
|
+ if (that.form.className.length > 20) {
|
|
|
this.$message.error('错了哦,课程名称字数超过20个字');
|
|
|
return false
|
|
|
}
|
|
|
@@ -323,17 +329,21 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ let teacherId = that.form.dialogValue.toString();
|
|
|
let param = {
|
|
|
token: localStorage.token,
|
|
|
- currName: that.form.currName,
|
|
|
+ shopId: localStorage.shopId,
|
|
|
+ className: that.form.className,
|
|
|
consumeHour: that.form.consumeHour,
|
|
|
topLimit: that.form.topLimit,
|
|
|
- wxvisible: that.form.wxvisible,
|
|
|
- currColor: that.form.currColor,
|
|
|
+ classType: that.form.classType,
|
|
|
+ wxVisible: that.form.wxvisible,
|
|
|
+ classColor: that.form.classColor,
|
|
|
+ teacherId:teacherId,
|
|
|
memo: that.form.memo,
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testSelect(postdata).then(res => {
|
|
|
+ ClassAdd(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
// 关闭弹窗
|
|
|
@@ -353,14 +363,13 @@
|
|
|
// 新增课程
|
|
|
addLesson() {
|
|
|
// clear
|
|
|
- this.form.currName = '';
|
|
|
- this.form.consumeHour = '';
|
|
|
- this.form.topLimit = '';
|
|
|
+ this.form.className = '';
|
|
|
+ this.form.consumeHour = 0;
|
|
|
+ this.form.topLimit = 0;
|
|
|
this.form.wxvisible = 1;
|
|
|
- this.form.currColor = "";
|
|
|
+ this.form.classColor = "#ffffff";
|
|
|
this.form.memo = "";
|
|
|
- this.form.dialogValue = "";
|
|
|
-
|
|
|
+ this.form.dialogValue = [];
|
|
|
this.dialogLesson = true;
|
|
|
},
|
|
|
// 改色
|
|
|
@@ -510,25 +519,25 @@
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val;
|
|
|
},
|
|
|
- clearForm(){
|
|
|
+ clearForm() {
|
|
|
// clear
|
|
|
- this.form.currName = '';
|
|
|
+ this.form.className = '';
|
|
|
this.form.consumeHour = 0;
|
|
|
this.form.topLimit = 0;
|
|
|
this.form.wxvisible = 1;
|
|
|
- this.form.currColor = '';
|
|
|
+ this.form.classColor = '';
|
|
|
this.form.memo = '';
|
|
|
},
|
|
|
// 编辑
|
|
|
- editLesson(row){
|
|
|
+ editLesson(row) {
|
|
|
let that = this;
|
|
|
this.clearForm();
|
|
|
|
|
|
- this.form.currName = row.name;
|
|
|
+ this.form.className = row.name;
|
|
|
this.form.consumeHour = row.Recovered;
|
|
|
this.form.topLimit = row.Recovered;
|
|
|
this.form.wxvisible = row.wxVisible;
|
|
|
- this.form.currColor = row.color;
|
|
|
+ this.form.classColor = row.color;
|
|
|
this.form.memo = row.memo;
|
|
|
this.form.dialogValue = row.dialogValue;
|
|
|
this.form.btnType = 1; //编辑
|
|
|
@@ -536,7 +545,7 @@
|
|
|
this.dialogLesson = true
|
|
|
this.dialogTitle = '编辑课程'
|
|
|
},
|
|
|
- Lessonmember(row){
|
|
|
+ Lessonmember(row) {
|
|
|
this.dialogTableVisible = true;
|
|
|
this.gridData = row.members;
|
|
|
|
|
|
@@ -562,7 +571,7 @@
|
|
|
tableMax: 9999,//
|
|
|
};
|
|
|
let postdata = qs.stringify(param);
|
|
|
- testTable(postdata).then(res => {
|
|
|
+ ClassListQuery(postdata).then(res => {
|
|
|
let json = res;
|
|
|
if (json.Code == 0) {
|
|
|
that.loading = false;
|