|  | @@ -5,6 +5,7 @@
 | 
	
		
			
				|  |  |  	<title>工作内容详情管理</title>
 | 
	
		
			
				|  |  |  	<meta name="decorator" content="default"/>
 | 
	
		
			
				|  |  |  	<%--<script src="${ctxStatic}/layer-v2.3/laydate/laydate.js"></script>--%>
 | 
	
		
			
				|  |  | +    <link href="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.css" rel="stylesheet" />
 | 
	
		
			
				|  |  |  	<script type="text/javascript">
 | 
	
		
			
				|  |  |          $(function() {
 | 
	
		
			
				|  |  |              $("#cus_name").show();
 | 
	
	
		
			
				|  | @@ -112,6 +113,7 @@
 | 
	
		
			
				|  |  |  			<!--查询条件-->
 | 
	
		
			
				|  |  |                  <form:form id="searchForm" modelAttribute="projectcontentinfo" action="${ctx}/projectcontentinfo/projectcontentinfo/list" method="post" class="form-inline">
 | 
	
		
			
				|  |  |                      <input id="id" name="id" type="hidden" value="${id}"/>
 | 
	
		
			
				|  |  | +                    <input id="workContentType" type="hidden" value="${workContentType}"/>
 | 
	
		
			
				|  |  |                      <input id="parentIds" name="parentIds" type="hidden" value="${parentIds}"/>
 | 
	
		
			
				|  |  |                      <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
 | 
	
		
			
				|  |  |                      <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
 | 
	
	
		
			
				|  | @@ -166,9 +168,14 @@
 | 
	
		
			
				|  |  |                          <a href="javascript:void(0)" onclick="openDialogre('新增工作内容', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&dictType=${dictType}&id=${id}&parentIds=${parentIds}','95%','95%',false,'inputForm')" class="nav-btn nav-btn-add" ><i class="fa fa-plus"></i>  新增</a>
 | 
	
		
			
				|  |  |                          <button class="nav-btn nav-btn-refresh" data-toggle="tooltip" data-placement="left" onclick="sortOrRefresh()" title="刷新"><i class="glyphicon glyphicon-repeat"></i> 刷新</button>
 | 
	
		
			
				|  |  |                      </c:if>
 | 
	
		
			
				|  |  | +                    <button class="nav-btn layui-btn" id="btn-expand">全部展开</button>
 | 
	
		
			
				|  |  | +                    <button class="nav-btn layui-btn-warm" id="btn-fold">全部折叠</button>
 | 
	
		
			
				|  |  | +                    <button class="nav-btn layui-bg-red" id="btn-refresh">刷新表格</button>
 | 
	
		
			
				|  |  |                      <div style="clear: both;"></div>
 | 
	
		
			
				|  |  |                  </div>
 | 
	
		
			
				|  |  | -                <table class="oa-table layui-table" id="contentTable"></table>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +                <table id="permissionTable" class="layui-table" lay-filter="permissionTable"></table>
 | 
	
		
			
				|  |  | +                <%--<table class="oa-table layui-table" id="contentTable"></table>--%>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |                  <!-- 分页代码 -->
 | 
	
		
			
				|  |  |                  <table:page page="${page}"></table:page>
 | 
	
	
		
			
				|  | @@ -178,7 +185,7 @@
 | 
	
		
			
				|  |  |      </div>
 | 
	
		
			
				|  |  |  </div>
 | 
	
		
			
				|  |  |  <script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 | 
	
		
			
				|  |  | -<script>
 | 
	
		
			
				|  |  | +<%--<script>
 | 
	
		
			
				|  |  |      layui.use('table', function(){
 | 
	
		
			
				|  |  |          layui.table.render({
 | 
	
		
			
				|  |  |              limit:${ page.pageSize }
 | 
	
	
		
			
				|  | @@ -240,6 +247,94 @@
 | 
	
		
			
				|  |  |          resizeListWindow3();
 | 
	
		
			
				|  |  |      });
 | 
	
		
			
				|  |  |      $("a").on("click",addLinkVisied);
 | 
	
		
			
				|  |  | +</script>--%>
 | 
	
		
			
				|  |  | +<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
 | 
	
		
			
				|  |  | +<script src="${ctxStatic}/layer-v2.3/layui/tableTree/treetable.js" charset="utf-8"></script>
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +    /*使用模块加载的方式 加载文件*/
 | 
	
		
			
				|  |  | +    layui.config({
 | 
	
		
			
				|  |  | +        base: '${ctx}/resoueces/css/layui/module/'
 | 
	
		
			
				|  |  | +    }).extend({
 | 
	
		
			
				|  |  | +        treetable: 'treetable-lay/treetable'
 | 
	
		
			
				|  |  | +    }).use(['layer', 'table', 'treetable'], function () {
 | 
	
		
			
				|  |  | +        var $ = layui.jquery;
 | 
	
		
			
				|  |  | +        var table = layui.table;
 | 
	
		
			
				|  |  | +        var layer = layui.layer;
 | 
	
		
			
				|  |  | +        var treetable = layui.treetable;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        // 渲染表格
 | 
	
		
			
				|  |  | +        var renderTable = function () {//树桩表格参考文档:https://gitee.com/whvse/treetable-lay
 | 
	
		
			
				|  |  | +            layer.load(2);
 | 
	
		
			
				|  |  | +            treetable.render({
 | 
	
		
			
				|  |  | +                treeColIndex: 1,//树形图标显示在第几列
 | 
	
		
			
				|  |  | +                treeSpid: 0,//最上级的父级id
 | 
	
		
			
				|  |  | +                treeIdName: 'permissionId',//id字段的名称
 | 
	
		
			
				|  |  | +                treePidName: 'pid',//pid字段的名称
 | 
	
		
			
				|  |  | +                treeDefaultClose: false,//是否默认折叠
 | 
	
		
			
				|  |  | +                treeLinkage: true,//父级展开时是否自动展开所有子级
 | 
	
		
			
				|  |  | +                elem: '#permissionTable',
 | 
	
		
			
				|  |  | +                url: '${ctx}/projectcontentinfo/projectcontentinfo/getProjectContentTreeDataOnLeft?projectId=${projectRecords.id}&workContentType=${workContentType}',
 | 
	
		
			
				|  |  | +                page: false,
 | 
	
		
			
				|  |  | +                cols: [[
 | 
	
		
			
				|  |  | +                    {type: 'numbers', title: '编号' ,width:80},
 | 
	
		
			
				|  |  | +                    {field: 'type', title: '内容类型',width:180},
 | 
	
		
			
				|  |  | +                    {field: 'name',title: '内容名称',templet:function(d){
 | 
	
		
			
				|  |  | +                            if(null != d.name){
 | 
	
		
			
				|  |  | +                                return "<a class=\"attention-info\" href=\"#\" onclick=\"openDialogView('查看工作内容详情', '${ctx}/projectcontentinfo/projectcontentinfo/form?view=contentView&dictType=${dictType}&id=${id}&parentIds=${parentIds}&infoId="+d.id+"','95%', '95%')\">" + d.name + "</a>";
 | 
	
		
			
				|  |  | +                            }else{
 | 
	
		
			
				|  |  | +                                return "";
 | 
	
		
			
				|  |  | +                            }
 | 
	
		
			
				|  |  | +                        }},
 | 
	
		
			
				|  |  | +                    {field: 'masterName', title: '负责人',width:100},
 | 
	
		
			
				|  |  | +                    {field: 'createDate', title: '创建日期',width:100},
 | 
	
		
			
				|  |  | +                    {templet: complain, title: '操作',width:130}
 | 
	
		
			
				|  |  | +                ]],
 | 
	
		
			
				|  |  | +                done: function () {
 | 
	
		
			
				|  |  | +                    layer.closeAll('loading');
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        renderTable();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        //触发三个button按钮
 | 
	
		
			
				|  |  | +        $('#btn-expand').click(function () {
 | 
	
		
			
				|  |  | +            treetable.expandAll('#permissionTable');
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $('#btn-fold').click(function () {
 | 
	
		
			
				|  |  | +            treetable.foldAll('#permissionTable');
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        $('#btn-refresh').click(function () {
 | 
	
		
			
				|  |  | +            renderTable();
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        function complain(d){//操作中显示的内容
 | 
	
		
			
				|  |  | +            if(d.loginId == d.createId){
 | 
	
		
			
				|  |  | +                return [
 | 
	
		
			
				|  |  | +                    '<a href="javascript:void(0)" onclick="openDialogre(\'修改工作内容详情\', \'${ctx}/projectcontentinfo/projectcontentinfo/form?view=content&dictType=${dictType}&id=${id}&parentIds=${parentIds}&projectContentData.id='+d.id+'\',\'95%\',\'95%\')" class="op-btn op-btn-edit" ><i class="fa fa-edit"></i> 修改</a>',
 | 
	
		
			
				|  |  | +                    '<a href="${ctx}/projectcontentinfo/projectcontentinfo/delete?infoId='+d.id+'&id=${id}&type=2" onclick="return confirmxRefresh(\'确认要删除该工作内容详情吗?\', this.href)"   class="op-btn op-btn-delete"><i class="fa fa-trash"></i> 删除</a>',
 | 
	
		
			
				|  |  | +                ].join('');
 | 
	
		
			
				|  |  | +            }else{
 | 
	
		
			
				|  |  | +                return[''].join('');
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        //监听工具条
 | 
	
		
			
				|  |  | +        table.on('tool(permissionTable)', function (obj) {
 | 
	
		
			
				|  |  | +            var data = obj.data;
 | 
	
		
			
				|  |  | +            var layEvent = obj.event;
 | 
	
		
			
				|  |  | +            if(data.permissionName!=null){
 | 
	
		
			
				|  |  | +                if (layEvent === 'del') {
 | 
	
		
			
				|  |  | +                    layer.msg('删除' + data.id);
 | 
	
		
			
				|  |  | +                } else if (layEvent === 'edit') {
 | 
	
		
			
				|  |  | +                    layer.msg('修改' + data.id);
 | 
	
		
			
				|  |  | +                }
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +    });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  </script>
 | 
	
		
			
				|  |  |  </body>
 | 
	
		
			
				|  |  |  </html>
 |