20200523-zlp-2
园历样式
This commit is contained in:
parent
89d61dd1f7
commit
ae513f1426
@ -111,52 +111,8 @@ export default {
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
getCalendarEvents(info, successCallback, failureCallback) {
|
||||
// const events = this.getSchoolCalendarList();
|
||||
console.log("ceshi11111111");
|
||||
getAllSchoolCalendars(this.queryParams).then(response => {
|
||||
this.calendarData = response.calendarData;
|
||||
});
|
||||
console.log("ceshi22222222");
|
||||
const events = this.calendarData;
|
||||
console.log(this.calendarData);
|
||||
console.log(events);
|
||||
// const events = [
|
||||
// ...this.calendarEvents,
|
||||
// {
|
||||
// title: '五一劳动节',
|
||||
// start: '2020-05-01 00:00:00',
|
||||
// end: '2020-05-06 00:00:00',
|
||||
// color:'orange'
|
||||
// },
|
||||
// {
|
||||
// start: '2020-05-02 10:00:00',
|
||||
// end: '2020-05-02 14:00:00',
|
||||
// title: '东南大学计算机学术会议',
|
||||
// color:'green'
|
||||
// }
|
||||
// ]
|
||||
successCallback(events);
|
||||
},
|
||||
toggleWeekends() {
|
||||
this.calendarWeekends = !this.calendarWeekends; // update a property
|
||||
},
|
||||
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",
|
||||
start: arg.date,
|
||||
allDay: arg.allDay
|
||||
});
|
||||
}
|
||||
this.calendarApi.refetchEvents();
|
||||
},
|
||||
handleEventClick(info) {
|
||||
alert("活动: " + info.event.title);
|
||||
this.msgSuccess("活动: " + info.event.title);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -196,4 +152,11 @@ export default {
|
||||
.no-border-btn {
|
||||
border: none;
|
||||
}
|
||||
.fc-header-toolbar {
|
||||
@media screen and (max-width: 768px) {
|
||||
.fc-left > .fc-today-button, .fc-right > .fc-listWeek-button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@ -32,12 +32,15 @@
|
||||
</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>
|
||||
placeholder="选择活动时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
@ -86,14 +89,18 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="schoolcalendarclassList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="checkSelectable"/>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="schoolcalendarclassList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<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" />
|
||||
<el-table-column label="所属班级" align="center" prop="byClass.bjmc" />
|
||||
<el-table-column label="学年学期" align="center" prop="xnxq" :formatter="xnxqFormat" />
|
||||
<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="createtime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createtime) }}</span>
|
||||
@ -120,7 +127,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -135,7 +142,7 @@
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="活动类型">
|
||||
<el-form-item label="活动类型" prop="type">
|
||||
<el-select v-model="form.type" placeholder="请选择活动类型">
|
||||
<el-option
|
||||
v-for="dict in typeOptions"
|
||||
@ -146,13 +153,19 @@
|
||||
</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: 240px"
|
||||
v-model="form.activitytime"
|
||||
type="date"
|
||||
type="daterange"
|
||||
value-format="yyyy-MM-dd"
|
||||
:picker-options="pickerOptions0"
|
||||
placeholder="选择活动时间">
|
||||
</el-date-picker>
|
||||
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">
|
||||
@ -164,14 +177,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listSchoolcalendarclass,
|
||||
import {
|
||||
listSchoolcalendarclass,
|
||||
listSchoolcalendarclassAll,
|
||||
getSchoolcalendarclass,
|
||||
delSchoolcalendarclass,
|
||||
addSchoolcalendarclass,
|
||||
updateSchoolcalendarclass,
|
||||
exportSchoolcalendarclass } from "@/api/benyi/schoolcalendarclass";
|
||||
getSchoolcalendarclass,
|
||||
delSchoolcalendarclass,
|
||||
addSchoolcalendarclass,
|
||||
updateSchoolcalendarclass,
|
||||
exportSchoolcalendarclass
|
||||
} from "@/api/benyi/schoolcalendarclass";
|
||||
|
||||
export default {
|
||||
name: "Schoolcalendarclass",
|
||||
@ -223,7 +237,15 @@ export default {
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
// 表单校验
|
||||
rules: {
|
||||
name: [{ required: true, message: "名称不能为空", trigger: "blur" }],
|
||||
type: [
|
||||
{ required: true, message: "活动类型不能为空", trigger: "blur" }
|
||||
],
|
||||
activitytime: [
|
||||
{ required: true, message: "活动时间不能为空", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -248,7 +270,7 @@ export default {
|
||||
});
|
||||
},
|
||||
/** 查询所有班级名称列表 */
|
||||
getListAll(){
|
||||
getListAll() {
|
||||
listSchoolcalendarclassAll(this.queryParams).then(response => {
|
||||
this.classListAll = response.rows;
|
||||
});
|
||||
@ -305,9 +327,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() {
|
||||
@ -318,9 +340,14 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
const id = row.id || this.ids;
|
||||
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;
|
||||
this.open = true;
|
||||
this.title = "修改园历管理(班级)";
|
||||
});
|
||||
@ -329,6 +356,11 @@ export default {
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
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) {
|
||||
updateSchoolcalendarclass(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
@ -356,29 +388,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 delSchoolcalendarclass(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 exportSchoolcalendarclass(queryParams);
|
||||
}).then(response => {
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -143,7 +143,7 @@ public class ByCalendarController extends BaseController
|
||||
}
|
||||
//定义返回列表
|
||||
List<ByCalendarShow> listvi= new ArrayList<>();
|
||||
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd");
|
||||
//加载本一园历
|
||||
List<ByCalendar> list = byCalendarService.selectByCalendarList(byCalendar);
|
||||
if(list.size()>0){
|
||||
|
Loading…
x
Reference in New Issue
Block a user