parent
8b3f7e8647
commit
3ff90e8e30
@ -0,0 +1,27 @@ |
|||||||
|
package com.keyware.htey.config; |
||||||
|
|
||||||
|
import com.zhuozhengsoft.pageoffice.poserver.Server; |
||||||
|
import org.springframework.beans.factory.annotation.Value; |
||||||
|
import org.springframework.boot.web.servlet.ServletRegistrationBean; |
||||||
|
import org.springframework.context.annotation.Bean; |
||||||
|
import org.springframework.context.annotation.Configuration; |
||||||
|
|
||||||
|
@Configuration |
||||||
|
public class PageOfficeConfig { |
||||||
|
|
||||||
|
@Value("${posyspath}") |
||||||
|
private String poSysPath; |
||||||
|
|
||||||
|
@Bean |
||||||
|
public ServletRegistrationBean pageofficeRegistrationBean() { |
||||||
|
Server poserver = new Server(); |
||||||
|
poserver.setSysPath(poSysPath); // 设置PageOffice注册成功后,license.lic文件存放的目录
|
||||||
|
|
||||||
|
ServletRegistrationBean srb = new ServletRegistrationBean(poserver); |
||||||
|
srb.addUrlMappings("/poserver.zz"); |
||||||
|
srb.addUrlMappings("/poclient"); |
||||||
|
srb.addUrlMappings("/pageoffice.js"); |
||||||
|
srb.addUrlMappings("/sealsetup.exe"); |
||||||
|
return srb; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,14 @@ |
|||||||
|
package com.keyware.htey.controller; |
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller; |
||||||
|
import org.springframework.ui.Model; |
||||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||||
|
|
||||||
|
@Controller |
||||||
|
public class IndexController { |
||||||
|
@GetMapping("/") |
||||||
|
public String index(Model model) { |
||||||
|
model.addAttribute("message", "Hello from Spring Boot!"); |
||||||
|
return "index"; // 返回 templates/index.html
|
||||||
|
} |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="en"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<title>Title</title> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<table> |
||||||
|
<tr> |
||||||
|
<td> |
||||||
|
<inpu type=""></inpu> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</table> |
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,14 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="en"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<title>Title</title> |
||||||
|
</head> |
||||||
|
<script type="text/javascript" src="/pageoffice.js"></script> |
||||||
|
<body> |
||||||
|
<a href="javascript:POBrowser.openWindow('simpleWord/openFile','width=1150px;height=900px;');"> |
||||||
|
在线打开文档 |
||||||
|
</a> |
||||||
|
|
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,24 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="en" xmlns:th="http://www.thymeleaf.org"> |
||||||
|
<head> |
||||||
|
<meta charset="UTF-8"> |
||||||
|
<title>最简单的打开保存文件</title> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<div style="width:100%; height:800px;" th:utext="${poHtmlCode}"></div> |
||||||
|
<script> |
||||||
|
function Save() { |
||||||
|
pageofficectrl.WebSave(); |
||||||
|
} |
||||||
|
//打开书签页面 |
||||||
|
function openBootMark(){ |
||||||
|
window.location.href = "/simpleWord/bootMarkPage"; |
||||||
|
} |
||||||
|
|
||||||
|
function OnPageOfficeCtrlInit() { |
||||||
|
pageofficectrl.AddCustomToolButton("保存", "Save", 1); |
||||||
|
pageofficectrl.AddCustomToolButton("书签", "openBootMark", 2); |
||||||
|
} |
||||||
|
</script> |
||||||
|
</body> |
||||||
|
</html> |
Loading…
Reference in new issue