Commit f7e1a9ed authored by 黄奎's avatar 黄奎

新增设置班级状态

parent 83ec657f
......@@ -248,3 +248,15 @@ export function setTeachingPerfFinance(data) {
data
});
}
/**
* 修改班级状态
* @param {JSON数据} data
*/
export function saveClassStatus(data) {
return request({
url: '/Class/SetClassStatus',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -218,17 +218,7 @@ export function saveClass(data) {
})
}
/**
* 修改班级状态
* @param {JSON数据} data
*/
export function saveClassStatus(data) {
return request({
url: '/Class/SetClassStatus',
method: 'post',
data
})
}
/**
* 新增修改班级
......
......@@ -8,7 +8,7 @@
</div>
<div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="课程状态" />
v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" />
</div>
<div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.TeacherName"
......@@ -65,6 +65,27 @@
style="background-color:#EEEEEF;color:#3FC4FF" class="q-mt-sm" />
</q-td>
</template>
<!--班级状态-->
<template v-slot:body-cell-ClassStatusStr="props">
<span>{{props.row.ClassStatusStr}}</span>&nbsp;
<i class="iconfont icon-edit" @click.stop="getClassItem(props.row)" title="点击修改班级状态">
<q-popup-proxy>
<q-banner v-if="isShowEdit">
<div class="calenderDialog">
<div style="margin:10px 0 15px 0;">设置班级状态</div>
<q-select standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="statusMsg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowEdit=false"
style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="setClassStatus()" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</i>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
......@@ -73,7 +94,8 @@
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="订单中心"
@click="gotoOrder(props.row)"></q-btn>
<q-btn flat size="xs" icon="edit" color="accent" @click="goPayment(props.row)" style="font-weight:400" label="收支明细"></q-btn>
<q-btn flat size="xs" icon="edit" color="accent" @click="goPayment(props.row)" style="font-weight:400"
label="收支明细"></q-btn>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCourse(props.row)" />
</q-td>
......@@ -90,8 +112,8 @@
import {
queryClassPage,
queryClassStatusList,
saveClassStatus, //修改班级状态
} from '../../api/course/class';
//获取校区列表
import {
getSchoolDropdown
......@@ -182,11 +204,16 @@
pageCount: 0,
classObjOption: null,
isShowClassInfo: false, //是否显示课程信息
isShowEdit: false,
statusMsg: {
ClassId: 0,
ClassStatus: 0
},
}
},
created() {
if(this.$route.query){
this.msg.ClassName=this.$route.query.ClassName
if (this.$route.query) {
this.msg.ClassName = this.$route.query.ClassName
}
this.getClassStatus();
this.getSchool();
......@@ -195,6 +222,29 @@
this.getClassList();
},
methods: {
//当前点击的班级
getClassItem(item) {
this.isShowEdit = true;
var Obj = JSON.parse(JSON.stringify(item));
this.statusMsg.ClassStatus = Obj.ClassStatus;
this.statusMsg.ClassId = Obj.ClassId;
},
//更新班级状态
setClassStatus() {
saveClassStatus(this.statusMsg).then(res => {
this.isShowEdit = false;
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '设置成功!',
position: 'top'
})
this.getClassList();
}
});
},
gotoOrder(item) {
var tempStr = '/course/classorder?ClassId=' + item.ClassId;
this.$router.push({
......@@ -202,13 +252,13 @@
});
},
//跳转到收支明细
goPayment(item){
goPayment(item) {
this.$router.push({
path:'paymentDetail',
query:{
ClassId:item.ClassId,
School_Id:item.School_Id,
blank:'y'
path: 'paymentDetail',
query: {
ClassId: item.ClassId,
School_Id: item.School_Id,
blank: 'y'
}
})
},
......
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