CN115269082A - Visual report generation method, device, equipment and medium - Google Patents

Visual report generation method, device, equipment and medium Download PDF

Info

Publication number
CN115269082A
CN115269082A CN202210886303.2A CN202210886303A CN115269082A CN 115269082 A CN115269082 A CN 115269082A CN 202210886303 A CN202210886303 A CN 202210886303A CN 115269082 A CN115269082 A CN 115269082A
Authority
CN
China
Prior art keywords
report
coordinate
data
cell
sample data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210886303.2A
Other languages
Chinese (zh)
Inventor
陈俊权
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huameng Technology Consulting Shenzhen Co ltd
Original Assignee
Huameng Technology Consulting Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huameng Technology Consulting Shenzhen Co ltd filed Critical Huameng Technology Consulting Shenzhen Co ltd
Priority to CN202210886303.2A priority Critical patent/CN115269082A/en
Publication of CN115269082A publication Critical patent/CN115269082A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Image Generation (AREA)

Abstract

The present disclosure provides a visual report generation method, apparatus, device and medium, wherein the method comprises: configuring the report in a visual interface; converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data, and storing the mapping between the coordinate value and the coordinate data into a mapping relation library; and responding to a call instruction of report form sample data, acquiring coordinate data of the report form sample data from the mapping relation library, and rendering the coordinate data to generate a report corresponding to the report form sample data. The method is different from the method of compiling and loading the report on demand in the traditional method, and is not based on the development of the cells of the report, so that a development scheme from low codes to no codes is realized.

Description

Visual report generation method, device, equipment and medium
Technical Field
The present disclosure relates to the field of report configuration technologies, and in particular, to a visual report generation method, apparatus, device, and medium.
Background
The report forms are the last ring of data processing and display in all software systems, most of the generation modes of the report forms are written by adopting the compiling languages of 'three swordsmen', such as HTML, CSS, javaScript and the like, and when the front end develops, the compiling languages are required to be adopted for writing every new report form.
At different times, each type of report can be adaptively changed according to policies, if each change of the report needs to be rewritten by using a specific computer language, a large amount of labels and codes can be accumulated inefficiently, the codes are bloated, and the repeated code development and writing work can also cause great difficulty in later maintenance of the system.
At present, the research directions of the report forms developed by the front end in the industry are many, but the development is basically carried out from basic table elements without codes or with low codes, and even the same report forms have different table patterns on the premise that the current tax policy changes frequently and the policies in different regions affect each other, so the development based on the basic table elements is not suitable.
The foregoing is merely provided to aid in understanding the technical aspects of the present disclosure and is not intended to be an admission that such is prior art.
Disclosure of Invention
In view of this, an object of the present disclosure is to provide a visual report generation method, apparatus, device and medium, so as to solve the problem of code accumulation caused by a large change of the current report.
Based on the above purpose, the present disclosure provides a visual report generation method, where the method includes:
configuring a report in a visual interface, comprising: defining a coordinate system in a visual interface, and acquiring a coordinate value of each cell in the report based on the coordinate system;
converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data, and storing the mapping between the coordinate value and the coordinate data into a mapping relation library;
and responding to a call instruction of report form sample data, acquiring coordinate data of the report form sample data from the mapping relation library, and rendering the coordinate data to generate a report corresponding to the report form sample data.
In a possible implementation manner of the present disclosure based on another object, the obtaining a coordinate value of each cell in the report based on the coordinate system further includes:
setting a cell label, and adding the cell label to the coordinate numerical value of the cell;
converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data, and further comprising:
converting the coordinate value of each cell and the cell label by a preset rule to obtain structured coordinate data;
the generating of the report corresponding to the report sample data after rendering the coordinate data includes:
and sequencing all the cells of the report according to the cell labels to generate a report corresponding to the report sample data.
In another objective of a feasible implementation manner of the present disclosure, the converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data includes:
calculating to obtain boundary coordinates, width values and height values of each cell in the report through a coordinate system of the visual interface;
constructing the boundary coordinate, the width numerical value and the height numerical value of each cell in the report as structured data;
converting the structured data of each cell in the report to form structured coordinate data, including:
traversing the structured data of each cell in the report, and performing bubble sorting by using a dual condition of taking Y in the coordinate system as a main condition and X as a secondary condition to sort out ordered data;
and traversing the ordered data, and establishing map type ordered data by taking Y as a key.
In another embodiment of the present disclosure, in response to a call instruction of report form data, the obtaining coordinate data of the report form data from the mapping relation library, and rendering the coordinate data to generate a report corresponding to the report form data includes:
when a call instruction of report form sample data is received, acquiring corresponding coordinate data from the mapping relation library;
reading the coordinate data to obtain column data, row data and width and height data of each cell of the report form sample data;
and performing reverse compilation by combining the obtained column data and row data of the report form sample data and the width and height data of each cell, establishing a DOM tree by taking TD as a basic element, and generating a report corresponding to the report form sample data after rendering.
In a possible embodiment of the present disclosure, before configuring the report in the visualization interface, the method further includes:
setting an adjusting instruction, wherein the adjusting instruction is used for:
and checking the coordinate values of the cells during configuration, and triggering the adjusting instruction when the coordinate values are overlapped so as to adjust the distance between two or more overlapped cells.
In another possible embodiment of the present disclosure, the checking the coordinate values of the cells in the configuration includes:
acquiring and judging the coordinate value of each cell;
when the boundary coordinate in one cell coordinate value is in the boundary coordinate range of another cell, judging that the coordinate values are overlapped;
and when the boundary coordinate in one cell coordinate value is not in the boundary coordinate range of the other cell, judging that the coordinate values are not overlapped.
In another embodiment, the present disclosure further includes: and saving the coordinate data in the mapping relation in a MAP structure form.
In a second aspect, the present disclosure further provides a visualized report generating apparatus, where the apparatus includes:
the configuration module is used for configuring the report in the visual interface and comprises the following steps: defining a coordinate system in a visual interface, and acquiring a coordinate value of each cell in the report based on the coordinate system;
the conversion module is used for converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data, and storing the mapping between the coordinate value and the coordinate data into a mapping relation library;
and the generating module is used for responding to a call instruction of the report form sample data, acquiring the coordinate data of the report form sample data from the mapping relation library, rendering the coordinate data and then generating a report corresponding to the report form sample data.
In a third aspect, the present disclosure further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the visualized report generating method when executing the program.
In a fourth aspect, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the visualized report generation method described above.
As can be seen from the foregoing, the visual report generation method, apparatus, device, and medium provided by the present disclosure are different from a conventional method in which a report is compiled and loaded as needed, and are not developed for basic table elements of a report, but developed based on a table cell of a report, so that a development scheme with low codes or no codes is implemented, accumulation of a large number of tags or style codes in the conventional method is not generated, a project system is simple and convenient to maintain, table development is very efficient, and even inexperienced workers can generate different types of reports through the visual interface of the present disclosure.
Drawings
In order to clearly illustrate the technical solutions of the present disclosure or related technologies, the drawings used in the embodiments or related technologies description will be briefly introduced below, and obviously, the drawings in the following description are only embodiments of the present disclosure, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a basic flowchart of a visual report generation method according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a cell in a visualization interface coordinate system according to an embodiment of the disclosure;
FIG. 3 is a schematic view of a cell label in accordance with an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of the configuration and generation of a transformation according to an embodiment of the present disclosure;
FIG. 5 is a DOM tree diagram of an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a visual report generation apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic device diagram for implementing a visualized report generating method according to an embodiment of the present disclosure.
Detailed Description
For the purpose of promoting a better understanding of the objects, aspects and advantages of the present disclosure, reference is made to the following detailed description taken in conjunction with the accompanying drawings.
It is to be noted that technical terms or scientific terms used in the embodiments of the present disclosure should have a general meaning as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in the embodiments of the disclosure is not intended to indicate any order, quantity, or importance, but rather to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item preceding the word comprises the element or item listed after the word and its equivalent, but does not exclude other elements or items.
The present disclosure relates to a visual report generation method, device, equipment and medium, which are mainly applied to a scene of front-end report development, and the basic idea is as follows: the mapping relation of the cells is formed in the visual interface through the structural processing of the coordinate data, the coordinate data are rendered according to the mapping relation to generate a target report for development, and other personnel can search and use the mapping relation from the database of the visual interface so as to generate the target report through the coordinate data in the mapping relation quickly.
The embodiment is applicable to a case where a visual interface is provided for report generation, where the method may be executed by a control device of the visual interface, where the control device may be implemented by software and/or hardware, and may be generally integrated in various intelligent terminals, or controlled by a central control module in the terminal, as shown in fig. 1, for a basic flowchart of the visual report generation method disclosed in the present disclosure, the method described in conjunction with fig. 1 specifically includes the following steps:
in step 110, configuring a report in a visualization interface, including: defining a coordinate system in a visual interface, and acquiring a coordinate value of each cell in the report based on the coordinate system;
in a possible exemplary embodiment of the present disclosure, the visualization interface may be a visualization interface built based on VUE, and the visualization interface may be rasterized, or initial coordinate data of a cell is provided in a manner of building a coordinate system in the present disclosure, and a coordinate system capable of processing the coordinate data is built on the visualization interface in a manner of defining the coordinate system, and as shown in fig. 2, a schematic diagram of the coordinate system built on the visualization interface in the present disclosure is shown, in the diagram, a coordinate system may be defined with an upper left corner as an origin (0,0), a horizontal dotted line as an X-axis, and a vertical dotted line as a Y-axis, so as to obtain a coordinate value of the cell when the cell is dragged into the visualization interface.
In some possible embodiments, the visual interface may also have a coordinate system, and at this time, the coordinate values corresponding to the cells may be obtained by using a uniform standard, or the coordinates of the rows are defined by using a standard-height cell and the coordinates of the columns are defined by using a standard-width cell by using an upper-left vertex origin of the report, and in the exemplary embodiment of the present disclosure, the coordinates are illustrated and converted by using a standard height or a standard width as an example.
As shown in connection with fig. 2, 7 cells are dragged into the visualized interface.
Obtaining the coordinate value of each cell in the report based on the defined coordinate system, for example, the coordinate values of the above 7 cells can be expressed as
{x:0,y:0,w:2,h:1},
{x:2,y:0,w:1,h:2},
{x:0,y:1,w:1,h:1},
{x:1,y:1,w:1,h:1},
{x:0,y:2,w:1,h:1},
{x:1,y:2,w:1,h:1},
{x:2,y:2,w:1,h:1}
Where x and y are the base coordinates of each cell, respectively, (x: 0, y.
In a mode of the exemplary embodiment of the present disclosure, the foregoing step 110 or before the step 110 further includes a step of setting a cell label, and adding the cell label to the coordinate value of the cell; specifically, the coordinate values further include cell labels, and as shown in fig. 3, the cell labels are cells numbered 1 to 7, and i represents a cell label, and at this time, the coordinate values of the cells may be represented as:
{x:0,y:0,w:2,h:1,i:1},
{x:2,y:0,w:1,h:2,i:2},
{x:0,y:1,w:1,h:1,i:3},
{x:1,y:1,w:1,h:1,i:4},
{x:0,y:2,w:1,h:1,i:5},
{x:1,y:2,w:1,h:1,i:6},
{x:2,y:2,w:1,h:1,i:7}
where x and y are the base coordinates of each cell, respectively, (x: 0, y.
In a possible embodiment of the present disclosure, the coordinate value of the cell may also be directly implemented by using a coordinate control carried by the cell.
In step 120, converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data, and storing the mapping between the coordinate value and the coordinate data into a mapping relation library;
for example, in conjunction with a set of coordinate values 3*3 of the labeled cell in fig. 4, after converting according to a preset rule and obtaining the structured coordinate data, the obtained coordinate data is:
Figure BDA0003765931880000071
specifically, this process may be implemented by:
calculating to obtain boundary coordinates, width values and height values of each cell in the report through a coordinate system of the visual interface;
the boundary coordinates can be coordinates of four vertexes of each cell, based on coordinate values obtained in a coordinate system, and the width values and the height values can be obtained by simply calculating the coordinates of the four vertexes.
Constructing the boundary coordinate, the width numerical value and the height numerical value of each cell in the report as structured data;
the structured data constructed in this step is unordered, for example, in connection with the structured data of the unordered state of cell 1 and cell 2 in fig. 3, are represented by { x:0, y 0, w.
And converting the structured data of each cell in the report to form structured coordinate data.
The step is a process of converting unordered data into ordered data, and the structured coordinate data is ordered and identifiable and can be directly processed through a certain compiling language.
In a possible embodiment, the above-mentioned conversion process is a process of performing conversion according to the preset rule, and this process may be represented as the following steps:
after the cell labels are added, the unordered structured data formed according to the coordinate values for the data of the cells of the report are as follows:
Figure BDA0003765931880000081
orderly structured coordinate data formed by double-condition bubble sorting with Y as a main condition and X as a secondary condition:
Figure BDA0003765931880000082
and (3) establishing map type data by taking Y as a key, converting the coordinate data into:
Figure BDA0003765931880000083
Figure BDA0003765931880000091
the coordinate data is map type data.
Next, the coordinate data is compiled into a DOM tree according to the map type data, and the generated DOM tree is constructed as shown in fig. 5, where 0,1,2 represents a row of the report, and td represents a column in the corresponding row.
The finally generated report page after rendering is expressed in the form that:
Figure BDA0003765931880000092
the explanation is made in correspondence with the above data, and can be expressed as:
Figure 1
in step 130, in response to a call instruction of the report form sample data, coordinate data of the report form sample data is obtained from the mapping relation library, and a report corresponding to the report form sample data is generated after rendering processing is performed on the coordinate data.
When a certain report needs to be used, because the corresponding mapping is stored in the mapping relation library, the mapping relation of the report is called from the mapping relation library based on the instruction of calling the sample data of the report, and the required report can be directly generated based on the coordinate data corresponding to the mapping relation and according to certain rendering processing.
In a possible implementation manner, when a certain report form data that needs to be used is not stored in the mapping relationship library, a corresponding mapping relationship may be constructed based on the above steps 110 to 120, so as to immediately establish a mapping relationship and store the mapping relationship in the mapping relationship library.
The mapping relation library can be stored in the local or cloud end, so that other users can conveniently obtain the corresponding mapping relation library which is updated immediately from the cloud end, and the required report can be generated quickly.
The visual report generation method can quickly cope with the change of various reports such as tax reports, and only needs visual modification configuration and immediate updating of the mapping relation library when in use, thereby greatly reducing the low-efficiency accumulation of codes during the development of the front-end template, enhancing the universality of report styles, having good expansibility, greatly increasing the convenience due to visual operation, completing the modification work of report forms even if inexperienced workers are simply trained, reducing the risk of service system change on the other layer, and reducing the cost of quality control.
In a feasible implementation manner of the exemplary embodiment of the present disclosure, the acquiring, in response to a call instruction of report form data, coordinate data of the report form data from the mapping relation library, and generating a report corresponding to the report form data after rendering the coordinate data includes a process of performing inverse compilation on the coordinate data to enable rendering processing of the coordinate data, where the process includes the following steps:
in step 510, when a call instruction of reporting the sample data is received, acquiring corresponding coordinate data from the mapping relation library;
for example, when the 3*3 report needs to be called, the coordinate data obtained from the mapping relation library is:
Figure BDA0003765931880000101
in an implementation of the exemplary embodiment of the present disclosure, the coordinate data is data of a MAP structure.
In step 520, reading the coordinate data to obtain column data, row data and width and height data of each cell of the report form sample data;
in step 530, the obtained column data, row data, and width and height data of each cell of the report form sample data are combined, and a reverse compilation is performed in a compilation language, so as to generate a report corresponding to the report form sample data after a rendering process.
And reading the column data, the row data and the width and height data of each cell in the coordinate data, performing reverse compilation by adopting a corresponding compilation language, and generating a corresponding report after rendering.
The steps of the present disclosure describe a process how to obtain a corresponding report after rendering through the mapping relationship stored in the mapping relationship library.
In one implementation of the exemplary embodiment of the present disclosure, before configuring the report, the method further includes:
setting an adjusting instruction, wherein the adjusting instruction is used for:
and checking the coordinate values of the cells during configuration, and triggering the adjusting instruction when the coordinate values are overlapped so as to adjust the distance between two or more overlapped cells.
When the cells are configured in the visual interface, the more the cells are, the cell collision may occur, and in order to prevent the cell collision and further prevent the error of the coordinate data of the cells from causing the error of the report generation, the collision of two or more cells is prevented through the position adaptation rule in the configuration stage.
Specifically, the collision avoidance may be performed by setting a preset threshold, for example, whether collision occurs between adjacent cells is determined by determining whether a distance between the adjacent cells satisfies the preset threshold, and as in the implementation manner of the exemplary embodiment of the present disclosure, whether the adjustment instruction is triggered by determining whether a coordinate value is overlapped, so as to adjust a distance between two or more cells that are overlapped.
Acquiring and judging the coordinate values of the cells:
when the boundary coordinate in one cell coordinate value is in the boundary coordinate range of another cell, judging that the coordinate values are overlapped;
and when the boundary coordinate in one cell coordinate value is not in the boundary coordinate range of the other cell, judging that the coordinate values are not overlapped.
Taking the coordinate system as an example, when the boundary coordinates in the coordinate data are that two vertexes of a lower boundary of one cell 1 are (0,0) and (2,0), one side boundary coordinate of the other cell is (1,0), and the other side boundary coordinate is (3,0), it may be determined that one side boundary of the other cell overlaps; when the boundary coordinate of one side of another cell is (4,0) and the boundary coordinate of the other side of the another cell is (5,0), it can be determined that the two cells are not overlapped.
By the mode of setting the adjusting instruction, under the condition that the report is complex, the configuration errors of the cells can be automatically reduced in the configuration process, and the error probability of the mapping relation library can be reduced in one-time warehousing.
It should be noted that the visualized report generation method according to the embodiment of the present disclosure may be executed by a single device, for example, a computer or a server. The method of the embodiment can also be applied to a distributed scene and completed by the mutual cooperation of a plurality of devices. In the case of such a distributed scenario, one device of the multiple devices may only execute one or more steps of the method according to the embodiment of the present disclosure, and the multiple devices interact with each other to complete the visual report generation method.
It should be noted that the above describes some embodiments of the disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments described above and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same disclosure concept, corresponding to any embodiment method, the disclosure also provides a visual report generation device.
Referring to fig. 6, the visualized report generating apparatus includes:
the configuration module 510 is configured to configure a report in a visualization interface, and includes: defining a coordinate system in a visual interface, and acquiring a coordinate value of each cell in the report based on the coordinate system;
the conversion module 520 is configured to convert the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data, and store a mapping relationship between the coordinate value and the coordinate data;
the generating module 530 is configured to, in response to a call instruction of report form data, obtain coordinate data of the report form data from the mapping relation library, perform rendering processing on the coordinate data, and generate a report corresponding to the report form data.
For convenience of description, the above devices are described as being divided into various modules by functions, and are described separately. Of course, the functionality of the various modules may be implemented in the same one or more software and/or hardware implementations of the present disclosure.
The visualized report generating device of the foregoing embodiment is used for implementing the corresponding visualized report generating method in any one of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same disclosure concept, corresponding to the method of any embodiment, the disclosure further provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the visualized report generating method according to any embodiment when executing the program.
Fig. 7 is a schematic diagram illustrating a more specific hardware structure of an electronic device according to this embodiment, where the electronic device may include: a processor 1010, a memory 1020, an input/output interface 1030, a communication interface 1040, and a bus 1050. Wherein the processor 1010, memory 1020, input/output interface 1030, and communication interface 1040 are communicatively coupled to each other within the device via bus 1050.
The processor 1010 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and is configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The Memory 1020 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, or the like. The memory 1020 may store an operating system and other application programs, and when the technical solution provided by the embodiments of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 1020 and called to be executed by the processor 1010.
The input/output interface 1030 is used for connecting an input/output module to input and output information. The i/o module may be configured as a component within the device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various sensors, etc., and the output devices may include a display, speaker, vibrator, indicator light, etc.
The communication interface 1040 is used for connecting a communication module (not shown in the drawings) to implement communication interaction between the present device and other devices. The communication module can realize communication in a wired mode (such as USB, network cable and the like) and also can realize communication in a wireless mode (such as mobile network, WIFI, bluetooth and the like).
Bus 1050 includes a path that transfers information between various components of the device, such as processor 1010, memory 1020, input/output interface 1030, and communication interface 1040.
It should be noted that although the above-mentioned device only shows the processor 1010, the memory 1020, the input/output interface 1030, the communication interface 1040 and the bus 1050, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
The electronic device of the foregoing embodiment is used to implement the corresponding visualized report generation method in any one of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Based on the same disclosure concept, corresponding to any of the above embodiment methods, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the visualized report generating method according to any of the above embodiments.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, for storing information may be implemented in any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The computer instructions stored in the storage medium of the foregoing embodiment are used to enable the computer to execute the visual report generation method according to any embodiment, and have the beneficial effects of the corresponding method embodiment, which are not described herein again.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the idea of the present disclosure, also technical features in the above embodiments or in different embodiments may be combined, steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures for simplicity of illustration and discussion, and so as not to obscure the embodiments of the disclosure. Furthermore, devices may be shown in block diagram form in order to avoid obscuring embodiments of the present disclosure, and this also takes into account the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the embodiments of the present disclosure are to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the disclosure, it should be apparent to one skilled in the art that the embodiments of the disclosure can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations thereof will be apparent to those skilled in the art in light of the foregoing description. For example, other memory architectures, such as Dynamic RAM (DRAM), may use the discussed embodiments.
The disclosed embodiments are intended to embrace all such alternatives, modifications and variances which fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalents, improvements, and the like that may be made within the spirit and principles of the embodiments of the disclosure are intended to be included within the scope of the disclosure.

Claims (10)

1. A visual report generation method is characterized by comprising the following steps:
configuring a report in a visual interface, comprising: defining a coordinate system in a visual interface, and acquiring a coordinate value of each cell in the report based on the coordinate system;
converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data, and storing the mapping between the coordinate value and the coordinate data into a mapping relation library;
and responding to a call instruction of report form sample data, acquiring coordinate data of the report form sample data from the mapping relation library, and rendering the coordinate data to generate a report corresponding to the report form sample data.
2. The visual report generation method according to claim 1, wherein the obtaining the coordinate value of each cell in the report based on the coordinate system further comprises:
setting a cell label, and adding the cell label to the coordinate numerical value of the cell;
converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data, and further comprising:
converting the coordinate value of each cell and the cell label by a preset rule to obtain structured coordinate data;
the generating a report corresponding to the report sample data after rendering the coordinate data includes:
and sequencing all the cells of the report according to the cell labels to generate a report corresponding to the report sample data.
3. A visual report generation method according to claim 1 or 2, wherein said converting the coordinate value of each cell in the report according to a preset rule to obtain a structured coordinate data comprises:
calculating to obtain boundary coordinates, width values and height values of each cell in the report through a coordinate system of the visual interface;
constructing the boundary coordinate, the width numerical value and the height numerical value of each cell in the report as structured data;
converting the structured data of each cell in the report to form structured coordinate data, including:
traversing the structured data of each cell in the report, and performing bubble sorting by using a dual condition of taking Y in the coordinate system as a main condition and X as a secondary condition to sort out ordered data;
and traversing the ordered data, and establishing map type ordered data by taking Y as a key.
4. The visual report generation method according to claim 1, wherein the step of obtaining the coordinate data of the report sample data from the mapping relation library in response to the call instruction of the report sample data, and generating the report corresponding to the report sample data after rendering the coordinate data comprises:
when a call instruction for reporting the sample data is received, acquiring corresponding coordinate data from the mapping relation library;
reading the coordinate data to obtain column data, row data and width and height data of each cell of the report form sample data;
and performing reverse compilation by combining the obtained column data and row data of the report form sample data and the width and height data of each cell, establishing a DOM tree by taking TD as a basic element, and generating a report corresponding to the report form sample data after rendering.
5. The visualized report generating method according to claim 1, wherein before configuring the report in the visualization interface, the method further comprises:
setting an adjustment instruction, wherein the adjustment instruction is used for:
and checking the coordinate values of the cells during configuration, and triggering the adjusting instruction when the coordinate values are overlapped so as to adjust the distance between two or more overlapped cells.
6. The visual report generation method according to claim 5, wherein the checking the coordinate values of the cells in the configuration comprises:
acquiring and judging the coordinate value of each cell;
when the boundary coordinate in one cell coordinate value is in the boundary coordinate range of another cell, judging that the coordinate values are overlapped;
and when the boundary coordinate in one cell coordinate value is not in the boundary coordinate range of the other cell, judging that the coordinate values are not overlapped.
7. The visual report generation method according to any one of claims 1 to 6, the method further comprising: and saving the coordinate data in the mapping relation in a MAP structure form.
8. A visual report generation apparatus, the apparatus comprising:
the configuration module is used for configuring the report in the visual interface and comprises the following steps: defining a coordinate system in a visual interface, and acquiring a coordinate value of each cell in the report based on the coordinate system;
the conversion module is used for converting the coordinate value of each cell in the report according to a preset rule to obtain structured coordinate data and storing the mapping between the coordinate value and the coordinate data into a mapping relation library;
and the generating module is used for responding to a call instruction of report form sample data, acquiring the coordinate data of the report form sample data from the mapping relation library, rendering the coordinate data and then generating a report corresponding to the report form sample data.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the visualized report generating method according to any one of claims 1 to 7 when executing the program.
10. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the visualized report generating method of any of claims 1 to 7.
CN202210886303.2A 2022-07-26 2022-07-26 Visual report generation method, device, equipment and medium Pending CN115269082A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210886303.2A CN115269082A (en) 2022-07-26 2022-07-26 Visual report generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210886303.2A CN115269082A (en) 2022-07-26 2022-07-26 Visual report generation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN115269082A true CN115269082A (en) 2022-11-01

Family

ID=83768753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210886303.2A Pending CN115269082A (en) 2022-07-26 2022-07-26 Visual report generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN115269082A (en)

Similar Documents

Publication Publication Date Title
TWI700638B (en) Display method and device of mixed view
CN108664461B (en) Automatic filling method and device for webpage form
CN107943466B (en) Database access statement generation method, device and equipment
CN109324796B (en) Interface layout method and device
US20140298161A1 (en) Method, apparatus, and terminal device for displaying multiple input boxes in a web page
CN112214210A (en) Logistics business rule engine and configuration method, device, equipment and storage medium thereof
CN113282488B (en) Terminal test method and device, storage medium and terminal
CN112667330A (en) Page display method and computer equipment
CN112068911B (en) Electronic form generation method, device, system, equipment and medium
US11073818B2 (en) Development support apparatus, program development support method, and program development support program
US20200225759A1 (en) Gesture control method and apparatus for display screen
CN111459802A (en) Method, device and equipment for testing WebView page of Android application program based on GUI
CN111913777A (en) Information processing method, information processing device, electronic equipment and storage medium
CN110019538B (en) Data table switching method and device
CN115269082A (en) Visual report generation method, device, equipment and medium
US8291313B1 (en) Generation of a container hierarchy from a document design
CN115981617A (en) Code sentence recommendation method and device, electronic equipment and storage medium
CN113449485B (en) Lead generation method, device, equipment and storage medium
CN114443042A (en) Service arrangement execution method based on rule engine and related equipment
CN112395268A (en) Visual configuration method and device for complex condition rules
CN112395827A (en) Drawing method of tree structure diagram and mobile terminal
CN112215523A (en) Method and device for analyzing capability dependency relationship in complex system architecture
CN112068828A (en) Title control generation method, device, system, equipment and medium
CN114594945A (en) Method, device, system, equipment and medium for generating advanced popup selection frame
CN111475999B (en) Error prompt generation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination