|
|
本帖最后由 spiral 于 2013-6-24 15:54 编辑
Q:无流程如何实现代办提醒呢,就是也会在首页显示消息。
A:可自定义首页,使用计算脚本,这部分,在我们打包出去的OA办公管理系统(标准版)中,首页有相关示例,如下图所示:
noneFlowPadding脚本为:- function noneFlowPadding(paddingName,sql,fieldNames,width,height){
- var w = "100%";
- var h = "100%";
- if(width) w = width;
- if(height) h = height;
- var datas = queryBySQL(sql);
- var temp = "";
- var value = "";
- var count = 1;
- var tempvalue="";
- if (datas.size() > 0) {
- for ( var it = datas.iterator(); it.hasNext();) {
- var doc = it.next();
- if(fieldNames.constructor==Array){
- count=fieldNames.length;
- tempvalue="";
- for(var i=0;i<count;i++){
- tempvalue+=doc.getItemValueAsString(fieldNames[i])+" "; }
- }else{
- tempvalue=doc.getItemValueAsString(fieldNames);
- }
-
- temp += '<tr>'
- +'<td id="pd" onMouseOver="this.className=\'over\'" onMouseOut="this.className=\'out\'" style="margin-top:2px;">'
- +'<img src="/obpm/resource/img/unRd.gif" alt="未读" name="isUnRdImg"/>'
- +'<a style="width:85%" href="javaScript:viewDoc(\''
- + doc.getId()
- + '\',\''
- + doc.getFormid()
- + '\','
- //+ null
- +false
- + ')">'
- + tempvalue
- + ' </a></td></tr>';
- }
- }
- value = '<div class=\'ElementDiv\' border=\'0\' style=\'padding:5px;background-color:white;height='+h+'; width='+w+';overflow:auto\' >'
- +'<div scope="col" class="column-head3" scope="row" id="header" style="border: 0px solid #ffcc00;font-size: 13px;cursor:move;" background="">'
- +'<img alt="pending-head" id="image1" src="/obpm/resource/imgnew/pending01.gif" />'
- +'<font style="font-size: 14px;cursor: context">'+paddingName+'</font>'
- +'</div><div class="context"><table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-homepage">'
- + temp
- +'</table>'
- +'</div><div align="left">'
- +'</div>';
- value += '<script type="text/javascript">'
- +'function viewDoc(docid, formid,reminderid) {'
- +'if (docid && formid) {'
- //+'var viewDocURL = "/obpm/portal/dynaform/document/view.action?application='+getApplication()+'&_currpage=1&_backURL=%2Fobpm%2Fportal%2Fdispatch%2Fhomepage.jsp&_rowcount=1&_pagelines=10";'
- +'var viewDocURL = "/obpm/portal/dynaform/document/view.action?application='+getApplication()+'&_currpage=1&_rowcount=1&_pagelines=10&_backURL=%2Fobpm%2Fportal%2Fdispatch%2Fhomepage.jsp?application='+getApplication()+'";'
- +'viewDocURL += "&_docid=" + docid;'
- +'viewDocURL += "&_formid=" + formid;'
- +'viewDocURL += "&reminderid=" + reminderid;'
- +'window.location.href = viewDocURL;'
- +'}'
- +'}'
- +'</script></div>';
- return value;
- }
复制代码 |
|