ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
系统上每个模块都接口文件,系统都是调用如下,**请认真阅读**: 一、**模块接口文件**,一个模块有以下5个基本接口页面。 ![](https://img.kancloud.cn/9b/16/9b16da1bf53ad1ba0d95cd5c83b2197b_332x100.png) 1、流程模块接口文件:webmain/model/flow/模块编号Model.php,此文件继承核心流程文件webmain/model/flow/flow.php,可重写里面方法,用于流程处理,如保存后发送通知,流程自定义审核人,列表页面字段显示过滤,流程处理中回调,如下图 ![](https://img.kancloud.cn/de/26/de2638e97cd5a2216fc14e1eb7a4ebc7_567x455.png) ![](https://img.kancloud.cn/7a/6d/7a6d3ad414c1edb0640b4e8dd21922bb_668x460.png) ![](https://img.kancloud.cn/29/80/2980d990caa87353a347ab68f5473bef_816x362.png) 2、模块录入接口文件:webmain/flow/input/mode\_模块编号Action.php,用于流程模块录入数据读取接口,录入数据保存前判断等。下拉框数据源编写。 3、模块录入JS文件:webmain/flow/input/inputjs/mode\_模块编号.js,用于录入页面上各个元素处理交互,如联动下拉框等,这个js帮助可以查看文件:webmain/flow/input/inputjs/mode\_demo.js。 4、模块接口常用方法 ``` //流程接口,数据替换方法,如要将uid转为姓名。 public function flowrsreplace($rs) { $urs = m('admin')->getone($rs['uid']); $rs['name'] = $urs['name']; //得到姓名 $rs['deptname'] = $urs['deptname']; //得到部门名称 return $rs; } //例子2,$lx,0默认,1详情展示,2列表显示 public function flowrsreplace($rs,$lx=0) { //如0,替换否,1替换为1 if($rs["abc"]=="0")$rs["abc"]="否"; if($rs["abc"]=="1")$rs["abc"]="是"; return $rs; } //条件过滤(v1.3.0以后少用到)到流程模块条件下设置条件的 //$lx是从atype参数传过来的,$uid用户Id protected function flowbillwhere($uid, $lx) { $where = "and 1=1"; return array( "where" => $where ); } ``` 子表的替换flowsubdata重写,如图 ![](https://img.kancloud.cn/ef/1c/ef1c8780ed752a4ee82798006a3e6f88_765x265.png)