|
@@ -30,18 +30,18 @@
|
|
|
var xml = "";
|
|
|
if(d.status==1){
|
|
|
xml += "<a class='layui-btn layui-btn-primary layui-btn-xs' onclick=\"look( '${ctx}/project/tem/form?id=" + d.id + "&tabId=1')\">查看</a>"
|
|
|
- +"<a class='layui-btn layui-btn-xs' onclick=\"update( '${ctx}/project/tem/form?id=" + d.id + "&tabId=2')\">修改</a>"
|
|
|
- +"<a class='layui-btn layui-btn-normal layui-btn-xs' lay-event='add'>添加项目</a>";
|
|
|
-}
|
|
|
+ +"<a class='layui-btn layui-btn-xs' onclick=\"update( '${ctx}/project/tem/form?id=" + d.id + "&tabId=2')\">修改</a>"
|
|
|
+ +"<a class='layui-btn layui-btn-normal layui-btn-xs' lay-event='add'>添加项目</a>";
|
|
|
+ }
|
|
|
if(d.status==2){
|
|
|
- xml +="<span class='myspan'>操作</span>";
|
|
|
-}
|
|
|
+ xml +="<span class='myspan'>操作</span>";
|
|
|
+ }
|
|
|
if(d.status==3){
|
|
|
- xml +="<a class='layui-btn layui-btn-xs' href=\"${ctx}/jkxl/list?id="+d.id+"&type="+d.type+"&projectId="+d.pid+"\">编辑</a>";
|
|
|
-}
|
|
|
+ xml +="<a class='layui-btn layui-btn-xs' href=\"${ctx}/jkxl/list?id="+d.id+"&type="+d.type+"&projectId="+d.pid+"\">编辑</a>";
|
|
|
+ }
|
|
|
|
|
|
- return xml;
|
|
|
-}}
|
|
|
+ return xml;
|
|
|
+ }}
|
|
|
]],
|
|
|
"data": [
|
|
|
<c:if test="${ not empty list}">
|
|
@@ -93,28 +93,30 @@
|
|
|
// treetable.foldAll('#table1');
|
|
|
table.on('tool(table1)', function(obj,target){
|
|
|
var data = obj.data;
|
|
|
+ alert(data.id);
|
|
|
+ alert(data.length);
|
|
|
//console.log(obj)
|
|
|
if(obj.event == 'add'){
|
|
|
- $("#addtext").val(data.id);
|
|
|
- layui.use(['table','layer'],function(){
|
|
|
- layer.open({
|
|
|
- type: 2,
|
|
|
- title: '添加项目',
|
|
|
- area: ['60%', '80%'],
|
|
|
- shade: 0.8,
|
|
|
- shadeClose: true,
|
|
|
- content: '${ctxp}/webpage/modules/sg/projecttem/addItem.jsp'
|
|
|
- , btn: ['确定','关闭']
|
|
|
- ,yes: function(index, layero){
|
|
|
- var body = layer.getChildFrame('body', index);
|
|
|
- var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
- var inputForm = body.find('#inputForm');
|
|
|
- var top_iframe;
|
|
|
- if(target){
|
|
|
- top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
-}else{
|
|
|
- top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
-}
|
|
|
+ $("#addtext").val(data.id);
|
|
|
+ layui.use(['table','layer'],function(){
|
|
|
+ layer.open({
|
|
|
+ type: 2,
|
|
|
+ title: '添加项目',
|
|
|
+ area: ['60%', '80%'],
|
|
|
+ shade: 0.8,
|
|
|
+ shadeClose: true,
|
|
|
+ content: '${ctxp}/webpage/modules/sg/projecttem/addItem.jsp'
|
|
|
+ , btn: ['确定','关闭']
|
|
|
+ ,yes: function(index, layero){
|
|
|
+ var body = layer.getChildFrame('body', index);
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
+ var top_iframe;
|
|
|
+ if(target){
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
+ }else{
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
|
+ }
|
|
|
inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
iframeWin.contentWindow.doSubmit();
|
|
|
|