Commit a0e8aa92 authored by 黄奎's avatar 黄奎

页面修改

parent 75f1cf97
...@@ -8,41 +8,49 @@ ...@@ -8,41 +8,49 @@
background: transparent; background: transparent;
border: 0; border: 0;
} }
.common_Style{
.common_Style {
display: inline-block; display: inline-block;
width:30px; width: 30px;
height:30px; height: 30px;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
line-height: 30px; line-height: 30px;
} }
.classForm_monday{
.classForm_monday {
background-color: #ced9f8; background-color: #ced9f8;
color:#2961FE; color: #2961FE;
} }
.classForm_tuesday{
.classForm_tuesday {
background-color: #d9f3ff; background-color: #d9f3ff;
color:#3FC4FF; color: #3FC4FF;
} }
.classForm_wednesday{
.classForm_wednesday {
background-color: #f6e2cb; background-color: #f6e2cb;
color:#F28C1D; color: #F28C1D;
} }
.classForm_thursday{
.classForm_thursday {
background-color: #ccf3eb; background-color: #ccf3eb;
color:#02C499; color: #02C499;
} }
.classForm_friday{
.classForm_friday {
background-color: #f7cfd6; background-color: #f7cfd6;
color:#F72E52; color: #F72E52;
} }
.classForm_saturday{
.classForm_saturday {
background-color: #fff5cc; background-color: #fff5cc;
color:#FFCC00; color: #FFCC00;
} }
.classForm_sunday{
.classForm_sunday {
background-color: #e6e3fe; background-color: #e6e3fe;
color:#8175FB; color: #8175FB;
} }
</style> </style>
...@@ -159,7 +167,7 @@ ...@@ -159,7 +167,7 @@
<div class="row wrap" style="margin:20px 0"> <div class="row wrap" style="margin:20px 0">
<div class="col-12"> <div class="col-12">
<q-field filled class="col-6 q-pr-lg q-pb-lg"> <q-field filled class="col-6 q-pr-lg q-pb-lg">
            <template v-slot:control>             <template v-slot:control>
<el-input placeholder="数值" v-model="objOption.CommissionValue"> <el-input placeholder="数值" v-model="objOption.CommissionValue">
<template slot="append"> <template slot="append">
<span v-if="objOption.CommissionType==1"></span> <span v-if="objOption.CommissionType==1"></span>
...@@ -167,7 +175,7 @@ ...@@ -167,7 +175,7 @@
</template> </template>
</el-input> </el-input>
</template> </template>
          </q-field>           </q-field>
</div> </div>
</div> </div>
<div class="text-caption q-mb-lg q-px-md text-grey-6">上课设置</div> <div class="text-caption q-mb-lg q-px-md text-grey-6">上课设置</div>
...@@ -181,13 +189,10 @@ ...@@ -181,13 +189,10 @@
<div class="row wrap" v-if="objOption.ClassStyle==1"> <div class="row wrap" v-if="objOption.ClassStyle==1">
<div class="col-6"> <div class="col-6">
<q-select filled stack-label multiple option-value="value" option-label="label" v-model="checkedArr" <q-select filled stack-label multiple option-value="value" option-label="label" v-model="checkedArr"
ref="ClassStyle" :options="weekList" label="选择周几" :dense="false" class="col-6 q-pr-lg q-pr-lg" ref="ClassStyle" :options="weekList" label="选择周几" :dense="false" class="col-6 q-pr-lg q-pr-lg" emit-value
emit-value map-options> map-options>
<template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }"> <template v-slot:option="{ itemProps, itemEvents, opt, selected, toggleOption }">
<q-item <q-item v-bind="itemProps" v-on="itemEvents">
v-bind="itemProps"
v-on="itemEvents"
>
<q-item-section avatar> <q-item-section avatar>
<span v-if="opt.icon==1" class="common_Style classForm_monday"></span> <span v-if="opt.icon==1" class="common_Style classForm_monday"></span>
<span v-if="opt.icon==2" class="common_Style classForm_tuesday"></span> <span v-if="opt.icon==2" class="common_Style classForm_tuesday"></span>
...@@ -203,7 +208,6 @@ ...@@ -203,7 +208,6 @@
<q-item-section side> <q-item-section side>
<i style="color:#2961FE" v-if="selected" class="iconfont icon-chenggong"></i> <i style="color:#2961FE" v-if="selected" class="iconfont icon-chenggong"></i>
</q-item-section> </q-item-section>
</q-item> </q-item>
</template> </template>
</q-select> </q-select>
...@@ -219,7 +223,7 @@ ...@@ -219,7 +223,7 @@
<q-input filled stack-label maxlength="20" v-model="objOption.ClassHours" :dense="false" <q-input filled stack-label maxlength="20" v-model="objOption.ClassHours" :dense="false"
class="col-6 q-pr-lg q-pb-lg" label="学习课时" /> class="col-6 q-pr-lg q-pb-lg" label="学习课时" />
</div> </div>
</div> </div>
</q-card-section> </q-card-section>
<q-separator /> <q-separator />
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
...@@ -237,7 +241,9 @@ ...@@ -237,7 +241,9 @@
} from '../../api/course/index' } from '../../api/course/index'
import { import {
getTeacherDropDownList, getTeacherDropDownList,
getSchoolDropdown getSchoolDropdown,
saveClass,
getClassInfo
} from '../../api/school/index' } from '../../api/school/index'
export default { export default {
components: {}, components: {},
...@@ -249,7 +255,6 @@ ...@@ -249,7 +255,6 @@
}, },
data() { data() {
return { return {
aa: 3,
persistent: true, persistent: true,
objOption: { objOption: {
ClassId: 0, //班级编号 ClassId: 0, //班级编号
...@@ -284,94 +289,84 @@ ...@@ -284,94 +289,84 @@
optionTitle: "", optionTitle: "",
defaultArray: [], defaultArray: [],
saveCourseLoading: false, saveCourseLoading: false,
ClassList: [], //关联课程下拉数据 ClassList: [], //关联课程下拉数据
TeacherList: [], //关联教师下拉数据 TeacherList: [], //关联教师下拉数据
SchoolList: [], //关联校区下拉数据 SchoolList: [], //关联校区下拉数据
classRoomList: [], // 关联教室 classRoomList: [], // 关联教室
ladderPriceList: [{ //阶梯定价数组 ladderPriceList: [{ //阶梯定价数组
pnumber: 2, pnumber: 2,
price: '' price: ''
}], }],
checkedArr:[], checkedArr: [],
//上课设置 //上课设置
classSetList:[{ classSetList: [{
Name:'按周排课', Name: '按周排课',
Id:1 Id: 1
},{ }, {
Name:'按月排课', Name: '按月排课',
Id:2 Id: 2
},{ }, {
Name:'固定日期', Name: '固定日期',
Id:3 Id: 3
},{ }, {
Name:'约课', Name: '约课',
Id:4 Id: 4
}], }],
//周几 //周几
weekList:[{ weekList: [{
label:'周一', label: '周一',
value:'周一', value: '周一',
icon:1 icon: 1
},{ }, {
label:'周二', label: '周二',
value:'周二', value: '周二',
icon:2 icon: 2
},{ }, {
label:'周三', label: '周三',
value:'周三', value: '周三',
icon:3 icon: 3
},{ }, {
label:'周四', label: '周四',
value:'周四', value: '周四',
icon:4 icon: 4
},{ }, {
label:'周五', label: '周五',
value:'周五', value: '周五',
icon:5 icon: 5
},{ }, {
label:'周六', label: '周六',
value:'周六', value: '周六',
icon:6 icon: 6
},{ }, {
label:'周日', label: '周日',
value:'周日', value: '周日',
icon:7 icon: 7
}], }],
//选中日期 //选中日期
checkedDays:[] checkedDays: []
} }
}, },
mounted() { created() {
this.getSchool();
this.CourseList(); this.CourseList();
this.GetTeacherList(); this.GetTeacherList();
this.getSchool(); },
mounted() {
this.initObj() this.initObj()
}, },
methods: { methods: {
//初始化表单 //初始化表单
initObj() { initObj() {
this.defaultArray = []; this.defaultArray = [];
if (this.saveObj && this.saveObj.CourseId > 0) { if (this.saveObj && this.saveObj.ClassId > 0) {
queryCourseInfo({ getClassInfo({
CourseId: this.saveObj.CourseId ClassId: this.saveObj.ClassId
}).then(res => { }).then(res => {
this.objOption.CourseId = res.Data.CourseId; console.log("rees", res.Data);
this.objOption.CoverImg = res.Data.CoverImg;
this.objOption.CourseName = res.Data.CourseName;
this.objOption.CourseIntro = res.Data.CourseIntro;
this.objOption.CateId = res.Data.CateId;
this.defaultArray.push(res.Data.CateId);
}) })
this.optionTitle = "修改课程信息" this.optionTitle = "修改班级信息"
} else { } else {
this.optionTitle = "新增课程" this.optionTitle = "新增班级"
this.objOption.CourseId = 0;
this.objOption.CoverImg = "";
this.objOption.CourseName = "";
this.objOption.CourseIntro = "";
this.objOption.CateId = 0;
} }
}, },
//关闭弹窗 //关闭弹窗
...@@ -379,10 +374,10 @@ ...@@ -379,10 +374,10 @@
this.$emit('close') this.$emit('close')
this.persistent = false this.persistent = false
}, },
//保存菜单 //保存班级
saveCourse() { saveCourse() {
this.saveCourseLoading = true this.saveCourseLoading = true
saveCourseInfo(this.objOption).then(res => { saveClass(this.objOption).then(res => {
this.saveCourseLoading = false this.saveCourseLoading = false
this.$q.notify({ this.$q.notify({
icon: 'iconfont icon-chenggong', icon: 'iconfont icon-chenggong',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment