<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國際加速解決方案。 廣告
                **前端接口相關參數** |參數名 |必選 |類型 |說明 | | ------ | ------ | ------ |------ | |export |是 |int |2-導出excel | |file_name |否 |string |導出文件名; 若不傳遞,使用后端設置的默認文件名 | |page_type |否 |int |導出數據類型 0-導出全部數據 1(默認)-導出指定分頁的數據(例:導出第2頁至第5頁數據時,同時要傳遞page_start = 2,page_end=5) | |page_size |否 |int |當page_type=1時有效,代表每頁的數量, 默認值25 | |page_start |否 |int |當page_type=1時有效,代表導出的起始頁碼, 默認值1 | |page_end |否 |int |當page_type=1時有效,代表導出的結束頁碼, 默認值200 | **后端列表類須實現的接口** `ListsExcelInterface` 該接口有兩個須實現的方法,`setExcelFields()`用于設置導出字段,`setFileName()`用于設置默認導出文件名 ``` /** * @notes 設置導出字段 * @return string[] * @author Tab * @date 2021/7/30 15:37 */ public function setExcelFields(): array { return [ // 特別注意:數值類型的字段不在排在第2位 // '數據庫字段名(支持別名) => 'Excel表字段名' 'title' => '標題', 'cid_desc' => '分類', 'is_notice_desc' => '商城公告', 'is_show_desc' => '文章狀態', 'visit' => '瀏覽量', 'likes' => '點贊量', 'sort' => '排序', 'create_time' => '創建時間', ]; } /** * @notes 設置默認表名 * @return string * @author Tab * @date 2021/7/30 15:37 */ public function setFileName(): string { return '文章幫助表'; } /** * @notes 文章/幫助列表 * @return array * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author Tab * @date 2021/7/14 9:48 */ public function lists() : array { $field = 'id,title,image,cid,cid as cid_desc,is_notice, is_notice as is_notice_desc,is_show,is_show as is_show_desc,visit,likes,sort,create_time'; $lists = Article::field($field) ->where($this->searchWhere) ->order('id', 'desc') ->page($this->pageNo, $this->pageSize) ->select() ->toArray(); return $lists; } ``` ``` **導出目錄** server/runtime/file/export **導出具體邏輯參考** app/common/lists/ListsExcelTrait.php
                  <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>

                              哎呀哎呀视频在线观看