功能修改、新增导入依赖

This commit is contained in:
ly19960718 2022-04-15 10:48:15 +08:00
parent cb1dc4b9b7
commit 1520b96cb9
23 changed files with 962 additions and 251 deletions

12
pom.xml
View File

@ -58,6 +58,18 @@
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ink.wgink</groupId>
<artifactId>basic-app</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ink.wgink</groupId>
<artifactId>module-file</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ink.wgink</groupId>

View File

@ -50,19 +50,29 @@ public class CarApplyController extends DefaultBaseController {
@ApiOperation(value = "车辆申请记录", notes = "车辆申请记录接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-bycarid/{carId}")
public List<CarApplyDTO> listByCarId(@PathVariable("carId") String carId){
Map<String,Object> params = new HashMap<>(1);
@GetMapping("list-bycarid/{carId}/{startTime}/{endTime}")
public List<CarApplyDTO> listByCarId(@PathVariable("carId") String carId,
@PathVariable("startTime") String startTime,
@PathVariable("endTime") String endTime
){
Map<String,Object> params = new HashMap<>(3);
params.put("carApplyCarId",carId);
params.put("carApplyStartTime",startTime);
params.put("carApplyEndTime",endTime);
return carApplyService.list(params);
}
@ApiOperation(value = "司机驾驶记录", notes = "司机驾驶记录接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-bydriverId/{driverId}")
public List<CarApplyDTO> listByDriverId(@PathVariable("driverId") String driverId){
Map<String,Object> params = new HashMap<>(1);
@GetMapping("list-bydriverId/{driverId}/{startTime}/{endTime}")
public List<CarApplyDTO> listByDriverId(@PathVariable("driverId") String driverId,
@PathVariable("startTime") String startTime,
@PathVariable("endTime") String endTime
){
Map<String,Object> params = new HashMap<>(3);
params.put("carApplyDriverId",driverId);
params.put("carApplyStartTime",startTime);
params.put("carApplyEndTime",endTime);
return carApplyService.list(params);
}

View File

@ -50,10 +50,16 @@ public class MeetingController extends DefaultBaseController {
@ApiOperation(value = "会议室会议管理列表", notes = "会议管理列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-byroomid/{roomId}")
public List<MeetingDTO> listByRoomId(@PathVariable("roomId") String roomId) {
@GetMapping("list-byroomid/{roomId}/{startTime}/{endTime}")
public List<MeetingDTO> listByRoomId(@PathVariable("roomId") String roomId,
@PathVariable("startTime") String startTime,
@PathVariable("endTime") String endTime
) {
Map<String, Object> params = requestParams();
params.put("meetingRoomId",roomId);
params.put("meetingStartTime",startTime);
params.put("meetingEndTime",endTime);
return meetingService.list(params);
}

View File

@ -124,19 +124,29 @@ public class CarApplyAppController extends DefaultBaseController {
@ApiOperation(value = "车辆申请记录", notes = "车辆申请记录接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-bycarid/{carId}")
public List<CarApplyDTO> listByCarId(@PathVariable("carId") String carId){
Map<String,Object> params = new HashMap<>(1);
@GetMapping("list-bycarid/{carId}/{startTime}/{endTime}")
public List<CarApplyDTO> listByCarId(@PathVariable("carId") String carId,
@PathVariable("startTime") String startTime,
@PathVariable("endTime") String endTime
){
Map<String,Object> params = new HashMap<>(3);
params.put("carApplyCarId",carId);
params.put("carApplyStartTime",startTime);
params.put("carApplyEndTime",endTime);
return carApplyService.list(params);
}
@ApiOperation(value = "司机驾驶记录", notes = "司机驾驶记录接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-bydriverId/{driverId}")
public List<CarApplyDTO> listByDriverId(@PathVariable("driverId") String driverId){
Map<String,Object> params = new HashMap<>(1);
@GetMapping("list-bydriverId/{driverId}/{startTime}/{endTime}")
public List<CarApplyDTO> listByDriverId(@PathVariable("driverId") String driverId,
@PathVariable("startTime") String startTime,
@PathVariable("endTime") String endTime
){
Map<String,Object> params = new HashMap<>(3);
params.put("carApplyDriverId",driverId);
params.put("carApplyStartTime",startTime);
params.put("carApplyEndTime",endTime);
return carApplyService.list(params);
}

View File

@ -0,0 +1,45 @@
package cn.com.tenlion.systemoa.controller.app.api.departmentbase;
import cn.com.tenlion.systemoa.pojo.dtos.carapply.CarApplyDTO;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.interfaces.department.IDepartmentBaseService;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.result.ErrorResult;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
* 部门数据封装
* @author : LY
* @date :2022-4-13 17:38
* @description :
* @modyified By:
*/
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "组织机构数据封装")
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/department/base")
public class DepartmentBaseAppController {
@Autowired
private IDepartmentBaseService departmentBaseService;
@ApiOperation(value = "组织结构列表", notes = "组织结构列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "parentId", value = "上级ID", paramType = "path")
})
@GetMapping("list-byparentid/{parentId}")
public List<DepartmentDTO> listByParentId(@RequestHeader("token") String token, @PathVariable("parentId") String parentId){
return departmentBaseService.listByParentId(parentId);
}
}

View File

@ -131,10 +131,21 @@ public class MeetingAppController extends DefaultBaseController {
@ApiOperation(value = "会议室会议列表", notes = "会议室会议列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list-byroomid/{roomId}")
public List<MeetingDTO> listByRoomId(@PathVariable("roomId") String roomId) {
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "roomId", value = "会议室ID", paramType = "path"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "path"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "path")
})
@GetMapping("list-byroomid/{roomId}/{startTime}/{endTime}")
public List<MeetingDTO> listByRoomId(@PathVariable("roomId") String roomId,
@PathVariable("startTime") String startTime,
@PathVariable("endTime") String endTime
) {
Map<String, Object> params = requestParams();
params.put("meetingRoomId",roomId);
params.put("meetingStartTime",startTime);
params.put("meetingEndTime",endTime);
return meetingService.list(params);
}

View File

@ -34,88 +34,27 @@ public class MeetingRoomAppController extends DefaultBaseController {
@Autowired
private IMeetingRoomService meetingRoomService;
@ApiOperation(value = "新增会议室管理", notes = "新增会议室管理接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PostMapping("save")
@CheckRequestBodyAnnotation
public SuccessResult save(@RequestHeader("token") String token, @RequestBody MeetingRoomVO meetingRoomVO) {
meetingRoomService.save(token, meetingRoomVO);
return new SuccessResult();
}
@ApiOperation(value = "删除会议室管理(id列表)", notes = "删除会议室管理(id列表)接口")
@ApiOperation(value = "选择会议室列表", notes = "选择会议室列表接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "ids", value = "ID列表用下划线分隔", paramType = "path", example = "1_2_3")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@DeleteMapping("remove/{ids}")
public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) {
meetingRoomService.remove(token, Arrays.asList(ids.split("\\_")));
return new SuccessResult();
}
@ApiImplicitParam(name = "roomType", value = "类型ID", paramType = "path")
@ApiOperation(value = "修改会议室管理", notes = "修改会议室管理接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "roomId", value = "会议室管理ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@PutMapping("updatemeetingroom/{roomId}")
@CheckRequestBodyAnnotation
public SuccessResult updateMeetingRoom(@RequestHeader("token") String token, @PathVariable("roomId") String roomId, @RequestBody MeetingRoomVO meetingRoomVO) {
meetingRoomService.update(token, roomId, meetingRoomVO);
return new SuccessResult();
}
@ApiOperation(value = "会议室管理详情(通过ID)", notes = "会议室管理详情(通过ID)接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "roomId", value = "会议室管理ID", paramType = "path")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get/{roomId}")
public MeetingRoomDTO get(@RequestHeader("token") String token, @PathVariable("roomId") String roomId) {
return meetingRoomService.get(roomId);
}
@ApiOperation(value = "会议室管理列表", notes = "会议室管理列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("list")
public List<MeetingRoomDTO> list(@RequestHeader("token") String token) {
@GetMapping("list-select/{roomType}")
public List<MeetingRoomDTO> listSelect(@PathVariable("roomType") String roomType) {
Map<String, Object> params = requestParams();
params.put("roomType",roomType);
params.put("roomOpenStatus","Y");
return meetingRoomService.list(params);
}
@ApiOperation(value = "会议室管理分页列表", notes = "会议室管理分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"),
@ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"),
@ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listpage")
public SuccessResultList<List<MeetingRoomDTO>> listPage(@RequestHeader("token") String token, ListPage page) {
Map<String, Object> params = requestParams();
page.setParams(params);
return meetingRoomService.listPage(page);
}
@ApiOperation(value = "会议室管理统计", notes = "会议室管理统计接口")
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("count")
SuccessResultData<Integer> count() {
Map<String, Object> params = requestParams();
return new SuccessResultData<>(meetingRoomService.count(params));
}
}

View File

@ -0,0 +1,90 @@
package cn.com.tenlion.systemoa.controller.app.api.userexpand;
import cn.com.tenlion.systemoa.pojo.dtos.userexpand.UserExpand;
import ink.wgink.common.base.DefaultBaseController;
import ink.wgink.common.component.SecurityComponent;
import ink.wgink.exceptions.TokenException;
import ink.wgink.interfaces.consts.ISystemConstant;
import ink.wgink.interfaces.department.IDepartmentUserBaseService;
import ink.wgink.interfaces.user.IUserBaseService;
import ink.wgink.interfaces.user.IUserExpandBaseService;
import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.app.AppTokenUser;
import ink.wgink.pojo.bos.UserInfoBO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.dtos.department.DepartmentSimpleDTO;
import ink.wgink.pojo.dtos.user.UserDTO;
import ink.wgink.pojo.result.ErrorResult;
import ink.wgink.pojo.result.SuccessResult;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.service.user.service.IUserService;
import ink.wgink.util.ReflectUtil;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 用户拓展信息
* @author : LY
* @date :2022-4-13 16:50
* @description :
* @modyified By:
*/
@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "用户拓展信息")
@RestController
@RequestMapping(ISystemConstant.APP_PREFIX + "/user/expand")
public class UserExpandController extends DefaultBaseController {
@Autowired
private IUserBaseService userBaseService;
@Autowired
private SecurityComponent securityComponent;
@Autowired
private IDepartmentUserBaseService departmentUserBaseService;
@ApiOperation(value = "用户详情", notes = "用户详情接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("get-user-info")
public UserInfoBO getUserInfo(@RequestHeader("token") String token) {
UserInfoBO userInfoBO = new UserInfoBO();
String userId = null;
try {
userId = securityComponent.getAppToken(token).getUserId();
} catch (ReflectUtil.ReflectException e) {
throw new TokenException("登录失效,请重新登录");
}
UserDTO userDTO = userBaseService.get(userId);
//基础信息
userInfoBO.setUserId(userDTO.getUserId());
userInfoBO.setUserName(userDTO.getUserName());
userInfoBO.setUserUsername(userDTO.getUserUsername());
userInfoBO.setUserPhone(userDTO.getUserPhone());
userInfoBO.setUserEmail(userDTO.getUserEmail());
userInfoBO.setUserAvatar(userDTO.getUserAvatar());
//获取用户部门信息
List<DepartmentDTO> departmentDTOS = departmentUserBaseService.listDepartmentByUserId(userId);
List<DepartmentSimpleDTO> departmentSimpleDTOs = new ArrayList<>();
departmentDTOS.forEach(departmentPO -> {
DepartmentSimpleDTO departmentSimpleDTO = new DepartmentSimpleDTO();
departmentSimpleDTO.setDepartmentId(departmentPO.getDepartmentId());
departmentSimpleDTO.setDepartmentParentId(departmentPO.getDepartmentParentId());
departmentSimpleDTO.setDepartmentName(departmentPO.getDepartmentName());
departmentSimpleDTO.setDepartmentCode(departmentPO.getDepartmentCode());
departmentSimpleDTOs.add(departmentSimpleDTO);
});
userInfoBO.setDepartments(departmentSimpleDTOs);
return userInfoBO;
}
}

View File

@ -6,9 +6,9 @@ package cn.com.tenlion.systemoa.enums;
*/
public enum NoticeTypeEnum {
SMS("sms","短信"),
MAIL("mail","邮件"),
MESSAGE("message","站内通知");
SMS("1","短信"),
MAIL("2","邮件"),
MESSAGE("3","站内通知");

View File

@ -1,6 +1,9 @@
package cn.com.tenlion.systemoa.service.meeting.impl;
import cn.com.tenlion.schedule.pojo.vos.schedule.ScheduleVO;
import cn.com.tenlion.schedule.service.schedule.IScheduleSaveService;
import cn.com.tenlion.schedule.service.schedule.IScheduleService;
import cn.com.tenlion.systemoa.enums.NoticeTypeEnum;
import cn.com.tenlion.systemoa.enums.meetinguser.UserTypeEnum;
import cn.com.tenlion.systemoa.pojo.dtos.meeting.MeetingQRCodeDTO;
import cn.com.tenlion.systemoa.pojo.dtos.meetinguser.MeetingUserDTO;
@ -52,10 +55,14 @@ public class MeetingServiceImpl extends DefaultBaseService implements IMeetingSe
@Autowired
private ISmsService smsService;
@Autowired
private IScheduleService scheduleService;
private IScheduleSaveService scheduleSaveService;
private final static String SIGN_URL = "app/meetinguser/update-sign";
//APP签到接口
private final static String APP_SIGN_URL = "app/meetinguser/update-sign";
//会议详情页路径
private final static String MEETING_SHOW_URL = "route/meeting/show.html?meetingId=";
//会议日程类型ID
private final static String SCHEDULE_TYPE_ID = "d49aeaee-1448-4dbc-b8d9-f3e6fff90cb1";
@ -78,7 +85,7 @@ public class MeetingServiceImpl extends DefaultBaseService implements IMeetingSe
}
try {
fileId = QRCodeUtil.deStyle1(userId, SIGN_URL);
fileId = QRCodeUtil.deStyle1(userId, APP_SIGN_URL);
} catch (Exception e) {
e.printStackTrace();
}
@ -119,6 +126,8 @@ public class MeetingServiceImpl extends DefaultBaseService implements IMeetingSe
meetingDao.save(params);
//保存人员
this.saveMeetingUser(token,meetingId,meetingVO);
//检查配置
this.checkConfig(meetingId,meetingVO);
return meetingId;
}
@ -300,7 +309,47 @@ public class MeetingServiceImpl extends DefaultBaseService implements IMeetingSe
private void checkConfig(){
private void checkConfig(String meetingId,MeetingVO meetingVO){
//主持人ID
String hostUserId = meetingVO.getMeetingHostUserId();
//参会人员ID
String userIds = meetingVO.getMeetingUserIds();
//加入日程
ScheduleVO scheduleVO = new ScheduleVO();
scheduleVO.setScheduleType(SCHEDULE_TYPE_ID);
scheduleVO.setScheduleTitle(meetingVO.getMeetingTitle());
scheduleVO.setScheduleStart(meetingVO.getMeetingStartTime());
scheduleVO.setScheduleEnd(meetingVO.getMeetingEndTime());
scheduleVO.setScheduleMessageType("1,2");//站内+短信
scheduleVO.setScheduleMessageConfig(10);//提前十分钟提醒
scheduleVO.setScheduleOpen("0");//不公开
scheduleVO.setScheduleLevel("1");//一般
//封装日程人员
List<String> userList = new ArrayList<String>();
userList.add(hostUserId);
for (String userId : userIds.split("_")) {
if(!userId.equals(hostUserId)){
userList.add(userId);
}
}
scheduleSaveService.save(userList,meetingId,MEETING_SHOW_URL + meetingId,scheduleVO);
//会议通知
String noticeType = meetingVO.getMeetingNoticeType();
for (String s : noticeType.split(",")) {
if(NoticeTypeEnum.MESSAGE.getValue().equals(s)){
//站内通知
}
if(NoticeTypeEnum.MAIL.getValue().equals(s)){
//邮件
}
if(NoticeTypeEnum.SMS.getValue().equals(s)){
//短信
}
}
}

View File

@ -391,13 +391,20 @@
AND
LEFT(t1.gmt_create, 10) <![CDATA[ <= ]]> #{endTime}
</if>
<if test="carApplyIds != null and carApplyIds.size > 0">
<if test="carApplyStartTime != null and carApplyStartTime != '' and carApplyEndTime != null and carApplyEndTime != ''">
AND
t1.car_apply_id IN
<foreach collection="carApplyIds" index="index" open="(" separator="," close=")">
#{carApplyIds[${index}]}
</foreach>
(
DATE_FORMAT(t1.car_apply_start_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{carApplyStartTime},'%Y-%m-%d') AND DATE_FORMAT(#{carApplyEndTime},'%Y-%m-%d')
OR
DATE_FORMAT(t1.car_apply_end_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{carApplyStartTime},'%Y-%m-%d') AND DATE_FORMAT(#{carApplyEndTime},'%Y-%m-%d')
OR
DATE_FORMAT(#{carApplyStartTime},'%Y-%m-%d') BETWEEN DATE_FORMAT(t1.car_apply_start_time,'%Y-%m-%d') AND DATE_FORMAT(t1.car_apply_end_time,'%Y-%m-%d')
OR
DATE_FORMAT(#{carApplyEndTime},'%Y-%m-%d') BETWEEN DATE_FORMAT(t1.car_apply_start_time,'%Y-%m-%d') AND DATE_FORMAT(t1.car_apply_end_time,'%Y-%m-%d')
)
</if>
<if test="carApplyCarId != null and carApplyCarId != ''">
AND t1.car_apply_car_id = #{carApplyCarId}
</if>

View File

@ -304,12 +304,17 @@
<if test="meetingRoomId != null and meetingRoomId != ''">
AND t1.meeting_room_id = #{meetingRoomId}
</if>
<if test="meetingIds != null and meetingIds.size > 0">
<if test="meetingStartTime != null and meetingStartTime != '' and meetingEndTime != null and meetingEndTime != ''">
AND
t1.meeting_id IN
<foreach collection="meetingIds" index="index" open="(" separator="," close=")">
#{meetingIds[${index}]}
</foreach>
(
DATE_FORMAT(t1.meeting_start_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{meetingStartTime},'%Y-%m-%d') AND DATE_FORMAT(#{meetingEndTime},'%Y-%m-%d')
OR
DATE_FORMAT(t1.meeting_end_time,'%Y-%m-%d') BETWEEN DATE_FORMAT(#{meetingStartTime},'%Y-%m-%d') AND DATE_FORMAT(#{meetingEndTime},'%Y-%m-%d')
OR
DATE_FORMAT(#{meetingStartTime},'%Y-%m-%d') BETWEEN DATE_FORMAT(t1.meeting_start_time,'%Y-%m-%d') AND DATE_FORMAT(t1.meeting_end_time,'%Y-%m-%d')
OR
DATE_FORMAT(#{meetingEndTime},'%Y-%m-%d') BETWEEN DATE_FORMAT(t1.meeting_start_time,'%Y-%m-%d') AND DATE_FORMAT(t1.meeting_end_time,'%Y-%m-%d')
)
</if>
<if test="creator != null and creator != ''">
AND t1.creator = #{creator}

View File

@ -86,9 +86,36 @@
aspectRatio: 3,
height: $win.height() - 200,
width: $win.width(),
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
dateClick: function(info) {
info.jsEvent.preventDefault();
},
events:function (info,callback) {
var startTime = info.startStr.split("T");
var endTime = info.endStr.split("T");
var carId = $('#carId option:selected').val();
if(carId == ''){
return;
}
top.restAjax.get(top.restAjax.path('api/carapply/list-bycarid/{carId}/{startTime}/{endTime}', [carId,startTime,endTime]), {}, null, function(code, data, args) {
var events = [];
for(var i = 0, item; item = data[i++];) {
events.push({
id: item.carApplyId,
start: item.carApplyStartTime,
end: item.carApplyEndTime,
title: item.carApplyStartPlace + '-' + item.carApplyEndPlace
});
}
callback(events);
}, function(code, data) {
top.dialog.msg(data.msg);
});
},
eventClick: function(info) {
var info = info.event;
top.dialog.open({
@ -117,28 +144,6 @@
selectObj['carId'] = selectValue;
form.val('dataForm', selectObj);
}
initCarApplyList(selectValue)
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
//初始化车辆申请
function initCarApplyList(carId) {
calendar.removeAllEvents();
if(carId == ''){
return;
}
top.restAjax.get(top.restAjax.path('api/carapply/list-bycarid/{carId}', [carId]), {}, null, function(code, data, args) {
for(var i = 0, item; item = data[i++];) {
calendar.addEvent({
id: item.carApplyId,
start: item.carApplyStartTime,
end: item.carApplyEndTime,
title: item.carApplyStartPlace + '-' + item.carApplyEndPlace
});
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
@ -186,7 +191,7 @@
return
}
top.dialog.open({
url: top.restAjax.path('route/meetingroom/show.html?roomId={roomId}', [roomId]),
url: top.restAjax.path('rote/meetingroom/show.html?roomId={roomId}', [roomId]),
title: '车辆详情',
width: '700px',
height: '500px',
@ -198,8 +203,8 @@
form.on('select(carId)',function (data) {
initCarApplyList(data.value)
form.on('select(carId)',function () {
calendar.refetchEvents();
});
// 校验

View File

@ -0,0 +1,279 @@
<!doctype html>
<html lang="en">
<head>
<base href="/systemoa/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>详情内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-row">
<div class="layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">申请人姓名</label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="carApplyUserName" placeholder="暂无" readonly>
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">申请人部门</label>
<div class="layui-input-block">
<input type="text" class="layui-input" name="carApplyUserDeptName" placeholder="暂无" readonly>
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">申请时间</label>
<div class="layui-input-block">
<input type="text" name="carApplyDateTime" class="layui-input" placeholder="暂无" readonly>
</div>
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">乘车人</label>
<div class="layui-input-block">
<input type="hidden" id="carApplyPassengerIds" name="carApplyPassengerIds">
<input type="text" name="carApplyPassengerNames" class="layui-input" placeholder="暂无" readonly>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">事由</label>
<div class="layui-input-block">
<textarea name="carApplyReason" class="layui-textarea" placeholder="暂无" readonly></textarea>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">开始时间</label>
<div class="layui-input-block">
<input type="text" name="carApplyStartTime" class="layui-input" placeholder="暂无" readonly style="cursor: pointer;">
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">结束时间</label>
<div class="layui-input-block">
<input type="text" name="carApplyEndTime" class="layui-input" placeholder="暂无" readonly style="cursor: pointer;">
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">起始地方</label>
<div class="layui-input-block">
<input type="text" name="carApplyStartPlace" class="layui-input" placeholder="暂无" readonly>
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">终止地方</label>
<div class="layui-input-block">
<input type="text" name="carApplyEndPlace" class="layui-input" value="" placeholder="暂无" readonly>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">申请车辆</label>
<div class="layui-input-block">
<input type="text" name="carApplyCarName" class="layui-input" placeholder="暂无" readonly>
</div>
</div>
</div>
<div class="layui-col-md6">
<div class="layui-form-item">
<label class="layui-form-label">驾驶员</label>
<div class="layui-input-block">
<input type="text" name="carApplyDriverName" class="layui-input" placeholder="暂无" readonly>
</div>
</div>
</div>
</div>
<div class="layui-row">
<div class="layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">用车前里程</label>
<div class="layui-input-block">
<input type="number" step="0.01" id="carApplyStartMileage" name="carApplyStartMileage" class="layui-input" value="" placeholder="请输入用车前里程" lay-verify="required">
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">用车后里程</label>
<div class="layui-input-block">
<input type="text" name="carApplyEndMileage" class="layui-input" placeholder="暂无" readonly>
</div>
</div>
</div>
<div class="layui-col-md4">
<div class="layui-form-item">
<label class="layui-form-label">用车里程</label>
<div class="layui-input-block">
<input type="text" name="carApplyMileage" class="layui-input" placeholder="暂无" readonly>
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">备注</label>
<div class="layui-input-block">
<textarea name="carApplyRemark" class="layui-textarea" placeholder="暂无" readonly></textarea>
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var carApplyId = top.restAjax.params(window.location.href).carApplyId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
document.getElementById(fileName +'FileBox').innerHTML = html;
});
}
// 初始化文件列表
function initFileList(fileName, ids, callback) {
var dataForm = {};
dataForm[fileName] = ids;
form.val('dataForm', dataForm);
if(!ids) {
refreshDownloadTemplet(fileName, []);
if(callback) {
callback(fileName, []);
}
return;
}
top.restAjax.get(top.restAjax.path('api/file/list', []), {
ids: ids
}, null, function(code, data) {
refreshDownloadTemplet(fileName, data);
if(callback) {
callback(fileName, data);
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化视频
function initVideo(fileName, data) {
for(var i = 0, item; item = data[i++];) {
var player = new ckplayer({
container: '#'+ fileName + i,
variable: 'player',
flashplayer: false,
video: {
file: 'route/file/download/true/'+ item.fileId,
type: 'video/mp4'
}
});
}
}
// 初始化内容
function initData() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/carapply/get/{carApplyId}', [carApplyId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -86,9 +86,36 @@
aspectRatio: 3,
height: $win.height() - 200,
width: $win.width(),
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
dateClick: function(info) {
info.jsEvent.preventDefault();
},
events:function (info,callback) {
var startTime = info.startStr.split("T");
var endTime = info.endStr.split("T");
var driverId = $('#driverId option:selected').val();
if(driverId == ''){
return;
}
top.restAjax.get(top.restAjax.path('api/carapply/list-bydriverId/{driverId}/{startTime}/{endTime}', [driverId,startTime,endTime]), {}, null, function(code, data, args) {
var events = [];
for(var i = 0, item; item = data[i++];) {
events.push({
id: item.carApplyId,
start: item.carApplyStartTime,
end: item.carApplyEndTime,
title: item.carApplyStartPlace + '-' + item.carApplyEndPlace
});
}
callback(events);
}, function(code, data) {
top.dialog.msg(data.msg);
});
},
eventClick: function(info) {
var info = info.event;
top.dialog.open({
@ -117,38 +144,11 @@
selectObj['driverId'] = selectValue;
form.val('dataForm', selectObj);
}
initCarApplyDriverList(selectValue)
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
//初始化驾驶员驾驶记录
function initCarApplyDriverList(driverId) {
calendar.removeAllEvents();
if(carId == ''){
return;
}
top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}', [driverId]), {}, null, function(code, data, args) {
for(var i = 0, item; item = data[i++];) {
calendar.addEvent({
id: item.meetingId,
start: item.meetingStartTime,
end: item.meetingEndTime,
title: item.meetingTitle
});
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化内容
function initData() {
initDriverSelect(selectDriverId);
@ -178,6 +178,15 @@
closeBox();
});
//驾驶员改变事件
form.on('select(driverId)', function(data){
calendar.refetchEvents();
});
//车辆详情
$(document).on('click','#driverShow',function () {
var roomId = $('#roomId').val();

View File

@ -60,9 +60,32 @@
aspectRatio: 3,
height: $win.height() - 100,
width: $win.width(),
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
dateClick: function(info) {
info.jsEvent.preventDefault();
},
events:function (info,callback) {
var startTime = info.startStr.split("T");
var endTime = info.endStr.split("T");
top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}/{startTime}/{endTime}', [roomId,startTime,endTime]), {}, null, function(code, data, args) {
var events = [];
for(var i = 0, item; item = data[i++];) {
events.push({
id: item.meetingId,
start: item.meetingStartTime,
end: item.meetingEndTime,
title: item.meetingTitle
});
}
callback(events);
}, function(code, data) {
top.dialog.msg(data.msg);
});
},
eventClick: function(info) {
var info = info.event;
top.dialog.open({
@ -81,25 +104,7 @@
}
//初始化会议室会议
function initRoomMeetingList(roomId) {
calendar.removeAllEvents();
if(roomId == ''){
return;
}
top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}', [roomId]), {}, null, function(code, data, args) {
for(var i = 0, item; item = data[i++];) {
calendar.addEvent({
id: item.meetingId,
start: item.meetingStartTime,
end: item.meetingEndTime,
title: item.meetingTitle
});
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
@ -107,7 +112,6 @@
// 初始化内容
function initData() {
initFullCalendar();
initRoomMeetingList(roomId)
}
initData();

View File

@ -131,9 +131,37 @@
aspectRatio: 3,
height: $win.height() - 200,
width: $win.width(),
headerToolbar: {
left: 'prev,next today',
center: 'title',
right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
dateClick: function(info) {
info.jsEvent.preventDefault();
},
events:function (info,callback) {
var startTime = info.startStr.split("T");
var endTime = info.endStr.split("T");
var roomId = $('#roomId option:selected').val();
if(roomId == ''){
return;
}
top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}/{startTime}/{endTime}', [roomId,startTime,endTime]), {}, null, function(code, data, args) {
var events = [];
for(var i = 0, item; item = data[i++];) {
events.push({
id: item.meetingId,
start: item.meetingStartTime,
end: item.meetingEndTime,
title: item.meetingTitle
});
}
callback(events);
}, function(code, data) {
top.dialog.msg(data.msg);
});
},
eventClick: function(info) {
var info = info.event;
top.dialog.open({
@ -163,7 +191,6 @@
selectObj['roomType'] = selectValue;
form.val('dataForm', selectObj);
}
initRoomIdSelect(selectValue,selectRoomId)
}, function(code, data) {
top.dialog.msg(data.msg);
});
@ -183,42 +210,17 @@
var selectObj = {};
selectObj['roomId'] = selectValue;
form.val('dataForm', selectObj);
initRoomMeetingList(selectValue);
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
//初始化会议室会议
function initRoomMeetingList(roomId) {
calendar.removeAllEvents();
if(roomId == ''){
return;
}
top.restAjax.get(top.restAjax.path('api/meeting/list-byroomid/{roomId}', [roomId]), {}, null, function(code, data, args) {
for(var i = 0, item; item = data[i++];) {
calendar.addEvent({
id: item.meetingId,
start: item.meetingStartTime,
end: item.meetingEndTime,
title: item.meetingTitle
});
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化内容
function initData() {
initRoomTypeSelect(selectRoomType);
//initRoomIdSelect(selectRoomType,selectRoomId);
initRoomIdSelect(selectRoomType,selectRoomId);
initFullCalendar();
}
initData();
@ -261,7 +263,7 @@
//日历联动
form.on('select(roomId)',function (data) {
initRoomMeetingList(data.value)
calendar.refetchEvents();
});

View File

@ -102,15 +102,24 @@
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
}
if('to' == rowData){
return '已办结';
}
if('nto' == rowData){
return '未办结';
}
return rowData;
}
},
{field: 'cz', width: 180, title: '操作', align:'center',
templet: function(row) {
var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') {
return '-';
var rowData = '';
var status = row['status'];
rowData += '<div class="layui-btn-group">';
if(status == 'to') {
rowData += '<button type="button" class="layui-btn layui-btn-sm" lay-event="showUser">详情</button>';
}
rowData += '</div>';
return rowData;
}
},
@ -241,6 +250,26 @@
}
}
});
//事件
table.on('tool(dataTable)', function (obj) {
var layEvent = obj.event;
var data = obj.data;
if(layEvent === 'showUser') {
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['90%', '90%'],
shadeClose: true,
anim: 2,
content: top.restAjax.path('route/overseeuser/show.html?overseeUserId={overseeUserId}', [data.overseeUserId]),
end: function() {
reloadTable();
}
});
}
});
});
</script>
</body>

View File

@ -0,0 +1,173 @@
<!doctype html>
<html lang="en">
<head>
<base href="/systemoa/">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
<link rel="stylesheet" href="assets/fonts/font-awesome/css/font-awesome.css"/>
<link rel="stylesheet" href="assets/layuiadmin/layui/css/layui.css" media="all">
<link rel="stylesheet" href="assets/layuiadmin/style/admin.css" media="all">
<link rel="stylesheet" type="text/css" href="assets/js/vendor/viewer/viewer.min.css">
</head>
<body>
<div class="layui-fluid layui-anim layui-anim-fadein">
<div class="layui-card">
<div class="layui-card-header">
<span class="layui-breadcrumb" lay-filter="breadcrumb" style="visibility: visible;">
<a class="close" href="javascript:void(0);">上级列表</a><span lay-separator="">/</span>
<a href="javascript:void(0);"><cite>详情内容</cite></a>
</span>
</div>
<div class="layui-card-body" style="padding: 15px;">
<form class="layui-form layui-form-pane" lay-filter="dataForm">
<div class="layui-form-item layui-form-text">
<label class="layui-form-label">办结说明</label>
<div class="layui-input-block">
<textarea readonly style="height: 233px" type="text" id="content" name="content" class="layui-textarea" value="" placeholder="请输入办结说明" maxlength="255" lay-verify="required"></textarea>
</div>
</div>
<div class="layui-form-item layui-layout-admin">
<div class="layui-input-block">
<div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="assets/js/vendor/wangEditor/wangEditor.min.js"></script>
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径
}).extend({
index: 'lib/index' //主入口模块
}).use(['index', 'form', 'laydate', 'laytpl'], function(){
var $ = layui.$;
var form = layui.form;
var laytpl = layui.laytpl;
var laydate = layui.laydate;
var overseeUserId = top.restAjax.params(window.location.href).overseeUserId;
var wangEditor = window.wangEditor;
var wangEditorObj = {};
var viewerObj = {};
function closeBox() {
parent.layer.close(parent.layer.getFrameIndex(window.name));
}
function refreshDownloadTemplet(fileName, file) {
var dataRander = {};
dataRander[fileName] = file;
laytpl(document.getElementById(fileName +'FileDownload').innerHTML).render(dataRander, function(html) {
document.getElementById(fileName +'FileBox').innerHTML = html;
});
}
// 初始化文件列表
function initFileList(fileName, ids, callback) {
var dataForm = {};
dataForm[fileName] = ids;
form.val('dataForm', dataForm);
if(!ids) {
refreshDownloadTemplet(fileName, []);
if(callback) {
callback(fileName, []);
}
return;
}
top.restAjax.get(top.restAjax.path('api/file/list', []), {
ids: ids
}, null, function(code, data) {
refreshDownloadTemplet(fileName, data);
if(callback) {
callback(fileName, data);
}
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
// 初始化视频
function initVideo(fileName, data) {
for(var i = 0, item; item = data[i++];) {
var player = new ckplayer({
container: '#'+ fileName + i,
variable: 'player',
flashplayer: false,
video: {
file: 'route/file/download/true/'+ item.fileId,
type: 'video/mp4'
}
});
}
}
// 初始化内容
function initData() {
var loadLayerIndex;
top.restAjax.get(top.restAjax.path('api/overseeuser/get/{overseeUserId}', [overseeUserId]), {}, null, function(code, data) {
var dataFormData = {};
for(var i in data) {
dataFormData[i] = data[i] +'';
}
form.val('dataForm', dataFormData);
form.render(null, 'dataForm');
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.loading, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
}
initData();
// 提交表单
form.on('submit(submitForm)', function(formData) {
top.dialog.confirm(top.dataMessage.commit, function(index) {
top.dialog.close(index);
var loadLayerIndex;
top.restAjax.put(top.restAjax.path('api/overseeuser/update/{overseeUserId}', [overseeUserId]), formData.field, null, function(code, data) {
var layerIndex = top.dialog.msg('提交成功!', {
time: 0,
btn: [top.dataMessage.button.yes],
shade: 0.3,
yes: function(index) {
top.dialog.close(index);
closeBox();
}
});
}, function(code, data) {
top.dialog.msg(data.msg);
}, function() {
loadLayerIndex = top.dialog.msg(top.dataMessage.committing, {icon: 16, time: 0, shade: 0.3});
}, function() {
top.dialog.close(loadLayerIndex);
});
});
return false;
});
$('.close').on('click', function() {
closeBox();
});
// 校验
form.verify({
});
});
</script>
</body>
</html>

View File

@ -454,24 +454,6 @@
});
$(document).on('click', '.showFile',function() {
var fileName = $(this).attr('title')
var fileId = $(this).attr('data-id')
var url = "http://192.168.0.120:8080/systemoa/route/file/download/false/" + fileId;
var previewUrl = url + '?fullfilename=' + fileName
layer.open({
type: 2,
title: '文件预览',
closeBtn: 1,
area: ['80%', '80%'],
shadeClose: true,
anim: 2,
content: 'http://192.168.0.120:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)),
end: function() {
reloadTable();
}
});
});

View File

@ -118,6 +118,7 @@
<script src="assets/js/vendor/ckplayer/ckplayer/ckplayer.js"></script>
<script src="assets/js/vendor/viewer/viewer.min.js"></script>
<script src="assets/layuiadmin/layui/layui.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/js-base64@3.6.0/base64.min.js"></script>
<script>
layui.config({
base: 'assets/layuiadmin/' //静态资源所在路径

View File

@ -58,7 +58,8 @@
{{# for(var i = 0, item = files[i]; item = files[i++];) { }}
<span class="layui-btn-group">
<div class="upload-file-box">
<a class="upload-file-a" href="route/file/download/false/{{item.fileId}}" title="{{item.fileName}} - 点击下载">
<!--href="route/file/download/false/{{item.fileId}}" -->
<a class="upload-file-a showFile" title="{{item.fileName}} - 点击下载">
{{# if(item.fileType == 'doc' || item.fileType == 'docx') { }}
<img src="assets/images/filetype/word.png"/>
{{# } else if(item.fileType == 'xls' || item.fileType == 'xlsx') { }}
@ -282,6 +283,25 @@
closeBox();
});
$(document).on('click', '.showFile',function() {
var fileName = $(this).attr('title')
var fileId = $(this).attr('data-id')
var url = "http://192.168.0.120:8080/systemoa/route/file/download/false/" + fileId;
var previewUrl = url + '?fullfilename=' + fileName
layer.open({
type: 2,
title: '文件预览',
closeBtn: 1,
area: ['80%', '80%'],
shadeClose: true,
anim: 2,
content: 'http://192.168.0.120:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)),
end: function() {
}
});
});
// 校验
form.verify({
});

View File

@ -391,7 +391,7 @@
</div>
<div class="layui-col-md4">
<div class="layui-card">
<div class="layui-card-header"><i class="fa fa-calendar icon"></i>日程管理</div>
<div class="layui-card-header"><i class="fa fa-calendar icon"></i>我的日程</div>
<div class="layui-card-body">
<div id="fullCalendar"></div>
</div>
@ -411,6 +411,7 @@
}).use(['index', 'animate-numbers'], function() {
var $ = layui.$;
var $win = $(window);
var calendar;
@ -424,6 +425,7 @@
aspectRatio: 3,
height: $win.height() - 90,
width: $win.width(),
//lazyFetching:false,
//showNonCurrentDates:false,
// selectable: true,
// headerToolbar: {
@ -431,14 +433,51 @@
// center: 'title',
// right: 'dayGridMonth,timeGridWeek,timeGridDay'
// },
//selectable: true,
dateClick: function(info) {
info.jsEvent.preventDefault();
},
eventClick: function(info) {
var info = info.event;
var event = info.event;
var moduleUrl = event.extendedProps.moduleUrl;
if(!moduleUrl){
top.dialog.msg('暂无详情')
return
}
layer.open({
type: 2,
title: false,
closeBtn: 0,
area: ['90%', '90%'],
shadeClose: true,
anim: 2,
content: moduleUrl,
end: function() {
reloadTable();
}
});
},
select:function (info) {
alert(1)
events:function (info,callback) {
var startTime = info.startStr.split("T")
var endTime = info.endStr.split("T")
top.restAjax.get(top.restAjax.path('api/schedule/listdate?startTime={startTime}&endTime={endTime}', [startTime[0],endTime[0]]), {}, null, function(code, data) {
var events = []
for(var i = 0, item; item = data[i++];) {
events.push({
id: item.id,
title: item.title,
start: new Date(item.start),
end: new Date(item.end),
allDay: item.allDay,
className:item.className,
moduleUrl:item.moduleUrl
});
};
callback(events)
}, function(code, data) {
top.dialog.msg(data.msg);
});
}
});
calendar.render();
@ -446,22 +485,6 @@
initFullCalendar();
// $(".fc-prev-button").click(function () {
// var year = calendar.lastDay
//
// // var year = calendar.fullCalendar("getDate").year();
// //var date = calendar.fullCalendar("getDate").year() + "-" + (calendar.fullCalendar("getDate").month() + 1);
// alert(year)
// })
// $(".fc-next-button").click(function () {
// alert('2')
// //date = calender.fullCalendar("getDate").year() + "-" + (calender.fullCalendar("getDate").month() + 1);
// })
// $(".fc-today-button").click(function () {
// alert('3')
// //date = calender.fullCalendar("getDate").year() + "-" + (calender.fullCalendar("getDate").month() + 1);
// })