Commit f7e1a9ed authored by 黄奎's avatar 黄奎

新增设置班级状态

parent 83ec657f
...@@ -248,3 +248,15 @@ export function setTeachingPerfFinance(data) { ...@@ -248,3 +248,15 @@ export function setTeachingPerfFinance(data) {
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) { ...@@ -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 @@ ...@@ -8,7 +8,7 @@
</div> </div>
<div class="col-3"> <div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name" <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>
<div class="col-3"> <div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.TeacherName" <q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.TeacherName"
...@@ -65,6 +65,27 @@ ...@@ -65,6 +65,27 @@
style="background-color:#EEEEEF;color:#3FC4FF" class="q-mt-sm" /> style="background-color:#EEEEEF;color:#3FC4FF" class="q-mt-sm" />
</q-td> </q-td>
</template> </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> <template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount" <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> :input="true" @input="changePage" />
...@@ -73,7 +94,8 @@ ...@@ -73,7 +94,8 @@
<q-td :props="props"> <q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="订单中心" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="订单中心"
@click="gotoOrder(props.row)"></q-btn> @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="编辑" <q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCourse(props.row)" /> @click="EditCourse(props.row)" />
</q-td> </q-td>
...@@ -90,8 +112,8 @@ ...@@ -90,8 +112,8 @@
import { import {
queryClassPage, queryClassPage,
queryClassStatusList, queryClassStatusList,
saveClassStatus, //修改班级状态
} from '../../api/course/class'; } from '../../api/course/class';
//获取校区列表 //获取校区列表
import { import {
getSchoolDropdown getSchoolDropdown
...@@ -182,11 +204,16 @@ ...@@ -182,11 +204,16 @@
pageCount: 0, pageCount: 0,
classObjOption: null, classObjOption: null,
isShowClassInfo: false, //是否显示课程信息 isShowClassInfo: false, //是否显示课程信息
isShowEdit: false,
statusMsg: {
ClassId: 0,
ClassStatus: 0
},
} }
}, },
created() { created() {
if(this.$route.query){ if (this.$route.query) {
this.msg.ClassName=this.$route.query.ClassName this.msg.ClassName = this.$route.query.ClassName
} }
this.getClassStatus(); this.getClassStatus();
this.getSchool(); this.getSchool();
...@@ -195,6 +222,29 @@ ...@@ -195,6 +222,29 @@
this.getClassList(); this.getClassList();
}, },
methods: { 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) { gotoOrder(item) {
var tempStr = '/course/classorder?ClassId=' + item.ClassId; var tempStr = '/course/classorder?ClassId=' + item.ClassId;
this.$router.push({ this.$router.push({
...@@ -202,13 +252,13 @@ ...@@ -202,13 +252,13 @@
}); });
}, },
//跳转到收支明细 //跳转到收支明细
goPayment(item){ goPayment(item) {
this.$router.push({ this.$router.push({
path:'paymentDetail', path: 'paymentDetail',
query:{ query: {
ClassId:item.ClassId, ClassId: item.ClassId,
School_Id:item.School_Id, School_Id: item.School_Id,
blank:'y' 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