在onLoadSuccess方法中加入以下代码
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
$('.easyui-linkbutton').linkbutton(
{text:'查看',plain:true,iconCls:'icon-view'});代码
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
/**//*
* 专项任务列表方法业务实现
*/
![](/Images/OutliningIndicators/ExpandedBlockStart.gif)
initSpecWorkPlayList:function()
{
var self = this;
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
self.$_specworkplayList.treegrid(
{
url: this.urls.querySpcialtaskUrl,
idField:'id',
treeField:'specialTaskName', //定义树节点的字段
toolbar: '#workPlayToolbar',
//singleSelect: false,
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
simpleData:
{
enable: true,
parentField:"parentId",
idField:"id"
},
columns:[[
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{field:'specialTaskName',title:'任务名称',width:180,editor:
{
"type":"validatebox",
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
"options":
{
"required":true
}
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
},formatter:function(value,row)
{
return '<span title="'+value+'" class="easyui-tooltip">'+value+'<span>';
}},
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{field:'workContent',title:'任务内容',width:380,formatter:function(value,row)
{
return '<span title="'+value+'" class="easyui-tooltip">'+value+'<span>';
}},
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{field:'departmentName',title:'被考核单位',width:100,editor:'text'},
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{field:'year',title:'考核年',width:100,editor:'text'},
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{field:'finishTimeString',title:'完成时间',width:100},
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{field:'finishStatus',title:'状态',width:100,formatter:function(value,row)
{
var status = admin.res.dic.getValue("spec_work_finish_status_dic",value);
if (status == null)
return "";
else
return '<font color=red>'+status+'</font>';
}},
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
{field:'cz',title:'操作',width:140,formatter:function(value,row)
{
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if (row.parentId != null && row.parentId != "null" && row.parentId != '')
{
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
if (self.finishStatusString == '2')
{
return '<span style="color:red"><a href="#" onclick=admin.speccomplete.viewWorkPlayCommpleteWin("'+row.id+'"); class="easyui-linkbutton1" data-options="plain:true,iconCls:\'icon-add\'">查看完成情况</a></span>';
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
}else
{
return '<span style="color:red"><a href="#" onclick=admin.speccomplete.editWorkPlayCommpleteWin("'+row.id+'"); class="easyui-linkbutton2" data-options="plain:true,iconCls:\'icon-edit\'">填写完成情况</a></span>';
}
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
} else
{
self.finishStatusString = row.finishStatus;
return '<span style="color:red"><a href="#" onclick=admin.speccomplete.viewSpecAuditDescList("'+row.id+'"); class="easyui-linkbutton3" data-options="plain:true,iconCls:\'icon-add\'">查看意见</a></span>';
}
}}
]],
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
onLoadSuccess:function(data)
{
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
$('.easyui-linkbutton1').linkbutton(
{text:'查看完成情况',plain:true,iconCls:'icon-view'});
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
$('.easyui-linkbutton2').linkbutton(
{text:'填写完成情况',plain:true,iconCls:'icon-edit'});
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
$('.easyui-linkbutton3').linkbutton(
{text:'查看意见',plain:true,iconCls:'icon-view'});
self.$_specworkplayList.treegrid("collapseAll");//树菜单收起来
},
//后台需要传入的参数
![](/Images/OutliningIndicators/ExpandedSubBlockStart.gif)
queryParams:
{
searchFinishStatus:self.searchstatus,
year:self.searchyear,
specType:'1', //新建类型
status1:'4',//任务状态审核通过
workPlayStauts1:'4', //查询工作计划审核通过
finishStatus1:self.finishStatus1, //完成情况状态为未填写
finishStatus2:self.finishStatus2, //完成情况状态为待审核状态
finishStatus3:self.finishStatus3 //完成情况状态为驳回状态
}
});
},示例如下:
posted on 2014-04-28 12:57
JJCEA 阅读(5215)
评论(2) 编辑 收藏 所属分类:
java日记 、
easyUI