Method for displaying visio flow chart at front end
By converting Visio files to SVG format and rendering flowcharts using the X6 framework, the problem of flowcharts not being able to be displayed in browsers was solved, enabling customized display of flowcharts and visualization of management standards.
Patent Information
- Application Number
- CN202410796871.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2024-10-15
AI Technical Summary
The existing flowchart display cannot meet the customization needs of information systems, and it is not possible to directly display Visio flowcharts in a browser and maintain corresponding policy documents or instructions at the process nodes.
Convert Visio files to SVG format, parse the SVG flowchart file, extract global styles and node content, render the flowchart using the X6 framework, and bind click events and tools to the nodes to support display and maintenance of related data in a browser.
It enables intuitive display of Visio flowcharts in a browser and allows maintenance of relevant files or descriptions at process nodes, enhancing the visualization of process management.
Smart Images

Figure CN118779045A_ABST
Abstract
Description
Technical Field
[0001] The invention discloses a method, which relates to the technical field of front-end management, and in particular to a method for displaying a Visio flow chart at the front end. Background Art
[0002] The current application execution process involves flowchart display, but the existing flowchart display cannot increase customization requirements. Due to the requirements of the information system, it is necessary to customize the Visio flowchart to be displayed directly in the browser, and maintain the corresponding system documents or instructions at the relevant process nodes to intuitively display the relevant process management content. Summary of the invention
[0003] In view of the problems of the prior art, the present invention provides a method for displaying a Visio flowchart on the front end, which can directly display the Visio flowchart in a browser and maintain corresponding system files or instructions at relevant process nodes to intuitively display relevant process management content.
[0004] The specific scheme proposed by the present invention is:
[0005] The present invention provides a method for displaying a Visio flowchart on a front end, comprising:
[0006] Save the Visio file as an SVG file, parse the SVG process file, and extract the file content:
[0007] Extract global styles and global def elements,
[0008] Extract the text content, style and position of each node in the flowchart;
[0009] Use the X6 framework to render the flowchart, and parse the extracted node content, style and position into the node format required by X6 according to the superior-subordinate relationship.
[0010] Convert global styles and global def elements into HTML format and add them to the page rendered by the X6 framework.
[0011] Bind the node to X6 click events and node tools to interact with the page, select nodes to display or add node-related data.
[0012] Stores the process files and the file list corresponding to each node.
[0013] Furthermore, the method for displaying a Visio flowchart on the front end described in the method for extracting the content and position of each node of the flowchart includes: filling in the style elements in the svg format process file that are not wrapped by the tspan element to ensure that the order of the text content is consistent with the original flowchart.
[0014] Furthermore, the method of displaying a Visio flowchart on the front end includes binding a node to an X6 click event and a node tool, including:
[0015] Unified click event for interacting with the page,
[0016] Unified node tools to display the number of node-related files.
[0017] Furthermore, when querying a flowchart in the method of displaying a Visio flowchart on the front end, the process file and the file list corresponding to the node are first read, the process details are queried, the flowchart is displayed step by step, and the number of node-related files is displayed.
[0018] The present invention also provides a device for displaying a Visio flowchart at the front end, comprising a parsing and extraction module, a rendering and display module and a storage module.
[0019] The parsing and extraction module saves the Visio file as an SVG file, parses the SVG process file, and extracts the file content:
[0020] Extract global styles and global def elements,
[0021] Extract the text content, style and position of each node in the flowchart;
[0022] The rendering and display module uses the X6 framework to render the flowchart, and parses the extracted content, style and position of each node into the node format required by X6 according to the superior-subordinate relationship;
[0023] Convert global styles and global def elements into HTML format and add them to the page rendered by the X6 framework.
[0024] Bind the node to X6 click events and node tools to interact with the page, select nodes to display or add node-related data.
[0025] The storage module stores the process files and the file list corresponding to each node.
[0026] Furthermore, the parsing and extraction module in the device for displaying Visio flowcharts on the front end extracts the content and position of each node in the flowchart, including: filling in the style elements in the svg format process file that are not wrapped by tspan elements to ensure that the order of the text content is consistent with the original flowchart.
[0027] Furthermore, the rendering display module in the device for displaying a Visio flowchart at the front end binds the node to the X6 click event and the node tool, including:
[0028] Unified click event for interacting with the page,
[0029] Unified node tools to display the number of node-related files.
[0030] Furthermore, the device for displaying Visio flowcharts on the front end also includes a query module. When the query module queries the flowchart, it first reads the process file and the file list corresponding to the node, queries the process details, and the rendering display module will gradually display the flowchart and display the number of node-related files.
[0031] The benefits of the present invention are:
[0032] The present invention displays a flow chart consistent with the effect of Visio software in the information system, and at the same time supports integration with other businesses on the process node, maintains related content, and makes management specifications more visualized. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic flow chart of the method of the present invention. DETAILED DESCRIPTION
[0034] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.
[0035] Example 1
[0036] The present invention provides a method for displaying a Visio flowchart on a front end, comprising:
[0037] You can save the Visio file as an SVG file, parse the SVG process file, and extract the file content:
[0038] Extract global styles and global def elements,
[0039] Extract the text content, style and position of each node in the flowchart, and fill in the style elements that are not wrapped by tspan elements in the svg format process file to ensure that the order of the text content is consistent with the original flowchart.
[0040] Use the X6 framework to render the flowchart, and parse the extracted node content, style, and position into the node format required by X6 according to the hierarchical relationship.
[0041] Convert global styles and global def elements into HTML format and add them to the page rendered by the X6 framework.
[0042] Bind the node to the X6 click event and node tool for interaction with the page. When binding the X6 click event and node tool, unify the click event for interaction with the page, unify the node tool, and display the number of node-related files.
[0043] Select a node to display or add node-related data. Click a node to query the node's related files and list them on the right. You can also maintain a list of files associated with the node.
[0044] Stores the process files and the file list corresponding to each node.
[0045] When querying the flowchart, first read the process file and the file list corresponding to the node, query the process details, and the rendering display module will gradually display the flowchart and the number of node-related files.
[0046] The method of the present invention can directly display the Visio flow chart in the browser, and maintain the corresponding system files or instructions at the relevant process nodes, so as to intuitively display the relevant process management content.
[0047] Example 2
[0048] The present invention also provides a device for displaying a Visio flowchart at the front end, comprising a parsing and extraction module, a rendering and display module and a storage module.
[0049] The parsing and extraction module saves the Visio file as an SVG file, parses the SVG process file, and extracts the file content:
[0050] Extract global styles and global def elements,
[0051] Extract the text content, style and position of each node in the flowchart;
[0052] The rendering and display module uses the X6 framework to render the flowchart, and parses the extracted content, style and position of each node into the node format required by X6 according to the superior-subordinate relationship;
[0053] Convert global styles and global def elements into HTML format and add them to the page rendered by the X6 framework.
[0054] Bind the node to X6 click events and node tools to interact with the page, select nodes to display or add node-related data.
[0055] The storage module stores the process files and the file list corresponding to each node.
[0056] As the contents of information interaction between modules in the above-mentioned device, execution of readable program process, etc. are based on the same concept as the embodiment of the method of the present invention, the specific contents can be found in the description of the embodiment of the method of the present invention, and will not be repeated here.
[0057] Similarly, the device of the present invention displays a flowchart consistent with the effect of Visio software in the information system, and at the same time supports integration with other businesses on the process node, maintains related content, and makes management specifications more visual.
[0058] It should be noted that not all steps and modules in the above-mentioned processes and device structures are necessary, and some steps or modules can be ignored according to actual needs. The execution order of each step is not fixed and can be adjusted as needed. The system structure described in the above-mentioned embodiments can be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or some components in multiple independent devices may be implemented together.
[0059] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.
Claims
1. A method for displaying a Visio flowchart on the front end, characterized in that include: Save the Visio file as an SVG file, parse the SVG process file, and extract the file content: Extract global styles and global def elements, Extract the text content, style and position of each node in the flowchart; Use the X6 framework to render the flowchart, and parse the extracted node content, style and position into the node format required by X6 according to the superior-subordinate relationship. Convert global styles and global def elements into HTML format and add them to the page rendered by the X6 framework. Bind the node to X6 click events and node tools to interact with the page, select nodes to display or add node-related data. Stores the process files and the file list corresponding to each node.
2. According to the method of claim 1, the front-end display method of Visio flowchart is characterized by: The extracting of the content and position of each node of the flowchart includes: filling in the style elements in the svg format process file that are not wrapped by the tspan element, so as to ensure that the sequence of the text content is consistent with the original flowchart.
3. According to the method of claim 1, the front-end display method of Visio flowchart is characterized by: The node binding X6 click event and node tool includes: Unified click event for interacting with the page, Unified node tools to display the number of node-related files.
4. According to the method of claim 1, the front-end display method of Visio flowchart is characterized by: When querying a flowchart, first read the process file and the file list corresponding to the node, query the process details, display the flowchart step by step, and display the number of node-related files.
5. A device for displaying a Visio flowchart at the front end, characterized in that Including parsing and extraction module, rendering and display module and storage module, The parsing and extraction module saves the Visio file as an SVG file, parses the SVG process file, and extracts the file content: Extract global styles and global def elements, Extract the text content, style and position of each node in the flowchart; The rendering and display module uses the X6 framework to render the flowchart, and parses the extracted content, style and position of each node into the node format required by X6 according to the superior-subordinate relationship; Convert global styles and global def elements into HTML format and add them to the page rendered by the X6 framework. Bind the node to X6 click events and node tools to interact with the page, select nodes to display or add node-related data. The storage module stores the process files and the file list corresponding to each node.
6. The device for displaying a Visio flowchart at the front end according to claim 5 is characterized in that The parsing and extraction module extracts the content and position of each node in the flowchart, including: filling in the style elements in the svg format process file that are not wrapped by the tspan element to ensure that the sequence of the text content is consistent with the original flowchart.
7. The device for displaying a Visio flowchart at the front end according to claim 5 is characterized in that The rendering and display module binds the node to the X6 click event and the node tool, including: Unified click event for interacting with the page, Unified node tools to display the number of node-related files.
8. The device for displaying a Visio flowchart at the front end according to claim 5 is characterized in that It also includes a query module. When the query module queries the flowchart, it first reads the process file and the file list corresponding to the node, queries the process details, and the rendering display module will gradually display the flowchart and the number of node-related files.
