20200422-zlp-1
园历展示
This commit is contained in:
parent
a2fa5e6428
commit
cf20c0d85b
@ -9,6 +9,15 @@ export function listSchoolcalendar(query) {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询园历列表
|
||||
export function getSchoolCalendars(query) {
|
||||
return request({
|
||||
url: '/benyi/schoolcalendar/getSchoolCalendars',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询园历管理详细
|
||||
export function getSchoolcalendar(id) {
|
||||
return request({
|
||||
|
@ -96,7 +96,7 @@
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<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="活动类型"
|
||||
@ -292,7 +292,9 @@ export default {
|
||||
/** 查询园历管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSchoolcalendar(this.queryParams).then(response => {
|
||||
listSchoolcalendar(
|
||||
this.addDateRange(this.queryParams, this.dateRange)
|
||||
).then(response => {
|
||||
this.schoolcalendarList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -321,6 +323,7 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.dateRange = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
@ -342,6 +345,8 @@ export default {
|
||||
const id = row.id || this.ids;
|
||||
getSchoolcalendar(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.scopeOptions = response.scopes;
|
||||
this.form.scope = response.scopeIds;
|
||||
this.open = true;
|
||||
this.title = "修改园历管理";
|
||||
});
|
||||
|
@ -24,12 +24,15 @@
|
||||
<!--自定义内容-->
|
||||
<div>
|
||||
<div class="calendar-day">{{ data.day.split('-').slice(2).join('-') }}</div>
|
||||
<div v-for="item in calendarData">
|
||||
<div v-if="(item.months).indexOf(data.day.split('-').slice(1)[0])!=-1">
|
||||
<div v-if="(item.days).indexOf(data.day.split('-').slice(2).join('-'))!=-1">
|
||||
<el-tooltip class="item" effect="dark" :content="item.things" placement="right">
|
||||
<div class="is-selected">{{item.things}}</div>
|
||||
</el-tooltip>
|
||||
<div v-for="(item,index) in calendarData" :key="index">
|
||||
<div v-if="(item.years).indexOf(data.day.split('-').slice(0)[0])!=-1">
|
||||
<div v-if="(item.months).indexOf(data.day.split('-').slice(1)[0])!=-1">
|
||||
<div v-if="(item.days).indexOf(data.day.split('-').slice(2).join('-'))!=-1">
|
||||
<el-tooltip class="item" effect="dark" :content="item.things" placement="right">
|
||||
<div class="is-selected">{{item.things}}</div>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div v-else></div>
|
||||
</div>
|
||||
<div v-else></div>
|
||||
</div>
|
||||
@ -46,6 +49,7 @@
|
||||
import RaddarChart from "./dashboard/RaddarChart";
|
||||
import PieChart from "./dashboard/PieChart";
|
||||
import BarChart from "./dashboard/BarChart";
|
||||
import { getSchoolCalendars } from "@/api/benyi/schoolcalendar";
|
||||
|
||||
export default {
|
||||
name: "Index",
|
||||
@ -56,16 +60,24 @@ export default {
|
||||
BarChart
|
||||
},
|
||||
data() {
|
||||
return {calendarData: [
|
||||
{ months: ['09', '11'],days: ['15'],things: '看电影' },
|
||||
{ months: ['10', '11'], days: ['02'],things: '去公园野炊' },
|
||||
{ months: ['11'], days: ['02'],things: '看星星' },
|
||||
{ months: ['11'], days: ['02'],things: '看月亮' }
|
||||
],
|
||||
value: new Date()
|
||||
return {
|
||||
calendarData: [],
|
||||
value: new Date(),
|
||||
// 查询参数
|
||||
queryParams: {}
|
||||
};
|
||||
},
|
||||
methods: {}
|
||||
created() {
|
||||
this.getSchoolCalendarList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询园历列表 */
|
||||
getSchoolCalendarList() {
|
||||
getSchoolCalendars(this.queryParams).then(response => {
|
||||
this.calendarData = response.calendarData;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-form ref="form" :model="user" :rules="rules" label-width="80px">
|
||||
<el-form-item label="用户昵称" prop="nickName">
|
||||
<el-form-item label="用户姓名" prop="nickName">
|
||||
<el-input v-model="user.nickName" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="phonenumber">
|
||||
|
@ -1,10 +1,14 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.project.benyi.domain.ByThings;
|
||||
import com.ruoyi.project.common.SchoolCommon;
|
||||
import com.ruoyi.project.system.service.ISysDictDataService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@ -37,6 +41,8 @@ public class BySchoolcalendarController extends BaseController {
|
||||
private IBySchoolcalendarService bySchoolcalendarService;
|
||||
@Autowired
|
||||
private SchoolCommon schoolCommon;
|
||||
@Autowired
|
||||
private ISysDictDataService dictDataService;
|
||||
|
||||
/**
|
||||
* 查询园历管理列表
|
||||
@ -49,6 +55,36 @@ public class BySchoolcalendarController extends BaseController {
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询园历管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:list')")
|
||||
@GetMapping("/getSchoolCalendars")
|
||||
public AjaxResult getSchoolCalendars(BySchoolcalendar bySchoolcalendar) {
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
bySchoolcalendar.setXnxq(schoolCommon.getCurrentXn());
|
||||
List<BySchoolcalendar> list = bySchoolcalendarService.selectBySchoolcalendarList(bySchoolcalendar);
|
||||
ByThings byThings=null;
|
||||
List<ByThings> listThings=new ArrayList<>();
|
||||
if(list!=null&&list.size()>0){
|
||||
for (int i=0;i<list.size();i++){
|
||||
byThings=new ByThings();
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String strActivitytime= formatter.format(list.get(i).getActivitytime());
|
||||
System.out.println("活动时间==="+strActivitytime);
|
||||
byThings.setYears(strActivitytime.split("-")[0]);
|
||||
byThings.setMonths(strActivitytime.split("-")[1]);
|
||||
byThings.setDays(strActivitytime.split("-")[2]);
|
||||
byThings.setThings(list.get(i).getName());
|
||||
|
||||
listThings.add(byThings);
|
||||
}
|
||||
}
|
||||
|
||||
ajax.put("calendarData",listThings);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出园历管理列表
|
||||
*/
|
||||
@ -67,7 +103,14 @@ public class BySchoolcalendarController extends BaseController {
|
||||
@PreAuthorize("@ss.hasPermi('benyi:schoolcalendar:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(bySchoolcalendarService.selectBySchoolcalendarById(id));
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
BySchoolcalendar bySchoolcalendar = bySchoolcalendarService.selectBySchoolcalendarById(id);
|
||||
ajax.put(AjaxResult.DATA_TAG, bySchoolcalendar);
|
||||
String dictType = "sys_yebjlx";
|
||||
ajax.put("scopes", dictDataService.selectDictDataByType(dictType));
|
||||
String strScope=bySchoolcalendar.getScope();
|
||||
ajax.put("scopeIds", strScope.split(";"));
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,47 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
public class ByThings {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public String getYears() {
|
||||
return years;
|
||||
}
|
||||
|
||||
public void setYears(String years) {
|
||||
this.years = years;
|
||||
}
|
||||
|
||||
public String getMonths() {
|
||||
return months;
|
||||
}
|
||||
|
||||
public void setMonths(String months) {
|
||||
this.months = months;
|
||||
}
|
||||
|
||||
public String getDays() {
|
||||
return days;
|
||||
}
|
||||
|
||||
public void setDays(String days) {
|
||||
this.days = days;
|
||||
}
|
||||
|
||||
public String getThings() {
|
||||
return things;
|
||||
}
|
||||
|
||||
public void setThings(String things) {
|
||||
this.things = things;
|
||||
}
|
||||
|
||||
private String years;
|
||||
|
||||
private String months;
|
||||
|
||||
private String days;
|
||||
|
||||
private String things;
|
||||
|
||||
|
||||
}
|
@ -26,11 +26,16 @@
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="type != null and type != ''">and type = #{type}</if>
|
||||
<if test="scope != null and scope != ''">and scope like concat('%', #{scope}, '%')</if>
|
||||
<if test="xnxq != null and xnxq != ''">and xnxq = #{xnxq}</if>
|
||||
<if test="xnxq != null and xnxq != ''">and xnxq like concat('%', #{xnxq}, '%')</if>
|
||||
<if test="deptid != null ">and dept_id = #{deptid}</if>
|
||||
<if test="activitytime != null ">and activitytime = #{activitytime}</if>
|
||||
<if test="createuserid != null ">and createuserid = #{createuserid}</if>
|
||||
<if test="createtime != null ">and createtime = #{createtime}</if>
|
||||
<if test="beginTime != null and beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND date_format(activitytime,'%y%m%d') >= date_format(#{beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''"><!-- 结束时间检索 -->
|
||||
AND date_format(activitytime,'%y%m%d') <= date_format(#{endTime},'%y%m%d')
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
${dataScope}
|
||||
|
||||
|
@ -36,6 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND post_name like concat('%', #{postName}, '%')
|
||||
</if>
|
||||
</where>
|
||||
|
||||
order by post_sort
|
||||
</select>
|
||||
|
||||
<select id="selectPostAll" resultMap="SysPostResult">
|
||||
|
@ -58,12 +58,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectRoleAll" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
WHERE r.del_flag = '0'
|
||||
</select>
|
||||
|
||||
<select id="selectYeyRoleAll" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.purpose = '1' and r.del_flag = '0'
|
||||
where r.purpose = '1'
|
||||
</select>
|
||||
|
||||
<select id="selectRoleListByUserId" parameterType="Long" resultType="Integer">
|
||||
@ -71,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from sys_role r
|
||||
left join sys_user_role ur on ur.role_id = r.role_id
|
||||
left join sys_user u on u.user_id = ur.user_id
|
||||
where u.user_id = #{userId} and r.del_flag = '0'
|
||||
where u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectYeyRoleListByUserId" parameterType="Long" resultType="Integer">
|
||||
@ -79,7 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from sys_role r
|
||||
left join sys_user_role ur on ur.role_id = r.role_id
|
||||
left join sys_user u on u.user_id = ur.user_id
|
||||
where r.purpose = '1' and u.user_id = #{userId} and r.del_flag = '0'
|
||||
where r.purpose = '1' and u.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult">
|
||||
|
Loading…
x
Reference in New Issue
Block a user