修改班级园历部分功能

This commit is contained in:
sk1551 2020-05-08 17:54:33 +08:00
parent 11855e06f8
commit 9afbfc2071
6 changed files with 56 additions and 10 deletions

View File

@ -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) {
return request({

View File

@ -176,6 +176,7 @@
v-model="form.activitytime"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions0"
placeholder="选择活动时间"
></el-date-picker>
</el-form-item>
@ -228,6 +229,12 @@ export default {
xnxqOptions: [],
//
selectable: Function,
//
pickerOptions0: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
}
},
//
queryParams: {
pageNum: 1,

View File

@ -11,7 +11,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="所属班级" prop="classid">
<!--<el-form-item label="所属班级" prop="classid">
<el-select v-model="queryParams.classid" placeholder="请选择班级" >
<el-option
v-for="item in classListAll"
@ -20,7 +20,7 @@
:value="item.classid"
/>
</el-select>
</el-form-item>
</el-form-item>-->
<el-form-item label="学年学期" prop="xnxq">
<el-select v-model="queryParams.xnxq" placeholder="请选择学年学期" clearable size="small">
<el-option
@ -87,7 +87,7 @@
</el-row>
<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="name" />
<el-table-column label="活动类型" align="center" prop="type" :formatter="typeFormat" />
@ -107,6 +107,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['benyi:schoolcalendarclass:edit']"
:disabled="!checkSelectable(scope.row)"
>修改</el-button>
<el-button
size="mini"
@ -114,6 +115,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['benyi:schoolcalendarclass:remove']"
:disabled="!checkSelectable(scope.row)"
>删除</el-button>
</template>
</el-table-column>
@ -148,6 +150,7 @@
v-model="form.activitytime"
type="date"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions0"
placeholder="选择活动时间">
</el-date-picker>
</el-form-item>
@ -196,6 +199,14 @@ export default {
typeOptions: [],
//
xnxqOptions: [],
//
selectable: Function,
//
pickerOptions0: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
}
},
//
queryParams: {
pageNum: 1,
@ -250,6 +261,18 @@ export default {
xnxqFormat(row, column) {
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() {
this.open = false;

View File

@ -50,6 +50,7 @@ import RaddarChart from "./dashboard/RaddarChart";
import PieChart from "./dashboard/PieChart";
import BarChart from "./dashboard/BarChart";
import { getSchoolCalendars } from "@/api/benyi/schoolcalendar";
//import { getSchoolCalendarsClass } from "@/api/benyi/schoolcalendarclass";
export default {
name: "Index",

View File

@ -48,10 +48,17 @@ public class BySchoolcalendarClassController extends BaseController
@GetMapping("/list")
public TableDataInfo list(BySchoolcalendarClass bySchoolcalendarClass)
{
startPage();
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
System.out.println("---------------------分页"+list);
return getDataTable(list);
String strClassId = schoolCommon.getClassId();
if(!schoolCommon.isStringEmpty(strClassId)){
startPage();
bySchoolcalendarClass.setClassid(schoolCommon.getClassId());
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
System.out.println("---------------------分页"+list);
return getDataTable(list);
}else{
return null;
}
}
/**

View File

@ -44,10 +44,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<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,
c.bjbh, c.bjmc
from by_schoolcalendar_class sc
left join by_class c on sc.classid = c.bjbh
from by_schoolcalendar_class sc, by_class c
<where>
sc.classid = c.bjbh
<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="classid != null and classid != ''"> and sc.classid = #{classid}</if>