###控制器
~~~
//begin 申报答辩 流程图
$flow5=M('flow')->where('type = 64')->limit(1)->order('id desc')->select();
if (!empty($flow5)) {
$this->flow5step1 =1;//第一步
$this->flow5id= $flow5[0]['id'];
$this->flow5step2=M('flow_log')->where('step = 21 and flow_id = '.$this->flow5id)->limit(1)->order('id desc,result desc')->getField("result");//getField("status") //第二步, 是1则第一个人审核通过完成
if($flow5[0]['status'] ==40) {
$this->flow5step3 =1; //第三步, 完成
}else{
$this->flow5step3 =0; //第三步, 完成
}
} // end
~~~
###模版
~~~
<div title="任务流程开始" style="padding-top:20px;clear:both">
<div class="col-sm-12">
<a class="btn btn-lg btn-success">申报答辩</a> <i class="fa fa-angle-double-right
"></i>
<switch name="flow5step1">
<case value="1"> <a href="{:U('flow/read')}?id={$flow5id}" class="btn btn-success">上报申请</a> </case>
<default /> <a href="javascript:open_url('{:U('flow/addSimple?type=64')}')" class="btn btn-danger"> 中期检查和每周的报表</a>
</switch>
<i class="fa fa-arrow-right"></i>
<switch name="flow5step2">
<case value="1"> <a href="{:U('flow/read')}?id={$flow5id}" class="btn btn-success">论文领导小组</a> </case>
<default /> <a class="btn btn-default"> 领导小组</a>
</switch>
<i class="fa fa-arrow-right"></i>
<switch name="flow5step3">
<case value="1">
<a href="{:U('flow/read')}?id={$flow5id}" class="btn btn-success">答辩主任</a>
<i class="fa fa-arrow-right"></i>
<a href="{:U('flow/read')}?id={$flow5id}" class="btn btn-success">秘书(抄送)</a>
</case>
<default />
<a href="{:U('flow/read')}?id={$flow5id}" class="btn btn-danger">答辩主任</a>
<i class="fa fa-arrow-right"></i>
<a href="{:U('flow/read')}?id={$flow5id}" class="btn btn-default">秘书(抄送)</a>
</switch>
</div>
</div>
~~~