修改班级园历部分功能
This commit is contained in:
@ -18,6 +18,15 @@ export function listSchoolcalendarclassAll(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 用于显示到首页的园历信息查询 暂时不写备用状态
|
||||||
|
// export function getSchoolCalendarsClass(query) {
|
||||||
|
// return request({
|
||||||
|
// url: '/benyi/schoolcalendarclass/getSchoolCalendarsClass',
|
||||||
|
// method: 'get',
|
||||||
|
// params: query
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
// 查询园历管理(班级)详细
|
// 查询园历管理(班级)详细
|
||||||
export function getSchoolcalendarclass(id) {
|
export function getSchoolcalendarclass(id) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -176,6 +176,7 @@
|
|||||||
v-model="form.activitytime"
|
v-model="form.activitytime"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
|
:picker-options="pickerOptions0"
|
||||||
placeholder="选择活动时间"
|
placeholder="选择活动时间"
|
||||||
></el-date-picker>
|
></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -228,6 +229,12 @@ export default {
|
|||||||
xnxqOptions: [],
|
xnxqOptions: [],
|
||||||
//声明方法
|
//声明方法
|
||||||
selectable: Function,
|
selectable: Function,
|
||||||
|
//禁止添加今天以前的日期
|
||||||
|
pickerOptions0: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() < Date.now() - 8.64e7;
|
||||||
|
}
|
||||||
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="所属班级" prop="classid">
|
<!--<el-form-item label="所属班级" prop="classid">
|
||||||
<el-select v-model="queryParams.classid" placeholder="请选择班级" >
|
<el-select v-model="queryParams.classid" placeholder="请选择班级" >
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in classListAll"
|
v-for="item in classListAll"
|
||||||
@ -20,7 +20,7 @@
|
|||||||
:value="item.classid"
|
:value="item.classid"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>-->
|
||||||
<el-form-item label="学年学期" prop="xnxq">
|
<el-form-item label="学年学期" prop="xnxq">
|
||||||
<el-select v-model="queryParams.xnxq" placeholder="请选择学年学期" clearable size="small">
|
<el-select v-model="queryParams.xnxq" placeholder="请选择学年学期" clearable size="small">
|
||||||
<el-option
|
<el-option
|
||||||
@ -87,7 +87,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="schoolcalendarclassList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="schoolcalendarclassList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" :selectable="checkSelectable"/>
|
||||||
<el-table-column label="编号" align="center" prop="id" />
|
<el-table-column label="编号" align="center" prop="id" />
|
||||||
<el-table-column label="名称" align="center" prop="name" />
|
<el-table-column label="名称" align="center" prop="name" />
|
||||||
<el-table-column label="活动类型" align="center" prop="type" :formatter="typeFormat" />
|
<el-table-column label="活动类型" align="center" prop="type" :formatter="typeFormat" />
|
||||||
@ -107,6 +107,7 @@
|
|||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['benyi:schoolcalendarclass:edit']"
|
v-hasPermi="['benyi:schoolcalendarclass:edit']"
|
||||||
|
:disabled="!checkSelectable(scope.row)"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -114,6 +115,7 @@
|
|||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['benyi:schoolcalendarclass:remove']"
|
v-hasPermi="['benyi:schoolcalendarclass:remove']"
|
||||||
|
:disabled="!checkSelectable(scope.row)"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -148,6 +150,7 @@
|
|||||||
v-model="form.activitytime"
|
v-model="form.activitytime"
|
||||||
type="date"
|
type="date"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd"
|
||||||
|
:picker-options="pickerOptions0"
|
||||||
placeholder="选择活动时间">
|
placeholder="选择活动时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -196,6 +199,14 @@ export default {
|
|||||||
typeOptions: [],
|
typeOptions: [],
|
||||||
//学年学期
|
//学年学期
|
||||||
xnxqOptions: [],
|
xnxqOptions: [],
|
||||||
|
//声明方法
|
||||||
|
selectable: Function,
|
||||||
|
//禁止添加今天以前的日期
|
||||||
|
pickerOptions0: {
|
||||||
|
disabledDate(time) {
|
||||||
|
return time.getTime() < Date.now() - 8.64e7;
|
||||||
|
}
|
||||||
|
},
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -250,6 +261,18 @@ export default {
|
|||||||
xnxqFormat(row, column) {
|
xnxqFormat(row, column) {
|
||||||
return this.selectDictLabel(this.xnxqOptions, row.xnxq);
|
return this.selectDictLabel(this.xnxqOptions, row.xnxq);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
//控制按钮可用
|
||||||
|
checkSelectable(row) {
|
||||||
|
var date = new Date();
|
||||||
|
//console.log(date.toLocaleDateString());
|
||||||
|
return this.CompareDate(row.activitytime, date.toLocaleDateString());
|
||||||
|
},
|
||||||
|
//比较日期大小
|
||||||
|
CompareDate(d1, d2) {
|
||||||
|
return new Date(d1.replace(/-/g, "/")) > new Date(d2.replace(/-/g, "/"));
|
||||||
|
},
|
||||||
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -50,6 +50,7 @@ import RaddarChart from "./dashboard/RaddarChart";
|
|||||||
import PieChart from "./dashboard/PieChart";
|
import PieChart from "./dashboard/PieChart";
|
||||||
import BarChart from "./dashboard/BarChart";
|
import BarChart from "./dashboard/BarChart";
|
||||||
import { getSchoolCalendars } from "@/api/benyi/schoolcalendar";
|
import { getSchoolCalendars } from "@/api/benyi/schoolcalendar";
|
||||||
|
//备用进行班级园历显示操作import { getSchoolCalendarsClass } from "@/api/benyi/schoolcalendarclass";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Index",
|
name: "Index",
|
||||||
|
@ -48,10 +48,17 @@ public class BySchoolcalendarClassController extends BaseController
|
|||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass)
|
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass)
|
||||||
{
|
{
|
||||||
startPage();
|
String strClassId = schoolCommon.getClassId();
|
||||||
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
if(!schoolCommon.isStringEmpty(strClassId)){
|
||||||
System.out.println("---------------------分页"+list);
|
startPage();
|
||||||
return getDataTable(list);
|
bySchoolcalendarClass.setClassid(schoolCommon.getClassId());
|
||||||
|
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||||
|
System.out.println("---------------------分页"+list);
|
||||||
|
return getDataTable(list);
|
||||||
|
}else{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,10 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass" resultMap="BySchoolcalendarClassResult">
|
<select id="selectBySchoolcalendarClassList" parameterType="BySchoolcalendarClass" resultMap="BySchoolcalendarClassResult">
|
||||||
select sc.id, sc.name, sc.type, sc.classid, sc.xnxq, sc.deptId, sc.activitytime, sc.createuserid, sc.createtime,
|
select sc.id, sc.name, sc.type, sc.classid, sc.xnxq, sc.deptId, sc.activitytime, sc.createuserid, sc.createtime,
|
||||||
c.bjbh, c.bjmc
|
c.bjbh, c.bjmc
|
||||||
from by_schoolcalendar_class sc
|
from by_schoolcalendar_class sc, by_class c
|
||||||
left join by_class c on sc.classid = c.bjbh
|
|
||||||
<where>
|
<where>
|
||||||
sc.classid = c.bjbh
|
|
||||||
<if test="name != null and name != ''"> and sc.name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and sc.name like concat('%', #{name}, '%')</if>
|
||||||
<if test="type != null and type != ''"> and sc.type = #{type}</if>
|
<if test="type != null and type != ''"> and sc.type = #{type}</if>
|
||||||
<if test="classid != null and classid != ''"> and sc.classid = #{classid}</if>
|
<if test="classid != null and classid != ''"> and sc.classid = #{classid}</if>
|
||||||
|
Reference in New Issue
Block a user