Commit a0e8aa92 authored by 黄奎's avatar 黄奎

页面修改

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