1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
function
editDutyKnowledgeFun(id) {
if
(id == undefined) {
var
rows = dutyKnowledgeGrid.datagrid(
'getSelections'
);
id = rows[0].id;
}
else
{
dutyKnowledgeGrid.datagrid(
'unselectAll'
).datagrid(
'uncheckAll'
);
}
parent.$.modalDialog({
title:
'知识编辑'
,
width: 900,
height: 700,
href:
'${path }/dutyKnowledge/editPage?id='
+ id,
buttons: [{
text:
'回复'
,
handler:
function
() {
parent.$.modalDialog.openner_dataGrid = dutyKnowledgeGrid;
//因为添加成功之后,需要刷新这个dataGrid,所以先预定义好
var
f = parent.$.modalDialog.handler.find(
'#dutyKnowledgeReplyForm'
);
f.submit();
}
}]
});
}
|
其中 dutyKnowledgeGrid 是你定义的的dataGrid。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
function
deleteDutyKnowledgeReplyFun(id) {
parent.$.messager.confirm(
'询问'
,
'您是否要删除当前回复(不可恢复)?'
,
function
(b) {
if
(b) {
progressLoad();
$.get(
'${path }/dutyKnowledgeReply/delete'
, {
id: id
},
function
(result) {
result = $.parseJSON(result);
if
(result.success) {
parent.parent.$.modalDialog.openner_dataGrid.datagrid(
'reload'
);
parent.$.messager.alert(
'提示'
, result.msg,
'info'
);
parent.$.modalDialog.handler.dialog(
'close'
);
}
else
{
parent.$.messager.alert(
'错误'
, result.msg,
'error'
);
}
progressClose();
},
'JSON'
);
}
});
}
|