Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhgh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhou Yang
zhgh
Commits
b1f23c34
Commit
b1f23c34
authored
Feb 25, 2019
by
Zhou Yang
🍋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增-地图热力图-石化开发区
parent
41ab93eb
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
71 additions
and
443 deletions
+71
-443
cloud_baseinfo.html
...-web/src/main/webapp/WEB-INF/page/sys/cloud_baseinfo.html
+1
-1
cloud_baseinfo_input.html
...rc/main/webapp/WEB-INF/page/sys/cloud_baseinfo_input.html
+1
-1
echarts_big.html
...uts-web/src/main/webapp/WEB-INF/page/sys/echarts_big.html
+4
-4
baseinfo.js
beansprouts-web/src/main/webapp/js/clouddata/baseinfo.js
+11
-15
zhgh_echarts.js
beansprouts-web/src/main/webapp/js/clouddata/zhgh_echarts.js
+25
-64
mycharts.js
beansprouts-web/src/main/webapp/js/mycharts.js
+28
-71
neditor.config.js
beansprouts-web/src/main/webapp/neditor/neditor.config.js
+1
-1
Uploader.java
...rc/main/webapp/statics/plugins/umeditor/jsp/Uploader.java
+0
-260
imageUp.jsp
.../src/main/webapp/statics/plugins/umeditor/jsp/imageUp.jsp
+0
-26
No files found.
beansprouts-web/src/main/webapp/WEB-INF/page/sys/cloud_baseinfo.html
View file @
b1f23c34
...
...
@@ -108,7 +108,7 @@ glyphicon glyphicon-blackboard "></i> 大屏幕</a>
<option
:value=
"4"
>
骆驼街道
</option>
<option
:value=
"5"
>
澥浦镇
</option>
<option
:value=
"6"
>
九龙湖镇
</option>
<option
:value=
"7"
>
化工
区
</option>
<option
:value=
"7"
>
石化开发
区
</option>
<option
:value=
"8"
>
系统工会
</option>
</select>
</div>
...
...
beansprouts-web/src/main/webapp/WEB-INF/page/sys/cloud_baseinfo_input.html
View file @
b1f23c34
...
...
@@ -102,7 +102,7 @@
<option
value=
"4"
>
骆驼街道
</option>
<option
value=
"5"
>
澥浦镇
</option>
<option
value=
"6"
>
九龙湖镇
</option>
<option
value=
"7"
>
化工
区
</option>
<option
value=
"7"
>
石化开发
区
</option>
<option
value=
"8"
>
系统工会
</option>
</select>
...
...
beansprouts-web/src/main/webapp/WEB-INF/page/sys/echarts_big.html
View file @
b1f23c34
...
...
@@ -7,7 +7,7 @@
<head>
<meta
charset=
"utf-8"
>
<title>
镇海工会
数据交换
共享分析平台
</title>
<title>
镇海工会
5·1云中心数据
共享分析平台
</title>
#parse("sys/header.html")
<meta
name=
"description"
content=
""
>
<meta
name=
"author"
content=
""
>
...
...
@@ -68,7 +68,7 @@
<div
id=
"title"
class=
"title-media"
>
<div
class=
"caption-title clearfix caption-title-media"
>
<i
class=
"title-left title-left-media"
><img
src=
"../doc/title-left.png"
></i>
<span
class=
"title-left-title-font title-left-title-font-media"
>
镇海工会
数据交换
共享分析平台
</span>
<span
class=
"title-left-title-font title-left-title-font-media"
>
镇海工会
5·1云中心数据
共享分析平台
</span>
<i
class=
"title-left title-right-media"
><img
src=
"../doc/title-right.png"
></i>
</div>
...
...
@@ -105,10 +105,10 @@
<i
class=
"bottomL"
></i>
<i
class=
"bottomR"
></i>
<div
class=
"data-title"
>
<b
class=
"data-title-left"
>
[
</b>
<!--
<b class="data-title-left">[</b>
<span>概述</span>
<b class="data-title-right">]</b>
-->
</div>
<ul
class=
"ym-menu-2 clearfix"
style=
"margin: 1% auto 0 auto; "
id=
"ym-menu-2"
>
...
...
beansprouts-web/src/main/webapp/js/clouddata/baseinfo.js
View file @
b1f23c34
...
...
@@ -43,20 +43,16 @@ $(function () {
index
:
"division"
,
width
:
45
,
formatter
:
function
(
value
,
option
,
row
)
{
if
(
value
===
1
)
{
return
'招宝山街道'
}
else
if
(
value
===
2
)
{
return
'蛟川街道'
}
else
if
(
value
===
3
)
{
return
'庄市街道'
}
else
if
(
value
===
4
)
{
return
'骆驼街道'
}
else
if
(
value
===
5
)
{
return
'澥浦镇'
}
else
if
(
value
===
6
)
{
return
'九龙湖镇'
}
else
{
return
'未知'
switch
(
value
){
case
1
:
return
"招宝山街道"
;
break
;
case
2
:
return
"蛟川街道"
;
break
;
case
3
:
return
"庄市街道"
;
break
;
case
4
:
return
"骆驼街道"
;
break
;
case
5
:
return
"澥浦镇"
;
break
;
case
6
:
return
"九龙湖镇"
;
break
;
case
7
:
return
"石化开发区"
;
break
;
case
8
:
return
"系统工会"
;
break
;
default
:
return
"未知"
;
break
;
}
}
},
...
...
beansprouts-web/src/main/webapp/js/clouddata/zhgh_echarts.js
View file @
b1f23c34
...
...
@@ -195,27 +195,14 @@ var vm = new Vue({
},
getNameByDivision
:
function
(
i
)
{
switch
(
i
)
{
case
1
:
return
"招宝山街道"
;
break
;
case
2
:
return
"蛟川街道"
;
break
;
case
3
:
return
"庄市街道"
;
break
;
case
4
:
return
"骆驼街道"
;
break
;
case
5
:
return
"澥浦镇"
;
break
;
case
6
:
return
"九龙湖镇"
;
break
;
default
:
return
"未知"
;
break
;
case
1
:
return
"招宝山街道"
;
break
;
case
2
:
return
"蛟川街道"
;
break
;
case
3
:
return
"庄市街道"
;
break
;
case
4
:
return
"骆驼街道"
;
break
;
case
5
:
return
"澥浦镇"
;
break
;
case
6
:
return
"九龙湖镇"
;
break
;
case
7
:
return
"石化开发区"
;
break
;
default
:
return
"未知"
;
break
;
}
},
mapHot
:
function
()
{
...
...
@@ -228,27 +215,14 @@ var vm = new Vue({
myData
.
forEach
(
function
(
item
,
index
)
{
var
myItem
=
{}
switch
(
item
.
name
)
{
case
1
:
item
.
name
=
"招宝山街道"
;
break
;
case
2
:
item
.
name
=
"蛟川街道"
;
break
;
case
3
:
item
.
name
=
"庄市街道"
;
break
;
case
4
:
item
.
name
=
"骆驼街道"
;
break
;
case
5
:
item
.
name
=
"澥浦镇"
;
break
;
case
6
:
item
.
name
=
"九龙湖镇"
;
break
;
default
:
item
.
name
=
"未知"
;
break
;
case
1
:
item
.
name
=
"招宝山街道"
;
break
;
case
2
:
item
.
name
=
"蛟川街道"
;
break
;
case
3
:
item
.
name
=
"庄市街道"
;
break
;
case
4
:
item
.
name
=
"骆驼街道"
;
break
;
case
5
:
item
.
name
=
"澥浦镇"
;
break
;
case
6
:
item
.
name
=
"九龙湖镇"
;
break
;
case
7
:
item
.
name
=
"石化开发区"
;
break
;
default
:
item
.
name
=
"未知"
;
break
;
}
myItem
.
name
=
item
.
name
;
myItem
.
value
=
item
.
data
;
...
...
@@ -265,7 +239,7 @@ var vm = new Vue({
'澥浦镇'
:
[
121.613027
,
30.022128
],
'蛟川街道'
:
[
121.661092
,
29.97852
],
'骆驼街道'
:
[
121.606904
,
29.980411
],
'石化开发区'
:
[
121.619841
,
30.046972
],
};
var
convertData
=
function
(
data
)
{
...
...
@@ -590,27 +564,14 @@ var vm = new Vue({
console
.
log
(
myData
)
myData
.
forEach
(
function
(
item
,
index
)
{
switch
(
item
.
name
)
{
case
1
:
item
.
name
=
"招宝山街道"
;
break
;
case
2
:
item
.
name
=
"蛟川街道"
;
break
;
case
3
:
item
.
name
=
"庄市街道"
;
break
;
case
4
:
item
.
name
=
"骆驼街道"
;
break
;
case
5
:
item
.
name
=
"澥浦镇"
;
break
;
case
6
:
item
.
name
=
"九龙湖镇"
;
break
;
default
:
item
.
name
=
"未知"
;
break
;
case
1
:
item
.
name
=
"招宝山街道"
;
break
;
case
2
:
item
.
name
=
"蛟川街道"
;
break
;
case
3
:
item
.
name
=
"庄市街道"
;
break
;
case
4
:
item
.
name
=
"骆驼街道"
;
break
;
case
5
:
item
.
name
=
"澥浦镇"
;
break
;
case
6
:
item
.
name
=
"九龙湖镇"
;
break
;
case
7
:
item
.
name
=
"石化开发区"
;
break
;
default
:
item
.
name
=
"未知"
;
break
;
}
nameList
.
push
(
item
.
name
);
dataList
.
push
(
item
.
data
);
...
...
beansprouts-web/src/main/webapp/js/mycharts.js
View file @
b1f23c34
...
...
@@ -28,33 +28,15 @@ if($(window).width() > 1190) {
var
app
=
angular
.
module
(
'myApp'
,
[]);
function
getNameByDivision
(
i
)
{
switch
(
i
)
{
case
1
:
return
"招宝山街道"
;
break
;
case
2
:
return
"蛟川街道"
;
break
;
case
3
:
return
"庄市街道"
;
break
;
case
4
:
return
"骆驼街道"
;
break
;
case
5
:
return
"澥浦镇"
;
break
;
case
6
:
return
"九龙湖镇"
;
break
;
case
7
:
return
"化工区"
;
break
;
case
8
:
return
"系统工会"
;
break
;
default
:
return
"未知"
;
break
;
case
1
:
return
"招宝山街道"
;
break
;
case
2
:
return
"蛟川街道"
;
break
;
case
3
:
return
"庄市街道"
;
break
;
case
4
:
return
"骆驼街道"
;
break
;
case
5
:
return
"澥浦镇"
;
break
;
case
6
:
return
"九龙湖镇"
;
break
;
case
7
:
return
"石化开发区"
;
break
;
case
8
:
return
"系统工会"
;
break
;
default
:
return
"未知"
;
break
;
}
}
...
...
@@ -90,27 +72,14 @@ app.controller('customersCtrl', function($scope, $http) {
// var dataList=[];
myDataFor1
.
forEach
(
function
(
item
,
index
)
{
switch
(
item
.
name
)
{
case
1
:
item
.
name
=
"招宝山街道"
;
break
;
case
2
:
item
.
name
=
"蛟川街道"
;
break
;
case
3
:
item
.
name
=
"庄市街道"
;
break
;
case
4
:
item
.
name
=
"骆驼街道"
;
break
;
case
5
:
item
.
name
=
"澥浦镇"
;
break
;
case
6
:
item
.
name
=
"九龙湖镇"
;
break
;
default
:
item
.
name
=
"未知"
;
break
;
case
1
:
item
.
name
=
"招宝山街道"
;
break
;
case
2
:
item
.
name
=
"蛟川街道"
;
break
;
case
3
:
item
.
name
=
"庄市街道"
;
break
;
case
4
:
item
.
name
=
"骆驼街道"
;
break
;
case
5
:
item
.
name
=
"澥浦镇"
;
break
;
case
6
:
item
.
name
=
"九龙湖镇"
;
break
;
case
7
:
item
.
name
=
"石化开发区"
;
break
;
default
:
item
.
name
=
"未知"
;
break
;
}
// nameList.push(item.name);
// dataList.push(item.data);
...
...
@@ -1194,7 +1163,8 @@ app.controller('customersCtrl', function($scope, $http) {
'庄市街道'
:
[
121.657198
,
29.931283
],
'澥浦镇'
:
[
121.613027
,
30.022128
],
'蛟川街道'
:
[
121.661092
,
29.97852
],
'骆驼街道'
:
[
121.606904
,
29.980411
]
'骆驼街道'
:
[
121.606904
,
29.980411
],
'石化开发区'
:
[
121.619841
,
30.046972
],
};
var
dat
=
dataForMap
;
...
...
@@ -1302,7 +1272,7 @@ app.controller('customersCtrl', function($scope, $http) {
var
option1
=
{
title
:
{
text
:
'按街道统计工会数的热力图'
,
subtext
:
'目前是虚拟数据,故我将圆放大了10倍'
,
//
subtext: '目前是虚拟数据,故我将圆放大了10倍',
left
:
'center'
,
textStyle
:
{
...
...
@@ -1517,27 +1487,14 @@ app.controller('customersCtrl', function($scope, $http) {
});
function
reDivision
(
division
){
switch
(
division
){
case
"招宝山街道"
:
return
1
;
break
;
case
"蛟川街道"
:
return
2
;
break
;
case
"庄市街道"
:
return
3
;
break
;
case
"骆驼街道"
:
return
4
;
break
;
case
"澥浦镇"
:
return
5
;
break
;
case
"九龙湖镇"
:
return
6
;
break
;
default
:
return
;
break
;
case
"招宝山街道"
:
return
1
;
break
;
case
"蛟川街道"
:
return
2
;
break
;
case
"庄市街道"
:
return
3
;
break
;
case
"骆驼街道"
:
return
4
;
break
;
case
"澥浦镇"
:
return
5
;
break
;
case
"九龙湖镇"
:
return
6
;
break
;
case
"石化开发区"
:
return
7
;
break
;
default
:
return
;
break
;
}
...
...
beansprouts-web/src/main/webapp/neditor/neditor.config.js
View file @
b1f23c34
...
...
@@ -35,7 +35,7 @@
videoActionName
:
"uploadvideo"
,
fileActionName
:
"uploadfile"
,
imageFieldName
:
"upfile"
,
// 提交的图片表单名称
imageMaxSize
:
2048000
,
// 上传大小限制,单位B
imageMaxSize
:
2048000
0
,
// 上传大小限制,单位B
imageUrlPrefix
:
"../statics/plugins/umeditor/"
,
scrawlUrlPrefix
:
""
,
videoUrlPrefix
:
""
,
...
...
beansprouts-web/src/main/webapp/statics/plugins/umeditor/jsp/Uploader.java
deleted
100644 → 0
View file @
41ab93eb
package
com
.
baidu
.
ueditor
.
um
;
import
java.io.*
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
org.apache.commons.fileupload.*
;
import
org.apache.commons.fileupload.FileUploadBase.InvalidContentTypeException
;
import
org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException
;
import
org.apache.commons.fileupload.util.*
;
import
org.apache.commons.fileupload.servlet.*
;
import
org.apache.commons.fileupload.FileItemIterator
;
import
org.apache.commons.fileupload.disk.DiskFileItemFactory
;
import
sun.misc.BASE64Decoder
;
import
javax.servlet.http.HttpServletRequest
;
/**
* UEditor文件上传辅助类
*
*/
public
class
Uploader
{
// 输出文件地址
private
String
url
=
""
;
// 上传文件名
private
String
fileName
=
""
;
// 状态
private
String
state
=
""
;
// 文件类型
private
String
type
=
""
;
// 原始文件名
private
String
originalName
=
""
;
// 文件大小
private
long
size
=
0
;
private
HttpServletRequest
request
=
null
;
private
String
title
=
""
;
// 保存路径
private
String
savePath
=
"upload"
;
// 文件允许格式
private
String
[]
allowFiles
=
{
".rar"
,
".doc"
,
".docx"
,
".zip"
,
".pdf"
,
".txt"
,
".swf"
,
".wmv"
,
".gif"
,
".png"
,
".jpg"
,
".jpeg"
,
".bmp"
};
// 文件大小限制,单位KB
private
int
maxSize
=
10000
;
private
HashMap
<
String
,
String
>
errorInfo
=
new
HashMap
<
String
,
String
>();
public
Uploader
(
HttpServletRequest
request
)
{
this
.
request
=
request
;
HashMap
<
String
,
String
>
tmp
=
this
.
errorInfo
;
tmp
.
put
(
"SUCCESS"
,
"SUCCESS"
);
//默认成功
tmp
.
put
(
"NOFILE"
,
"未包含文件上传域"
);
tmp
.
put
(
"TYPE"
,
"不允许的文件格式"
);
tmp
.
put
(
"SIZE"
,
"文件大小超出限制"
);
tmp
.
put
(
"ENTYPE"
,
"请求类型ENTYPE错误"
);
tmp
.
put
(
"REQUEST"
,
"上传请求异常"
);
tmp
.
put
(
"IO"
,
"IO异常"
);
tmp
.
put
(
"DIR"
,
"目录创建失败"
);
tmp
.
put
(
"UNKNOWN"
,
"未知错误"
);
}
public
void
upload
()
throws
Exception
{
boolean
isMultipart
=
ServletFileUpload
.
isMultipartContent
(
this
.
request
);
if
(!
isMultipart
)
{
this
.
state
=
this
.
errorInfo
.
get
(
"NOFILE"
);
return
;
}
DiskFileItemFactory
dff
=
new
DiskFileItemFactory
();
String
savePath
=
this
.
getFolder
(
this
.
savePath
);
dff
.
setRepository
(
new
File
(
savePath
));
try
{
ServletFileUpload
sfu
=
new
ServletFileUpload
(
dff
);
sfu
.
setSizeMax
(
this
.
maxSize
*
1024
);
sfu
.
setHeaderEncoding
(
"utf-8"
);
FileItemIterator
fii
=
sfu
.
getItemIterator
(
this
.
request
);
while
(
fii
.
hasNext
())
{
FileItemStream
fis
=
fii
.
next
();
if
(!
fis
.
isFormField
())
{
this
.
originalName
=
fis
.
getName
().
substring
(
fis
.
getName
().
lastIndexOf
(
System
.
getProperty
(
"file.separator"
))
+
1
);
if
(!
this
.
checkFileType
(
this
.
originalName
))
{
this
.
state
=
this
.
errorInfo
.
get
(
"TYPE"
);
continue
;
}
this
.
fileName
=
this
.
getName
(
this
.
originalName
);
this
.
type
=
this
.
getFileExt
(
this
.
fileName
);
this
.
url
=
savePath
+
"/"
+
this
.
fileName
;
BufferedInputStream
in
=
new
BufferedInputStream
(
fis
.
openStream
());
File
file
=
new
File
(
this
.
getPhysicalPath
(
this
.
url
));
FileOutputStream
out
=
new
FileOutputStream
(
file
);
BufferedOutputStream
output
=
new
BufferedOutputStream
(
out
);
Streams
.
copy
(
in
,
output
,
true
);
this
.
state
=
this
.
errorInfo
.
get
(
"SUCCESS"
);
this
.
size
=
file
.
length
();
//UE中只会处理单张上传,完成后即退出
break
;
}
else
{
String
fname
=
fis
.
getFieldName
();
//只处理title,其余表单请自行处理
if
(!
fname
.
equals
(
"pictitle"
)){
continue
;
}
BufferedInputStream
in
=
new
BufferedInputStream
(
fis
.
openStream
());
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
in
));
StringBuffer
result
=
new
StringBuffer
();
while
(
reader
.
ready
())
{
result
.
append
((
char
)
reader
.
read
());
}
this
.
title
=
new
String
(
result
.
toString
().
getBytes
(),
"utf-8"
);
reader
.
close
();
}
}
}
catch
(
SizeLimitExceededException
e
)
{
this
.
state
=
this
.
errorInfo
.
get
(
"SIZE"
);
}
catch
(
InvalidContentTypeException
e
)
{
this
.
state
=
this
.
errorInfo
.
get
(
"ENTYPE"
);
}
catch
(
FileUploadException
e
)
{
this
.
state
=
this
.
errorInfo
.
get
(
"REQUEST"
);
}
catch
(
Exception
e
)
{
this
.
state
=
this
.
errorInfo
.
get
(
"UNKNOWN"
);
}
}
/**
* 接受并保存以base64格式上传的文件
* @param fieldName
*/
public
void
uploadBase64
(
String
fieldName
){
String
savePath
=
this
.
getFolder
(
this
.
savePath
);
String
base64Data
=
this
.
request
.
getParameter
(
fieldName
);
this
.
fileName
=
this
.
getName
(
"test.png"
);
this
.
url
=
savePath
+
"/"
+
this
.
fileName
;
BASE64Decoder
decoder
=
new
BASE64Decoder
();
try
{
File
outFile
=
new
File
(
this
.
getPhysicalPath
(
this
.
url
));
OutputStream
ro
=
new
FileOutputStream
(
outFile
);
byte
[]
b
=
decoder
.
decodeBuffer
(
base64Data
);
for
(
int
i
=
0
;
i
<
b
.
length
;
++
i
)
{
if
(
b
[
i
]
<
0
)
{
b
[
i
]
+=
256
;
}
}
ro
.
write
(
b
);
ro
.
flush
();
ro
.
close
();
this
.
state
=
this
.
errorInfo
.
get
(
"SUCCESS"
);
}
catch
(
Exception
e
)
{
this
.
state
=
this
.
errorInfo
.
get
(
"IO"
);
}
}
/**
* 文件类型判断
*
* @param fileName
* @return
*/
private
boolean
checkFileType
(
String
fileName
)
{
Iterator
<
String
>
type
=
Arrays
.
asList
(
this
.
allowFiles
).
iterator
();
while
(
type
.
hasNext
())
{
String
ext
=
type
.
next
();
if
(
fileName
.
toLowerCase
().
endsWith
(
ext
))
{
return
true
;
}
}
return
false
;
}
/**
* 获取文件扩展名
*
* @return string
*/
private
String
getFileExt
(
String
fileName
)
{
return
fileName
.
substring
(
fileName
.
lastIndexOf
(
"."
));
}
/**
* 依据原始文件名生成新文件名
* @return
*/
private
String
getName
(
String
fileName
)
{
Random
random
=
new
Random
();
return
this
.
fileName
=
""
+
random
.
nextInt
(
10000
)
+
System
.
currentTimeMillis
()
+
this
.
getFileExt
(
fileName
);
}
/**
* 根据字符串创建本地目录 并按照日期建立子目录返回
* @param path
* @return
*/
private
String
getFolder
(
String
path
)
{
SimpleDateFormat
formater
=
new
SimpleDateFormat
(
"yyyyMMdd"
);
path
+=
"/"
+
formater
.
format
(
new
Date
());
File
dir
=
new
File
(
this
.
getPhysicalPath
(
path
));
if
(!
dir
.
exists
())
{
try
{
dir
.
mkdirs
();
}
catch
(
Exception
e
)
{
this
.
state
=
this
.
errorInfo
.
get
(
"DIR"
);
return
""
;
}
}
return
path
;
}
/**
* 根据传入的虚拟路径获取物理路径
*
* @param path
* @return
*/
private
String
getPhysicalPath
(
String
path
)
{
String
servletPath
=
this
.
request
.
getServletPath
();
String
realPath
=
this
.
request
.
getSession
().
getServletContext
()
.
getRealPath
(
servletPath
);
return
new
File
(
realPath
).
getParent
()
+
"/"
+
path
;
}
public
void
setSavePath
(
String
savePath
)
{
this
.
savePath
=
savePath
;
}
public
void
setAllowFiles
(
String
[]
allowFiles
)
{
this
.
allowFiles
=
allowFiles
;
}
public
void
setMaxSize
(
int
size
)
{
this
.
maxSize
=
size
;
}
public
long
getSize
()
{
return
this
.
size
;
}
public
String
getUrl
()
{
return
this
.
url
;
}
public
String
getFileName
()
{
return
this
.
fileName
;
}
public
String
getState
()
{
return
this
.
state
;
}
public
String
getTitle
()
{
return
this
.
title
;
}
public
String
getType
()
{
return
this
.
type
;
}
public
String
getOriginalName
()
{
return
this
.
originalName
;
}
}
beansprouts-web/src/main/webapp/statics/plugins/umeditor/jsp/imageUp.jsp
deleted
100644 → 0
View file @
41ab93eb
<%@ page
language=
"java"
contentType=
"text/html; charset=utf-8"
pageEncoding=
"utf-8"
%>
<%@ page
import=
"com.baidu.ueditor.um.Uploader"
%>
<%
request
.
setCharacterEncoding
(
"utf-8"
);
response
.
setCharacterEncoding
(
"utf-8"
);
Uploader
up
=
new
Uploader
(
request
);
up
.
setSavePath
(
"upload"
);
String
[]
fileType
=
{
".gif"
,
".png"
,
".jpg"
,
".jpeg"
,
".bmp"
};
up
.
setAllowFiles
(
fileType
);
up
.
setMaxSize
(
10000
);
//单位KB
up
.
upload
();
String
callback
=
request
.
getParameter
(
"callback"
);
String
result
=
"{\"name\":\""
+
up
.
getFileName
()
+
"\", \"originalName\": \""
+
up
.
getOriginalName
()
+
"\", \"size\": "
+
up
.
getSize
()
+
", \"state\": \""
+
up
.
getState
()
+
"\", \"type\": \""
+
up
.
getType
()
+
"\", \"url\": \""
+
up
.
getUrl
()
+
"\"}"
;
result
=
result
.
replaceAll
(
"\\\\"
,
"\\\\"
);
if
(
callback
==
null
){
response
.
getWriter
().
print
(
result
);
}
else
{
response
.
getWriter
().
print
(
"
<
script
>
"+ callback +"
(
" + result + "
)</
script
>"
);
}
%>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment