|
@@ -35,7 +35,7 @@ class ActionProcess extends Base
|
|
|
->where($where)
|
|
|
->count('id');
|
|
|
|
|
|
- $list = APModel::field('id,status_name,order_process,status,action_type,operation_type,next_action_ids,creater,addtime,remark')
|
|
|
+ $list = APModel::field('id,status_name,order_process,status,action_type,operation_type,next_action_ids,creater,addtime,remark,is_master')
|
|
|
->where($where)
|
|
|
->order('id', 'desc')
|
|
|
->page($param['page'], $param['size'])
|
|
@@ -66,7 +66,7 @@ class ActionProcess extends Base
|
|
|
public function add()
|
|
|
{
|
|
|
|
|
|
- $param = $this->request->filter('trim')->only(['token', 'process_id', 'action_type', 'operation_type', 'status_name', 'order_process', 'next_action_ids' => '', 'remark' => ''], 'post');
|
|
|
+ $param = $this->request->filter('trim')->only(['token', 'process_id', 'action_type', 'operation_type', 'status_name', 'order_process', 'next_action_ids' => '', 'remark' => '','is_master'=>APModel::$is_master_no], 'post');
|
|
|
|
|
|
$val = Validate::rule([
|
|
|
'token' => 'require',
|
|
@@ -76,6 +76,7 @@ class ActionProcess extends Base
|
|
|
'status_name|节点名称' => 'require|max:255',
|
|
|
'order_process|节点值' => 'require|number|egt:0|checkOrderProcess:',
|
|
|
'next_action_ids|下一节点' => 'array|requireIf:action_type,' . APModel::$action_type_start . '|requireIf:action_type,' . APModel::$action_type_process,
|
|
|
+ 'is_master|是否主节点' => 'require|number|in:' . APModel::$is_master_yes . ',' . APModel::$is_master_no
|
|
|
]);
|
|
|
|
|
|
$val->extend('checkOrderProcess', function ($val, $rule, $data) {
|
|
@@ -135,7 +136,7 @@ class ActionProcess extends Base
|
|
|
public function update()
|
|
|
{
|
|
|
|
|
|
- $param = $this->request->filter('trim')->only(['token', 'id', 'process_id', 'action_type', 'operation_type', 'status_name', 'order_process', 'next_action_ids', 'remark' => '', 'status', 'is_del'], 'post');
|
|
|
+ $param = $this->request->filter('trim')->only(['token', 'id', 'process_id', 'action_type', 'operation_type', 'status_name', 'order_process', 'next_action_ids', 'remark' => '', 'status', 'is_del','is_master'=>APModel::$is_master_no], 'post');
|
|
|
|
|
|
$val = Validate::rule([
|
|
|
'token' => 'require',
|
|
@@ -148,6 +149,7 @@ class ActionProcess extends Base
|
|
|
'next_action_ids|下一节点' => 'array|requireIf:action_type,' . APModel::$action_type_start . '|requireIf:action_type,' . APModel::$action_type_process,
|
|
|
'is_del|是否删除' => 'eq:' . APModel::$is_deleted,
|
|
|
'status|状态' => 'in:' . APModel::$status_disable . ',' . APModel::$status_normal,
|
|
|
+ 'is_master|是否主节点' => 'require|number|in:' . APModel::$is_master_yes . ',' . APModel::$is_master_no
|
|
|
]);
|
|
|
|
|
|
|