[General] Mobile JS Template to Achieve Jump

  • Last update:March 06, 2024
  • I Overview

    1. Version

    Report server versionJARApp
    HTML5 mobile display plugin
    10.02020-04-2610.4.69
    V10.4.69


    2. Function introduction

    Through the JS statement, click the summary data above the template to jump to the detailed data below.

    Note 1: This method does not support horizontal screen.

    Note 2: If JS is triggered after the full screen is zoomed in, exit the full screen and jump to the corresponding component.

    Note 3: Click the floating window in the template to navigate to the specified position on the page, please refer to: Fast positioning of component navigation

    The JS calling scene is shown in the following table:

    JS calling sceneSpecific introduction
    EeventWidget event
    body initialization event
    HyperlinkHyperlink of cells in report block
    Chart hyperlink in body
    Hyperlink of chart in report block
    Tab block

    II. Example

    Note: This method can only be used when the body layout in dashoboard is re-layout.

    1. Prepare template

    Open the template in the FineReport designer:

    %FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\Dashoboard\Retail group real-time monitoring-phone.frm

    Click to download the template:

    Retail group real-time monitoring-phone.frm


    2. Add hyperlink

    Hyperlink JS statements are different in different scenarios, as shown below:

    • Use hyperlinks in cells:_g().options.form.jumpToMark("markName")

    • Use hyperlinks in form components:this.options.form.jumpToMark("markName")

    Note: 'markName' can be the widget name, table component name, chart block name, and Tab-tabpane name.

    1) Add hyperlink to report cell

    Double click with the left mouse buttonreport0Report block, selectedA3Cell, click in the property panel on the rightHyperlink,chooseJavaScript script,As shown below:

    1.png

    The JS code is as follows:

    _g().options.form.jumpToMark("chart1")

    2) Add hyperlink to chart block

    Double clickchart2Chart block, clickSpecial Effects>Add a link,chooseJavaScript,As shown below:

    The JS code is as follows:

    this.options.form.jumpToMark("chart0")

    Double clickchart2Chart block, clickSpecial effects>Add a link,chooseJavaScript,As shown below:

    The JS code is as follows:

    this.options.form.jumpToMark("report1")

    Double-click the added link name to change the link nameIn turnchange into:Real-time sales,Top,As shown below:

    4.png


    3. Use navigation

    1) Selectreport1,  ClickMobile Terminal, checkUse NavigationButton, as shown in the figure below:

    5.png

    2) Selectchart0,  ClickMobile Terminal, checkUse NavigationButton, as shown in the figure below:

    6.png

    3) Selectchart1, ClickMobile Terminal, checkUse NavigationButton, as shown in the figure below:

    7.png


    4. Effect view

    Take the App effect as an example, as shown in the figure below:

    8.gif

    III. Template download

    The completed template can be found in:%FR_HOME%\webapps\webroot\WEB-INF\reportlets\doc-EN\JS\Form JS instance\35-JS realizes rapid component positioning.frm

    Click to download the template:

    35-JS realizes fast positioning of components.frm

    Attachment List


    Theme: Fine Mobile
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy