<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>

                >本章介紹API數據源報表制作 [TOC] ### 一、數據源報表制作、新建數據庫表(以student學生表為示例) #### 1、數據庫表結構 ![](https://static.jeecg.com/upload/test/dataSource_1604995757499.jpg) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 2、新增幾條數據 ![](https://img.kancloud.cn/84/ce/84ce8d07a9453c454400a80bc6745f10_882x378.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 3、新增后臺api接口(必須為json格式) ``` 注意:必須為"示例1"所示的,并且數據不為空,且用data包裹起來,否則api解析不出來字 段 如果需要分頁則需要傳total(總頁數),count(總條數)如"示例2",如果要想在瀏覽頁面看到分頁效果, 需要數據大于10條或者在設計頁面設置每頁顯示條數 ``` 示例1: ``` { "data": [{ "ctotal": "125箱", "cname": "牛奶0", "cprice": "56", "riqi": "2021年08月11日", "id": 100, "dtotal": "1256箱", "tp": "7000", "ztotal": "589箱", "cnum": "每箱12瓶", "dId": "1" }] } ``` 示例2: ``` { "data": [{ "ctotal": "125箱", "cname": "牛奶0", "cprice": "56", "riqi": "2021年08月11日", "id": 100, "dtotal": "1256箱", "tp": "7000", "ztotal": "589箱", "cnum": "每箱12瓶", "dId": "1" }], "total": 1, "count": 3 } ``` :-: 圖二 ### 二、新建API報表 #### 1、點擊頭像,鼠標放到'新建'即可顯示 ![](https://img.kancloud.cn/f3/dd/f3ddcd3b0c398fdf713b6f11020752da_1279x234.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 2、點擊新建報表進入此頁面 ![](https://img.kancloud.cn/bf/a6/bfa6d76e56915cd16e5e096b66732c17_1916x511.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 3、點擊數據集管理(API數據集) ![](https://img.kancloud.cn/31/35/3135ff31db49e34a6533f66c2c03276a_251x217.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 4、進入頁面后,填寫編碼、名稱、Api地址、請求方式 ![](https://img.kancloud.cn/6b/1e/6b1e9e1fe1f0cd65f1e7a6828e48f5b7_1813x529.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) * 編碼:API數據源的標識; * 名稱:API數據源的名稱; * 是否集合:是為集合多條數據 否為單條數據 * 是否分頁:如果有多頁預覽和打印,需要勾選“是否分頁”; * 請求方式:分為get和post;根據后臺的請求類型來選擇(本例get); * 類轉換器:[參考文檔](http://report.jeecg.com/2293839) * Api地址:配置的API數據源地址(可以為本地和線上,但必須是JSON類型,如:{"data":"[{}]"}); ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 5、填寫完成后點擊API解析會出現下圖(動態報表配置明細) ![](https://img.kancloud.cn/8b/08/8b08926de929d11b455bd1abb80dc1ed_1865x549.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) * 字段名:數據庫表中的字段名稱 * 排序:顯示到第幾位,如1排在第一位 * 字段文本:該字段對應的文本(如 name 學生名稱) * 類型:數據類型 (數值類型、字符類型、日期類型) * 字典code:字典翻譯;如sex字段數據庫中存1或2 報表中顯示男或女 [點擊查看字典配置專題](http://report.jeecg.com/2083759) * 查詢:選中復選框,在預覽中會有查詢欄可查詢數據 * 查詢模式:可選輸入框、下拉單選、下拉多選、范圍查詢、模糊查詢、下拉樹、自定義下拉框 [查詢控件專題查看](http://report.jeecg.com/2373406) * 查詢默認值:可自定義默認值 [點擊查看專題](http://report.jeecg.com/2373407) * 查詢日期格式:日期格式設置 [點擊查看專題](http://report.jeecg.com/2384073) * 參數配置:可配置下拉樹接口 [點擊查看專題](http://report.jeecg.com/2388194) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 6、點擊確定返回頁面,數據集中下面會有我們剛才創建的內容 ![](https://img.kancloud.cn/0f/a2/0fa2b3f82dff75b724aaf2ef30c5f606_287x338.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) ### 三、填寫數據信息、保存瀏覽 #### 1、填寫標題 ![](https://img.kancloud.cn/4e/0b/4e0b26190b856dae2e326151579185bb_1920x903.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 2、文本內容可將數據拖拽 ![](https://img.kancloud.cn/c0/c2/c0c28ec6a43866e6a700ee7da5a9c941_1920x903.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 3、保存預覽 ![](https://img.kancloud.cn/c9/98/c9984e0c15d8d764faf7c7822ccf11d6_1234x227.png) ![](https://img.kancloud.cn/d6/13/d61333cdfd7adae5427ea6d7a13fa196_697x262.png) #### 4、分組預覽 1)點擊班級所在表格進行分組設置,聚合方式選擇分組 ![](https://img.kancloud.cn/fc/9a/fc9a95c24f04585cec0c5f3f5d8080e1_1648x665.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) 2)保存預覽 ![](https://img.kancloud.cn/03/e0/03e0135486bd46e5d15046e7bbf0b60c_922x314.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) ### 四、打印、導出 #### 1、打印 打印區域和紙張設置 ![](https://img.kancloud.cn/46/5a/465a8f19e33e5a51c4f43a3f6f77ec01_865x321.png) 點擊“打印”按鈕,選擇“Canvas打印”或“Html打印”,進入打印預覽界面 ![](https://img.kancloud.cn/3a/ec/3aec99eb1e53fa035bad5a6f40d5054a_1318x873.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 2、導出(包含excel、pdf、pdf圖像、圖片) 點擊“導出”按鈕,選擇“導出excel”、“pdf”、“PDF圖像”、“圖片”,可將表單數據導出相應形式; ![](https://img.kancloud.cn/eb/3e/eb3e373da7cdc326190a90430b3809df_825x307.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) ### 五、菜單配置 #### 1、復制瀏覽器的鏈接 ![](https://img.kancloud.cn/a6/39/a6391a79ccae7cdb56cd13c13fb683db_898x576.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 2、在系統管理菜單管理進行配置 ![](https://img.kancloud.cn/ab/a4/aba41c984395cbedc5697cea3d5e7c9a_329x953.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 3、點擊新增按鈕填寫信息 1)如果是二級菜單,一級菜單應如下圖配置 ``` 注意: * 前段組件必須按照格式填寫 layouts/RouteView * 菜單路徑必須為/**(本章/test),且不能重復 * 是否為路由菜單:是 ``` ![](https://img.kancloud.cn/71/8b/718bccc8c227f651da8d341a02257b49_864x883.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) 2)如果是二級菜單,這里應配置子菜單,否則為一級菜單 ``` 注意: * 前段組件必須按照格式填寫 layouts/IframePageView * 用{{ window._CONFIG['domianURL'] }}代替IP地址、端口號和項目名稱 * 是否為路由菜單:是 ``` ![](https://img.kancloud.cn/58/76/58767100721e4ac26130fd441f850bf1_852x671.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) #### 4、角色授權 路徑:在系統管理->角色授權找到自己對應的角色,鼠標放到更多->授權 勾選剛才創建的菜單 ![](https://img.kancloud.cn/5b/29/5b298cc0e610b06f1123bdab1b37a7d6_810x223.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png) 刷新頁面即可看見點擊菜單 ![](https://img.kancloud.cn/eb/aa/ebaa136afd449971e99a957fa1fe884a_1145x801.png) ![](https://img.kancloud.cn/02/3a/023a6d50e79c95858fd9911bc0059c1f_803x26.png)
                  <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>

                              哎呀哎呀视频在线观看