幼儿园和幼儿园班级园历展示优化,弹出层显示
This commit is contained in:
parent
13f5bcfe89
commit
23dc256ce0
@ -33,6 +33,61 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 添加或修改园历管理(班级)对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" class="v-dialog">
|
||||||
|
<el-form ref="form" :model="form" label-width="80px">
|
||||||
|
<el-form-item label="事件名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
disabled="true"
|
||||||
|
v-model="form.name"
|
||||||
|
size="small"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动类型" prop="type">
|
||||||
|
<el-select
|
||||||
|
disabled="true"
|
||||||
|
v-model="form.type"
|
||||||
|
size="small"
|
||||||
|
placeholder="请选择活动类型"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in typeOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="活动时间" prop="activitytime">
|
||||||
|
<el-date-picker
|
||||||
|
disabled="true"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
class="my-date-picker"
|
||||||
|
v-model="form.activitytime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
range-separator="-"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
></el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input
|
||||||
|
disabled="true"
|
||||||
|
type="textarea"
|
||||||
|
v-model="form.remark"
|
||||||
|
size="small"
|
||||||
|
placeholder=""
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -43,6 +98,8 @@ import timeGridPlugin from "@fullcalendar/timegrid";
|
|||||||
import interactionPlugin from "@fullcalendar/interaction";
|
import interactionPlugin from "@fullcalendar/interaction";
|
||||||
import listPlugin from "@fullcalendar/list";
|
import listPlugin from "@fullcalendar/list";
|
||||||
import { getAllSchoolCalendars } from "@/api/benyi/calendar";
|
import { getAllSchoolCalendars } from "@/api/benyi/calendar";
|
||||||
|
import { getSchoolcalendarclass } from "@/api/benyi/schoolcalendarclass";
|
||||||
|
import { getSchoolcalendar } from "@/api/benyi/schoolcalendar";
|
||||||
export default {
|
export default {
|
||||||
name: "fullcalendar_page",
|
name: "fullcalendar_page",
|
||||||
components: {
|
components: {
|
||||||
@ -117,6 +174,14 @@ export default {
|
|||||||
],
|
],
|
||||||
calendarApi: null,
|
calendarApi: null,
|
||||||
calendarData: [],
|
calendarData: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 活动类型字典
|
||||||
|
typeOptions: [],
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
queryParams: {},
|
queryParams: {},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -124,10 +189,59 @@ export default {
|
|||||||
getAllSchoolCalendars(this.queryParams).then((response) => {
|
getAllSchoolCalendars(this.queryParams).then((response) => {
|
||||||
this.calendarEvents = response.calendarData;
|
this.calendarEvents = response.calendarData;
|
||||||
});
|
});
|
||||||
|
this.getDicts("sys_schoolcalendartype").then((response) => {
|
||||||
|
this.typeOptions = response.data;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleEventClick(info) {
|
handleEventClick(info) {
|
||||||
this.msgSuccess("事件: " + info.event.title);
|
//console.log(info);
|
||||||
|
var group = info.event.groupId;
|
||||||
|
//group==1 代表幼儿园班级园历信息
|
||||||
|
//group==2 代表幼儿园园历信息
|
||||||
|
if (group == "1") {
|
||||||
|
var id = info.event.id;
|
||||||
|
this.title = "园历详细信息";
|
||||||
|
this.open = true;
|
||||||
|
var myArray = new Array(2);
|
||||||
|
getSchoolcalendarclass(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
myArray[0] = response.data.activitytime;
|
||||||
|
myArray[1] = response.data.activityendtime;
|
||||||
|
//console.log(myArray);
|
||||||
|
this.form.activitytime = myArray;
|
||||||
|
});
|
||||||
|
} else if (group == "2") {
|
||||||
|
var id = info.event.id;
|
||||||
|
this.title = "园历详细信息";
|
||||||
|
this.open = true;
|
||||||
|
var myArray = new Array(2);
|
||||||
|
getSchoolcalendar(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
myArray[0] = response.data.activitytime;
|
||||||
|
myArray[1] = response.data.activityendtime;
|
||||||
|
//console.log(myArray);
|
||||||
|
this.form.activitytime = myArray;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.msgSuccess("事件: " + info.event.title);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: undefined,
|
||||||
|
name: undefined,
|
||||||
|
type: undefined,
|
||||||
|
activitytime: undefined,
|
||||||
|
remark: undefined,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -205,4 +319,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.el-select {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.my-date-picker {
|
||||||
|
width: 100% !important;
|
||||||
|
}
|
||||||
|
.no-margin ::v-deep.el-form-item__content {
|
||||||
|
margin: 0 !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
@ -237,6 +237,7 @@ public class ByCalendarController extends BaseController {
|
|||||||
by.setStart(formatter.format(bsc.getActivitytime()));
|
by.setStart(formatter.format(bsc.getActivitytime()));
|
||||||
by.setEnd(formatter.format(bsc.getActivityendtime()));
|
by.setEnd(formatter.format(bsc.getActivityendtime()));
|
||||||
by.setColor(hashMap.get(bsc.getType()));
|
by.setColor(hashMap.get(bsc.getType()));
|
||||||
|
by.setGroupId("2");//代表学校园历信息
|
||||||
listvi.add(by);
|
listvi.add(by);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -324,6 +325,7 @@ public class ByCalendarController extends BaseController {
|
|||||||
by.setStart(formatter.format(bscc.getActivitytime()));
|
by.setStart(formatter.format(bscc.getActivitytime()));
|
||||||
by.setEnd(formatter.format(bscc.getActivityendtime()));
|
by.setEnd(formatter.format(bscc.getActivityendtime()));
|
||||||
by.setColor(hashMap.get(bscc.getType()));
|
by.setColor(hashMap.get(bscc.getType()));
|
||||||
|
by.setGroupId("1");//代表班级园历信息
|
||||||
listvi.add(by);
|
listvi.add(by);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ public class BySchoolcalendarClassController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取园历管理(班级)详细信息
|
* 获取园历管理(班级)详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:query')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendarclass:query')"+ "||@ss.hasPermi('benyi:schoolcalendar:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
return AjaxResult.success(bySchoolcalendarClassService.selectBySchoolcalendarClassById(id));
|
return AjaxResult.success(bySchoolcalendarClassService.selectBySchoolcalendarClassById(id));
|
||||||
|
@ -145,7 +145,7 @@ public class BySchoolcalendarController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* 获取园历管理详细信息
|
* 获取园历管理详细信息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:query')")
|
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:query')" + "||@ss.hasPermi('benyi:schoolcalendarclass:query')")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
AjaxResult ajax = AjaxResult.success();
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
@ -11,6 +11,7 @@ public class ByCalendarShow {
|
|||||||
private String start;
|
private String start;
|
||||||
private String end;
|
private String end;
|
||||||
private String color;
|
private String color;
|
||||||
|
private String groupId;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -51,4 +52,12 @@ public class ByCalendarShow {
|
|||||||
public void setColor(String color) {
|
public void setColor(String color) {
|
||||||
this.color = color;
|
this.color = color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGroupId() {
|
||||||
|
return groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupId(String groupId) {
|
||||||
|
this.groupId = groupId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user