<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                [TOC] ## getPrimarykey(string $tableName = '') 獲取指定表名的主鍵 首先查找module表中指定表名的pk字段存儲的主鍵名,不存在則是id ## **getAddColumns(string $tableName = '', array $info = [])**: 獲取添加頁面可展示的字段信息 ``` 返回的數組下標對應的值和創建表單的方法參數一致 0 字段類型 1 mysql字段名(如id、name) 2 字段別名 3 提示信息 4 該字段的值(如id的值) ... 具體的參數參考創建表單的方法add_字段類型(參數1,參數2,...) getAddColumns查出來的值適合addFormItems 例如: Array( [0] => text (addFormItems調用addFormItem時其中的array_shift會刪出開頭的此值并且下標從0開始重新排序,然后再將新的數組傳入addtext等方法) [1] => employee_name [2] => 姓名 [3] => 業務員姓名 [4] => dash [5] => Array() [6] => [7] => [8] => [9] => ) //對應如下: /** * 添加單行文本框 * @param string $name ①字段名稱 * @param string $title ②字段別名 * @param string $tips ③提示信息 * @param string $default ④默認值 * @param array $group ⑤標簽組,可以在文本框前后添加按鈕或者文字 * @param string $extra_attr ⑥額外屬性 * @param string $extra_class ⑦額外css類名 * @param string $placeholder ⑧占位符 * @param bool $required ⑨是否必填 * @return $this|array */ public function addText($name = '', $title = '', $tips = '', $default = '', $group = [], $extra_attr = '', $extra_class = '', $placeholder = '', $required = false) ``` 返回的數組格式 ``` 添加和修改頁次方法返回的格式 array ( 0 => array ( 0 => 'text', 1 => 'create_people', 2 => '創建人', 3 => '默認為登錄操作人員', 4 => '', 5 => array ( ), 6 => '', 7 => '', 8 => '', 9 => false, ), 1 => array ( 0 => 'date', 1 => 'accounts_expenditure_time', 2 => '出帳時間', 3 => '出帳時間', 4 => '0', 5 => 'Y-m-d', 6 => '', 7 => '', 8 => '', 9 => false, ), 2 => array ( 0 => 'textarea', 1 => 'remarks', 2 => '備注', 3 => '備注', 4 => '', 5 => '', 6 => '', 7 => '', 8 => false, ), 3 => array ( 0 => 'select', 1 => 'filiale', 2 => '公司', 3 => '業務招待費分公司', 4 => array ( 1 => '山東分公司', 0 => '北京分公司', ), 5 => '0', 6 => '', 7 => '', 8 => '', 9 => false, ), ) ``` ## **getListColumns(string $tableName = '')** 獲取列表頁面可展示的字段信息 getFields方法查出Field表的字段,首先排除列表不展示的(字段管理-字段展示-列表進行勾選)和狀態(字段管理-狀態管理-顯示/隱藏 進行勾選)為0的字段,然后再組裝 當Field表data_source字段的值為1即字典列表時 查出dictionary表的dict_type為Field表的dict_code的數據 返回的數組格式: [$field['field'], $field['name'], $field['type'], $default, $param, $class, $sortable]; 字段名、字段名描述、字段類型、默認值、額外參數(如字典列表的值)、額外類、是否排序 ``` array ( 0 => array ( 0 => 'id',//字段名 1 => '編號',//字段名描述 2 => 'hidden',//字段類型 3 => '0',//默認值 4 => array ( ),//額外參數 5 => '',//額外類 6 => 'false',//是否排序 ), 1 => array ( 0 => 'employee_name', 1 => '姓名', 2 => 'text', 3 => '', 4 => array ( ), 5 => '', 6 => 'true', ), ) ``` 示例: ~~~ return TableBuilder::getInstance() ->addColumns([ // 批量添加列 ['id', 'ID'], ['type_name', '會員組'], ['mobile', '電話'], ['create_time', '創建時間'], ['update_time', '修改時間'], ['status', '狀態', 'yesno'], ]) ->fetch(); ~~~ ## **getListSearch(string $tableName = '')** 獲取列表需要的搜索字段 返回的數組格式 ``` array( 0=>array( 0=>'text',// 字段類型 1=>'employee_name',// 字段名稱 2=>'姓名',// 字段別名 3=>'=',// 匹配方式 4=>'',// 默認值 5=>array(),// 額外參數 6=>0,// 數據源 [0 字段本身, 1 系統字典, 2 模型數據] 7=>'',// 模型關聯 8=>'',// 關聯字段 9=>532,// 字段編號(在field表中的id) ), 1=>array(0=>'date', 1=>'accounts_expenditure_time', 2=>'出帳時間', 3=>'=', 4=>'', 5=>array(), 6=>0, 7=>'', 8=>'', 9=>548, ), 2=>array(0=>'select', 1=>'filiale', 2=>'公司', 3=>'=', 4=>'', 5=>array( 1=>'山東分公司', 0=>'北京分公司', ), 6=>1, 7=>'', 8=>'', 9=>550, ), ) ``` ## **getFields(string $tableName = '')** 獲取表的所有字段信息 根據表名稱查詢出當前模塊在module表的id,根據module的ID獲取Field表的所有字段 MakeBuilder::getFields($this->tabeName) ``` array ( 0 => array ( 'id' => 526, 'module_id' => 40, 'field' => 'id', 'name' => '編號', 'tips' => '', 'required' => 0, 'minlength' => 0, 'maxlength' => 0, 'type' => 'hidden', 'data_source' => 0, 'relation_model' => '', 'relation_field' => '', 'dict_code' => '', 'is_add' => 0, 'is_edit' => 0, 'is_list' => 1, 'is_search' => 0, 'is_sort' => 0, 'search_type' => '=', 'status' => 1, 'sort' => 1, 'remark' => '自增ID', 'setup' => array ( 'default' => '0', 'extra_attr' => '', 'extra_class' => '', 'fieldtype' => 'int', ), 'group_id' => 16, 'is_pk' => 1, ), 1 => array ( 'id' => 531, 'module_id' => 40, 'field' => 'create_people', 'name' => '創建人', 'tips' => '默認為登錄操作人員', 'required' => 0, 'minlength' => 0, 'maxlength' => 0, 'type' => 'text', 'data_source' => 0, 'relation_model' => '', 'relation_field' => '', 'dict_code' => '', 'is_add' => 1, 'is_edit' => 1, 'is_list' => 0, 'is_search' => 0, 'is_sort' => 0, 'search_type' => 'LIKE', 'status' => 1, 'sort' => 50, 'remark' => '', 'setup' => array ( 'default' => '', 'extra_attr' => '', 'extra_class' => '', 'placeholder' => '', 'fieldtype' => 'varchar', 'group' => '', ), 'group_id' => 16, 'is_pk' => 0, ), ) ``` ## **getListWhere(string $tableName = '')** 獲取篩選的條件 getListSearch方法獲取設置搜索的字段,然后進行組裝 ## **getAddUrl(string $tableName = '')** 獲取列表的新增地址 模型管理最后一項有個添加參數的input框,專門添加【列表頁面頂部按鈕組中添加按鈕的參數,如 cate\_id,多個用`,`分割】,這個方法就是將這些額外參數組裝添加到【增加】按鈕的地址上 ## **getHideShowAll(string $tableName = '')** 隱藏<顯示全部>按鈕 ## **getFieldOptions(array $field)** 獲取選項的列表值(下拉列表select 的option?) 參數格式與**getFields**的一致(字典和關聯模型的組裝?) ## **checkSingle(string $modelName)** 檢測單頁模式是否跳轉 ## **getgetAddGroups(string $modelName, string $tableName, array $columns)** 添加/修改頁面獲取字段分組,用于FormBuilder ## **changeFormData(array $formData, string $tableName)** 新增、修改保存時改變提交的信息為需要的格式[日期、時間、日期時間] 查詢出Field的字段,然后查出form表單傳遞過來的post值,如果表單傳過來的值在Field的字段中沒有出現則刪除該表單的值 ## **changeTableData($tableData, string $modelName)** 列表展示時改變為需要的格式[日期、時間、日期時間] ## **unMakeModule()** 獲取不可生成的模塊[內置模塊][模型名稱] 如:'Field', 'Module', 'AuthGroup', 'Admin', 'AuthRule', 'AdminLog', 'Cate' ## **checkModuleTable(string $tableName, string $modelName)** 生成模型時替換模型文件中的table屬性 ## **makeRule(string $id)** 生成模型時替換模型文件中的table屬性
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看