5 Common global interface
1 get the basic information of the current open request
Description: including workflow id、 node id、 form id, primary and secondary account information
getBaseInfo:function()
2 Contorl message display duration
showMessage:function controlling display time (msg, type, duration)
Parameter Description
msg
String
true
Information content
type
int
false
Prompt type ,1(warning),2(error),3(success),4(general), default is 1, different types of prompt messages have different effects
duration
Float
false
How long automatically disappears, per second, default is 1.5 seconds
3 System style Confirm message box description
Note: compatible with mobile, custom confirmation content and button name
showConfirm:function (content, okEvent, cancelEvent, otherInfo ={})
Parameter Description
content
String
Yes
Confirmation of information
okEvent
Function
Yes
Click Confirm Event
cancelEvent
Function
No
Click Cancel Event
otherInfo
Object
No
Custom information (button name)
4 Form Top Button, Right-click Menu set disable
Description: Set Form Top Button, Right-click Menu disable and restore to enable
isDisabledcontrolBtnDisabled:function (isDisabled)
Parameter Description
isDisabled
boolean
Yes
true:button all disable can not be operated, false: recovery button can be operated
5 Right click event
Description: call right-click event logic, call only, do not allow override
doRightBtnEvent:function (type)
Parameter Description
type
String
Yes
Button
6 Refresh the form page
force refresh the form page, default to current requestid
reloadPage:function (params ={})
Parameter Description
params
Object
No
Custom parameters, overrides default parameters
7 Mobile app open link method
Only supports the mobile side, especially the non-main form user interface (for example: detail editing) needs to open the link in this way. By opening the link this way, the return does not refresh the form
window.showHoverWindow:function (url, baseRoute)
Parameter Description
url
String
Yes
Open link address
baseRoute
String
Yes
The current routing address is specified in the url address, and the detail edit opens the req/editDetailRow'/ pass
Example
8 Extend parameters send to server
Minimum version:KB900190801
Custom extension parameters sent to the server, the server can take the corresponding parameter value recommendation by request.getParameter
Suggest: the extended custom parameters start with cus_, Avoid affecting / covering the parameters necessary for standard products, resulting function abnormal
appendSubmitParam:function (obj ={})
Parameter Description
obj
Object
No
JSON Format Custom Parameters
9 Get the first required field
Minimum version: KB900191201
scenario: call the required verification logic of the product to obtain the first field that may not be filled in; For example, work with WfForm.OPER_BEOPER_BEFOREVERIFY in section 2.1 to control custom control prompts
getFirstRequiredEmptyField:function()
10 Trigger one time required verification
minimum version: KB900191201
manually trigger one time required field verification and prompt, optional control check must add empty detail / check field required
verifyFormRequired:function (mustAddDetail =true,fieldRequired=true)
Parameter Description
mustAddDetail
Boolean
No
Check whether you must add an empty detail by default
fieldRequired
Boolean
No
Check fields must be filled in by default
Last updated