Method for displaying process flow route
Technical Field
The invention relates to a method for displaying a mold manufacturing process, in particular to a method for displaying a process flow route.
Background
Traditional process display is generally realized by tables, namely, a complicated nested mode of entering a product from an item, entering a mould from the product, entering a workpiece from the mould, entering a working procedure from the workpiece and entering a working procedure from the working procedure, so that the process is expanded layer by layer. The table display method comprises the following disadvantages:
1) each time more layers need to be checked, multiple clicks are needed
2) Only information under one level node can be inquired each time;
3) the hierarchical relationship of the current die, workpiece and process cannot be seen visually.
In order to facilitate a traditional mode, a tree structure is introduced to make up for multi-layer expansion, but the tree structure still inevitably needs to be nested layer by layer, and the whole structure cannot be visually displayed. The tree structure display method comprises the following disadvantages:
1) the configuration procedure has troublesome relativity, needs query and click, and is not intuitive;
2) the process correlation is checked, a card needs to be inserted under one workpiece, and the whole die cannot be checked.
3) The front working procedure and the rear working procedure can not be seen at one time, and only the front working procedure can be seen.
The two procedures and the process correlation display have obvious defects and are not intuitive enough, and the data display is rigid and has no layering sense.
Because of the limitation of the table and tree structures, a lot of troubles and tedious operations are often brought to enterprises and users, the visualization concept of process data and process processing flow is carried out aiming at the pain point, and then a set of complete solutions is realized aiming at the concept.
Disclosure of Invention
Aiming at the technical problems in the prior art, the invention provides the display method of the process flow route which is intuitive, flexible in deletion, strong in layering sense and capable of displaying the whole structure of the processing process.
The technical scheme for solving the technical problems is as follows: a display method of a process flow route comprises the following steps:
step 1, assembling according to the structure and the main external key relation of an item table, a product table, a die table, a workpiece table, a process table and a step table, and nesting in a set nesting mode;
and 2, displaying the process flow according to a process structure diagram and a processing flow diagram respectively.
On the basis of the technical scheme, the invention can be further improved as follows.
Further, the step 1 comprises:
respectively extracting information of a main key and an external key of each table, wherein the main key is a field which corresponds to each entity in the current table and is used for uniquely identifying the entity, and the external key is a main key in a previous table of the current table;
for each table, according to the foreign key information of the table, packaging the entities with the same foreign key into a set list;
packaging the set list into an entity corresponding to the foreign key of the set list in the upper-level table according to the foreign key information of the set list;
and sequentially executing the steps until all the tables are nested in a set nesting mode.
Further, the step 1 further comprises:
additional packaging is performed for the work order table:
the entities in the work order table are all processing procedures of a certain workpiece, and all the entities in the work order table are sorted according to the processing sequence;
for a certain entity in the work order table, defining all processing procedures before the entity as pre-procedures and packaging into a pre-procedure set list1, and defining all processing procedures after the entity as post-procedures and packaging into a post-procedure set list 2;
the pre-process set list1 and post-process set list2 are encapsulated into the entity.
Further, the method for displaying the process structure diagram in the step 2 comprises:
selecting a corresponding entity according to a user request for reverse disassembly;
drawing the entity, the collection contained by the entity and the relationship between the entity and the collection on a canvas by using a mind map mode; wherein the entity's primary key ID serves as an intermediate node of the mind map and the entity's included collection serves as a diffusion node of the mind map.
Further, the method for displaying the processing flow chart in the step 2 includes:
selecting a corresponding workpiece entity from the workpiece table according to a user request for reverse disassembly;
dividing a horizontal coordinate X axis from the upper middle position to the lower middle position of the canvas, wherein the origin of the X axis is information of the workpiece, the right side direction of the origin is a set of all processes under the workpiece, the processes are sequenced according to a sequence, the processes are connected from small to large with a shape of →, and the processes on the X axis render different colors according to the processing state;
in the canvas, a 90-degree vertical line of an origin of an X axis is used as a Y axis, an area of the Y axis above the X axis is used as a front process display area of a process, and an area of the Y axis below the X axis is used as a rear process display area of the process.
The invention has the beneficial effects that:
A. can clearly display the work-procedure hierarchy and the processing state of the whole set of die and can be freely expanded/contracted
B. The workpiece, the working procedure and the working step can be added and deleted under the condition of ensuring clear structure display, and the process can be automatically synchronized to the corresponding process, so that the process is visualized and fully operated.
C. The processing flow, the processing sequence and the processing state of the current workpiece and the basic information of the working procedure can be displayed according to the workpiece;
D. for any one of the processes in the process flow chart, the front-end process (including the workpiece information of the front-end process), the back-end process (including the workpiece information of the back-end process), the basic information and the processing state of the front-end process and the back-end process of the process can be shown through the flow chart;
E. the whole process realizes data visualization operation, is not limited to a single table, and can realize all visualization addition, deletion, modification and check and visualization of a processing route.
Drawings
Fig. 1 is a flowchart of a method for displaying a process flow route according to an embodiment of the present invention.
Detailed Description
The principles and features of this invention are described below in conjunction with examples, which are set forth to illustrate, but are not to be construed to limit the scope of the invention.
Fig. 1 is a flowchart of a method for displaying a process flow path according to an embodiment of the present invention, and as shown in fig. 1, the method for displaying a process flow path includes the following steps:
step 1, assembling according to the structure and the main external key relation of an item table, a product table, a die table, a workpiece table, a process table and a step table, and nesting in a set nesting mode;
specifically, the step 1 includes:
respectively extracting information of a main key and an external key of each table, wherein the main key is a field which corresponds to each entity in the current table and is used for uniquely identifying the entity, and the external key is a main key in a previous table of the current table;
for each table, according to the foreign key information of the table, packaging the entities with the same foreign key into a set list;
packaging the set list into an entity corresponding to the foreign key of the set list in the upper-level table according to the foreign key information of the set list;
and sequentially executing the steps until all the tables are nested in a set nesting mode.
Additional packaging is performed for the work order table:
the entities in the work order table are all processing procedures of a certain workpiece, and all the entities in the work order table are sorted according to the processing sequence;
for a certain entity in the work order table, defining all processing procedures before the entity as pre-procedures and packaging into a pre-procedure set list1, and defining all processing procedures after the entity as post-procedures and packaging into a post-procedure set list 2;
the pre-process set list1 and post-process set list2 are encapsulated into the entity.
And 2, displaying the process flow according to a process structure diagram and a processing flow diagram respectively.
The invention has two ways to show in the front end, the data source comes from the encapsulated data, the effect is divided into a process structure chart and a processing flow chart.
Wherein "front end" means: the system loads a renderer of the page, and the data can be assembled and beautified into the webpage seen by the user through the renderer.
The invention adopts jQuery and BootstrapCS components as main components to carry out visual display of data:
reversely disassembling the data finally packaged in the response of the background, traversing a data object in a Json format, and binding Mind (a block node displayed on a page) by using the ID in the entity domain as a unique mark correspondingly;
"response" is an object carrying assembly data returned by the browser in response to a user request after the user accesses the system.
Data objects in the Json format refer to: the front end can identify the type object.
The data is patterned into a mind map using CSS 3. The number of the die is used as the middle point of the mind map, the workpiece below the die is used as the diffusion node of the mind map, and the process below the workpiece is used as the diffusion node of the workpiece.
For each Id of Mind, a line is drawn with canvas according to the relationship in the entity Domain and pointed. And simultaneously binding a right click event to each Mind, and displaying corresponding operation after right click.
The display method of the processing flow chart comprises the following steps:
the method adopts a graph rendering mode of Echarts to render the response data.
The MAP of Echarts is used as a container, and the specific DIV of the FixedPage is used as a container for pre-rendering.
The MAP refers to a container of pages, which is used for bearing a processing flow chart.
Dividing the up-down central position of the MAP into an X axis of abscissa: the X-axis origin is information of a workpiece, the right side direction of the X-axis is a set of all processes below the workpiece, the processes are sorted according to the process numbers, the processes are connected in sizes from small to large with sizes →, and the processes on the X-axis take the processing state (red is not started, orange is paused, blue is in the process, green is finished) in the process Domain as the color.
And taking a 90-degree vertical line of the workpiece information origin of the X axis in the MAP as a Y axis, wherein the Y axis is positioned above the X axis and is used as a front task display area of the process, and the Y axis is positioned below the X axis and is used for displaying the rear task. The pre-job and post-job of the first unfinished process are displayed by default.
The upper part of the page is arranged by process names, and is related to the process of the X axis by using the ID of the process Domain as a medium in the background js, and the process name of clicking the upper part of the page is equal to the process of clicking the X axis.
The page self-adapting length and width are controlled by js to zoom the middle scroll axis of the page mouse, and after the preprocessing is finished, rendering is carried out according to the pre-rendering area.
The invention has the beneficial effects that:
A. can clearly display the work-procedure hierarchy and the processing state of the whole set of die and can be freely expanded/contracted
B. The workpiece, the working procedure and the working step can be added and deleted under the condition of ensuring clear structure display, and the process can be automatically synchronized to the corresponding process, so that the process is visualized and fully operated.
C. The processing flow, the processing sequence and the processing state of the current workpiece and the basic information of the working procedure can be displayed according to the workpiece;
D. for any one of the processes in the process flow chart, the front-end process (including the workpiece information of the front-end process), the back-end process (including the workpiece information of the back-end process), the basic information and the processing state of the front-end process and the back-end process of the process can be shown through the flow chart;
E. the whole process realizes data visualization operation, is not limited to a single table, and can realize all visualization addition, deletion, modification and check and visualization of a processing route.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.