This page summarizes all the interfaces of the JS API. You can simply view the functions and mobile terminal support of each interface. For details, please read the corresponding interface introduction.
I. Public module
The interface of the public module, general report and dashboard can be used, divided into global interface, parameter pane interface, widget interface, table interface, toolbar interface, report pagination interface and export interface.
1. global interface
The global interface is basically used for the report body. In addition to the methods on the report object obtained by _g(), it also includes methods on the FR object and the FS object.
The methods on the report object obtained by g() are shown in the following table, and the details can be seen: Global interface
| Interface | Instruction | Mobile |
|---|---|---|
| _g() | Get the report object, and use it in combination with the method of the report object. | Support |
| getParameterContainer | Get the parameter pane object in the report, and use it in combination with the parameter pane interface | Support |
| parameterCommit | After submitting the parameters, re-query and refresh the report | Support |
| loadContentPane | Reload, refresh report | Support |
| getPreviewType | Get the preview mode the report is currently in | Support |
The methods on the FR object, as shown in the following table, can be seen in detail:
| Interface | Instruction | Mobile |
|---|---|---|
| servletURL | Obtain servletURL | Support |
| serverURL | Obtain serverURL | Not support |
| server | Obtain server | Not support |
| fineServletURL | Obtain fineServletURL | Not support |
| SessionMgr.getSessionID | Obtain sessionId | Support |
| showDialog | Open a dialog | Not support |
| closeDialog | Close dialog | Not support |
| doHyperlinkByGet | The Get method opens a web page, you can pass parameters, and you can set page attributes | Support |
| doHyperlinkByPost | The Post method opens a web page, you can pass parameters, and you can set page attributes | Support |
| doURLPrint | Call up the print tool to print the report | Not support |
| Msg | FR's built-in unified style message box can replace the alert, confirm and prompt pop-ups in Window | Support |
| remoteEvaluate | Execute FR built-in formula and return the result of formula calculation | Support |
| jsonEncode | jsonEncode encode the string | Not support |
| jsonDecode | jsonEncode decode the string | Not support |
| ajax | Wrapped jQuery.ajax() function | Support |
| isEmpty | Determine if an object is empty | Not support |
| isArray | Determine if an object is an array | Not support |
The methods on the FR object are only supported by the mobile terminal, as shown in the following table. For details, see: Mobile terminal exclusive
| Interface | Instruction | Mobile |
|---|---|---|
| location | It is used to realize the positioning function and obtain the latitude and longitude, which can be used in https, enterprise WeChat, and DingTalk. | Support |
| Mobile.getDeviceInfo | Get device information | Support |
The methods on the FS object, as shown in the following table, can be seen in detail: Global Interface - FS
| Interface | Instruction | Mobile |
|---|---|---|
| signOut | Log out of the decision-making platform, that is, return to the decision-making platform login interface | Not support |
| tabPane.closeActiveTab | Close the tab of the decision-making platform, that is, automatically close the preview template opened in the decision-making platform | Support |
| tabPane.addItem | Opens a new tab in decision-making platform | Support |
2. Parameter pane interface
The parameter pane interface can be used to adjust some attributes of the parameter pane, as shown in the following table. For details, see: Parameter pane interface
| Interface | Instruction | Mobile |
|---|---|---|
| getWidgetByName | Get the widget in the parameter pane and use it in combination with the widget method | Support |
| collapse | Collapse the parameter pane | Support |
| expand | Expand the parameter pane | Support |
| submit | Query after submitting automatically | Support |
3. Widget interface
The widget interface is mainly used to modify the attributes of the widgets in the parameter pane, the widgets in the filling and reporting cells, and the widgets in the dashboard body. The widget interface is divided into general and exclusive. All widgets can be used except the special interface. The exclusive interface can only be used by the specified widgets.
The interface to get the widget can only be used in the "event" of the widget, as shown in the following table, the details can be seen: Get widget
| Interface | Instruction | Mobile |
|---|---|---|
| this | It is used in the event of the widget to get the current widget object. After getting it, the methods and attributes of the widget can be used. | Support |
| this.options.form | Called in the event of the widget, you can use all methods of the parameter pane interface | Support |
General interface, as shown in the following table, detailed introduction can be seen: Widget general use
| Interface | Instruction | Mobile |
|---|---|---|
| getValue | Get the actual value of the widget | Support |
| getText | Get the display value of the widget | Support |
| setValue | Set the value of the widget | Support |
| visible | Set widget visible | Support |
| invisible | Set widget invisible | Support |
| setVisible | Set widget visible/invisible | Support |
| isVisible | Whether the widget is visible | Support |
| setEnable | Set widget enable/disable | Support |
| isEnabled | Whether the widget is enabled | Support |
| reset | Reset the widget, clear the content of the widget | Support |
| getType | Get widget type | Support |
| setWaterMark | Add watermark text (only supports widgets with input boxes) | Support |
| fireEvent | Call widget event | Support |
| setPopupStyle | Set the style of the widget drop-down option box, only supports widgets with option boxes | Not support |
| return false | Add return false to the specific event of the widget, without triggering linkage and query | Not support |
The exclusive interface of "Date Widget" is shown in the following table. For details, please see: Date Widget Exclusive
| Interface | Instruction | Mobile |
|---|---|---|
| setMaxAndMinDate | Set an optional date range for the date widget | Support |
| setPopupStyle | Set the popup style, only supports widgets with popups | Not support |
The exclusive interface of "Button Widget" is shown in the following table, and the detailed introduction can be seen: Button Widget Exclusive
| Interface | Instruction | Mobile |
|---|---|---|
| doClick | The click event that triggers the button is equivalent to a manual click | Support |
The exclusive interface of the "drop-down box" widget is shown in the following table, and the detailed introduction can be seen: Drop-down box widget exclusive
| Interface | Instruction | Mobile |
|---|---|---|
| setName4Empty | Modify the default text "not selected" when the drop-down box widget is pulled down | Not support |
4. Table interface
The table interface is mainly used to modify the table content in the report. According to the application scenario, it can be divided into marquee interface, hidden scrollbar interface, modify cell background interface, modify cell font interface, modify row height and column width interface, get and set cell values, and set cell prompts, set cell styles.
The marquee interface is shown in the following table, and the detailed introduction can be seen: Marquee interface
| Interface | Instruction | Mobile |
|---|---|---|
| startMarquee | Start marquee effect | Not support |
| stopMarquee | Stop marquee effect | Not support |
The hidden scrollbar interface is shown in the following table, and the detailed introduction can be seen: Hide scrollbar interface
| Interface | Instruction | Mobile |
|---|---|---|
| setHScrollBarVisible | Set the horizontal scrollbar to visible/invisible | Not support |
| setVScrollBarVisible | Set the vertical scrollbar to visible/invisible | Not support |
The interface for modifying the cell background is shown in the following table, and the details can be found in: Modify the cell background
| Interface | Instruction | Mobile |
|---|---|---|
| addEffect | type: 'highlightRow',When the mouse clicks or hovers a cell, the row where the cell is located changes color. | Support |
| type: 'highlightCol',When the mouse clicks or hovers a cell, the column where the cell is located changes color. | Support | |
| type: 'highlightCross' ,When the mouse clicks or hovers a cell, the row and column where the cell is located changes color. | Support | |
| type: 'highlightCell' ,Cells change color when mouse clicks or hovers over cells | Support |
Modify the cell font interface, as shown in the following table, the details can be seen: Modify cell font
| Interface | Instruction | Mobile |
|---|---|---|
| addEffect | type: 'setCellFont', When the mouse clicks or hovers the cell, the cell font format changes. | Support |
| type: 'setRowFont' ,When the mouse clicks or hovers a cell, the font format of the row where the cell is located changes. | Support | |
| The font of the row where the mouse clicks or hovers the cell changes, and the mouse clicks or hovers other rows to restore. | Support |
Set the cell prompt interface, as shown in the following table, the details can be found in: Setting Cell Prompt
| Interface | Instruction | Mobile |
|---|---|---|
| addEffect | type: 'setCellFont',A text/image prompt box appears when the mouse hovers | Not support |
The interface for modifying row height and column width is shown in the following table. For details, see: Modify row height and column width
| Interface | Instruction | Mobile |
|---|---|---|
| setRowHeight | Change cell row height | Not support |
| setColWidth | Change cell column height | Not support |
Modify the cell font interface, as shown in the following table, the details can be seen: Get and Set Cell Values
| Interface | Instruction | Mobile |
|---|---|---|
| getCellValue | Get the value of a specific cell, the parameter can be the cell address or the cell row and column number | Partial support |
| setCellValue | Assign a value to a specific cell, the parameter can be the cell address or the cell row and column number | Partial support |
Set the cell style interface, as shown in the following table, the details can be found in: Set cell style
| Interface | Instruction | Mobile |
|---|---|---|
| setCellRadius | Set rounded corners for all cells in the report. The cells must have a background color, otherwise the effect cannot be seen. | Not support |
5. Toolbar interface
The toolbar interface is mainly used to modify the attributes of the toolbar and buttons in the toolbar.
Toolbar interface, as shown in the following table, detailed introduction can be seen: Toolbar
| Interface | Instruction | Mobile |
|---|---|---|
| getWidgetByName | Get the button in the report toolbar, which can be used in combination with the button method. | Not support |
| toolBarFloat | Set the toolbar display position | Not support |
| setStyle | Modify toolbar size | Not support |
| setVisible | Set toolbar visible/invisible | Support |
Toolbar button general interface, all toolbar buttons can be used except special ones, as shown in the following table, the details can be seen: Toolbar button general use
| Interface | Instruction | Mobile |
|---|---|---|
| visible | Set a certain toolbar button visible | Not support |
| invisible | Set a certain toolbar button invisible | Not support |
| setVisible | Set a certain toolbar button visible/invisible | Not support |
| isVisible | Whether the certain toolbar button visible/invisible | Not support |
| setEnable | Set a certain toolbar button enable/disable | Not support |
| isEnabled | Whether the certain toolbar button is enabled | Not support |
Mail button exclusive interface, only mail button is enabled, as shown in the following table, detailed introduction can be seen: Mail button exclusive
| Interface | Instruction | Mobile |
|---|---|---|
| changeFormat | Modify the format options supported by mail | Not support |
6. Report pagination interface
The report pagination interface is mainly used for paging reports, as shown in the following table. For details, see: Report Pagination
| Interface | Instruction | Mobile |
|---|---|---|
| gotoPreviousPage | Go to the previous page | Support |
| gotoNextPage | Go to the next page | Support |
| gotoLastPage | Go to the last page | Support |
| gotoFirstPage | Go to the first page | Support |
| gotoPage | Go to the specified page | Support |
| getCurrentPageIndex | Get the current page index | Support |
| getReportTotalPage | Get the report total page | Support |
| currentPageIndex | The index of the current page of the report | Support |
| reportTotalPage | The total number of pages in the report | Support |
7. Report export interface
The export interface is mainly used for report export, as shown in the following table. For details, see: Export interface
| Interface | Instruction | Mobile |
|---|---|---|
| exportReportToExcel | Export report to Excel | Partial support |
| exportReportToImage | Export report to image | Partial support |
| exportReportToPDF | Export report to PDF | Partial support |
| exportReportToWord | Export report to Word | Partial support |
II. General report
The general report interface, that is, only the cpt general report is enabled, divided into public part and private part. The public part, that is, all preview modes, can be used, and the private part can only be used in the corresponding preview mode.
1. Public interface
The public part of the interface is shown in the following table, and the detailed introduction can be seen: Public section
| Interface | Instruction | Mobile |
|---|---|---|
| getToolbar | Get the toolbar object | Support |
2. Pagination preview interface
The Pagination Preview exclusive interface is shown in the table below, and the detailed introduction can be found here: Pagination Preview Exclusive
| Interface | Instruction | Mobile |
|---|---|---|
| expandNodeLayer | Expand the collapsed tree to N level nodes | Not support |
| collapseNodeLayer | Collapse the collapsed tree to N level nodes | Not support |
| expandAllNodeLayer | Expand all nodes of the collapsed tree | Not support |
| collapseAllNodeLayer | Collapse all nodes of the collapsed tree | Not support |
3. Data Entry preview interface
The exclusive interface for data entry preview is shown in the table below, and the detailed introduction can be found here: Data Entry Preview Exclusive
| Interface | Instruction | Mobile |
|---|---|---|
| getWidgetByName | Get the widget in the filling cell by the widget name | Support |
| getWidgetByCell | Get the widget in the filling cell through the cell address | Support |
| getWidgetsByName | Get the widget with the same name in the filling cell by the widget name | Support |
| appendReportRC | Insert a row at a specific position | Not support |
| appendReportRow | Insert a row | Support |
| deleteReportRC | Delete a row | Not support |
| deleteRows | Delete a row | Not support |
| refreshAllSheets | Re-query, refresh all sheets, after refresh, it will stay on the last viewed sheet | Support |
| loadSheetByIndex | Switch to the specified sheet, the parameter is the sheet number | Not support |
| loadSheetByName | Switch to the specified sheet, the parameter is the sheet name | Not support |
| isDirtyPage | Determine if a page has been edited | Not support |
| isAutoStash | To determine whether to enable automatic temporary storage, please refer to: Data Entry Temporary Storage | Not support |
| writeReport | Force commit, no verification | Support |
| verifyAndWriteReport | Verify and submit reports | Support |
| verifyReport | Data verification | Support |
| importExcel | Impory Excel | Not support |
| importExcel_Append | Import Excel with "Empty Import" | Not support |
| importExcel_Clean | Import Excel by means of "incremental import" | Not support |
| importExcel_Cover | Import Excel by "overwriting import" | Not support |
| stash | Temporary storage | Not support |
| clear | Empty staging | Not support |
4. Data Analysis Interface
The data analysis exclusive interface is shown in the following table, and the detailed introduction can be found at: Data Analysis Exclusive
| Interface | Instruction | Mobile |
|---|---|---|
| centerReport | When previewing "Data Analysis", set the report to be displayed in the center | Not support |
| expandNodeLayer | When previewing "Data Analysis", expand the collapsed tree to N level nodes | Not support |
| collapseNodeLayer | When previewing "Data Analysis", collapse the collapsed tree to N level nodes | Not support |
| expandAllNodeLayer | When previewing "Data Analysis", expand all nodes of the collapsed tree | Not support |
| collapseAllNodeLayer | When previewing "Data Analysis", collapse all nodes of the collapsed tree | Not support |
III. Dashboard
The interface of the dashboard, that is, only the frm dashboard is enabled, divided into the acquisition component interface, the component general interface , and the Tab component interface.
1. Get component interface
The interface for getting components is shown in the following table, and the details can be found in: Get Components
| Interface | Instruction | Mobile |
|---|---|---|
| getAllWidgets | Get all the component information in the report object | Support |
| getWidgetByName | Get a component in the report object, you can get the components in the body and the widgets in the parameter pane. | Support |
2. Component General Interface
The component general interface is that all components in the dashboard can be used, as shown in the following table, and the detailed introduction can be seen: General components
| Interface | Instruction | Mobile |
|---|---|---|
| visible | Set component visible | Support |
| invisible | Set component invisible | Support |
| setVisible | Set component visible/invisible | Support |
| isVisible | Returns whether the component is visible | Support |
3. Report block interface
The report block interface is used to modify the attributes of the report block component, as shown in the following table. For details, see: Report Block Component Interface
| Interface | Instruction | Mobile |
|---|---|---|
| getToolbar(index) | Get the toolbar of the report block, use when the toolbar is open. | Support |
4. Tab component interface
The Tab component interface is used to modify the attributes of the Tab component, as shown in the following table. For details, see: Tab Component
| Interface | Instruction | Mobile |
|---|---|---|
| showCardByIndex | Get the positioning index of the tab page being displayed | Support |
| setTabVisible | Set a tab page to visible/invisible | Support |
| getShowIndex | Set Tab block title to visible/invisible | Support |
| setTitleVisible | Show Nth Tab Page | Not support |