<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ include file="../language.jsp" %>

<script src="../scripts/itsm/security/resourceMain.js"></script>


 
<div class="loading" id="resourceMain_loading"><img src="../images/icons/loading.gif" /></div>




        
<!-- 数据列表 -->
<div  id="resourceMain_content" class="easyui-panel content" fit="true"  border="none">



<div class="easyui-layout" fit="true" id="resContent">




<div region="west" id="resourceWest" split="true" title="<fmt:message key="title.resource.currentFunction" />" style="width:300px;">


     			<!-- 修改开始 -->
     			
     			 <div class="lineTableBgDiv" id="editFunctionDiv">
     			<form id="editCurrentFunction">	

               
				<table style="width:100%" class="lineTable" cellspacing="1">
               
                <tr>
                <td style="width:35%"><fmt:message key="label.resource.functionName" /></td>
                <td style="width:65%"><input id="edit_resName" name="functionDto.resName" class="easyui-validatebox input" required="true"/></td>
                </tr>
                
               
                <tr>
                <td><fmt:message key="label.resource.functionCode" /></td>
                <td><input id="edit_resCode" name="functionDto.resCode" class="easyui-validatebox input" required="true"/></td>
                </tr>
                
                
              
                
               <tr>
                <td><fmt:message key="label.resource.functionUrl" /></td>
                <td>
	             <input id="edit_resUrl" name="functionDto.resUrl"  class="easyui-validatebox input" required="true" />
                </td>
                </tr>
                
                
                  <tr>
                <td><fmt:message key="label.resource.functionIcon" /></td>
                <td>
                
                	
                	<input type="hidden" id="edit_icon" name="functionDto.resIcon" />
               
               		 <div id="show_edit_icon" class="showicon"></div>
                
					<input id="upload_edit_icon" type="file" size="16" name="myFile" onchange="return commonUploadFile('upload_edit_icon','edit_icon','show_edit_icon')"/>

                </td>
                
                </tr>
                
               
               <tr>
                <td colspan="2" style="height:40px">
               	<input id="editCurrentFunction_resNo" name="functionDto.resNo" type="hidden"/>
	               	<sec:authorize url="/pages/function!updateFunction.action">
	                	<a id="editFunctionBtn" class="easyui-linkbutton" icon="icon-save" ><fmt:message key="common.save" /></a>
	                </sec:authorize>
                </td>
                </tr>
                
                </table>
               

                </form>
                 </div>
               
    			<!-- 修改结束 -->



</div>





<div region="center" style="background:#eee;">




<div class="easyui-tabs" fit="true" id="resourceTabMain" border="false">


<!-- 常规视图 start -->




<div title="<fmt:message key="title.resource.childrenFunction" />" >


	<div  style="overflow:hidden; padding:2px"> 
				

                    <table width="100%" border="0" align="center">
  <tr>


    <td style="width:100%" valign="top">
    
    
    
    <!-- 添加功能开始 -->
                <div id="addFunctionDiv" class="easyui-panel" title="<fmt:message key="title.resource.addFunction" />" >
                
                
                
                
                <form id="addChildrenFunctionForm">
                
                
                
               <div class="lineTableBgDiv">
				<table style="width:100%" class="lineTable" cellspacing="1">
               
                <tr>
                <td style="height:30px;width:15%"><fmt:message key="label.resource.functionName" /></td>
                <td style="height:30px;width:85%"><input id="resName" name="functionDto.resName" class="easyui-validatebox input" required="true"/></td>
                </tr>
                
                
                <tr>
                <td style="height:30px"><fmt:message key="label.resource.functionCode" /></td>
                <td><input id="resCode" name="functionDto.resCode" class="easyui-validatebox input" required="true"/></td>
                </tr>

                
                <tr>
                <td style="height:30px"><fmt:message key="label.resource.functionUrl" /></td>
                <td>
	             <input id="resUrl" name="functionDto.resUrl" class="easyui-validatebox input" required="true" />
                </td>
                </tr>
                
                
                 <tr>
                <td style="height:30px"><fmt:message key="label.resource.functionIcon" /></td>
                <td>
                
               
                
                <div id="show_icon" class="showicon"></div>
				<input id="upload_icon" type="file" size="45" name="myFile" onchange="return commonUploadFile('upload_icon','icon','show_icon')" />
                
                
                </td>
                </tr>
                
               
                           
               <tr>
                <td colspan="2" >
                
                 <input type="hidden" name="functionDto.parentFunctionNo" id="add_parentFunctionNo">
                <input type="hidden" id="icon" name="functionDto.resIcon" />
               	 <sec:authorize url="/pages/function!addFunction.action">
               	 <a id="addFunctionBtn" class="easyui-linkbutton" icon="icon-ok" ><fmt:message key="common.save" /></a>
               	 </sec:authorize>
                </td>
                </tr>
                
                </table>
                </div>

                </form>
                
                
</div>
    			<!-- 修改结束 -->
    
    
    
    </td>
  </tr>
</table>
	</div>
	
	
	
	

	
	


</div>

<!-- 常规视图 end -->




<!-- 列表视图 start -->

<sec:authorize url="/pages/function!findGrid.action">

<div title="<fmt:message key="common.gridView" />">



	<div style="overflow:hidden;padding:4px;padding-right:6px" >
	<table id="functionGrid"></table>
    <div id="functionPager"></div>

	<div id="functionToolbar" style="display:none">
	
		<sec:authorize url="/pages/function!addFunction.action">
			<a class="easyui-linkbutton"  plain="true" icon="icon-add" id="functionGrid_add" ><fmt:message key="common.add" /></a> 
		</sec:authorize>
		
		<sec:authorize url="/pages/function!updateFunction.action">
		<a class="easyui-linkbutton"  plain="true" icon="icon-edit" id="functionGrid_edit" ><fmt:message key="common.edit" /></a>
		</sec:authorize>
		 
		<sec:authorize url="/pages/function!deleteFunctionByIds.action">
		<a class="easyui-linkbutton"  plain="true" icon="icon-cancel" id="functionGrid_delete"><fmt:message key="common.delete" /></a> 
		</sec:authorize>
		
		
		<a class="easyui-linkbutton"  plain="true" icon="icon-search" id="functionGrid_search"><fmt:message key="common.search" /></a> 
		
		
		 &nbsp;&nbsp;<a id="importFunction"><fmt:message key="label.dc.import" /></a>
		 &nbsp;|&nbsp;<a id="exportFunction"><fmt:message key="label.dc.export" /></a>
		
		
	</div>
    </div>



</div>


</sec:authorize>


<!-- 列表视图 end -->




<!-- 列表视图 start -->

<sec:authorize url="/pages/operation!find.action">


<div title="<fmt:message key="title.resource.operationGrid" />">



	<div style="overflow:hidden;padding:4px;padding-right:6px" >
	<table id="operationGrid"></table>
    <div id="operationPager"></div>

	<div id="operationToolbar" style="display:none">
	
	<sec:authorize url="/pages/operation!addOperation.action">
		<a class="easyui-linkbutton"  plain="true" icon="icon-add" id="operationGrid_add"><fmt:message key="common.add" /></a> 
	</sec:authorize>
	
	<sec:authorize url="/pages/function!updateFunction.action">
		<a class="easyui-linkbutton"  plain="true" icon="icon-edit" id="operationGrid_edit"><fmt:message key="common.edit" /></a> 
	</sec:authorize>
	
	<sec:authorize url="/pages/operation!deleteOperations.action">
		<a class="easyui-linkbutton"  plain="true" icon="icon-cancel" id="operationGrid_delete"><fmt:message key="common.delete" /></a> 
	</sec:authorize>
	
	<a class="easyui-linkbutton"  plain="true" icon="icon-search" id="operationGrid_search"><fmt:message key="common.search" /></a> 
	
	
	
	
	 &nbsp;&nbsp;<a id="importOperation"><fmt:message key="label.dc.import" /></a>
	 &nbsp;|&nbsp;<a id="exportOperation"><fmt:message key="label.dc.export" /></a>
	
	
	
	</div>
    </div>



</div>

</sec:authorize>

<!-- 列表视图 end -->


</div>


</div>










<!-- 树节点 -->
<div region="east" id="resourceEast" title="<fmt:message key="title.resource.functionGrid" />" split="true" style="width:200px; padding:5px">

<div id='functionTreeDIV'></div>

</div>



</div>
	
	
	










<!-- 新增操作 -->
<div id="addOperation_win"  class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="title.resource.addOperation" />" style="width:500px;height:auto">
    
    
    <form id="addOperationForm_win">
    
     <div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
    
    
   
        <tr>
            <td  style="width:40%">
            <fmt:message key="label.resource.operationName" />
            </td>
            
            <td style="width:60%">

         	<input id="opeartion_resName" name="operationDto.resName" class="easyui-validatebox input" required="true"/>
           
            </td>
        </tr>
        <tr>
            <td>
          <fmt:message key="label.resource.operationCode" />
            </td>
            <td>
            <input id="opeartion_resCode" name="operationDto.resCode" class="easyui-validatebox input" required="true"/>
            </td>
        </tr>
        
        
        <tr>
                <td style="height:30px"><fmt:message key="label.resource.operationUrl" /></td>
                <td>
	               <input id="opeartion_resUrl" name="operationDto.resUrl"  class="easyui-validatebox input" required="true"/>
                </td>
         </tr>

         
         
                <tr>
                <td style="height:30px"><fmt:message key="label.resource.operationIcon" /></td>
                <td>
                
                <input type="hidden" id="opeartion_resIcon" name="operationDto.resIcon" />
                
                <div id="show_opicon" class="showicon"></div>
					<input id="addOperation_icon" type="file"  name="myFile" onchange="return commonUploadFile('addOperation_icon','opeartion_resIcon','show_opicon')" style="width:100%"/>
                </td>
                </tr>
         
         
        <tr>
            <td colspan="2">
                <div style="padding-top:8px;">
                <input type="hidden" id="operation_functionNo" name="operationDto.functionNo"/>
                <a id="addOperationBtn_OK"  class="easyui-linkbutton" icon="icon-ok"><fmt:message key="common.save" /></a>
                </div>
        </td>
        </tr>
    </table>
    </div>
    
    </form>
    
    
</div>



<!-- 编辑操作 -->
<div id="editOperation_win"  class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="title.resource.editOperation" />" style="width:500px;height:auto">
    
    
    <form id="editOperationForm_win">
    
     
    <div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
        <tr>
            <td  style="width:40%">
           <fmt:message key="label.resource.operationName" />
            </td>
            
            <td style="width:60%">

         	<input id="edit_opeartion_resName" name="operationDto.resName" class="easyui-validatebox input" required="true"/>
           
            </td>
        </tr>
        <tr>
            <td>
            <fmt:message key="label.resource.operationCode" />
            </td>
            <td>
            <input id="edit_opeartion_resCode" name="operationDto.resCode" class="easyui-validatebox input" required="true"/>
            </td>
        </tr>
        
        
        
           <tr>
            <td>
           <fmt:message key="label.resource.operationUrl" />
            </td>
            <td>
            <input id="edit_opeartion_resUrl" name="operationDto.resUrl" class="easyui-validatebox input" required="true"/>
            </td>
        </tr>
        
        
              <tr>
                <td ><fmt:message key="label.resource.operationIcon" /></td>
                <td>
                
                <input type="hidden" id="edit_opeartion_resIcon" name="operationDto.resIcon" />
                
                <div id="show_editOpeartion_resIcon" class="showicon"></div>
					<input id="up_editOpeartion_resIcon" type="file"  name="myFile" onchange="return commonUploadFile('up_editOpeartion_resIcon','edit_opeartion_resIcon','show_editOpeartion_resIcon')" style="width:100%"/>   
                </td>
                </tr>

        <tr>
            <td colspan="2">
                
               		<input type="hidden" id="edit_opeartion_resNo" name="operationDto.resNo"/>
                	<a id="editOperationBtn_OK"  class="easyui-linkbutton" icon="icon-ok"><fmt:message key="common.save" /></a>
        </td>
        </tr>
    </table>
    </div>
    
    </form>
    
    
</div>



<%-- 搜索操作 --%>
<div id="searchOperation_win"  class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="false" title="<fmt:message key="title.resource.searchOperation" />" style="width:380px;height:auto">
    
    
    
    
     <form style="margin:0px">
    <div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
        <tr>
            <td  style="width:40%">
            <fmt:message key="label.resource.operationName" />
            </td>
            
            <td style="width:60%">

         	<input id="search_operationQueryDto_resName" name="operationQueryDto.resName" class="input"/>
           
            </td>
        </tr>
        <tr>
            <td>
            <fmt:message key="label.resource.operationCode" />
            </td>
            <td>
            <input id="search_operationQueryDto_resCode" name="operationQueryDto.resCode" class="input"/>
            </td>
        </tr>

           <tr>
            <td>
          <fmt:message key="label.resource.operationUrl" />
            </td>
            <td>
            <input id="search_operationQueryDto_resUrl" name="operationQueryDto.resUrl" class="input"/>
            </td>
        </tr>

        <tr>
            <td colspan="2">
                <div style="padding-top:5px; text-align:right">
                <input type="hidden" id="search_FunctionNo" name="functionNo">
                <a id="searchOperationBtn_OK"  class="easyui-linkbutton" icon="icon-search"><fmt:message key="common.search" /></a>
                </div>
        </td>
        </tr>
    </table>
    </div>
    
    </form>
    
    
    
    
</div>
 







































<!-- 新增功能 -->
<div id="addFunction_win"  class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="title.resource.addFunction" />" style="width:500px;height:auto ">
    
    
    <form id="addFunctionForm_win">
    <div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
    
          <tr>
            <td style="width:40%">
            	<fmt:message key="title.resource.parentFunction" />
            </td>
            <td style="width:60%">
         		<input id="addFunction_parentFunction_win" class="easyui-validatebox input" required="true" style="cursor:pointer" readonly/>

            </td>
        </tr>
    
    
        <tr>
            <td  style="width:20%">
            <fmt:message key="label.resource.functionName" />
            </td>
            
            <td style="width:80%">

         	<input id="addFunction_resName_win" name="functionDto.resName" class="easyui-validatebox input" required="true"/>
           
            </td>
        </tr>
        <tr>
            <td>
            <fmt:message key="label.resource.functionCode" />
            </td>
            <td>
            <input id="addFunction_resCode_win" name="functionDto.resCode" class="easyui-validatebox input" required="true"/>
            </td>
        </tr>
        
        
    

        
        <tr>
                <td style="height:30px"><fmt:message key="label.resource.functionUrl" /></td>
                <td>
	               <input id="addFunction_resUrl_win" name="functionDto.resUrl"  class="easyui-validatebox input" required="true" />
                </td>
         </tr>




              <tr>
                <td style="height:30px"><fmt:message key="label.resource.functionIcon" /></td>
                <td>
                

                <div id="show_addFunction_resIcon_win" class="showicon"></div>
					<input id="up_addFunction_resIcon_win" type="file"  name="myFile" onchange="return commonUploadFile('up_addFunction_resIcon_win','addFunction_resIcon_win','show_addFunction_resIcon_win')" style="width:100%"/>
                </td>
                </tr>

        <tr>
            <td colspan="2">
              
                <input type="hidden" id="function_parentFunctionNo" name="functionDto.parentFunctionNo"/>
                <input type="hidden" id="addFunction_resIcon_win" name="functionDto.resIcon" />
                <a id="addFunctionBtn_OK"  class="easyui-linkbutton" icon="icon-ok"><fmt:message key="common.save" /></a>
        </td>
        </tr>
    </table>
    
    </div>
    </form>
    
    
</div>



<!-- 编辑功能 -->
<div id="editFunction_win"  class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="title.resource.editFunction" />" style="width:500px;height:auto">
    
    
    <form id="editFunctionForm_win">
    
   <div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
    
      	<tr>
            <td  style="width:40%">
            <fmt:message key="title.resource.parentFunction" />
            </td>
            
            <td style="width:60%">

         	<input id="editFunction_parentFunction_win" class="easyui-validatebox choose" required="true" readonly/>
           	<input type="hidden" id="editFunction_parentFunctionNo" name="functionDto.parentFunctionNo"/>
           	
            </td>
        </tr>
        
    
        <tr>
            <td>
            <fmt:message key="label.resource.functionName" />
            </td>
            
            <td>

         	<input id="editFunction_resName_win" name="functionDto.resName" class="easyui-validatebox input" required="true"/>
           
            </td>
        </tr>
        <tr>
            <td>
            <fmt:message key="label.resource.functionCode" />
            </td>
            <td>
            <input id="editFunction_resCode_win" name="functionDto.resCode" class="easyui-validatebox input" required="true" />
            </td>
        </tr>
        
        
        
           <tr>
            <td>
           <fmt:message key="label.resource.functionUrl" />
            </td>
            <td>
            <input id="editFunction_resUrl_win" name="functionDto.resUrl" class="easyui-validatebox input" required="true"/>
            </td>
        </tr>
        
        
        
                      <tr>
                <td ><fmt:message key="label.resource.functionIcon" /></td>
                <td>
                
                <input type="hidden" id="editFunction_resIcon_win" name="functionDto.resIcon" />
                
                <div id="show_editFunction_resIcon_win" class="showicon"></div>
					<input id="up_editFunction_resIcon_win" type="file"  name="myFile" onchange="return commonUploadFile('up_editFunction_resIcon_win','editFunction_resIcon_win','show_editFunction_resIcon_win')" style="width:100%"/>
                </td>
                </tr>
        
        

        <tr>
            <td colspan="2">
            
                <input type="hidden" id="editFunction_resNo_win" name="functionDto.resNo"/>
                <a id="editFunctionBtn_OK"  class="easyui-linkbutton" icon="icon-ok"><fmt:message key="common.save" /></a>
        </td>
        </tr>
    </table>
    </div>
    
    </form>
    
    
</div>










<!-- 搜索功能 -->
<div id="searchFunction_win"  class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="false" title="<fmt:message key="title.resource.searchFunction" />" style="width:380px;height:auto">
    
    
    
    
     <form>
       
   <div class="lineTableBgDiv">
		<table style="width:100%" class="lineTable" cellspacing="1">
        <tr>
            <td  style="width:40%">
           <fmt:message key="label.resource.functionName" />
            </td>
            
            <td style="width:60%">

         	<input name="functionQueryDTO.resName" class="input"/>
           
            </td>
        </tr>
        <tr>
            <td>
            <fmt:message key="label.resource.functionCode" />
            </td>
            <td>
            <input name="functionQueryDTO.resCode" class="input"/>
            </td>
        </tr>

           <tr>
            <td>
          <fmt:message key="label.resource.functionUrl" />
            </td>
            <td>
            <input name="functionQueryDTO.resUrl" class="input"/>
            </td>
        </tr>

        <tr>
            <td colspan="2">
               
                <input type="hidden" id="search_FunctionNo" name="functionNo">
                <a id="searchFunctionBtn_OK"  class="easyui-linkbutton" icon="icon-search"><fmt:message key="common.search" /></a>
              
        </td>
        </tr>
    </table>
    </div>
    
    </form>
    
    
    
    
</div>
 



<!-- 搜索功能 -->
<div id="selectFunctionTree_win"  class="easyui-window" closed="true" collapsible="false" minimizable="false" maximizable="false" modal="true" title="<fmt:message key="title.resource.chooseFunction" />" style="width:250px;height:350px; padding:10px; line-height:20px;">
    
    <div id="selectFunctionTreeDIV"></div>
    
</div>



    <div style="display: none;">
    
    
    
    
    
       <!-- 导出功能隐藏信息 -->
	   <form action="function!exportFunction.action" id="exportFunctionForm" method="post">
	     <table>
	     <tr>
			<td>						
				<input id="exportFunction_resName" name="functionQueryDTO.resName"/>
				<input id="exportFunction_resCode" name="functionQueryDTO.resCode"/>
				<input id="exportFunction_resUrl" name="functionQueryDTO.resUrl"/>
				
				<input id="exportFunction_sidx" name="sidx"/>
				<input id="exportFunction_sord" name="sord"/>
				<input id="exportFunction_page" name="page"/>
				<input id="exportFunction_rows" name="rows"/>
			</td>
		</tr>
	     </table>
	   </form>
	   
	   
	    <!-- 导出操作隐藏信息 -->
	    <form action="operation!exportOperation.action" id="exportOperationForm" method="post">
	     <table>
	     <tr>
			<td>						
				<input id="exportOperation_resName" name="operationQueryDto.resName"/>
				<input id="exportOperation_resCode" name="operationQueryDto.resCode"/>
				<input id="exportOperation_resUrl" name="operationQueryDto.resUrl"/>
				<input id="exportOperation_functionNo" name="functionNo">
				
				<input id="exportOperation_page" name="page"/>
				<input id="exportOperation_rows" name="rows"/>
			</td>
		</tr>
	     </table>
	   	</form>
	   
	   
	   
    </div>
    
   



</div>	
