E8前端相关知识点

页面通用标签
<!--指定页面编码-->
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<!--引入相关的包类-->
<%@ page import="weaver.general.Util,weaver.hrm.common.*,weaver.conn.*" %>
<!--引入表单标签-->
<%@ taglib uri="/WEB-INF/weaver.tld" prefix="wea"%>
<%@ taglib uri="/browserTag" prefix="brow"%>
<!--引入浏览按钮标签-->
<%@ taglib uri="/WEB-INF/tld/browser.tld" prefix=“brow”%>

引入标准jsp标签页

/** 高级搜索 **/
<script language=javascript src="/js/ecology8/docs/docSearchInit_wev8.js"></script>
/** 右键菜单 **/
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
/**暂时不知道有什么作用**/
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
/**页面功能控制权限**/
<%@ include file="/systeminfo/init.jsp" %>
<!--引入系统页面,用于判断是否登录,以及获取user对象-->
<%@ include file="/systeminfo/init_wev8.jsp" %>



引入产品标准功能代码

<%
//判断是否有对应的权限,有则显示该菜单
if(HrmUserVarify.checkUserRight("HrmCountriesAdd:Add", user)){ 
RCMenu += "{"+SystemEnv.getHtmlLabelName(82,user.getLanguage())+",javascript:doAdd();,_self} " ;
/*标签显示菜单名,如 82 为新增*/
RCMenuHeight += RCMenuHeightStep;
}

%>
/*多语言标签 */
<%=SystemEnv.getHtmlLabelName(21995,user.getLanguage())%>
21995:高级搜索
user.getLanguage():存储设置的语言格式
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */

铺助脚本

HtmlLabelIndex:预算流程初始化定义表-HtmlLabelIndex---wf_fna_labelidx_imp表
HtmlLabelInfo:预算流程初始化定义表---wf_fna_labelinfo_imp表
systemrightdetail:系统权限详细表
systemrightslanguage:	系统权限语言表
systemrights:系统权限表
systemrightdetail:系统权限详细表




控件

浏览按钮
/*浏览按钮*/
<brow:browser //浏览按钮组件标签
name=“workflowid” //浏览框的id和name
viewType=0//字段类型(0:主表字段,1:明细表字段) 用于流程中,该属性非必要
hasBrowser=true//显示放大镜
hasAdd=false//显示添加按钮
browserUrl="/systeminfo/BrowserMain.jsp?url=/workflow/workflow/WorkflowBrowser_frm.jsp"
//浏览框打开的页面地址
isMustInput=2//是否必填 字段是否必填(默认是0) 2:必填
isSingle=true//是否单选
hasInput=true//是否显示输入框
completeUrl="/data.jsp?type=workflowBrowser&isTemplate=0" //自动联想的地址
width=“300px” //浏览框的宽度
browserValue="" //默认浏览框隐藏域的值
browserSpanValue=""//默认浏览框显示的值
onPropertyChange="" //浏览按钮对应的隐藏域的触发的onpropertychange事件调用的方法
_callback=""//执行完browserUrl事件后的回调方法,该方法默认传递四个参数(event,datas,name,_callbackParams)
_callbackParams=""//_callback所需要的参数
/>
/*单人员浏览按钮*/
<brow:browser 
viewType="0" 
id="pName" 
name="pName" 
browserValue=""
browserUrl="/systeminfo/BrowserMain.jsp?url=/hrm/resource/ResourceBrowser.jsp?selectedids=" 
hasInput="true" 
isSingle="true" 
hasBrowser="true" 
isMustInput='1' 
completeUrl="/data.jsp"
linkUrl="javascript:openhrm($id$)" 
width="165px" 
browserSpanValue="" />

/*多人员浏览按钮*/
<brow:browser 
name="userid" 
viewType="0" 
hasBrowser="true" 
hasAdd="false"
browserUrl='<%="/systeminfo/BrowserMain.jsp?url=/hrm/resource/MutiResourceBrowser.jsp" %>'
isMustInput="2" 
isSingle="false" 
hasInput="true" 
completeUrl="/data.jsp?type=1"
width="300px" 
browserValue='' 
browserSpanValue=''/>

布局控件

/*布局控件*/
<wea:layout type="diycol"><!---->
				<wea:group context="历史请假查询" ><!---->
					<wea:item  attributes="	{'isTableList':'true','colspan':'full'}"><!---->
	<wea:SplitPageTag  tableString="<%=tableString%>" mode="run" /><!---->
					</wea:item>
				</wea:group>
			</wea:layout>

必填校验
<!-- 字段必填的标识,只控制后面感叹号的显示, -->
<wea:required id="aaspan" required="true">
下拉组件



/*下拉组件*/
<select name="LeaveType" id="LeaveType">
<option value="" ></option>
<%for(String key:map.keySet()){ %>
	<option value="<%=key+"-"+map.get(key) %>" 
	<%if(LeaveType.equals(key+"-"+map.get(key))){ %> selected <%} %>><%=key+"-"+map.get(key) %>
	</option>
<%} %>
</select>
编辑表格与分页表格报表
/*可编辑表格*/
var option = {
basictitle:"可编辑表格标题。。。",
optionHeadDisplay:"none",
colItems:items,
container:"#FieldList", //显示容器的id
configCheckBox:true,
usesimpledata:true, //true|fase 当值为true时,则该可编辑表格默认以初始化数据初始化,初始化的具体数据配置详见initdatas
initdatas:initjsondatas,
canDrag:true,
orderField:'orderid',
//addrowCallBack:marcallback,//添加行时,回调的方法
checkBoxItem:{"itemhtml":'<input name="id" class="groupselectbox" type="checkbox" value="-1">',width:"5%"}
};
-- 填充数据
var initjsondatas = [[{'name': 'id', 'value': '11','iseditable': 'true','type': 'checkbox'},
{'name': 'fieldid', 'value': '3', 'label': '程序媛', 'iseditable': 'true','type': 'browser'},
{'name': 'wb','value': '程序媛','iseditable': true, 'type': 'input' },
{'name': 'xlk','value': '1', 'iseditable': true, 'type': 'select'},
{'name': 'orderid','value': '1', 'iseditable': true, 'type': 'input'}
], [{'name': 'id', 'value': '12','iseditable': 'true','type': 'checkbox'},
{'name': 'fieldid', 'value': '14', 'label': 'cjr', 'iseditable': true, 'type': 'browser'},
{'name': 'wb','value': 'cjr','iseditable': true,'type': 'input'},
{'name': 'xlk','value': '2','iseditable': true, 'type': 'select'},
{'name': 'orderid','value': '2', 'iseditable': 'true', 'type': 'input'}]]
--编辑表格表头设置
var items=[
{width:"10%",colname:"浏览按钮<SPAN class=\".e8tips\" style=\"CURSOR: hand\" id=remind_m title=\"<%=tiptitle %>\"><IMG id=ext-gen124 align=absMiddle src=\"/images/remind_wev8.png\"></SPAN>",itemhtml:item_browser},
{width:"20%",colname:"文本框",itemhtml:"<input name='wb' id='wb' type='text' value='默认值' />"},
{width:"20%",colname:"下拉框",itemhtml:"<select name='xlk' id='xlk' ><option value=''>全部</option><option value='1'>AA</option><option value='2'>BB</option></select>"},
{width:"20%",display:'none',colname:"排序",itemhtml:"<input name='orderid' id='orderid' type='text' />"}
];
--浏览框指定页面填充
var item_browser = "<span class='browser' viewType='0' _callback='UserCallBack' _callbackParams='_#rowIndex#' hasInput='true' name='fieldid' getBrowserUrlFn='getBrowserUrlFn' isMustInput='1' isSingle='false' completeUrl='/data.jsp' ></span>" ;
--功能显示
groupAction=new WeaverEditTable(option);
jQuery("#FieldList").append(groupAction.getContainer());
--数据删除
function deleteAction(){
//top.Dialog.confirm("<%=SystemEnv.getHtmlLabelNames("15097",user.getLanguage())%>",function(){
groupAction.deleteRows();
//});
<!--分页控件-->
内部数据
<form id="frmmain" name=frmmain method=post action="HisList.jsp" >

</form>
<wea:item  attributes="{'isTableList':'true','colspan':'full'}">
<%
	String backfields =" * ";
	String fromSql  = " JD_LeaveHistory ";
	String orderby = " startDateLeave "; 
	//out.print("select  "+backfields+fromSql+sqlWhere);
	String tableString =" <table pagesize=\""+perpage+"\"  tabletype=\"checkbox\">"+
			" <sql backfields=\""+backfields+"\"  "+
				" sqlform=\""+fromSql+"\" sqlwhere=\""+sqlWhere+"\"  sqlorderby=\""+orderby+"\"  sqlprimarykey=\"id\" sqlsortway=\"desc\" sqlisdistinct=\"false\"/>"+
			"	<head>"+
			"<col width=\"100px\" text=\"单据编号\" column=\"receipt\"  />"+
			"<col width=\"80px\" text=\"假期类型编码\" column=\"vacationType\"  />"+
			"<col width=\"100px\" text=\"假期类型名称\" column=\"holidayType\"  />"+
			 "<col width=\"100px\" text=\"请假开始日期\" column=\"startDateLeave\"  />"+
			"<col width=\"100px\" text=\"开始时间\" column=\"startAfternoon\" />"+
			"<col width=\"100px\" text=\"请假结束日期\" column=\"endDateLeave\" />"+ 
			"<col width=\"100px\" text=\"结束时间\" column=\"endUpperAfternoon\" />"+
			"<col width=\"100px\" text=\"请假时长\" column=\"leavetime\" />"+
			"<col width=\"100px\" text=\"单据状态\" column=\"documentsState\" />"+
			"<col width=\"100px\" text=\"业务状态\" column=\"businessState\" />"+
			"</head>"+
			"</table>";
%>
						<wea:SplitPageTag  tableString="<%=tableString%>" mode="run" />
					</wea:item>
tableString:执行脚本和对应的字段显示题头
外部数据源
<form action="demo_edittableoperation.jsp" method="post" id="weaver" name="weaver">
	<wea:layout type="fourCol">
		<wea:group context="数据列表">
			<wea:item attributes="{'isTableList':'true','colspan':'full'}">
				<%
					String tableString = ""; //定义表格xml数据
								// 指定分页条数和初始化 id以及是否有复选框 以及数据来源 datasource表示数据来源 sourceparams表示传入参数参数格式为"name:value+name1:value1"多个参数用加号连接
								tableString = " <table instanceid=\"ds_list\" tabletype=\"checkbox\" datasource=\"weaver.oatest.DemoUtil.getDemoData\" sourceparams=\"loginid:"
										+ user.getUID() + "+departmentid:" + user.getUserDepartment() + "\" pagesize=\"5\" >"
										+ " <checkboxpopedom id=\"checkbox\" popedompara=\"column:id\" showmethod=\"weaver.oatest.DemoUtil.getCanCheck\" />"
										+ //用于控制checkbox 框是否可用
										" <sql backfields=\"*\" sqlform=\"tmptable\" sqlwhere=\"\" sqlorderby=\"\" sqlprimarykey=\"id\" sqlsortway=\"asc\" sqlisdistinct=\"false\" />"
										+ " <head>" + " <col width=\"10%\" text=\"数据ID\" column=\"id\" orderkey=\"id\" />"
										+ " <col width=\"20%\" text=\"数据名称\" column=\"lastname\" />"
										+ " <col width=\"20%\" text=\"用户名称\" column=\"loginid\" />" + " </head>" + " <operates>"
										+ //相关操作
										" <popedom column=\"id\" otherpara=\"column:loginid\" transmethod=\"weaver.oatest.DemoUtil.getCanOperation\"></popedom> "
										+ //用于控制操作菜单是否可用
										" <operate href=\"javascript:onDel();\" text=\""
										+ SystemEnv.getHtmlLabelName(91, user.getLanguage())
										+ "\" otherpara=\"column:loginid\" target=\"_self\" index=\"0\"/>"
										+ " <operate href=\"javascript:onshowlog();\" text=\""
										+ SystemEnv.getHtmlLabelName(83, user.getLanguage())
										+ "\" otherpara=\"column:loginid\" target=\"_self\" index=\"1\"/>" + " </operates>"
										+ " </table>";
				%>
				<wea:SplitPageTag tableString='<%=tableString%>' mode="run" />
				<!-- 显示分页数据 -->
			</wea:item>
		</wea:group>
	</wea:layout>
</form>
action:这里有点不同,是指当前页面的文件名称

</span>


弹出框组件

<script language="javascript" src="/wui/theme/ecology8/jquery/js/zDialog_wev8.js"></script>
<script language="javascript" type="text/javascript">
//在其子页面中,调用此方法打开相应的界面 
function openDialog(title, url) {
var dlg = new window.top.Dialog();//定义Dialog对象
dialog.currentWindow = window;
dlg.Model = true;
dlg.Width = 500;//定义长度   
dlg.Height = 400;
dlg.URL = url;//需要打开弹出的页面
dlg.Title = title;//弹出框头标识
dlg.show();
}
</script>
右键菜单
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
RCMenu += "{提交表单,javascript:doSubmit(),_self} ";
RCMenuHeight += RCMenuHeightStep;
RCMenu += "{返回,/main.jsp,_self} ";
RCMenuHeight += RCMenuHeightStep;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
weaverTree树形组件
<link rel="stylesheet" href="/css/ecology8/request/leftNumMenu_wev8.css" type="text/css" />
<script type="text/javascript" src="/js/ecology8/request/leftNumMenu_wev8.js"></script>
<link rel="stylesheet" href="/wui/common/jquery/plugin/zTree/css/zTreeStyle/zTreeStyle_wev8.css" type="text/css">
<script type="text/javascript" src="/wui/common/jquery/plugin/zTree/js/jquery.ztree.core_wev8.js"></script>
<%@ include file="/systeminfo/leftMenuCommon.jsp" %>
$(".ulDiv").leftNumMenu(demoLeftMenus,{
numberTypes:{
//下面的四个属性需要跟你在数据中定义的属性名称相同,本例中为flowNew、flowResponse、flowOut、flowAll
flowNew:{
hoverColor:"#EDCEAF",//鼠标悬停时显示的方块的颜色
color:"#FFA302",//普通文字的颜色
title:"新的流程"//鼠标悬停时显示的方块的title
},
flowResponse:{hoverColor:"#C0D8B8",color:"#486C3E",title:"超时的流程"},
flowOut:{hoverColor:"#DAC0E3",color:"#C325FF",title:"有反馈的流程"},
flowAll:{hoverColor:"#A6A6A6",color:"black",title:"全部流程"}
},
});
//是否显示值为0的数字;不写的话默认为false
showZero:false,
日期控件

<span class="wuiDateSpan" selectId="dateselect" selectValue="">
	<input class=wuiDateSel type="hidden" id="datefrom" name="datefrom" value="">
	<input class=wuiDateSel type="hidden" id="dateto" name="dateto" value="">
1、class=" wuiDate" 这个是必须要写的
2、_ callback:指选中完后调用的回调函数	
开关组件
<link href="/js/checkbox/jquery.tzCheckbox_wev8.css" type=text/css rel=STYLESHEET>
<script type="text/javascript" src="/js/ecology8/jNice/jNice/jquery.jNice_wev8.js"></script>
注意tzCheckbox="true"是固定的,不能随意改动!
菜单的点击事件
//attr:就是你在菜单中定义的自定义属性,attr.xxx可以取到属性的值;例如attr.workflowid
//level:被点击的菜单的层级;注意是从1开始,不是从0开始的;
//numberType:如果你是在鼠标悬停的方块上点击的,那么这个numberType的值为方块的类型。比如说flowNew
示例:
clickFunction:function(attr,level,numberType){
var v = '';
if(level==1){
v = attr.typeid;
}else{
v = attr.workflowid;
}
parent.jQuery("#contentframe").attr("src","/gsoa/oaproject/weavertree/body.jsp?level="+level+"&value="+v);
}});
  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

知青先生

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值