20200523-zlp-1
园历样式
This commit is contained in:
parent
9180d882fd
commit
89d61dd1f7
@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
// 查询园历管理(本一)列表
|
||||
export function listCalendar(query) {
|
||||
return request({
|
||||
url: '/system/calendar/list',
|
||||
url: '/benyi/calendar/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
@ -12,7 +12,7 @@ export function listCalendar(query) {
|
||||
// 查询园历管理(本一)详细
|
||||
export function getCalendar(id) {
|
||||
return request({
|
||||
url: '/system/calendar/' + id,
|
||||
url: '/benyi/calendar/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@ -20,7 +20,7 @@ export function getCalendar(id) {
|
||||
// 新增园历管理(本一)
|
||||
export function addCalendar(data) {
|
||||
return request({
|
||||
url: '/system/calendar',
|
||||
url: '/benyi/calendar',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
@ -29,7 +29,7 @@ export function addCalendar(data) {
|
||||
// 修改园历管理(本一)
|
||||
export function updateCalendar(data) {
|
||||
return request({
|
||||
url: '/system/calendar',
|
||||
url: '/benyi/calendar',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
@ -38,7 +38,7 @@ export function updateCalendar(data) {
|
||||
// 删除园历管理(本一)
|
||||
export function delCalendar(id) {
|
||||
return request({
|
||||
url: '/system/calendar/' + id,
|
||||
url: '/benyi/calendar/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -46,7 +46,7 @@ export function delCalendar(id) {
|
||||
// 导出园历管理(本一)
|
||||
export function exportCalendar(query) {
|
||||
return request({
|
||||
url: '/system/calendar/export',
|
||||
url: '/benyi/calendar/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
@ -55,6 +55,7 @@ export default {
|
||||
& .sidebar-logo-link {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
|
||||
& .sidebar-logo {
|
||||
width: 32px;
|
||||
@ -66,7 +67,7 @@ export default {
|
||||
& .sidebar-title {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
color: #fff;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
|
@ -222,9 +222,9 @@ export default {
|
||||
margin-right: 15px;
|
||||
}
|
||||
&.active {
|
||||
background-color: #42b983;
|
||||
background-color: #2C3E50;
|
||||
color: #fff;
|
||||
border-color: #42b983;
|
||||
border-color: #2C3E50;
|
||||
&::before {
|
||||
content: '';
|
||||
background: #fff;
|
||||
|
@ -3,50 +3,24 @@
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="活动类型" prop="type">
|
||||
<el-select v-model="queryParams.type" placeholder="请选择活动类型" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
<el-option
|
||||
v-for="dict in calendartypeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="activitytime">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="queryParams.activitytime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择活动时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动结束时间" prop="activityendtime">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="queryParams.activityendtime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择活动结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动样式颜色" prop="stylecolor">
|
||||
<el-input
|
||||
v-model="queryParams.stylecolor"
|
||||
placeholder="请输入活动样式颜色"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createuserid">
|
||||
<el-input
|
||||
v-model="queryParams.createuserid"
|
||||
placeholder="请输入创建人"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createtime">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="queryParams.createtime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择创建时间">
|
||||
</el-date-picker>
|
||||
placeholder="选择活动时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@ -61,7 +35,7 @@
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:calendar:add']"
|
||||
v-hasPermi="['benyi:calendar:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -71,7 +45,7 @@
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:calendar:edit']"
|
||||
v-hasPermi="['benyi:calendar:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -81,7 +55,7 @@
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:calendar:remove']"
|
||||
v-hasPermi="['benyi:calendar:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
@ -90,7 +64,7 @@
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:calendar:export']"
|
||||
v-hasPermi="['benyi:calendar:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -99,19 +73,15 @@
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="标识" align="center" prop="id" />
|
||||
<el-table-column label="名称" align="center" prop="name" />
|
||||
<el-table-column label="活动类型" align="center" prop="type" />
|
||||
<el-table-column label="活动时间" align="center" prop="activitytime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.activitytime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动结束时间" align="center" prop="activityendtime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.activityendtime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="活动类型"
|
||||
align="center"
|
||||
:formatter="calendartypeFormat"
|
||||
prop="type"
|
||||
/>
|
||||
<el-table-column label="活动开始时间" align="center" prop="activitytime" width="180"></el-table-column>
|
||||
<el-table-column label="活动结束时间" align="center" prop="activityendtime" width="180"></el-table-column>
|
||||
<el-table-column label="活动样式颜色" align="center" prop="stylecolor" />
|
||||
<el-table-column label="创建人" align="center" prop="createuserid" />
|
||||
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createtime) }}</span>
|
||||
@ -124,19 +94,19 @@
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:calendar:edit']"
|
||||
v-hasPermi="['benyi:calendar:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:calendar:remove']"
|
||||
v-hasPermi="['benyi:calendar:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -152,31 +122,36 @@
|
||||
<el-input v-model="form.name" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动类型">
|
||||
<el-select v-model="form.type" placeholder="请选择活动类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
<el-select v-model="form.type" placeholder="请选择活动类型" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in calendartypeOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="activitytime">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
<el-form-item label="起始时间" prop="activitytime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="form.activitytime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择活动时间">
|
||||
</el-date-picker>
|
||||
placeholder="选择活动起始时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动结束时间" prop="activityendtime">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
<el-form-item label="结束时间" prop="activityendtime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
v-model="form.activityendtime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择活动结束时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动样式颜色" prop="stylecolor">
|
||||
<el-input v-model="form.stylecolor" placeholder="请输入活动样式颜色" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人" prop="createuserid">
|
||||
<el-input v-model="form.createuserid" placeholder="请输入创建人" />
|
||||
placeholder="选择活动结束时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -188,7 +163,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCalendar, getCalendar, delCalendar, addCalendar, updateCalendar, exportCalendar } from "@/api/benyi/calendar";
|
||||
import {
|
||||
listCalendar,
|
||||
getCalendar,
|
||||
delCalendar,
|
||||
addCalendar,
|
||||
updateCalendar,
|
||||
exportCalendar
|
||||
} from "@/api/benyi/calendar";
|
||||
|
||||
export default {
|
||||
name: "Calendar",
|
||||
@ -206,6 +188,8 @@ export default {
|
||||
total: 0,
|
||||
// 园历管理(本一)表格数据
|
||||
calendarList: [],
|
||||
//活动类型
|
||||
calendartypeOptions: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -225,14 +209,20 @@ export default {
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
rules: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("sys_schoolcalendartype").then(response => {
|
||||
this.calendartypeOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 学校园历类型--字典状态字典翻译
|
||||
calendartypeFormat(row, column) {
|
||||
return this.selectDictLabel(this.calendartypeOptions, row.type);
|
||||
},
|
||||
/** 查询园历管理(本一)列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
@ -273,9 +263,9 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@ -286,7 +276,7 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
const id = row.id || this.ids;
|
||||
getCalendar(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
@ -324,29 +314,39 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除园历管理(本一)编号为"' + ids + '"的数据项?', "警告", {
|
||||
this.$confirm(
|
||||
'是否确认删除园历管理(本一)编号为"' + ids + '"的数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
return delCalendar(ids);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有园历管理(本一)数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
this.$confirm("是否确认导出所有园历管理(本一)数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return exportCalendar(queryParams);
|
||||
}).then(response => {
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -2,14 +2,15 @@
|
||||
<div class="app-container">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="4" :xs="24">
|
||||
<el-button type="primary">日常活动</el-button>
|
||||
<el-button type="success">教学活动</el-button>
|
||||
<el-button type="info">大型活动</el-button>
|
||||
<el-button type="warning">家长参与</el-button>
|
||||
<el-button type="danger">节假日</el-button>
|
||||
<!-- <Tag type="dot" :color="NORMAL_COLOR">未预约</Tag>
|
||||
<Tag type="dot" :color="USED_COLOR">已预约</Tag>
|
||||
<Tag type="dot" :color="DISABLED_COLOR">已停用</Tag> -->
|
||||
<el-row class="xs-btns-style" :gutter="10">
|
||||
<el-col v-for="item in btns" :key="item.title">
|
||||
<el-button
|
||||
type="primary"
|
||||
class="btn no-border-btn"
|
||||
:style="{background: `${item.color}`}"
|
||||
>{{item.title}}</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
<el-col :span="20" :xs="24">
|
||||
<div>
|
||||
@ -26,9 +27,8 @@
|
||||
:eventLimit="true"
|
||||
:displayEventEnd="true"
|
||||
eventLimitText="更多"
|
||||
@dateClick="handleDateClick"
|
||||
@eventClick="handleEventClick"
|
||||
/>
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -36,47 +36,64 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FullCalendar from '@fullcalendar/vue'
|
||||
import dayGridPlugin from '@fullcalendar/daygrid'
|
||||
import timeGridPlugin from '@fullcalendar/timegrid'
|
||||
import interactionPlugin from '@fullcalendar/interaction'
|
||||
import listPlugin from '@fullcalendar/list';
|
||||
import { getAllSchoolCalendars } from "@/api/benyi/calendar"
|
||||
import FullCalendar from "@fullcalendar/vue";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||
import interactionPlugin from "@fullcalendar/interaction";
|
||||
import listPlugin from "@fullcalendar/list";
|
||||
import { getAllSchoolCalendars } from "@/api/benyi/calendar";
|
||||
export default {
|
||||
name: 'fullcalendar_page',
|
||||
name: "fullcalendar_page",
|
||||
components: {
|
||||
FullCalendar
|
||||
},
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
// DISABLED_COLOR: '#c5c8ce',
|
||||
// USED_COLOR: '#19be6b',
|
||||
// NORMAL_COLOR: '#2db7f5',
|
||||
btns: [
|
||||
{
|
||||
color: "#52c41a",
|
||||
title: "家长参与"
|
||||
},
|
||||
{
|
||||
color: "#135200",
|
||||
title: "大型活动"
|
||||
},
|
||||
{
|
||||
color: "#1890ff",
|
||||
title: "教学活动"
|
||||
},
|
||||
{
|
||||
color: "#eb2f96",
|
||||
title: "节假日"
|
||||
}
|
||||
],
|
||||
views: {
|
||||
list: {
|
||||
noEventsMessage: '暂无日程'
|
||||
}
|
||||
list: {
|
||||
noEventsMessage: "暂无日程"
|
||||
}
|
||||
},
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'dayGridMonth,timeGridWeek,timeGridDay listWeek'
|
||||
left: "prev,next today",
|
||||
center: "title",
|
||||
right: "dayGridMonth,timeGridWeek,timeGridDay listWeek"
|
||||
},
|
||||
buttonText: {
|
||||
today: '今天',
|
||||
month: '月',
|
||||
week: '周',
|
||||
day: '日',
|
||||
list: '周列表'
|
||||
today: "今天",
|
||||
month: "月",
|
||||
week: "周",
|
||||
day: "日",
|
||||
list: "周列表"
|
||||
},
|
||||
calendarPlugins: [ // plugins must be defined in the JS
|
||||
calendarPlugins: [
|
||||
// plugins must be defined in the JS
|
||||
dayGridPlugin,
|
||||
timeGridPlugin,
|
||||
interactionPlugin,// needed for dateClick
|
||||
listPlugin
|
||||
interactionPlugin, // needed for dateClick
|
||||
listPlugin
|
||||
],
|
||||
calendarWeekends: true,
|
||||
calendarEvents: [ // initial event data
|
||||
calendarEvents: [
|
||||
// initial event data
|
||||
// {
|
||||
// title: 'Event Now',
|
||||
// start: new Date(),
|
||||
@ -86,15 +103,15 @@ export default {
|
||||
calendarApi: null,
|
||||
calendarData: [],
|
||||
queryParams: {}
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
getAllSchoolCalendars(this.queryParams).then(response => {
|
||||
this.calendarEvents = response.calendarData;
|
||||
});
|
||||
this.calendarEvents = response.calendarData;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getCalendarEvents (info, successCallback, failureCallback) {
|
||||
getCalendarEvents(info, successCallback, failureCallback) {
|
||||
// const events = this.getSchoolCalendarList();
|
||||
console.log("ceshi11111111");
|
||||
getAllSchoolCalendars(this.queryParams).then(response => {
|
||||
@ -119,46 +136,64 @@ export default {
|
||||
// color:'green'
|
||||
// }
|
||||
// ]
|
||||
successCallback(events)
|
||||
successCallback(events);
|
||||
},
|
||||
toggleWeekends () {
|
||||
this.calendarWeekends = !this.calendarWeekends // update a property
|
||||
toggleWeekends() {
|
||||
this.calendarWeekends = !this.calendarWeekends; // update a property
|
||||
},
|
||||
gotoPast () {
|
||||
this.calendarApi.gotoDate('2019-08-01') // call a method on the Calendar object
|
||||
gotoPast() {
|
||||
this.calendarApi.gotoDate("2019-08-01"); // call a method on the Calendar object
|
||||
},
|
||||
handleDateClick (arg) {
|
||||
if (confirm('Would you like to add an event to ' + arg.dateStr + ' ?')) {
|
||||
this.calendarEvents.push({ // add new event data
|
||||
title: 'New Event',
|
||||
handleDateClick(arg) {
|
||||
if (confirm("Would you like to add an event to " + arg.dateStr + " ?")) {
|
||||
this.calendarEvents.push({
|
||||
// add new event data
|
||||
title: "New Event",
|
||||
start: arg.date,
|
||||
allDay: arg.allDay
|
||||
})
|
||||
});
|
||||
}
|
||||
this.calendarApi.refetchEvents()
|
||||
this.calendarApi.refetchEvents();
|
||||
},
|
||||
handleEventClick (info) {
|
||||
alert('Event: ' + info.event.title)
|
||||
handleEventClick(info) {
|
||||
alert("活动: " + info.event.title);
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.calendarApi = this.$refs.fullCalendar.getApi()
|
||||
mounted() {
|
||||
this.calendarApi = this.$refs.fullCalendar.getApi();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scope>
|
||||
// you must include each plugins' css
|
||||
// paths prefixed with ~ signify node_modules
|
||||
@import '~@fullcalendar/core/main.css';
|
||||
@import '~@fullcalendar/daygrid/main.css';
|
||||
@import '~@fullcalendar/timegrid/main.css';
|
||||
@import '~@fullcalendar/list/main.css';
|
||||
.panel {
|
||||
padding-top: 64px;
|
||||
color: deeppink;
|
||||
@import "~@fullcalendar/core/main.css";
|
||||
@import "~@fullcalendar/daygrid/main.css";
|
||||
@import "~@fullcalendar/timegrid/main.css";
|
||||
@import "~@fullcalendar/list/main.css";
|
||||
.calendar {
|
||||
width: 820px;
|
||||
}
|
||||
.xs-btns-style {
|
||||
@media screen and (max-width: 768px) {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.el-col {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
.calendar {
|
||||
width: 820px;
|
||||
@media screen and (min-width: 769px) {
|
||||
}
|
||||
.el-col {
|
||||
margin-bottom: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.btn {
|
||||
width: 96px;
|
||||
}
|
||||
.no-border-btn {
|
||||
border: none;
|
||||
}
|
||||
</style>
|
||||
|
@ -106,7 +106,8 @@
|
||||
/>
|
||||
<el-table-column label="适用范围" align="center" :formatter="scopeFormat" prop="scope" />
|
||||
<el-table-column label="学年学期" align="center" :formatter="xnxqFormat" prop="xnxq" />
|
||||
<el-table-column label="活动时间" align="center" prop="activitytime" width="180" />
|
||||
<el-table-column label="活动开始时间" align="center" prop="activitytime" width="180" />
|
||||
<el-table-column label="活动截止时间" align="center" prop="activityendtime" width="180" />
|
||||
<el-table-column label="创建时间" align="center" prop="createtime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createtime) }}</span>
|
||||
@ -172,13 +173,16 @@
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
style="width: 200px"
|
||||
style="width: 240px"
|
||||
v-model="form.activitytime"
|
||||
type="date"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
:picker-options="pickerOptions0"
|
||||
placeholder="选择活动时间"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
<el-input v-model="form.activityendtime" v-if="false" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -364,8 +368,13 @@ export default {
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
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;
|
||||
this.scopeOptions = response.scopes;
|
||||
this.form.scope = response.scopeIds;
|
||||
this.open = true;
|
||||
@ -378,6 +387,12 @@ export default {
|
||||
if (valid) {
|
||||
var arrscope = this.form.scope;
|
||||
this.form.scope = arrscope.join(";");
|
||||
|
||||
var v1 = this.form.activitytime[0];
|
||||
var v2 = this.form.activitytime[1];
|
||||
this.form.activitytime = v1;
|
||||
this.form.activityendtime = v2;
|
||||
|
||||
if (this.form.id != undefined) {
|
||||
updateSchoolcalendar(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
@ -389,6 +404,7 @@ export default {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
//console.log(this.form.activitytime[1]);
|
||||
addSchoolcalendar(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
|
@ -7,9 +7,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.ServletUtils;
|
||||
import com.ruoyi.framework.security.LoginUser;
|
||||
import com.ruoyi.framework.security.service.TokenService;
|
||||
import com.ruoyi.project.benyi.domain.*;
|
||||
import com.ruoyi.project.benyi.service.IBySchoolcalendarClassService;
|
||||
import com.ruoyi.project.benyi.service.IBySchoolcalendarService;
|
||||
@ -63,7 +60,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 查询园历管理(本一)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:list')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByCalendar byCalendar)
|
||||
{
|
||||
@ -75,7 +72,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 导出园历管理(本一)列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:export')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:export')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByCalendar byCalendar)
|
||||
@ -88,7 +85,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 获取园历管理(本一)详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:query')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
@ -98,18 +95,21 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 新增园历管理(本一)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:add')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:add')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByCalendar byCalendar)
|
||||
{
|
||||
byCalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
byCalendar.setStylecolor("red");
|
||||
byCalendar.setCreatetime(new Date());
|
||||
return toAjax(byCalendarService.insertByCalendar(byCalendar));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改园历管理(本一)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:edit')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:edit')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByCalendar byCalendar)
|
||||
@ -120,7 +120,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 删除园历管理(本一)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:calendar:remove')")
|
||||
@PreAuthorize("@ss.hasPermi('benyi:calendar:remove')")
|
||||
@Log(title = "园历管理(本一)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
@ -131,7 +131,7 @@ public class ByCalendarController extends BaseController
|
||||
/**
|
||||
* 园历展示(本一)
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:list')")
|
||||
//@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:list')")
|
||||
@GetMapping("/getAllSchoolCalendars")
|
||||
public AjaxResult getAllSchoolCalendars(ByCalendar byCalendar) {
|
||||
//将类型颜色样式加载到字典
|
||||
@ -151,6 +151,7 @@ public class ByCalendarController extends BaseController
|
||||
ByCalendarShow by = new ByCalendarShow();
|
||||
by.setId(calendar.getId());
|
||||
by.setTitle(calendar.getName());
|
||||
System.out.println("title:"+calendar.getName());
|
||||
by.setStart(formatter.format(calendar.getActivitytime()));
|
||||
by.setEnd(formatter.format(calendar.getActivityendtime()));
|
||||
by.setColor(hashMap.get(calendar.getType()));
|
||||
@ -242,7 +243,7 @@ public class ByCalendarController extends BaseController
|
||||
by.setStart(timefor);
|
||||
by.setEnd(timefor);
|
||||
//教师生日颜色
|
||||
by.setColor("aqua");
|
||||
by.setColor("#13c2c2");
|
||||
listvi.add(by);
|
||||
System.out.println("当前年工作日期timefor===" + timefor+"====="+listTeacherBirth.get(i).getUser().getNickName()+"-合同满年期限");
|
||||
}
|
||||
@ -257,7 +258,7 @@ public class ByCalendarController extends BaseController
|
||||
by.setStart(timefor);
|
||||
by.setEnd(timefor);
|
||||
//教师生日颜色
|
||||
by.setColor("aqua");
|
||||
by.setColor("#722ed1");
|
||||
listvi.add(by);
|
||||
System.out.println("当前年生日timefor===" + timefor+"====="+listTeacherBirth.get(i).getUser().getNickName()+"-生日");
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@ -53,10 +54,11 @@ public class BySchoolcalendarClassController extends BaseController
|
||||
startPage();
|
||||
bySchoolcalendarClass.setClassid(strClassId);
|
||||
List<BySchoolcalendarClass> list = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||
System.out.println("---------------------分页"+list);
|
||||
//System.out.println("---------------------分页"+list);
|
||||
return getDataTable(list);
|
||||
}else{
|
||||
return null;
|
||||
List<BySchoolcalendarClass> list =new ArrayList<>();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
}
|
||||
@ -69,7 +71,7 @@ public class BySchoolcalendarClassController extends BaseController
|
||||
public TableDataInfo listAll(BySchoolcalendarClass bySchoolcalendarClass)
|
||||
{
|
||||
List<BySchoolcalendarClass> listAll = bySchoolcalendarClassService.selectBySchoolcalendarClassList(bySchoolcalendarClass);
|
||||
System.out.println("---------------------没有分页"+listAll);
|
||||
//System.out.println("---------------------没有分页"+listAll);
|
||||
return getDataTable(listAll);
|
||||
}
|
||||
|
||||
|
@ -168,6 +168,7 @@ public class BySchoolcalendarController extends BaseController {
|
||||
//首先判断 当前用户是否为学校
|
||||
if (schoolCommon.isSchool()) {
|
||||
bySchoolcalendar.setCreatetime(new Date());
|
||||
//System.out.println("activitytime="+bySchoolcalendar.getActivitytime());
|
||||
String strXnxq = schoolCommon.getCurrentXnXq(bySchoolcalendar.getActivitytime());
|
||||
bySchoolcalendar.setXnxq(strXnxq);
|
||||
bySchoolcalendar.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
|
@ -29,11 +29,11 @@ public class ByCalendar extends BaseEntity
|
||||
private String type;
|
||||
|
||||
/** 活动时间 */
|
||||
@Excel(name = "活动时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date activitytime;
|
||||
|
||||
/** 活动结束时间 */
|
||||
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date activityendtime;
|
||||
|
||||
/** 活动样式颜色 */
|
||||
|
@ -61,7 +61,7 @@ public class BySchoolcalendar extends BaseEntity {
|
||||
/**
|
||||
* 活动结束时间
|
||||
*/
|
||||
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date activityendtime;
|
||||
|
||||
/**
|
||||
|
@ -48,7 +48,7 @@ public class BySchoolcalendarClass extends BaseEntity
|
||||
/**
|
||||
* 活动结束时间
|
||||
*/
|
||||
@Excel(name = "活动结束时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date activityendtime;
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user