天翎MyApps技术社区 - 低代码平台 | 流程管理系统 | BPM软件

 找回密码
 注册成为天翎用户
查看: 2423|回复: 0

[Iscript] 无流程做待办脚本【无流程待办】

[复制链接]
purple 发表于 2012-3-12 10:41:29 | 显示全部楼层 |阅读模式
本帖最后由 spiral 于 2013-6-24 15:54 编辑

Q:无流程如何实现代办提醒呢,就是也会在首页显示消息。

A:可自定义首页,使用计算脚本,这部分,在我们打包出去的OA办公管理系统(标准版)中,首页有相关示例,如下图所示:
无流程代办.jpg
noneFlowPadding脚本为:
  1. function noneFlowPadding(paddingName,sql,fieldNames,width,height){
  2. var w = "100%";
  3. var h = "100%";
  4. if(width) w = width;
  5. if(height) h = height;
  6. var datas = queryBySQL(sql);
  7. var temp = "";
  8. var value = "";
  9. var count = 1;
  10. var tempvalue="";
  11. if (datas.size() > 0) {
  12.         for ( var it = datas.iterator(); it.hasNext();) {
  13.                 var doc = it.next();
  14.                 if(fieldNames.constructor==Array){
  15.                        count=fieldNames.length;
  16.                        tempvalue="";
  17.                        for(var i=0;i<count;i++){
  18.                                  tempvalue+=doc.getItemValueAsString(fieldNames[i])+"&nbsp;&nbsp;";                           }
  19.                 }else{
  20.                         tempvalue=doc.getItemValueAsString(fieldNames);
  21.                 }
  22.                
  23.                 temp += '<tr>'
  24.                             +'<td id="pd" onMouseOver="this.className=\'over\'" onMouseOut="this.className=\'out\'" style="margin-top:2px;">'   
  25.                         +'<img src="/obpm/resource/img/unRd.gif" alt="未读"  name="isUnRdImg"/>'
  26.                         +'<a style="width:85%" href="javaScript:viewDoc(\''
  27.                                 + doc.getId()
  28.                                 + '\',\''
  29.                                 + doc.getFormid()
  30.                                 + '\','
  31.                                 //+ null
  32.                                 +false
  33.                                 + ')">'
  34.                                 + tempvalue
  35.                                 + '&nbsp;&nbsp;&nbsp;</a></td></tr>';

  36.         }       
  37. }
  38. value = '<div class=\'ElementDiv\'  border=\'0\' style=\'padding:5px;background-color:white;height='+h+'; width='+w+';overflow:auto\' >'
  39.                     +'<div scope="col" class="column-head3" scope="row" id="header" style="border: 0px solid #ffcc00;font-size: 13px;cursor:move;" background="">'
  40.                     +'<img alt="pending-head" id="image1"        src="/obpm/resource/imgnew/pending01.gif" />'
  41.                     +'<font style="font-size: 14px;cursor: context">'+paddingName+'</font>'
  42.                     +'</div><div class="context"><table width="100%"  border="0" cellspacing="0" cellpadding="0" class="table-homepage">'
  43.                     + temp
  44.                     +'</table>'
  45.                     +'</div><div align="left">'
  46.                     +'</div>';
  47.         value += '<script type="text/javascript">'
  48.                 +'function viewDoc(docid, formid,reminderid) {'
  49.                 +'if (docid && formid) {'
  50.                         //+'var viewDocURL = "/obpm/portal/dynaform/document/view.action?application='+getApplication()+'&amp;_currpage=1&amp;_backURL=%2Fobpm%2Fportal%2Fdispatch%2Fhomepage.jsp&amp;_rowcount=1&amp;_pagelines=10";'
  51.                         +'var viewDocURL = "/obpm/portal/dynaform/document/view.action?application='+getApplication()+'&amp;_currpage=1&amp;_rowcount=1&amp;_pagelines=10&amp;_backURL=%2Fobpm%2Fportal%2Fdispatch%2Fhomepage.jsp?application='+getApplication()+'";'
  52.                         +'viewDocURL += "&_docid=" + docid;'
  53.                         +'viewDocURL += "&_formid=" + formid;'
  54.                         +'viewDocURL += "&reminderid=" + reminderid;'
  55.                         +'window.location.href = viewDocURL;'
  56.                 +'}'
  57.         +'}'
  58.         +'</script></div>';

  59. return value;
  60. }
复制代码

本版积分规则

QQ|手机版|天翎MyApps技术社区 ( 粤ICP备11093750号 )

GMT+8, 2026-8-12 13:35

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表