Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jfV5portal
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
管理员
jfV5portal
Commits
39e76091
Commit
39e76091
authored
Sep 06, 2018
by
朱天成
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
日志
parent
c32feafd
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
129 additions
and
177 deletions
+129
-177
logTab.js
WebContent/jwapp/pages/log/js/logTab.js
+25
-93
replyTab.js
WebContent/jwapp/pages/log/js/replyTab.js
+87
-82
replyTabDetail.jsp
WebContent/jwapp/pages/log/replyTabDetail.jsp
+0
-2
struts-ext.xml
src/struts-ext.xml
+17
-0
No files found.
WebContent/jwapp/pages/log/js/logTab.js
View file @
39e76091
...
...
@@ -178,28 +178,6 @@ function openreplyRow(editUrl,is_row,is_title,is_max,is_width,is_height,is_left,
});
}
////定义grid列表
//var ls_title="日志管理";
//var is_column = [ [
// {field : 'LOG_TITLE',title : '日志标题',width : 100,align : 'center'},
// {field : 'LOG_CONTENT',title : '日志内容',width : 300,align : 'center'},
// {field : 'NEW_CREATE',title : '创建人',width : 80,align : 'center'},
// {field : 'CREATE_TIME',title : '创建时间',width : 150,align : 'center'},
// {field : 'NEW_UPDATE',title : '修改人',width : 80,align : 'center'},
// {field : 'UPDATE_TIME',title : '修改时间',width : 150,align : 'center'}
// ] ];
////列表加载完成回调
//function dataOnLoadSuccess(){
//
//}
////设置颜色和每行高度
//function rowstyler(index,row){
//
//}
////展示列表
//datagrid("list",ls_title,gaowj.WEB_APP_NAME + "/logData_list",queryData,is_column,60,80);
/**
* 序号:
* 功能:回复
...
...
@@ -221,13 +199,23 @@ function replyRow(index) {
//加载回复子页面成功后的回调
function
replyUrlOnloadCallback
(
is_row
){
// var listItem=logModule.logDataAction.listItem({
// FIELD_LOG_ID:is_row.UUID
// }).rowSet;
// for(var i=0;i<listItem.length;i++){
// add_log_item(listItem[i].REPLY_NAME,listItem[i].REPLY_CONTENT,listItem[i].UUID,listItem[i].CODE);
// }
datagridReply
(
"logItemInputForm"
,
gaowj
.
WEB_APP_NAME
+
"/logData_listItem"
,
queryData
,
reply_column
);
var
reply_column
=
[
[
{
field
:
'REPLY_NAME'
,
width
:
100
,
align
:
'center'
},
{
field
:
'REPLY_CONTENT'
,
width
:
300
,
align
:
'center'
},
{
field
:
'opt'
,
width
:
150
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
){
var
deleteBtn
=
'<a style="cursor:pointer" onclick="javascript:deleteItemRow('
+
index
+
')">删除</a>'
return
'<div class=
\'
optBtns
\'
>'
+
deleteBtn
+
'</div>'
;
}
}
]
];
var
logUuid
=
is_row
.
UUID
;
var
reply_query
=
{
FIELD_LOG_ID
:
logUuid
}
datagridReply
(
"logItemInputForm"
,
gaowj
.
WEB_APP_NAME
+
"/logData_listItem"
,
reply_query
,
reply_column
);
}
//回复保存
...
...
@@ -239,7 +227,7 @@ function replySaveRow(){
FIELD_REPLY_CONTENT
:
$
(
"input[name=FIELD_USER_REPLY_CONTENT]"
).
val
()}
var
v_result
=
logModule
.
logActAction
.
insertReply
(
items
);
if
(
v_result
.
NAME
==
'999'
){
add_log_item
(
items
.
REPLY_NAME
,
items
.
REPLY_CONTENT
,
items
.
UUID
,
items
.
CODE
);
$
(
'#logItemInputForm'
).
datagrid
(
'reload'
);
}
}
}
...
...
@@ -319,9 +307,11 @@ function deleteBatchRow(){
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function
deleteItemRow
(
handler
){
code
=
$
(
handler
).
parent
().
next
().
find
(
'input'
).
val
();
console
.
log
(
code
)
function
deleteItemRow
(
index
){
$
(
'#logItemInputForm'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#logItemInputForm'
).
datagrid
(
'getSelections'
);
$
(
'#logItemInputForm'
).
datagrid
(
'clearSelections'
);
var
code
=
is_row
[
0
].
UUID
;
if
(
code
==
''
||
code
==
null
){
return
}
else
{
...
...
@@ -330,18 +320,11 @@ function deleteItemRow(handler){
var
v_query
=
{};
v_query
.
FIELD_CODE
=
code
;
var
v_result
=
logModule
.
logActAction
.
deleteReply
(
v_query
);
$
(
handler
).
parent
().
parent
().
remove
();
if
(
v_result
.
NAME
==
'999'
){
$
(
handler
).
parent
().
parent
().
remove
();
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
}
$
(
'#logItemInputForm'
).
datagrid
(
'reload'
);
}
});
}
}
/****/
...
...
@@ -377,52 +360,6 @@ function searchRow(){
}
/****/
function
add_log_item
(
index
,
content
,
uuid
,
code
){
if
(
typeof
index
==
'undefined'
){
index
=
''
;
}
if
(
typeof
content
==
'undefined'
){
content
=
''
;
}
if
(
typeof
uuid
==
'undefined'
){
uuid
=
''
;
}
if
(
typeof
code
==
'undefined'
){
code
=
''
;
}
var
log_item_list
=
$
(
".log_item_list"
);
var
item
=
$
(
"<div class='log_item_one' style='overflow: auto;margin-bottom:10px'></div>"
);
log_item_list
.
append
(
item
);
var
log_item_index
=
$
(
'<div></div>'
);
log_item_index
.
addClass
(
'log_item_index'
);
var
log_item_info
=
$
(
'<div></div>'
);
log_item_info
.
addClass
(
'log_item_info'
);
var
log_item_delete
=
$
(
'<div></div>'
);
log_item_delete
.
addClass
(
'log_item_delete'
);
var
log_item_uuid
=
$
(
'<div></div>'
);
log_item_uuid
.
addClass
(
'log_item_uuid'
);
var
log_item_code
=
$
(
'<div></div>'
);
log_item_code
.
addClass
(
'log_item_code'
);
item
.
append
(
log_item_index
);
item
.
append
(
log_item_info
);
item
.
append
(
log_item_delete
);
item
.
append
(
log_item_uuid
);
item
.
append
(
log_item_code
);
log_item_index
.
append
(
'<input class="easyui-validatebox easyui-textbox" readonly="readonly" name="log_item_index" value="'
+
index
+
'" />'
);
log_item_info
.
append
(
'<input class="easyui-validatebox easyui-textbox" readonly="readonly" name="log_item_info" style="width: 400px" value="'
+
content
+
'"/>'
);
log_item_delete
.
append
(
'<a name="log_item_delete" onclick="javascript:deleteItemRow(this)">删除</a>'
);
log_item_uuid
.
append
(
'<input type="hidden" name="log_item_uuid" value="'
+
uuid
+
'" />'
);
log_item_code
.
append
(
'<input type="hidden" name="log_item_code" value="'
+
code
+
'" />'
);
$
.
parser
.
parse
(
'.log_item_one'
);
}
/**
* 回复
...
...
@@ -434,7 +371,6 @@ function datagridReply(is_view,is_url,is_query,is_column){
iconCls
:
$
.
getJwWindowPic
(),
url
:
is_url
,
queryParams
:
is_query
,
//查询参数
rownumbers
:
true
,
//显示索引号
singleSelect
:
false
,
//是否多选
fitColumns
:
false
,
//是否撑满
autoRowHeight
:
false
,
//设定高度
...
...
@@ -446,12 +382,8 @@ function datagridReply(is_view,is_url,is_query,is_column){
remoteSort
:
false
,
//是否从服务器排序
columns
:
is_column
,
onLoadSuccess
:
function
()
{
dataOnLoadSuccess
();
}
});
}
var
reply_column
=
[
[
{
field
:
'REPLY_NAME'
,
width
:
100
,
align
:
'center'
},
{
field
:
'REPLY_CONTENT'
,
width
:
300
,
align
:
'center'
},
]
];
WebContent/jwapp/pages/log/js/replyTab.js
View file @
39e76091
...
...
@@ -67,6 +67,39 @@ reportgrid("list",ls_title,gaowj.WEB_APP_NAME + "/logData_list",queryData,is_col
//回复弹出框格式
function
openreplyRow
(
editUrl
,
is_row
,
is_title
,
is_max
,
is_width
,
is_height
,
is_left
,
is_top
){
$
(
'#detail'
).
dialog
(
{
title
:
is_title
,
iconCls
:
$
.
getJwWindowPic
(),
width
:
ls_width
*
is_width
,
height
:
ls_height
*
is_height
,
closed
:
false
,
cache
:
false
,
maximizable
:
is_max
,
left
:
is_left
,
top
:
is_top
,
href
:
editUrl
,
queryParams
:
get_FIELD
(
is_row
),
modal
:
true
,
buttons
:
[
{
text
:
'关闭'
,
iconCls
:
'icon-back'
,
handler
:
function
()
{
closeBox
(
'detail'
);
}
}
],
onLoad
:
function
editUrlOnload
(){
if
(
is_row
.
OPETYPE
==
'reply'
){
replyUrlOnloadCallback
(
is_row
);
}
else
{
updateUrlOnloadCallback
(
is_row
);
}
}
});
}
/**
* 序号:
* 功能:回复
...
...
@@ -82,27 +115,32 @@ function replyRow(index) {
$
(
'#list'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#list'
).
datagrid
(
'getSelections'
);
$
(
'#list'
).
datagrid
(
'clearSelections'
);
is_row
[
0
].
OPETYPE
=
'
update
'
;
open
Edit
Row
(
"logView_replyTabDetail"
,
is_row
[
0
],
"回复"
,
true
,
0.65
,
0.95
,
0
,
0
);
is_row
[
0
].
OPETYPE
=
'
reply
'
;
open
reply
Row
(
"logView_replyTabDetail"
,
is_row
[
0
],
"回复"
,
true
,
0.65
,
0.95
,
0
,
0
);
}
//加载回复子页面成功后的回调
function
updateUrlOnloadCallback
(
is_row
){
var
listItem
=
logModule
.
logDataAction
.
listItem
({
FIELD_LOG_ID
:
is_row
.
UUID
}).
listItems
;
for
(
var
i
=
0
;
i
<
listItem
.
length
;
i
++
){
add_log_item
(
listItem
[
i
].
REPLY_NAME
,
listItem
[
i
].
REPLY_CONTENT
,
listItem
[
i
].
UUID
,
listItem
[
i
].
CODE
);
function
replyUrlOnloadCallback
(
is_row
){
var
reply_column
=
[
[
{
field
:
'REPLY_NAME'
,
width
:
100
,
align
:
'center'
},
{
field
:
'REPLY_CONTENT'
,
width
:
300
,
align
:
'center'
},
{
field
:
'opt'
,
width
:
150
,
align
:
'center'
,
formatter
:
function
(
value
,
row
,
index
){
var
deleteBtn
=
'<a style="cursor:pointer" onclick="javascript:deleteItemRow('
+
index
+
')">删除</a>'
var
Btn
=
''
return
'<div class=
\'
optBtns
\'
>'
+
(
row
.
CODE
==
gaowj
.
SEESION_CODE
?
deleteBtn
:
Btn
)
+
'</div>'
;
}
}
]
];
function
OnLoadSuccess
(){}
var
logUuid
=
is_row
.
UUID
;
var
reply_query
=
{
FIELD_LOG_ID
:
logUuid
}
datagridReply
(
"logItemInputForm"
,
gaowj
.
WEB_APP_NAME
+
"/logData_listItem"
,
reply_query
,
reply_column
);
}
//保存
function
updateData
(
is_entity
){
var
v_result
=
logModule
.
logActAction
.
updateLog
(
is_entity
);
$
(
'#list'
).
datagrid
(
'reload'
);
return
v_result
;
}
//回复保存
function
replySaveRow
(){
if
(
$
(
"input[name=FIELD_USER_REPLY_CONTENT]"
).
val
()
==
''
){
...
...
@@ -112,7 +150,7 @@ function replySaveRow(){
FIELD_REPLY_CONTENT
:
$
(
"input[name=FIELD_USER_REPLY_CONTENT]"
).
val
()}
var
v_result
=
logModule
.
logActAction
.
insertReply
(
items
);
if
(
v_result
.
NAME
==
'999'
){
add_log_item
(
items
.
REPLY_NAME
,
items
.
REPLY_CONTENT
,
items
.
UUID
,
items
.
CODE
);
$
(
'#logItemInputForm'
).
datagrid
(
'reload'
);
}
}
}
...
...
@@ -149,63 +187,6 @@ function searchRow(){
}
/****/
function
add_log_item
(
index
,
content
,
uuid
,
code
){
if
(
typeof
index
==
'undefined'
){
index
=
''
;
}
if
(
typeof
content
==
'undefined'
){
content
=
''
;
}
if
(
typeof
uuid
==
'undefined'
){
uuid
=
''
;
}
if
(
typeof
code
==
'undefined'
){
code
=
''
;
}
var
log_item_list
=
$
(
".log_item_list"
);
var
item
=
$
(
"<div class='log_item_one' style='overflow: auto;margin-bottom:10px'></div>"
);
log_item_list
.
append
(
item
);
var
log_item_index
=
$
(
'<div></div>'
);
log_item_index
.
addClass
(
'log_item_index'
);
var
log_item_info
=
$
(
'<div></div>'
);
log_item_info
.
addClass
(
'log_item_info'
);
var
log_item_delete
=
$
(
'<div></div>'
);
log_item_delete
.
addClass
(
'log_item_delete'
);
var
log_item_uuid
=
$
(
'<div></div>'
);
log_item_uuid
.
addClass
(
'log_item_uuid'
);
var
log_item_code
=
$
(
'<div></div>'
);
log_item_code
.
addClass
(
'log_item_code'
);
item
.
append
(
log_item_index
);
item
.
append
(
log_item_info
);
item
.
append
(
log_item_delete
);
item
.
append
(
log_item_uuid
);
item
.
append
(
log_item_code
);
log_item_index
.
append
(
'<input class="easyui-validatebox easyui-textbox" readonly="readonly" name="log_item_index" value="'
+
index
+
'" />'
);
log_item_info
.
append
(
'<input class="easyui-validatebox easyui-textbox" readonly="readonly" name="log_item_info" style="width: 400px" value="'
+
content
+
'"/>'
);
log_item_delete
.
append
(
'<a name="log_item_delete" class="log_item_delete" onclick="javascript:deleteItemRow(this)">删除</a>'
);
log_item_uuid
.
append
(
'<input type="hidden" name="log_item_uuid" value="'
+
uuid
+
'" />'
);
log_item_code
.
append
(
'<input type="hidden" name="log_item_code" value="'
+
code
+
'" />'
);
$
.
parser
.
parse
(
'.log_item_one'
);
$
(
'.log_item_delete'
).
each
(
function
(){
if
(
typeof
$
(
this
).
next
().
next
().
find
(
'input'
).
val
()
==
'undefined'
){
}
else
{
if
(
$
(
this
).
next
().
next
().
find
(
'input'
).
val
()
==
gaowj
.
SEESION_CODE
){
}
else
{
$
(
this
).
hide
();
}
}
});
}
/**
* 序号:
* 功能:回复删除
...
...
@@ -216,8 +197,12 @@ function add_log_item(index,content,uuid,code){
* 单位:杰夫兄弟智慧科技有限公司
* 备注:需更改
**/
function
deleteItemRow
(
handler
){
code
=
$
(
'.log_item_delete'
).
parent
().
next
().
find
(
'input'
).
val
();
function
deleteItemRow
(
index
){
$
(
'#logItemInputForm'
).
datagrid
(
'selectRow'
,
index
);
var
is_row
=
$
(
'#logItemInputForm'
).
datagrid
(
'getSelections'
);
$
(
'#logItemInputForm'
).
datagrid
(
'clearSelections'
);
var
code
=
is_row
[
0
].
UUID
;
var
thiscode
=
is_row
[
0
].
CODE
;
if
(
code
==
''
||
code
==
null
){
return
}
else
{
...
...
@@ -225,17 +210,37 @@ function deleteItemRow(handler){
if
(
r
)
{
var
v_query
=
{};
v_query
.
FIELD_CODE
=
code
;
v_query
.
FIELD_THISCODE
=
thiscode
;
var
v_result
=
logModule
.
logActAction
.
deleteReply
(
v_query
);
if
(
v_result
.
NAME
==
'999'
){
$
(
'.log_item_delete'
).
parent
().
parent
().
remove
();
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
}
else
{
$
.
messager
.
alert
(
'提示'
,
v_result
.
VALUE
);
}
$
(
'#logItemInputForm'
).
datagrid
(
'reload'
);
}
});
}
}
/****/
/**
* 回复
* 2016-12-01
* 高伟杰
**/
function
datagridReply
(
is_view
,
is_url
,
is_query
,
is_column
){
$
(
'#'
+
is_view
).
datagrid
({
iconCls
:
$
.
getJwWindowPic
(),
url
:
is_url
,
queryParams
:
is_query
,
//查询参数
singleSelect
:
false
,
//是否多选
fitColumns
:
false
,
//是否撑满
autoRowHeight
:
false
,
//设定高度
rowStyler
:
function
(
index
,
row
){
return
rowstyler
(
index
,
row
);},
pagination
:
true
,
//分页显示
pageSize
:
rows
,
//显示行数
pageList
:
listPageSize
,
//条数选择
striped
:
true
,
//是否隔行显示
remoteSort
:
false
,
//是否从服务器排序
columns
:
is_column
,
onLoadSuccess
:
function
()
{
}
});
}
WebContent/jwapp/pages/log/replyTabDetail.jsp
View file @
39e76091
...
...
@@ -49,8 +49,6 @@
</table>
</form>
<form id="logItemInputForm">
<div class="log_item_list">
</div>
</form>
<div class="log_reply_list" >
<input class="easyui-textbox" id="USER_REPLY_CONTENT" name="FIELD_USER_REPLY_CONTENT" required style="width:600px;" value="${is_row.USER_REPLY_CONTENT}"/>
...
...
src/struts-ext.xml
View file @
39e76091
...
...
@@ -140,6 +140,23 @@
method=
"{1}"
>
<result
name=
"{1}"
>
/jwapp/pages/meeting/{1}.jsp
</result>
</action>
<!-- 日志管理 -->
<action
name=
"logAct_*"
class=
"com.jw.app.log.action.actAction"
method=
"{1}"
>
<result
name=
"json"
type=
"json"
>
<param
name=
"root"
>
jsonObject
</param>
</result>
</action>
<action
name=
"logData_*"
class=
"com.jw.app.log.action.dataAction"
method=
"{1}"
>
<result
name=
"json"
type=
"json"
>
<param
name=
"root"
>
jsonObject
</param>
</result>
</action>
<action
name=
"logView_*"
class=
"com.jw.app.log.action.viewAction"
method=
"{1}"
>
<result
name=
"{1}"
>
/jwapp/pages/log/{1}.jsp
</result>
</action>
</package>
<package
name=
"src_jwapp_store"
extends=
"gaowj"
>
<action
name=
"storeAct_*"
class=
"com.jw.app.store.action.actAction"
...
...
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