The content of the invention
In view of the above-mentioned problems, a kind of method that the present invention provides real-time monitoring form applied to SVG interfaces, is solved
Monitor in SVG interfaces, dynamic table display effect and using effect with the problem of display styles differ larger in graphic editor.
When realizing monitoring form in real time, the size of SVG file is reduced, picture loading velocity is improved.
To realize above-mentioned technical purpose and the technique effect, the present invention is achieved through the following technical solutions:
A kind of method of real-time monitoring form applied to SVG interfaces, comprises the following steps:
Step 1, real-time grid control is edited in graphic editor, and the picture editted is preserved into meet CIM/G
The file format of specification;
Step 2, the SVG file that the file for meeting CIM/G specifications that step 1 is obtained is converted into meeting to SVG specifications;
Step 3, the loading SVG file generation dynamic surveillance form in SVG monitoring interfaces.
It is preferred that, in step 1, edit real-time grid control and comprise the following steps:
1.1) it is unique No. ID of grid control distribution;
1.2) the connection Database Properties of definition tables control;
1.3) the Show Styles attribute of configuration form control.
It is preferred that, step 2 specifically includes following steps:
2.1) message that graphic file updates is monitored;
2.2) message body is parsed, the graphic file name updated is obtained;
2.3) CIM/G graphic file, the SVG file that form pel is converted into being described with SVG, in SVG file are parsed
Middle two customized labels of increase identify the Database Properties and display properties of form.
It is preferred that, step 3 specifically includes following steps:
3.1) browser loading SVG file, reads the form data of SVG file;
3.2) dynamic creation shows the subwindow of form, the position of configuration form window and size;
3.3) configuration form subwindow and the overlay order of the levels at SVG interfaces;
3.4) list data in the Database Properties reading database in SVG file;
3.5) generate grid control and complete to configure according to display properties.
The beneficial effects of the invention are as follows:
Firstth, when the present invention is applied to the real-time monitoring form at SVG interfaces, performance is significantly improved.
Secondth, the present invention has abundant bandwagon effect and preferable user experience.
3rd, there is the real-time monitoring form at SVG interfaces of the invention What You See Is What You Get, the automatic picture that adapts to scale, supervise
The characteristics of depending on content dynamic refresh.
There is the present invention parsing and refresh rate to accelerate, and monitoring form function is abundant, convenient, efficient advantage.
Embodiment
Technical solution of the present invention is described in further detail with specific embodiment below in conjunction with the accompanying drawings, so that ability
The technical staff in domain can be better understood from the present invention and can be practiced, but illustrated embodiment is not as the limit to the present invention
It is fixed.
A kind of method of real-time monitoring form applied to SVG interfaces, comprises the following steps:
Step 1, real-time grid control is edited in graphic editor, and the picture editted is preserved into meet CIM/G
The file format of specification.
Step 2, the SVG file that the file for meeting CIM/G specifications that step 1 is obtained is converted into meeting to SVG specifications.
Step 3, the loading SVG file generation dynamic surveillance form in SVG monitoring interfaces.
Introduce in detail below.
In step 1, edit real-time grid control and comprise the following steps:
1.1) it is unique No. ID of grid control distribution;
1.2) the connection Database Properties of definition tables control, the Database Properties refer to grid control from database
Necessary parameter when reading data, including the information of application number, table number, display field, querying condition, ordering rule;
1.3) the Show Styles attribute of configuration form control, the Show Styles attribute includes the position of grid control, table
Lattice control size, gauge outfit background colour, gauge outfit font color, form font color, form background colour.
As shown in figure 1, the real-time monitoring spreadsheet interface of the present invention is that generation is edited in graphic editor, first in figure
Drag and drop grid control in editing machine, by the Database Properties of searcher instrument definition grid control, in graphic editor attribute window
The display properties of grid control defined in mouthful, is completed after spreadsheet interface editor, is preserved generation G files (state's net graphic file) and is led to
Cross messaging bus and send the message that figure updates.
Step 2 specifically includes following steps:
2.1) message that graphic file updates is monitored;
2.2) message body is parsed, the graphic file name updated is obtained;
2.3) CIM/G graphic file, the SVG file that form pel is converted into being described with SVG, in SVG file are parsed
Middle two customized labels of increase identify the Database Properties and display properties of form.
SVG file be meet XML format can be directly by the interface file of browser resolves, SVG file describes one
The definition of complete CIM/G list control, the Database Properties and display properties of form are all put into<metadata></
metadata>One combination in, customized label<web:table>Define the Database Properties of form, including form
Application number, the attribute such as table number;Customized label<web:showAttr>Define the Show Styles such as position, the size of form
Attribute.
As shown in Fig. 2 the SVG file of the present invention is generated by SVG conversion process, this is a backstage Resident Process,
The message that figure updates is received by messaging bus, parsing message body obtains updated G filenames, reads and parse G files,
The Database Properties and display properties of form in G files are generated in SVG file.
Step 3 specifically includes following steps:
3.1) browser loading SVG file, reads the form data of SVG file;
3.2) dynamic creation shows the subwindow of form, the position of configuration form window and size;
3.3) configuration form subwindow and the overlay order of the levels at SVG interfaces;
3.4) list data in the Database Properties reading database in SVG file;
3.5) generate grid control and complete to configure according to display properties.
Specifically following steps are subdivided into as shown in figure 3, generating grid control and completing configuration according to display properties:
3.5.1) according to the size and location attribute of grid control, JavaScript table interface dynamic creation forms are called
Window;
3.5.2) according to the Database Properties of form (including the ID of form, the information such as list data, position, size), hair
List data is sent to ask to database;
3.5.3) dynamic sets the display data of form;
3.5.4) according to form display properties configuration form pattern;
3.5.5) complete monitoring form in real time to show, and monitor form data variation.
Database Properties and display properties that SVG file obtains CIM/G list pels are borrowed, outside JavaScript is used
Table interface is generated, the real-time monitoring form on dynamic creation SVG interfaces, and configure the folded of monitoring form and SVG interfaces in real time
Plus the method for order, solve in monitoring SVG interfaces, dynamic table display effect and using effect in graphic editor with showing
Show the problem of style difference is larger.When realizing monitoring form in real time, the size of SVG file is reduced, performance has been obtained significantly
Improve, also achieve quick real-time SVG interfaces complicated and changeable, editor's layout and generation display.With parsing and brush
New speed is accelerated, and monitoring form function is abundant, convenient, efficient advantage.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair
The equivalent structure that bright specification and accompanying drawing content are made either equivalent flow conversion or to be directly or indirectly used in other related
Technical field, be included within the scope of the present invention.