Blame view

application/admin/controller/fastflow/Billlist.php 1.22 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
  <?php
  
  namespace app\admin\controller\fastflow;
  use app\admin\model\AuthRule;
  use app\admin\model\fastflow\CancheckIndex;
  use app\admin\model\fastflow\flow\Bill;
  use app\common\controller\Backend;
  use fastflow\api;
  use think\Loader;
  
  /**
   * 我的抄送
   *
   * @icon fa fa-circle-o
   */
  class Billlist extends Backend
  {
      protected $noNeedRight = [];
  
      protected $model = null;
  
      public function _initialize()
      {
          parent::_initialize();
      }
  
  
  
      /**
       * 查看
       */
      public function index()
      {
          $billModel = new Bill();
          $bill_list = $billModel->field(['bill_name', 'bill_table', 'controller'])->select();
  
          foreach ($bill_list as &$bill) {//查询可签章数
              $bill = $bill->toArray();
              $url = Loader::parseName($bill['controller'], 0);
              $bill['controller_url'] = str_replace('/_', '/', $url);
              //获取bill对应的rule id
              $auth_rule = new AuthRule();
              $rule = $auth_rule->where(['name' => $bill['controller_url']])->find();
              if ($rule){
                  $bill['rule_id'] = $rule['id'];
              }
          }
          $this->view->assign(['billList' => $bill_list]);
          return $this->view->fetch();
      }
  
  
  }