diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/filecatalogue/FileCatalogueAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/filecatalogue/FileCatalogueAppController.java index 45dcfbf..059f4dd 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/filecatalogue/FileCatalogueAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/filecatalogue/FileCatalogueAppController.java @@ -1,7 +1,9 @@ package cn.com.tenlion.systemoa.controller.app.api.filecatalogue; +import cn.com.tenlion.systemoa.pojo.dtos.filecatalogue.ListZTreeDTO; import ink.wgink.annotation.CheckRequestBodyAnnotation; import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.exceptions.SearchException; import ink.wgink.interfaces.consts.ISystemConstant; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.ErrorResult; @@ -12,6 +14,7 @@ import cn.com.tenlion.systemoa.pojo.dtos.filecatalogue.FileCatalogueDTO; import cn.com.tenlion.systemoa.pojo.vos.filecatalogue.FileCatalogueVO; import cn.com.tenlion.systemoa.service.filecatalogue.IFileCatalogueService; import io.swagger.annotations.*; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -90,6 +93,7 @@ public class FileCatalogueAppController extends DefaultBaseController { @GetMapping("list") public List list(@RequestHeader("token") String token) { Map params = requestParams(); + params.put("token", token); return fileCatalogueService.list(params); } @@ -106,6 +110,7 @@ public class FileCatalogueAppController extends DefaultBaseController { @GetMapping("listpagefilecatalogue") public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { Map params = requestParams(); + params.put("token", token); page.setParams(params); return fileCatalogueService.listPage(page); } @@ -118,4 +123,20 @@ public class FileCatalogueAppController extends DefaultBaseController { return new SuccessResultData<>(fileCatalogueService.count(params)); } + @ApiOperation(value = "文档目录树形", notes = "文档目录树形接口") + @ApiImplicitParams({}) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("ztree") + public List ztree(@RequestHeader("token") String token) throws SearchException { + Map params = requestParams(); + params.put("token", token); + String parentId = "0"; + if (!StringUtils.isBlank(params.get(ISystemConstant.PARAMS_ID) == null ? null : params.get(ISystemConstant.PARAMS_ID).toString())) { + parentId = params.get(ISystemConstant.PARAMS_ID).toString(); + } + params.put("parentId", parentId); + + return fileCatalogueService.ztree(params); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/fileupload/FileUploadAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/fileupload/FileUploadAppController.java index 7aded41..ca511f8 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/fileupload/FileUploadAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/fileupload/FileUploadAppController.java @@ -79,7 +79,7 @@ public class FileUploadAppController extends DefaultBaseController { @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) @GetMapping("get/{fileUploadId}") public FileUploadDTO get(@RequestHeader("token") String token, @PathVariable("fileUploadId") String fileUploadId) { - return fileUploadService.get(fileUploadId); + return fileUploadService.get(token, fileUploadId); } @ApiOperation(value = "文档上传列表", notes = "文档上传列表接口") @@ -90,6 +90,7 @@ public class FileUploadAppController extends DefaultBaseController { @GetMapping("list") public List list(@RequestHeader("token") String token) { Map params = requestParams(); + params.put("token", token); return fileUploadService.list(params); } @@ -119,4 +120,21 @@ public class FileUploadAppController extends DefaultBaseController { return new SuccessResultData<>(fileUploadService.count(params)); } + @ApiOperation(value = "共享文档分页列表", notes = "共享文档分页列表接口") + @ApiImplicitParams({ + @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("sharelistpage") + public SuccessResultList> shareListPage(@RequestHeader("token") String token, ListPage page) { + Map params = requestParams(); + params.put("token", token); + page.setParams(params); + return fileUploadService.shareListPage(page); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userarchives/UserArchivesAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userarchives/UserArchivesAppController.java index 36be2e5..2a32de0 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userarchives/UserArchivesAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userarchives/UserArchivesAppController.java @@ -128,4 +128,12 @@ public class UserArchivesAppController extends DefaultBaseController { return new SuccessResultData<>(userArchivesService.count(params)); } + @ApiOperation(value = "获取个人档案ID", notes = "获取个人档案ID接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("pageTurnTo") + public String pageTurnTo(@RequestHeader("token") String token) { + Map params = requestParams(); + return userArchivesService.pageTurnTo(token, params); + } + } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userarchivestype/UserArchivesTypeAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userarchivestype/UserArchivesTypeAppController.java index d39e143..aae8278 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userarchivestype/UserArchivesTypeAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userarchivestype/UserArchivesTypeAppController.java @@ -26,7 +26,7 @@ import java.util.Map; * @Date: 2022-06-13 10:26:43 * @Version: 3.0 **/ -@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "接口") +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "人力档案类型接口") @RestController @RequestMapping(ISystemConstant.APP_PREFIX + "/userarchivestype") public class UserArchivesTypeAppController extends DefaultBaseController { diff --git a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userhonor/UserHonorAppController.java b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userhonor/UserHonorAppController.java index c5b5f90..93de5c0 100644 --- a/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userhonor/UserHonorAppController.java +++ b/src/main/java/cn/com/tenlion/systemoa/controller/app/api/userhonor/UserHonorAppController.java @@ -26,7 +26,7 @@ import java.util.Map; * @Date: 2022-06-24 10:28:35 * @Version: 3.0 **/ -@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "接口") +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "个人荣誉接口") @RestController @RequestMapping(ISystemConstant.APP_PREFIX + "/userhonor") public class UserHonorAppController extends DefaultBaseController { diff --git a/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/filecatalogue/FileCatalogueDTO.java b/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/filecatalogue/FileCatalogueDTO.java index 12939b4..8c6b5aa 100644 --- a/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/filecatalogue/FileCatalogueDTO.java +++ b/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/filecatalogue/FileCatalogueDTO.java @@ -50,6 +50,8 @@ public class FileCatalogueDTO { private String viewUserId; @ApiModelProperty(name = "viewUserName", value = "查看人员名称") private String viewUserName; + @ApiModelProperty(name = "shareUserName", value = "谁共享给我") + private String shareUserName; public String getFileCatalogueId() { return fileCatalogueId == null ? "" : fileCatalogueId.trim(); @@ -194,4 +196,12 @@ public class FileCatalogueDTO { public void setViewUserName(String viewUserName) { this.viewUserName = viewUserName; } + + public String getShareUserName() { + return shareUserName; + } + + public void setShareUserName(String shareUserName) { + this.shareUserName = shareUserName; + } } diff --git a/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/fileupload/FileUploadDTO.java b/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/fileupload/FileUploadDTO.java index 23fd384..57590b6 100644 --- a/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/fileupload/FileUploadDTO.java +++ b/src/main/java/cn/com/tenlion/systemoa/pojo/dtos/fileupload/FileUploadDTO.java @@ -68,6 +68,8 @@ public class FileUploadDTO { private String operationRole; @ApiModelProperty(name = "isOff", value = "下架状态:0:草稿1:发布") private Integer isOff; + @ApiModelProperty(name = "shareUserName", value = "谁共享给我") + private String shareUserName; public String getFileUploadId() { return fileUploadId == null ? "" : fileUploadId.trim(); @@ -284,4 +286,12 @@ public class FileUploadDTO { public void setIsOff(Integer isOff) { this.isOff = isOff; } + + public String getShareUserName() { + return shareUserName; + } + + public void setShareUserName(String shareUserName) { + this.shareUserName = shareUserName; + } } diff --git a/src/main/java/cn/com/tenlion/systemoa/service/filecatalogue/impl/FileCatalogueServiceImpl.java b/src/main/java/cn/com/tenlion/systemoa/service/filecatalogue/impl/FileCatalogueServiceImpl.java index 62d7a3e..e6da247 100644 --- a/src/main/java/cn/com/tenlion/systemoa/service/filecatalogue/impl/FileCatalogueServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemoa/service/filecatalogue/impl/FileCatalogueServiceImpl.java @@ -172,8 +172,22 @@ public class FileCatalogueServiceImpl extends DefaultBaseService implements IFil if (null != userInfoBO) { creator = userInfoBO.getUserId(); } + + String token = null; + if (null != params.get("token")) { + token = params.get("token").toString(); + try { + AppTokenUser appTokenUser = securityComponent.getAppTokenUser(token); + if (null != appTokenUser) { + creator = appTokenUser.getId(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + if(null != params.get("type") && params.get("type").toString().equals("0")) { - params.put("creator", userInfoBO.getUserId()); + params.put("creator", creator); } List list = fileCatalogueDao.list(params); if(null != list && list.size() > 0) { diff --git a/src/main/java/cn/com/tenlion/systemoa/service/fileupload/IFileUploadService.java b/src/main/java/cn/com/tenlion/systemoa/service/fileupload/IFileUploadService.java index 95acbdd..dc48775 100644 --- a/src/main/java/cn/com/tenlion/systemoa/service/fileupload/IFileUploadService.java +++ b/src/main/java/cn/com/tenlion/systemoa/service/fileupload/IFileUploadService.java @@ -115,6 +115,14 @@ public interface IFileUploadService { */ FileUploadDTO get(String fileUploadId); + /** + * 文档上传详情 + * + * @param fileUploadId + * @return + */ + FileUploadDTO get(String token, String fileUploadId); + /** * 文档上传详情 * @@ -194,4 +202,6 @@ public interface IFileUploadService { SuccessResultList> listPageOff(ListPage page); List listOff(Map params); + + SuccessResultList> shareListPage(ListPage page); } \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systemoa/service/fileupload/impl/FileUploadServiceImpl.java b/src/main/java/cn/com/tenlion/systemoa/service/fileupload/impl/FileUploadServiceImpl.java index 1d3a0fd..db09ef0 100644 --- a/src/main/java/cn/com/tenlion/systemoa/service/fileupload/impl/FileUploadServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemoa/service/fileupload/impl/FileUploadServiceImpl.java @@ -1,6 +1,7 @@ package cn.com.tenlion.systemoa.service.fileupload.impl; import cn.com.tenlion.systemoa.config.properties.ConfigPro; +import cn.com.tenlion.systemoa.dao.filerole.IFileRoleDao; import cn.com.tenlion.systemoa.dao.fileupload.IFileUploadDao; import cn.com.tenlion.systemoa.pojo.bos.fileupload.FileUploadBO; import cn.com.tenlion.systemoa.pojo.dtos.filecatalogue.FileCatalogueDTO; @@ -26,9 +27,11 @@ import ink.wgink.module.file.service.IFileService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.app.AppTokenUser; import ink.wgink.pojo.bos.UserInfoBO; +import ink.wgink.pojo.dtos.user.UserDTO; import ink.wgink.pojo.pos.FilePO; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.properties.FileProperties; +import ink.wgink.service.user.service.IUserService; import ink.wgink.util.UUIDUtil; import ink.wgink.util.date.DateUtil; import ink.wgink.util.map.HashMapUtil; @@ -73,6 +76,10 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp private IFileRoleService fileRoleService; @Autowired private ITypeRoleService typeRoleService; + @Autowired + private IUserService userService; + @Autowired + private IFileRoleDao fileRoleDao; @Override public void save(FileUploadVO fileUploadVO) { @@ -169,11 +176,43 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp @Override public FileUploadDTO get(Map params) { + String creator = null; + UserInfoBO userInfoBO = this.securityComponent.getCurrentUser(); + if (null != userInfoBO) { + creator = userInfoBO.getUserId(); + } + String token = null; + if (null != params.get("token")) { + token = params.get("token").toString(); + try { + AppTokenUser appTokenUser = securityComponent.getAppTokenUser(token); + if (null != appTokenUser) { + creator = appTokenUser.getId(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + FileUploadDTO fileUploadDTO = fileUploadDao.get(params); if(null != fileUploadDTO) { + // 设置操作权限和查看权限为无权限 + fileUploadDTO.setOperationRole("0"); + if(!StringUtils.isEmpty(fileUploadDTO.getFileTypeId())) { FileCatalogueDTO fileCatalogueDTO = fileCatalogueService.get(fileUploadDTO.getFileTypeId()); if(null != fileCatalogueDTO) { + // 若文档类型创建者和当前登录用户一致,则授权操作权限 + if(creator.equals(fileCatalogueDTO.getCreator())) { + fileUploadDTO.setOperationRole("1"); + }else { + // 获取操作权限 + params.put("fileCatalogueId", fileCatalogueDTO.getFileCatalogueId()); + if(typeRoleService.hasRole(params)) { + fileUploadDTO.setOperationRole("1"); + } + } + fileUploadDTO.setOldFileType(fileCatalogueDTO.getName()); fileUploadDTO.setFileTypeName(fileCatalogueDTO.getName()); @@ -238,6 +277,14 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp return get(params); } + @Override + public FileUploadDTO get(String token, String fileUploadId) { + Map params = super.getHashMap(2); + params.put("fileUploadId", fileUploadId); + params.put("token", token); + return get(params); + } + @Override public FileUploadBO getBO(Map params) { return fileUploadDao.getBO(params); @@ -707,6 +754,55 @@ public class FileUploadServiceImpl extends DefaultBaseService implements IFileUp return fileUploadDTOList; } + @Override + public SuccessResultList> shareListPage(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List fileUploadDTOs = shareList(page.getParams()); + PageInfo pageInfo = new PageInfo<>(fileUploadDTOs); + return new SuccessResultList<>(fileUploadDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + private List shareList(Map params) { + List fileUploadDTOList = new ArrayList<>(); + UserInfoBO userInfoBO = this.securityComponent.getCurrentUser(); + if (null != userInfoBO) { + params.put("creator", userInfoBO.getUserId()); + } + String token = null; + if(null != params.get("token")) { + token = params.get("token").toString(); + try { + AppTokenUser appTokenUser = securityComponent.getAppTokenUser(token); + if(null != appTokenUser) { + params.put("creator", appTokenUser.getId()); + } + }catch (Exception e) { + e.printStackTrace(); + } + } + + List fileRoleDTOList = fileRoleDao.list(params); + params.remove("creator"); + if(null != fileRoleDTOList && fileRoleDTOList.size() > 0) { + for(FileRoleDTO fileRoleDTO: fileRoleDTOList) { + FileUploadDTO fileUploadDTO = get(fileRoleDTO.getFileUploadId()); + if(null != fileUploadDTO) { + UserDTO userDTO = userService.get(fileRoleDTO.getCreator()); + if(null != userDTO) { + fileUploadDTO.setShareUserName(userDTO.getUserName()); + } + params.put("fileCatalogueId", fileUploadDTO.getFileTypeId()); + FileCatalogueDTO fileCatalogueDTO = fileCatalogueService.get(params); + fileUploadDTO.setCatalogueId(fileCatalogueDTO.getFileCatalogueId()); + fileUploadDTO.setCatalogueName(fileCatalogueDTO.getName()); + fileUploadDTO.setCatalogueType("0".equals(fileCatalogueDTO.getType()) ? "个人文档": "公共文档"); + fileUploadDTOList.add(fileUploadDTO); + } + } + } + return fileUploadDTOList; + } + private void toPdf(FileUploadVO fileUploadVO, String fileUploadId) { Map params = new HashMap<>(); // 生成临时PDF文件 diff --git a/src/main/java/cn/com/tenlion/systemoa/service/typerole/impl/TypeRoleServiceImpl.java b/src/main/java/cn/com/tenlion/systemoa/service/typerole/impl/TypeRoleServiceImpl.java index 202ab10..f27b206 100644 --- a/src/main/java/cn/com/tenlion/systemoa/service/typerole/impl/TypeRoleServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systemoa/service/typerole/impl/TypeRoleServiceImpl.java @@ -228,7 +228,7 @@ public class TypeRoleServiceImpl extends DefaultBaseService implements ITypeRole try { AppTokenUser appTokenUser = securityComponent.getAppTokenUser(token); if(null != appTokenUser) { - creator = userInfoBO.getUserId(); + creator = appTokenUser.getId(); params.put("userId", appTokenUser.getId()); } }catch (Exception e) { diff --git a/src/main/resources/mybatis/mapper/userhonor/user-honor-mapper.xml b/src/main/resources/mybatis/mapper/userhonor/user-honor-mapper.xml index d8529eb..57da5f2 100644 --- a/src/main/resources/mybatis/mapper/userhonor/user-honor-mapper.xml +++ b/src/main/resources/mybatis/mapper/userhonor/user-honor-mapper.xml @@ -126,6 +126,9 @@ user_archives_id = #{userArchivesId}, + + + photo = '', gmt_modified = #{gmtModified}, modifier = #{modifier}, diff --git a/src/main/resources/templates/filecatalogue/list-tree.html b/src/main/resources/templates/filecatalogue/list-tree.html index b914eba..d20de51 100644 --- a/src/main/resources/templates/filecatalogue/list-tree.html +++ b/src/main/resources/templates/filecatalogue/list-tree.html @@ -82,9 +82,33 @@ }); } + function addHoverDom(treeId, treeNode) { + if(1 == type) { + var aObj = $("#" + treeNode.tId + "_a"); + if ($("#diyBtn_" + treeNode.id).length > 0) return; + var editStr = " " + + ""; + aObj.append(editStr); + var btn = $("#diyBtn_" + treeNode.id); + if (btn) btn.bind("click", function () { + setRole(treeNode.id, treeNode.typeType); + }); + } + }; + + function removeHoverDom(treeId, treeNode) { + $("#diyBtn_"+treeNode.id).unbind().remove(); + $("#diyBtn_space_" +treeNode.id).unbind().remove(); + }; + // 初始化树 function initThree() { var setting = { + view: { + addHoverDom: addHoverDom, + removeHoverDom: removeHoverDom + }, async: { enable: true, autoLoad: false, @@ -108,10 +132,10 @@ initIFrame(treeLevel); return false; }, - onRightClick: function(event, treeId, treeNode) { + /*onRightClick: function(event, treeId, treeNode) { console.log(treeNode) setRole(treeNode.id, treeNode.typeType); - } + }*/ }, }; var zTree = $.fn.zTree.init($("#leftTree"), setting); diff --git a/src/main/resources/templates/filecatalogue/save.html b/src/main/resources/templates/filecatalogue/save.html index 62ea5a8..cb6579d 100644 --- a/src/main/resources/templates/filecatalogue/save.html +++ b/src/main/resources/templates/filecatalogue/save.html @@ -239,6 +239,7 @@ var loadLayerIndex; formData.field.type = type; top.restAjax.post(top.restAjax.path('api/filecatalogue/save', []), formData.field, null, function(code, data) { + parent.parent.common.refreshTree('leftTree'); var layerIndex = top.dialog.msg(top.dataMessage.commitSuccess, { time: 0, btn: [top.dataMessage.button.yes, top.dataMessage.button.no], diff --git a/src/main/resources/templates/filecatalogue/update.html b/src/main/resources/templates/filecatalogue/update.html index da71870..b39be70 100644 --- a/src/main/resources/templates/filecatalogue/update.html +++ b/src/main/resources/templates/filecatalogue/update.html @@ -227,6 +227,7 @@ top.dialog.close(index); var loadLayerIndex; top.restAjax.put(top.restAjax.path('api/filecatalogue/update/{fileCatalogueId}', [fileCatalogueId]), formData.field, null, function(code, data) { + parent.parent.common.refreshTree('leftTree'); var layerIndex = top.dialog.msg(top.dataMessage.updateSuccess, { time: 0, btn: [top.dataMessage.button.yes, top.dataMessage.button.no], diff --git a/src/main/resources/templates/fileupload/list-public-off.html b/src/main/resources/templates/fileupload/list-public-off.html index 5779c3a..26a5f12 100644 --- a/src/main/resources/templates/fileupload/list-public-off.html +++ b/src/main/resources/templates/fileupload/list-public-off.html @@ -144,7 +144,7 @@ }); } - function fileView(fileId, fileHz) { + /*function fileView(fileId, fileHz) { var url = getWebRootPath() + "/route/file/download/false/" + fileId; var previewUrl = url + '&fullfilename=' + fileHz; @@ -155,9 +155,21 @@ area: ['80%', '80%'], shadeClose: true, anim: 2, - content: 'http://192.168.0.120:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)), + content: 'http://121.36.71.250/onlinePreview/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)), end: function() { + } + }); + }*/ + + function fileView(fileId, fileHz) { + top.dialog.open({ + url: top.restAjax.path('oa/index/onlineFileView/{fileId}', [fileId]), + title: false, + width: '800px', + height: '500px', + onClose: function() { + } }); } diff --git a/src/main/resources/templates/fileupload/list-share-personal-new.html b/src/main/resources/templates/fileupload/list-share-personal-new.html index 68cfd87..00332be 100644 --- a/src/main/resources/templates/fileupload/list-share-personal-new.html +++ b/src/main/resources/templates/fileupload/list-share-personal-new.html @@ -223,7 +223,7 @@ }); } - function fileView(fileId, fileHz) { + /*function fileView(fileId, fileHz) { var url = getWebRootPath() + "/route/file/download/false/" + fileId; var previewUrl = url + '&fullfilename=' + fileHz; @@ -237,6 +237,18 @@ content: 'http://192.168.0.120:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)), end: function() { + } + }); + }*/ + + function fileView(fileId, fileHz) { + top.dialog.open({ + url: top.restAjax.path('oa/index/onlineFileView/{fileId}', [fileId]), + title: false, + width: '800px', + height: '500px', + onClose: function() { + } }); } diff --git a/src/main/resources/templates/fileupload/list-share-public-new.html b/src/main/resources/templates/fileupload/list-share-public-new.html index 795cea9..c2e958e 100644 --- a/src/main/resources/templates/fileupload/list-share-public-new.html +++ b/src/main/resources/templates/fileupload/list-share-public-new.html @@ -258,7 +258,7 @@ }); } - function fileView(fileId, fileHz) { + /*function fileView(fileId, fileHz) { var url = getWebRootPath() + "/route/file/download/false/" + fileId; var previewUrl = url + '&fullfilename=' + fileHz; @@ -272,6 +272,18 @@ content: 'http://192.168.0.120:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)), end: function() { + } + }); + }*/ + + function fileView(fileId, fileHz) { + top.dialog.open({ + url: top.restAjax.path('oa/index/onlineFileView/{fileId}', [fileId]), + title: false, + width: '800px', + height: '500px', + onClose: function() { + } }); } diff --git a/src/main/resources/templates/fileupload/list-share-share-new.html b/src/main/resources/templates/fileupload/list-share-share-new.html index 1bd4a8b..c9b84c9 100644 --- a/src/main/resources/templates/fileupload/list-share-share-new.html +++ b/src/main/resources/templates/fileupload/list-share-share-new.html @@ -151,7 +151,7 @@ }); } - function fileView(fileId, fileHz) { + /*function fileView(fileId, fileHz) { var url = getWebRootPath() + "/route/file/download/false/" + fileId; var previewUrl = url + '&fullfilename=' + fileHz; @@ -165,6 +165,18 @@ content: 'http://192.168.0.120:8012/onlinePreview?url='+encodeURIComponent(Base64.encode(previewUrl)), end: function() { + } + }); + }*/ + + function fileView(fileId, fileHz) { + top.dialog.open({ + url: top.restAjax.path('oa/index/onlineFileView/{fileId}', [fileId]), + title: false, + width: '800px', + height: '500px', + onClose: function() { + } }); } diff --git a/src/main/resources/templates/fileupload/list-tree-public.html b/src/main/resources/templates/fileupload/list-tree-public.html index dfb9b52..a8682fa 100644 --- a/src/main/resources/templates/fileupload/list-tree-public.html +++ b/src/main/resources/templates/fileupload/list-tree-public.html @@ -84,6 +84,7 @@ height: $win.height() - 50, }); } + // 初始化树 function initThree() { var setting = { diff --git a/src/main/resources/templates/fileupload/save-new.html b/src/main/resources/templates/fileupload/save-new.html index fd2001c..5efdf6f 100644 --- a/src/main/resources/templates/fileupload/save-new.html +++ b/src/main/resources/templates/fileupload/save-new.html @@ -102,7 +102,7 @@
- +
diff --git a/src/main/resources/templates/fileupload/update-new.html b/src/main/resources/templates/fileupload/update-new.html index 012e754..ffdfbff 100644 --- a/src/main/resources/templates/fileupload/update-new.html +++ b/src/main/resources/templates/fileupload/update-new.html @@ -125,7 +125,7 @@
- +