Commit eb633a6d authored by 罗超's avatar 罗超

1

parent a2a7ae3d
......@@ -290,4 +290,52 @@ export function GetHandoverShiftList() {
method: 'post',
data: ""
})
}
/**
* 获取节假日计划分页列表
* @param {JSON参数} data
*/
export function getHolidayPlanList(data) {
return request({
url: '/Holiday/GetHolidayList',
method: 'post',
data: data
})
}
/**
* 获取节假日计划详情
* @param {JSON参数} data
*/
export function getHolidayInfo(data) {
return request({
url: '/Holiday/GetHolidayInfo',
method: 'post',
data: data
})
}
/**
* 新增节假日计划
* @param {JSON参数} data
*/
export function setHolidayPlan(data) {
return request({
url: '/Holiday/SetHoliday ',
method: 'post',
data: data
})
}
/**
* 删除节假日计划
* @param {JSON参数} data
*/
export function delHolidayPlan(data) {
return request({
url: '/Holiday/DelHoliday ',
method: 'post',
data: data
})
}
\ No newline at end of file
import request from '../../utils/request'
/**
* 获取学员管理列表
* @param {JSON参数} data
*/
export function GetStuPageList(data) {
return request({
url: '/TeacherClass/GetClassStudent',
method: 'post',
data
})
}
<template>
<q-dialog v-model="persistent" persistent content-class="bg-grey-1" transition-show="scale" transition-hide="scale">
<q-card style="width: 480px;max-width:480px;">
<q-card-section>
<div class="text-h6">
{{ addMsg.HolidayId > 0 ? "修改计划表" : "新增计划表" }}
</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row wrap">
<q-select filled class="col-12" option-value="value" option-label="label" ref="DayType"
v-model="addMsg.DayType" :options="typeOpts" :rules="[val => !!val || '请选择计划类型']" emit-value map-options
label="计划类型" />
</div>
<div class="row wrap">
<div class="col-12 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="date" value-format="yyyy-MM-dd" type="daterange"
 range-separator="至"  start-placeholder="开始日期"  end-placeholder="结束日期" >
 </el-date-picker>       
</template>
</q-field>
</div>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeVisitForm" />
<q-btn label="保存" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading"
@click="saveCourse" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
setHolidayPlan,
} from '../../api/scheduling/schedu'
export default {
components: {},
props: {
saveObj: {
type: Object,
default: null
}
},
data() {
return {
persistent: true,
addMsg: {
HolidayId: 0,
DayType: 1, //类型
StartTime: "", //开始时间
EndTime: "", //结束时间
},
date: [],
typeOpts: [{
label: '节假日',
value: 1
},
{
label: '工作日',
value: 2
}
],
saveCourseLoading: false,
};
},
created() {
if (this.saveObj && this.saveObj.HolidayId > 0) {
this.addMsg = this.saveObj
this.date[0]=this.saveObj.StartTime
this.date[1]=this.saveObj.EndTime
}
},
methods: {
//关闭弹窗
closeVisitForm() {
this.$emit("close");
this.persistent = false;
},
//保存菜单
saveCourse() {
console.log(this.date)
this.addMsg.StartTime=this.date[0]
this.addMsg.EndTime=this.date[1]
if(this.addMsg.StartTime==""||this.addMsg.EndTime==""){
this.Success('请选择时间')
return
}
setHolidayPlan(this.addMsg).then(res=>{
if(res.Code===1){
this.Success(res.Message)
this.closeVisitForm();
this.$emit("success")
}
})
},
}
};
</script>
......@@ -32,7 +32,7 @@
</q-list>
</q-menu>
</q-btn>
<q-btn @click="changeMenu(2)" v-if="AccountType==2 || ispower==true" flat :color="chosenMenu==2?'primary':'blue-grey-14'" :class="[chosenMenu==2?'text-weight-bold':'']" label="备课管理">
<!-- <q-btn @click="changeMenu(2)" v-if="AccountType==2 || ispower==true" flat :color="chosenMenu==2?'primary':'blue-grey-14'" :class="[chosenMenu==2?'text-weight-bold':'']" label="备课管理"> -->
</q-btn>
<q-btn flat @click="changeMenu(3)" :color="chosenMenu==3?'primary':'blue-grey-14'" :class="[chosenMenu==3?'text-weight-bold':'']" label="我的排班计划"></q-btn>
<q-btn flat @click="changeMenu(4)" v-if="AccountType==2" :color="chosenMenu==4?'primary':'blue-grey-14'" :class="[chosenMenu==4?'text-weight-bold':'']" label="我的上课计划"></q-btn>
......
......@@ -1301,7 +1301,7 @@
  showQRcode(path) {
      this.apipostDS(
        "/api/user/GetWeiXinQRCodeForHT",
        { Path: "/pages/"+path+'?JumpType=17', With: 212 },
        { Path: "/pages/"+path, With: 212 },
        (res) => {
          if (res.data.resultCode == 1) {
            if (res.data.data) {
......
......@@ -113,7 +113,6 @@
} else {
const needle = val.toLowerCase();
this.classroomopt = this.classroomopt.filter(v => v.RoomName.toLowerCase().indexOf(needle) > -1);
}
})
},
......@@ -126,10 +125,6 @@
if (!this.$route.query.key) {
this.msg.SchoolId = res.Data[0].Key
}
this.schoolopt.unshift({
SchoolName: "不限",
Key: -1
})
this.schoolChange2(this.msg.SchoolId)
}
}).catch(() => {
......
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.DayType" :options="typeOpts"
option-value="value" option-label="label" label="节假日类型" emit-value map-options />
</div>
<div class="col-3 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="dateList" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
 range-separator="至"  start-placeholder="开始日期"  end-placeholder="结束日期">
 </el-date-picker>       
</template>
</q-field>
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">节假日计划表</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" icon="add" label="新增计划" @click="EditSchool(null)" />
</div>
</template>
<!-- <template v-slot:body-cell-time="props">
<q-td :props="props">
{{props.row.StartTime}}/{{props.row.EndTime}}
</q-td>
</template> -->
<template v-slot:body-cell-type="props">
<q-td :props="props">
<span v-if="props.row.DayType===1">节假日</span>
<span v-if="props.row.DayType===2">工作日</span>
</q-td>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="edit" color="accent" style="font-family:perfectFont" label="编辑"
@click="EditSchool(props.row)" />
<q-btn flat size="xs" icon="delete" color="accent" style="font-family:perfectFont" label="删除"
@click="EditSchool(props.row)" />
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
</q-table>
<VacationPlanForm v-if="isShowSchoolForm" :save-obj="objOption" @close="closeSchoolForm" @success="resetSearch">
</VacationPlanForm>
</div>
</div>
</template>
<script>
import {
getHolidayPlanList,
} from '../../api/scheduling/schedu'
import VacationPlanForm from '../../components/schedul/vacationPlan-form'
export default {
meta: {
title: "节假日计划表"
},
components: {
VacationPlanForm
},
data() {
return {
columns: [{
name: 'HolidayId',
label: '编号',
field: 'HolidayId',
align: 'left',
},
{
name: 'StartTime',
label: '开始时间',
align: 'left',
field: 'StartTime'
},
{
name: 'EndTime',
label: '结束时间',
align: 'left',
field: 'EndTime'
},
{
name: 'type',
label: '计划类型',
align: 'left',
field: ''
},
{
name: 'optioned',
label: '操作',
field: 'SId'
},
],
data: [],
loading: true,
typeOpts: [{
label: '不限',
value: 0
},
{
label: '节假日',
value: 1
},
{
label: '工作日',
value: 2
}
],
dateList: [],
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
DayType: 0, //类型
StartTime: "", //开始时间
EndTime: "", //结束时间
},
pageCount: 0,
objOption: {
DayType: 0, //类型
StartTime: "", //开始时间
EndTime: "", //结束时间
},
isShowSchoolForm: false, //是否显示校区弹窗
}
},
created() {
},
mounted() {
this.getList()
},
methods: {
getList() {
this.msg.StartTime = this.dateList[0]
this.msg.EndTime = this.dateList[1]
this.loading = true
getHolidayPlanList(this.msg).then(res => {
this.loading = false
console.log(185, res)
if (res.Code === 1) {
this.data = res.Data.PageData
this.pageCount = res.Data.PageCount
}
}).catch(err => {
this.loading = false
})
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
//分页改变
changePage(val) {
this.msg.pageIndex = val;
this.getList()
},
//关闭校区弹窗
closeSchoolForm() {
this.isShowSchoolForm = false;
},
//新增、修改校区
EditSchool(obj) {
console.log(obj)
if (obj) {
this.objOption = obj;
} else {
this.objOption = null;
}
this.isShowSchoolForm = true;
},
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<style>
.Sysuser_Date .el-range-editor .el-range-input {
background-color: transparent;
width: 100%;
border: none;
}
.Sysuser_Date .el-range-editor.el-input__inner {
background-color: transparent;
width: 100%;
border: none;
}
.el-date-range-picker {
z-index:9999 !important;
}
</style>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -909,6 +909,11 @@ const routes = [{
component: () =>
import("pages/scheduling/scheduleInfo.vue")
},
{
path: "/scheduling/vacationPlan", //假期计划表
component: () =>
import("pages/scheduling/vacationPlan")
},
{
path: "/test", //API测试
component: () =>
......@@ -939,6 +944,31 @@ const routes = [{
component: () =>
import("pages/teacher/teachMonthLessonCost")
},
{
path: "/teacher/myPrepareLessons", //我的备课
component: () =>
import("pages/teacher/myPrepareLessons")
},
{
path: "/teacher/lessonTimeStatistics", //课时统计
component: () =>
import("pages/teacher/lessonTimeStatistics")
},
{
path: "/teacher/teacherclassSee", //课时统计-查看老师
component: () =>
import("pages/teacher/teacherclassSee")
},
{
path: "/teacher/studentsClassSee", //课时统计-查看学生
component: () =>
import("pages/teacher/studentsClassSee")
},
{
path: "/teacher/studentManager", //学员管理
component: () =>
import("pages/teacher/studentManager")
},
],
},
......
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