easyUI comboTree usage code

<!-- Continuous Information Disclosure-Announcement Type Level 1-->
	<query id="ReportInternalProgressCtrl-reportTypeComTree">
		<sql>
		<![CDATA[
		<#if (id?exists)>
   			select t.code as "id", t.value as "text", cast('open' as varchar(6)) as "state"
			  from X27_ENUM t
			  left join x27_dict d
			    on d.dict_id = t.dict_id
			 where d.code =:id
			  order by t.code asc
   		<#else>	
   			select t.code as "id", t.name as "text", cast('closed' as varchar(6)) as "state"
			  from x27_dict t
			 where t.code in ('9503', '9504', '9505')
			  order by t.code asc
   	   	</#if>   
		 ]]>
		</sql>
	</query>

 

//Query the tree structure of the industry, load the first-level industry by default, click the parent class, and load the second-level asynchronously
    public void reportTypeComTree(HttpServletRequest req, HttpServletResponse res) {
    	String id = req.getParameter("id");
    	Map searchCondition = new HashMap();
		searchCondition.put("id", id);
	  	List<Map> list = publishReportManager.executeSql("ReportInternalProgressCtrl-reportTypeComTree", searchCondition);
	  	CtrlUtils.putJSON(list, res);
    }

 

$('#reportType').combotree({
		url:webPath+'/reportTypeComTree.ripc',
		width:'250',
		panelHeight: '450'
	});

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326198526&siteId=291194637