functionsDetail.jsp
4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<%@ page contentType="text/html; charset=UTF-8"%>
<%@page import="com.weaver.formmodel.mobile.scriptlib.FParam"%>
<%@page import="com.weaver.formmodel.mobile.scriptlib.Function"%>
<%@page import="com.engine.mobilemode.service.FunctionService"%>
<%@ include file="./init.jsp"%>
<%
List<Function> functionList = FunctionService.getInstance().loadFunction(user.getLanguage());
%>
<html>
<head>
<title></title>
<link rel="stylesheet" href="/mobilemode/admin/dep/perfect-scrollbar/css/perfect-scrollbar.min.css">
<style type="text/css">
*{
font-family: 'Microsoft YaHei', Arial;
}
html,body{
height: 100%;
margin: 0px;
padding: 0px;
overflow: hidden;
}
* {
font-family: "Helvetica Neue", "Segoe UI", Tahoma, Arial, "Hiragino Sans GB", STHeiti, "Microsoft Yahei", "WenQuanYi Micro Hei", sans-serif;
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body{
background: #fff;
font-size: 12px;
}
#function_main{
position: absolute;
left:0px;
top: 0px;
bottom: 0px;
width: 100%;
overflow-y: auto;
overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6, h7, p {
font-weight: 400;
margin: 0;
padding: 0;
}
pre {
display: block;
word-break: break-all;
word-wrap: break-word;
margin: 10px 0;
}
pre code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border-radius: 0;
}
.function-content pre {
background-color: #efeff4;
color: #666;
font-size: 12px;
padding: 15px;
}
.function-content {
margin: 0;
padding: 2px 30px;
}
.function-title {
color: #0066b1;
font-size: 16px;
font-weight: 600;
border-bottom: 1px solid #ccc;
height: 40px;
line-height: 40px;
}
.function-title-desc {
margin-top: 10px;
}
.function-content p {
padding: 5px 0 0 0;
}
.function-param {
position: relative;
background: #fff;
margin: 5px 0 0 20px;
}
.function-param-label {
color: #0066b1;
font-size: 12px;
font-weight: 600;
width: 120px;
display: inline-block;
}
.function-param-type {
padding-left: 20px;
border-left: 1px solid #ccc;
}
</style>
<script>
require(["perfect-scrollbar"], function() {
$('#function_main').perfectScrollbar({ theme: "light" });
})
</script>
</head>
<body>
<div id="function_main">
<%for(Function function : functionList){ %>
<%List<FParam> params = function.getParams(); %>
<div id="function_<%=function.getId() %>" class="function-content">
<div class="function-title"><%=function.getSign() %></div>
<div class="function-title-desc">
<p><%=function.getDesc() %></p>
<%if(params.size() == 0){%><p><strong><%=SystemEnv.getHtmlLabelName(383537,user.getLanguage())%><!-- 参数: --></strong><%=SystemEnv.getHtmlLabelName(127228,user.getLanguage())%><!-- 无 --></p><%}else{%><p><strong><%=SystemEnv.getHtmlLabelName(383537,user.getLanguage())%><!-- 参数: --></strong></p><%}%>
</div>
<%for(int i = 0; i < params.size(); i++){
FParam fParam = params.get(i);
%>
<div class="function-param">
<div class="function-param-head">
<span class="function-param-label"><%=fParam.getName() %></span>
<span class="function-param-type"><%=fParam.getType() %></span>
<%=fParam.getRequired().equalsIgnoreCase("true") ? "["+SystemEnv.getHtmlLabelName(383237,user.getLanguage())+"]" : "["+SystemEnv.getHtmlLabelName(383238,user.getLanguage())+"]" %> <!-- 必需, 可选-->
<%=fParam.getExplain() %>
</div>
</div>
<%} %>
<%
String returnV = function.getReturnV();
if(returnV.trim().equals("")){
returnV = SystemEnv.getHtmlLabelName(127228,user.getLanguage()); //无
}
%>
<p><strong><%=SystemEnv.getHtmlLabelName(383540,user.getLanguage())%><!-- 返回值: --></strong><%=returnV %></p>
<p><strong><%=SystemEnv.getHtmlLabelName(127578,user.getLanguage())%><!-- 示例:--></strong></p>
<pre><code class="lang-javascript prettyprint prettyprinted"><%=function.getExample().replaceAll("<", "<").replaceAll(">", ">") %></code></pre>
</div>
<%} %>
</div>
</body>
</html>