Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5pc
Overview
Overview
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
管理员
jfV5pc
Commits
ccd1b8a2
Commit
ccd1b8a2
authored
Jul 19, 2018
by
陈玉兰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
a674c257
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
55 additions
and
8 deletions
+55
-8
fileGrapTab.js
WebContent/reptile/fileGrap/js/fileGrapTab.js
+21
-3
textGrapTab.js
WebContent/reptile/textGrap/js/textGrapTab.js
+22
-4
AllDataBusinessImpl.java
...ptile/com/gaowj/business/allData/AllDataBusinessImpl.java
+3
-0
allDataDAO.xml
src_reptile/com/gaowj/business/allData/allDataDAO.xml
+4
-0
actAction.java
src_reptile/com/gaowj/fileGrap/actAction.java
+2
-0
actAction.java
src_reptile/com/gaowj/textGrap/actAction.java
+3
-1
No files found.
WebContent/reptile/fileGrap/js/fileGrapTab.js
View file @
ccd1b8a2
...
...
@@ -144,6 +144,14 @@ function addRow(){
//加载增加子页面成功后的回调
function
addUrlOnloadCallback
(
is_row
){
init_combobox
();
init_inputValue
();
}
function
init_inputValue
(){
$
(
'#save_Path'
).
textbox
(
'setValue'
,
'/usr/local/spider_pic'
);
$
(
'#DATABASE_NAME'
).
textbox
(
'setValue'
,
'pc_business'
);
$
(
'#TABLE_NAME'
).
textbox
(
'setValue'
,
'file_attribute'
);
}
//初始化下拉框
...
...
@@ -318,8 +326,10 @@ function lookRow(index){
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
is_row
[
0
].
OPETYPE
=
'update'
;
//document.getElementById("textGrapiframe").contentWindow.init(is_row[0].TABLE_NAME);
//fileGrapiframe.window.init(is_row[0].TABLE_NAME);
if
(
is_row
[
0
].
STATUS
!=
'SUCCESS'
){
$
.
messager
.
alert
(
'提示'
,
"该记录无数据!"
,
'info'
);
return
;
}
window
.
location
=
'fileGrapView_fileGrapDataTab?savepath='
+
is_row
[
0
].
SAVE_PATH
;
//openViewIframRow('listData',"fileGrapView_fileGrapDataTab?tableName="+is_row[0].TABLE_NAME,is_row[0],"爬取数据",true,0.65,0.95,170,0);
...
...
@@ -327,8 +337,12 @@ function lookRow(index){
function
statusRow
(
index
){
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
if
(
is_row
[
0
].
STATUS
==
'SUCCESS'
){
$
.
messager
.
alert
(
'提示'
,
"该记录已爬取成功!"
,
'info'
);
}
var
map
=
{};
map
.
FIELD_UUID
=
is_row
[
0
].
UUID
map
.
FIELD_CREATE_ID
=
is_row
[
0
].
CREATE_ID
...
...
@@ -344,7 +358,10 @@ function statusRow(index){
url
:
"fileGrapAct_status"
,
data
:
map
,
success
:
function
(
data
){
$
(
'#list'
).
datagrid
(
'reload'
);
if
(
data
.
statusCode
==
200
){
$
.
messager
.
alert
(
'提示'
,
"状态获取成功!"
,
'info'
);
}
$
(
'#list'
).
datagrid
(
'load'
,{});
}
});
}
\ No newline at end of file
WebContent/reptile/textGrap/js/textGrapTab.js
View file @
ccd1b8a2
...
...
@@ -167,7 +167,6 @@ function init_combobox_for_url(){
$
(
"#SAVE_PATH"
).
textbox
(
'setValue'
,
record
.
SAVE_PATH
);
$
(
"#DATABASE_NAME"
).
textbox
(
'setValue'
,
record
.
DATABASE_NAME
);
$
(
"#TABLE_NAME"
).
textbox
(
'setValue'
,
record
.
TABLE_NAME
);
console
.
log
(
record
);
}
})
}
...
...
@@ -316,7 +315,8 @@ function grapRow(index){
//alert("开发中");
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
.
messager
.
confirm
(
'提示'
,
'确定开始爬取?'
,
function
(
r
)
{
if
(
r
)
{
$
.
ajax
({
type
:
'post'
,
url
:
"textGrapAct_grap"
,
...
...
@@ -327,7 +327,12 @@ function grapRow(index){
tableName
:
is_row
[
0
].
TABLE_NAME
},
success
:
function
(
data
){
console
.
log
(
data
);
if
(
data
.
statusCode
==
200
){
$
.
messager
.
alert
(
'提示'
,
"开始爬取!"
,
'info'
);
}
}
});
}
});
...
...
@@ -337,6 +342,10 @@ function grapRow(index){
function
lookRow
(
index
){
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
if
(
is_row
[
0
].
STATUS
!=
'SUCCESS'
){
$
.
messager
.
alert
(
'提示'
,
"该记录无数据!"
,
'info'
);
return
;
}
$
(
'#list'
).
datagrid
(
'clearSelections'
);
window
.
location
=
'textGrapView_textGrapDataTab?tablename='
+
is_row
[
0
].
TABLE_NAME
;
}
...
...
@@ -354,12 +363,20 @@ function statusRow(index){
map.FIELD_TABLE_NAME=is_row[0].TABLE_NAME*/
map
.
FIELD_URL_ID
=
is_row
[
0
].
URL_ID
;
map
.
FIELD_TASK_ID
=
is_row
[
0
].
TASK_ID
;
if
(
is_row
[
0
].
STATUS
==
'SUCCESS'
){
$
.
messager
.
alert
(
'提示'
,
"该记录已爬取成功!"
,
'info'
);
return
;
}
$
.
ajax
({
type
:
'post'
,
url
:
"textGrapAct_status"
,
data
:
map
,
success
:
function
(
data
){
$
(
'#list'
).
datagrid
(
'reload'
);
if
(
data
.
statusCode
==
200
){
$
.
messager
.
alert
(
'提示'
,
"状态获取成功!"
,
'info'
);
}
$
(
'#list'
).
datagrid
(
'load'
,{});
}
});
}
\ No newline at end of file
src_reptile/com/gaowj/business/allData/AllDataBusinessImpl.java
View file @
ccd1b8a2
...
...
@@ -158,6 +158,9 @@ public class AllDataBusinessImpl implements AllDataBusiness {
public
int
listCount_file_attribute
(
Map
<
String
,
Object
>
query
)
throws
BusinessException
{
// TODO Auto-generated method stub
if
(
query
.
get
(
"SAVE_PATH"
)!=
null
&&
""
!=(
query
.
get
(
"SAVE_PATH"
))){
query
.
put
(
"SAVE_PATH"
,
"%"
+
query
.
get
(
"SAVE_PATH"
)+
"%"
);
}
return
allDataDAO
.
listCount_file_attribute
(
query
);
}
...
...
src_reptile/com/gaowj/business/allData/allDataDAO.xml
View file @
ccd1b8a2
...
...
@@ -67,5 +67,8 @@
<![CDATA[
select count(*) c from FILE_ATTRIBUTE f where 1=1
]]>
<if
test=
"SAVE_PATH != null and SAVE_PATH != ''"
>
and f.SAVE_PATH LIKE #{SAVE_PATH}
</if>
</select>
</mapper>
\ No newline at end of file
src_reptile/com/gaowj/fileGrap/actAction.java
View file @
ccd1b8a2
...
...
@@ -141,6 +141,8 @@ public class actAction extends BasicAction{
entity
.
put
(
"RESULT_COUNT"
,
0
);
}
business
.
update_fileGrap
(
entity
);
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"查询状态成功"
));
jsonObject
.
put
(
"statusCode"
,
responseBack
.
getStatusCode
());
jsonObject
.
put
(
"responseBody"
,
responseBack
.
getResponseBody
());
return
"json"
;
}
...
...
src_reptile/com/gaowj/textGrap/actAction.java
View file @
ccd1b8a2
...
...
@@ -162,7 +162,9 @@ public class actAction extends BasicAction{
entity
.
put
(
"STATUS"
,
responseBack
.
getResponseBody
());
business
.
update_textGrap
(
entity
);
}
jsonObject
.
putAll
(
Status
.
getStatusSuccessMessage
(
"获取状态成功"
));
jsonObject
.
put
(
"statusCode"
,
responseBack
.
getStatusCode
());
jsonObject
.
put
(
"responseBody"
,
responseBack
.
getResponseBody
());
return
"json"
;
}
...
...
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