informat.system Global System Operations
Overview
Use the informat.system object for global system operations
toast
Call the system Toast notification
informat.system.toast(msg);| Parameter | Type | Description |
|---|---|---|
| msg | String | Display message |
confirm
Call the system confirmation dialog
informat.system.confirm(options);| Parameter | Type | Description |
|---|---|---|
| title | String | Dialog title, optional |
| content | String | Prompt content, if not provided, will use the title parameter value as an alternative display |
| dialogTop | String | Distance from top, default (15vh) |
| dialogHeight | String | Window height |
| dialogWidth | String | Window width, default (400px) |
| horizontalAlign | String | Content horizontal alignmentleft, center, right, justify, default center |
| verticalAlign | String | Content vertical alignmenttop, center, bottom, default center |
| showCancel | bool | Whether to show cancel button |
| cancelText | String | Cancel button text, default (Cancel) |
| confirmText | String | Confirm button text, default (Confirm) |
Return Value User operation result
// Call confirmation prompt
informat.system
.confirm({
title: "Are you sure you want to perform this operation?",
})
.then((confirm) => {
if (!confirm) {
console.log("Cancelled");
return;
}
console.log("Confirmed");
});Notes
If the content attribute is not provided, the system will use title as the content to display information, while hiding the title display.
previewImage
Call the system image preview dialog to preview images
informat.system.previewImage(options);| Parameter | Type | Description |
|---|---|---|
| startIndex | Integer | Preview image default index position, starts from 0 |
| list | Array<ImageItem> | Preview image list |
ImageItem structure is as follows
interface ImageItem {
// Image ID, optional parameter
id: String;
// Image name, optional parameter
name: String;
// Image URL, required parameter
src: String;
}Return Value User operation result
// Call system image preview dialog to preview images
informat.system.previewImage({
startIndex: 0,
list: [{ src: "https://url.to.image" }],
});getSystemConfig
Get system global configuration data
informat.system.getSystemConfig();Return Value Type is Promise<Object>
informat.system.getSystemConfig().then((data) => {
console.log(data);
});getCompany
Get team information of the currently logged-in user
informat.system.getCompany();Return Value Type is Promise<Company>
informat.system.getCompany().then((data) => {
console.log(data);
});getAccount
Get the currently logged-in user
informat.system.getAccount();Return Value Type is Promise<Account>
informat.system.getAccount().then((user) => {
console.log(user);
});getToken
Get Token data of the currently logged-in user
informat.system.getToken();Return Value Type is Promise<String>
informat.system.getToken().then((token) => {
console.log(token);
});getServerUrl
Get platform service address
informat.system.getServerUrl();Return Value Type is Promise<String>
// If server configuration is set to https://next.informat.cn
informat.system.getServerUrl().then((url) => {
console.log(url); //https://next.informat.cn
});getClientUrl
Get the prefix of the current platform access address
informat.system.getClientUrl();Return Value Type is Promise<String>
// If current browser access address is https://next.informat.cn/web0/app/xxx/table/xxx?id=xxxx
informat.system.getClientUrl().then((url) => {
console.log(url); // https://next.informat.cn/
});showLoading
Display system loading state
informat.system.showLoading();Return Value Type is Promise
informat.system.showLoading().then(() => {
console.log("loading show");
});hideLoading
Hide system loading state
informat.system.hideLoading();Return Value Type is Promise
informat.system.hideLoading().then(() => {
console.log("loading show");
});setModuleBarStyle
Set application menu bar style
informat.system.setModuleBarStyle(layout);| Parameter | Type | Description |
|---|---|---|
| layout | String | Top-bottom layout:topLeft-right layout:leftLeft-right layout (including top navigation):lefttopTop-bottom layout (no top navigation):topminiNo navigation bar:none |
Return Value Type is Promise
informat.system.setModuleBarStyle("left").then(() => {
console.log("setModuleBarStyle success");
});setAppColor
Set application menu bar style
informat.system.setAppColor(color);| Parameter | Type | Description |
|---|---|---|
| color | String | Color, supports using system default colors or custom colors |
Notes
System default color list
| Value | Color |
|---|---|
| c0 | #5b8ff9 |
| c1 | #57ca8c |
| c2 | #5d7092 |
| c3 | #faad14 |
| c4 | #e86452 |
| c5 | #56c1ec |
| c6 | #945fb9 |
| c7 | #ff9845 |
| c8 | #1e9493 |
| c9 | #000000 |
Return Value Type is Promise
setVisitHistoryVisible
Set application module visit history visibility
informat.system.setVisitHistoryVisible(locale);| Parameter | Type | Description |
|---|---|---|
| visible | Boolean | Whether visible |
Return Value Type is Promise
setNavBreadcrumbVisible
Set application module path visibility
informat.system.setNavBreadcrumbVisible(locale);| Parameter | Type | Description |
|---|---|---|
| visible | Boolean | Whether visible |
Return Value Type is Promise
setModuleTitleVisible
Set application module title visibility
informat.system.setModuleTitleVisible(locale);| Parameter | Type | Description |
|---|---|---|
| visible | Boolean | Whether visible |
Return Value Type is Promise
updateAppDefine
Update application configuration object property data
informat.system.updateAppDefine(key, value);| Parameter | Type | Description |
|---|---|---|
| key | String | Property name |
| value | Object | Property value |
Return Value Type is Promise
updateModuleDefine
Update application module configuration object property data
informat.system.updateModuleDefine(key, value);| Parameter | Type | Description |
|---|---|---|
| key | String | Property name |
| value | Object | Property value |
Return Value Type is Promise
Data Table Default View
Data Table Other Views
setLocale
Modify current user language
informat.system.setLocale(locale);| Parameter | Type | Description |
|---|---|---|
| color | String | Language. Supports Simplified Chinese:zh_CNEnglish:en_US |
Return Value Type is Promise

