CN116383545B - Webpage report template generation method, device, equipment and medium - Google Patents
Webpage report template generation method, device, equipment and medium Download PDFInfo
- Publication number
- CN116383545B CN116383545B CN202310652603.9A CN202310652603A CN116383545B CN 116383545 B CN116383545 B CN 116383545B CN 202310652603 A CN202310652603 A CN 202310652603A CN 116383545 B CN116383545 B CN 116383545B
- Authority
- CN
- China
- Prior art keywords
- field
- icon
- cell
- data
- target
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000009877 rendering Methods 0.000 claims abstract description 31
- 238000004364 calculation method Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 13
- 230000004044 response Effects 0.000 claims description 11
- 230000015654 memory Effects 0.000 claims description 10
- 230000006870 function Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 239000003086 colorant Substances 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 238000010276 construction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/186—Templates
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- User Interface Of Digital Computer (AREA)
- Document Processing Apparatus (AREA)
Abstract
The application provides a method, a device, equipment and a medium for generating a webpage report template, wherein the method comprises the following steps: acquiring form style data and form field data of a target report template; rendering is carried out in a canvas area based on the table style data, and an initial table of a target report template is obtained; generating a field icon of each field based on each field in the table field data, and displaying the field icon in a field display area; for each field icon in the field display area, responding to the drag operation for the field icon, and controlling the field icon to move along with the drag operation; responding to the end of the drag operation aiming at each field icon in the field display area, and associating the field of the field icon with the target cell according to the position of the field icon controlled by the drag operation; and generating template data of the target report template according to the fields associated with each cell in the canvas area and the table style data of the target report template.
Description
Technical Field
The application relates to the field of report design, in particular to a method, a device, equipment and a medium for generating a webpage report template.
Background
With the popularity of internet technology, business users of various industries often present different types of data via hypertext markup language (Hyper Text Markup Language, HTML) reports in HTML pages. In the prior art, a web page report is usually generated by manually writing codes according to the needs of users, and different fields (such as a header, an editing function and the like) are required to be configured for different cells, however, in an actual application scene, different enterprises, different departments of the same enterprise, even different running devices may have differences in the forms of the required web page report, and the developer is usually required to provide the web page report conforming to the different forms, but because the different web page reports need to write different codes, the professional requirements of the developer are high, and the codes required to be written by the developer are many, so that the working efficiency is low.
Disclosure of Invention
Accordingly, the present application is directed to a method, apparatus, device, and medium for generating a web page report template, which are used for solving the problem of low efficiency of generating web page report in the prior art.
In a first aspect, an embodiment of the present application provides a method for generating a webpage report template, which is applied to a terminal device, where the terminal device includes a webpage interface, and the webpage interface includes a canvas area and a field display area, and includes:
acquiring form style data and form field data of a target report template;
rendering is carried out in a canvas area based on the table style data, and an initial table of a target report template is obtained; the initial table comprises a plurality of cells;
generating a field icon of each field based on each field in the table field data, and displaying the field icon in the field display area;
for each field icon in the field display area, responding to a drag operation for the field icon, and controlling the field icon to move along with the drag operation;
for each field icon in the field display area, responding to the end of the drag operation, determining a target cell to be associated with a field of the field icon according to the position of the field icon controlled by the drag operation, and associating the field of the field icon with the target cell;
and generating template data of the target report template according to the fields associated with each cell in the canvas area and the table style data of the target report template.
Optionally, for each field icon in the field display area, responding to a drag operation for the field icon, and controlling the field icon to move along with the drag operation, including:
and for each field icon in the field display area, responding to the drag operation, selecting the field icon, determining a recommendation associated cell in the canvas area according to the attribute information of the field icon, and highlighting the recommendation associated cell.
Optionally, generating template data of the target report template according to the field associated with each cell in the canvas area and the table style data of the target report template, including:
dividing each cell in the canvas area into different rendering levels according to attribute information of a field associated with each cell in the canvas area;
taking each cell in the canvas area as a minimum node, and constructing a layer rendering structure of the canvas area according to a rendering level to which each cell belongs;
and generating template data of the target report template according to the fields associated with each cell in the canvas area, the table style data of the target report template and the layer rendering structure of the canvas area.
Optionally, for each field icon in the field display area, responding to the end of the drag operation, and determining, according to the position of the field icon controlled by the drag operation, a target cell to which a field of the field icon needs to be associated, including:
for each field icon in the field display area, responding to the end of the drag operation, and determining a target cell to be associated with a field of the field icon according to the position of the field icon controlled by the drag operation and a calculation rule in the field corresponding attribute information of the field icon; the calculation rule involves an operation between at least two cell correspondence data.
Optionally, the method further comprises:
setting a used identifier for the field icon in the field display area in response to completion of association of the field icon with the target cell;
in response to a drag operation for a field icon provided with a used identifier, the field icon does not move with the drag operation.
Optionally, the method further comprises:
and responding to the cancellation of the association of the field icon and the target cell, and restoring the field icon provided with the used identifier to the original state in the field display area.
Optionally, the table field data includes a plurality of fields, each field having corresponding attribute information; the attribute information includes any one or more of the following information: the field labels, the calculation rules corresponding to the fields and the data display areas corresponding to the fields.
In a second aspect, an embodiment of the present application provides a device for generating a web page report template, which is applied to a terminal device, where the terminal device includes a graphical user interface, and the graphical user interface includes a canvas area and a field display area, and includes:
the acquisition module is used for acquiring the form style data and the form field data of the target webpage report;
the rendering module is used for rendering in the canvas area based on the table style data to obtain an initial table of the target webpage report; the initial table comprises a plurality of cells;
the generation module is used for generating a field icon of each field based on each field in the table field data and displaying the field icon in the field display area;
the drag module is used for responding to the drag operation for each field icon in the field display area and controlling the field icon to move along with the drag operation;
the association module is used for responding to the end of the drag operation aiming at each field icon in the field display area, determining a target cell which needs to be associated with the field of the field icon according to the position of the field icon controlled by the drag operation, and associating the field of the field icon with the target cell;
and the generating module is used for generating a webpage report template of the target webpage report according to the field associated with each cell in the canvas area.
In a third aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the steps of the method described above when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above method.
The method for generating the webpage report template comprises the steps of firstly, obtaining form style data and form field data of a target report template; rendering is carried out in a canvas area based on the table style data, and an initial table of a target report template is obtained; the initial table comprises a plurality of cells; generating a field icon of each field based on each field in the table field data, and displaying the field icon in the field display area; secondly, responding to the drag operation for each field icon in the field display area, and controlling the field icon to move along with the drag operation; for each field icon in the field display area, responding to the end of the drag operation, determining a target cell to be associated with a field of the field icon according to the position of the field icon controlled by the drag operation, and associating the field of the field icon with the target cell; and finally, generating template data of the target report template according to the fields associated with each cell in the canvas area and the table style data of the target report template.
In some embodiments, a blank table to be added with fields and fields to be added into the blank table are displayed in a visual mode, then association of the fields and cells of the table is realized through a dragging operation, data corresponding to a webpage report is finally formed, a developer is not required to associate the fields with the cells through manual editing codes in the process of editing codes, the condition that the report is problematic in display caused by errors of the developer is reduced, in addition, a target report template is generated in the mode, the developer is not required to edit all codes, the professional requirements on the developer are low, and the user experience is improved.
In order to make the above objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for generating a web page report template according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a first web page according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a second web page according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a third web page according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a device for generating a web page report template according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. The components of the embodiments of the present application generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the application, as presented in the figures, is not intended to limit the scope of the application, as claimed, but is merely representative of selected embodiments of the application. All other embodiments, which can be made by a person skilled in the art without making any inventive effort, are intended to be within the scope of the present application.
In the present stage, the mode of generating the webpage report is basically generated by a developer through a mode of editing codes, the developer is required to design the mode of the webpage report and also is required to associate each cell to the data related to the cell through a mode of editing codes, the development workload of the developer is very large, the data related to different enterprises, different departments of the same enterprise and the like can be different, and if the code development amount of the developer is very large, the generation efficiency of the webpage report is reduced.
The embodiment of the application provides a method for generating a webpage report template, which is shown in fig. 1 and is applied to terminal equipment, wherein the terminal equipment comprises a webpage interface, the webpage interface comprises a canvas area and a field display area, and the method comprises the following steps:
s101, table style data and table field data of a target webpage report are obtained;
s102, rendering is carried out in a canvas area based on the table style data, and an initial table of a target webpage report is obtained; the initial table comprises a plurality of cells;
s103, generating a field icon of each field based on each field in the table field data, and displaying the field icon in the field display area;
s104, responding to the drag operation for the field icons aiming at each field icon in the field display area, and controlling the field icons to move along with the drag operation;
s105, for each field icon in the field display area, responding to the end of the drag operation, determining a target cell to be associated with a field of the field icon according to the position of the field icon controlled by the drag operation, and associating the field of the field icon with the target cell;
s106, generating template data of the target report template according to the fields associated with each cell in the canvas area and the table style data of the target report template.
The application discloses a generation method of a webpage report template, which is applied to terminal equipment displaying a webpage interface, wherein the webpage interface comprises a canvas area and a field display area.
In the step S101, the table style data of the target web page report is data in which the styles of the cells in the target web page report are recorded, and may specifically include any one or more of the following data: index of cells, row of cells, column width of cells, background color of cells, initialization data of cells, configuration of cells, and the like.
The table field data is some fields related to the target web page report, which can enable users to access to some specific functions in the table, for example, header fields, fields (merging cells, formulas) corresponding to editing controls in an editing column, and the like.
In a specific implementation, the table style data and the table field data of the target webpage report are respectively stored in different databases, and in order to obtain the two types of data, a generation request of the target report template needs to be initiated first, and based on the generation request, the server can respectively obtain corresponding data from the databases storing the table style data and the table field data.
In the above step S102, the initial table of the target report template is composed of a plurality of cells, and no field exists in the initial table.
As shown in FIG. 2, the web page interface includes a field display area on the left and a canvas area on the right, where only the initial form that does not contain a field is displayed.
In the above step S103, in the specific implementation, a corresponding field icon is generated for each field in the table field data and displayed in the field display area, so that the subsequent steps S104 to S106 are performed.
In step S104, the drag operation is an operation of controlling the object selected by the drag operation to move in the web interface. The selected object can be an object of which the area where the object is located overlaps with the position where the indication mark corresponding to the mouse is located when the mouse is clicked; or may be an object within the frame selection range of the frame selection operation, etc.
In particular, for each field icon in the field display area, a drag operation is performed, by which the field icon is placed in an appropriate cell, that is, the subsequent step S105 is performed.
In the step S105, for each field icon in the field display area, when the drag operation is finished (when the mouse button is suddenly released), it is indicated that the field icon may have reached the position of the cell where the corresponding field needs to be filled, so that, according to the current position of the field icon and the position of each cell in the target report template, the target cell where the field needs to be filled in the field icon is determined, the field of the field icon is associated with the target cell, and the field corresponding to the field icon is displayed in the target cell.
In general, in order to avoid a situation that when determining a target cell to which a field of a field icon needs to be associated, the field icon is set to be smaller than the shape of the area where the target cell is located because the position of the field icon exceeds the area where the target cell is located, the target cell cannot be accurately determined.
Also, in some cases, not one cell can only prevent corresponding to one field, there may be a case where at least two cells are combined and then corresponding to the same field, where the step of determining the target cell includes:
step 1051, for each field icon in the field display area, responding to the end of the drag operation, determining a target cell to be associated with a field of the field icon according to the area covered by the field icon controlled by the drag operation, and associating the field of the field icon with the target cell.
In the step 1051, the shape of the field icon is sized, for each field icon in the field display area, in response to the end of the drag operation, the cell covered by the field icon (the cell where the intersection exists between the cell area and the field icon area in all the cells) is determined, the cell covered by the field icon is determined as the target cell to which the field of the field icon needs to be associated, and the field of the field icon is associated with the target cell.
For example, as shown in fig. 3, there are a plurality of blank cells in the initial table of the canvas area, wherein when the drag operation is finished, the field icon 4 covers the areas where the cell 1 and the cell 2 are located, so as shown in fig. 4, the cell 1 and the cell 2 are combined to obtain the cell 3, and the field 4 corresponding to the field icon 4 is displayed in the cell 3.
In step S106, finally, template data of the target report template is generated according to the fields associated with each cell in the canvas area and the table style data of the target report template.
According to the embodiment of the application, through the six steps, the blank table with fields needing to be added and the fields needing to be added in the blank table are displayed in a visual mode, then the association of the fields and the cells of the table is realized through the dragging operation, finally the data corresponding to the webpage report is formed, the fields and the cells are not required to be associated by a developer in the process of editing codes through manual editing codes, the problem of report display caused by errors of the developer is reduced, in addition, the target report template is generated in the mode, the developer is not required to edit all codes, the professional requirements on the developer are lower, and the user experience is improved.
In general, the positions of some field icons in the report are relatively fixed, so to say that most developers can set certain basic fields in a relatively fixed position based on the aspects of convenience in operation, that is, so as to facilitate most users to operate, and for the reasons mentioned above, in the process of dragging the field icons, the application recommends, in the canvas area, the positions where the fields corresponding to the field icons can be set for the developers, that is, step S104, includes:
step 1041, for each field icon in the field display area, selecting the field icon in response to the drag operation, determining a recommendation associated cell in the canvas area according to the attribute information of the field icon, and highlighting the recommendation associated cell.
In step 1041 described above, the highlighting may be any one of the following display modes: the borders of the cells are bolded, other background colors are set for the cells that are different from the existing background colors, the cells are highlighted, etc. The attribute information of the field includes any one or more of the following information: the field labels, the calculation rules corresponding to the fields and the data display areas corresponding to the fields. The recommended association cells are statistically obtained from the field tags in the history data, for example, as shown in fig. 4, the "serial number" field is mostly set in the first row and first column cells below the edit bar. The history data may be the history edit data of the user who is currently editing the table, or the history edit data of the user who edits all the tables historically.
In a specific implementation, for each field icon in the field display area, as long as the field icon is selected by a drag operation, the server automatically counts the position where the field label of the field corresponding to the field icon is often placed based on historical data, that is, the position where most developers will place the field icon, and the position can be called as a recommendation association cell, and the recommendation association cell is highlighted to remind the developers to place the field icon at a more suitable position as soon as possible. And further, the generation efficiency of the template data of the target report template is improved.
In a table, based on different functions of each cell, the cells may be classified, and if the classification requirements are different, the classification results will also be different, for example, step S106 in the present application includes:
step 1061, dividing each cell in the canvas area into different rendering levels according to the attribute information of the field associated with each cell in the canvas area;
step 1062, constructing a layer rendering structure of the canvas area according to the rendering level to which each cell belongs by taking each cell in the canvas area as a minimum node;
step 1063, generating template data of the target report template according to the fields associated with each cell in the canvas area, the table style data of the target report template and the layer rendering structure of the canvas area.
In step 1061, the rendering levels are divided according to the attribute information of the fields associated with different cells, for example, each small cell is one level, the cells with similar functions form another level (the insertion area, the formula area, etc. in the editing column), and the similar functions of the same level may form a higher level (the editing column, the data filling area, etc.).
In step 1062, each cell in the canvas area is taken as the minimum node, different cells are associated based on the rendering level to which each cell belongs, and finally, a layer rendering structure of the canvas area is constructed. For example, as shown in fig. 5, shape is a small cell, group is the upper level of the lowest cell, layer is the upper level of Group, stage is the upper level of layer, and stage is the final level of the layer rendering structure.
In step 1063, the fields associated with each cell, the table style data of the target report template, and the layer rendering structure of the canvas area are stored, so as to obtain template data for generating the target report template.
In the report, some data corresponding to the fields are needed to be obtained based on the operation between the data corresponding to the at least two cells, so step S105 includes:
step 1052, for each field icon in the field display area, responding to the end of the drag operation, and determining a target cell to be associated with a field of the field icon according to the position of the field icon controlled by the drag operation and a calculation rule in the field corresponding attribute information of the field icon; the calculation rule involves an operation between at least two cell correspondence data.
In the step 1052, for each field icon in the field display area, responding to the end of the drag operation, determining whether a calculation rule exists in the attribute information based on the field corresponding attribute information of the field icon, if so, determining a first cell corresponding to the data related to the calculation rule, determining a second cell based on the position of the field icon controlled by the drag operation, and finally determining both the first cell and the second cell as the target cell to which the field of the field icon needs to be associated.
The field display area contains field icons corresponding to a plurality of fields, in order to avoid failure in generating a target report template caused by repeated dragging of the same field icon by a developer, the application also provides a method comprising the following steps:
step 107, setting a used identifier for the field icon in the field display area in response to the completion of the association of the field icon with the target cell;
step 108, responding to a drag operation for the field icon provided with the used identifier, wherein the field icon does not move along with the drag operation.
In the above steps 107 and 108, the same field does not exist in a report that is not yet filled with data, so when an icon of a field icon in the field display area has been associated with a corresponding cell, it is explained that a field of the field icon can no longer be associated with other cells, and in order to avoid a situation that a user performs a drag operation on a field icon corresponding to a field that is already associated, or even repeatedly associates the field, the present application sets a used identifier for a field icon corresponding to a field that is already associated. By using the identification to make the developer clearly know which fields are not associated currently and which fields are associated, the situation of repeatedly associating the fields is avoided. The used identification may be any of the following identification means: the brightness of the field icon is reduced, the field icon is covered with a transparent gray layer, crosses are arranged around the field icon, and the like.
Of course, the association between the fields and the cells in the present application is not a hammer, and the developer may regret, that is, may cancel the association between the fields and the cells, which specifically includes:
and step 109, in response to the cancellation of the association between the field of the field icon and the target cell, restoring the field icon with the used identifier to the original state in the field display area.
In step 109, when the field is disassociated with the target cell, the used identifier of the field icon capable of being displayed in the field display area is controlled to be removed, and the original window state of the field icon is restored, that is, the situation that the field icon can be dragged again is restored.
The embodiment of the application provides a generating device of a webpage report template, which is applied to terminal equipment as shown in fig. 5, wherein the terminal equipment comprises a graphical user interface, the graphical user interface comprises a canvas area and a field display area, and the generating device comprises:
the acquiring module 501 is configured to acquire table style data and table field data of a target webpage report;
the rendering module 502 is configured to render in a canvas area based on the table style data to obtain an initial table of the target webpage report; the initial table comprises a plurality of cells;
a generating module 503, configured to generate a field icon of each field based on each field in the table field data, and display the field icon in the field display area;
a drag module 504, configured to respond to a drag operation for each field icon in the field display area, and control the field icon to move along with the drag operation;
the association module 505 is configured to determine, for each field icon in the field display area, a target cell to which a field of the field icon needs to be associated according to a position of the field icon controlled by the drag operation, and associate the field of the field icon with the target cell, in response to the end of the drag operation;
and a generating module 506, configured to generate a webpage report template of the target webpage report according to the field associated with each cell in the canvas area.
Optionally, the dragging module includes:
and the dragging unit is used for responding to the dragging operation to select the field icons for each field icon in the field display area, determining recommended association cells in the canvas area according to the attribute information of the fields of the field icons, and highlighting the recommended association cells.
Optionally, the generating module includes:
a dividing unit, configured to divide each cell in the canvas area into different rendering levels according to attribute information of a field associated with each cell in the canvas area;
the construction unit is used for constructing a layer rendering structure of the canvas area by taking each cell in the canvas area as a minimum node according to the rendering level to which each cell belongs;
and the generating unit is used for generating the template data of the target report template according to the fields associated with each cell in the canvas area, the table style data of the target report template and the layer rendering structure of the canvas area.
Optionally, the association module includes:
the association unit is used for responding to the end of the drag operation aiming at each field icon in the field display area, and determining target cells to be associated with the fields of the field icons according to the position of the field icon controlled by the drag operation and the calculation rule in the field corresponding attribute information of the field icon; the calculation rule involves an operation between at least two cell correspondence data.
Optionally, the apparatus further includes:
the first response module is used for responding to the completion of the association of the field icon with the target cell, and setting a used identifier for the field icon in the field display area;
and the second response module is used for responding to the drag operation aiming at the field icon provided with the used mark, and the field icon does not move along with the drag operation.
Optionally, the apparatus further includes:
and the restoration module is used for responding to the cancellation of the association between the field of the field icon and the target cell, and restoring the field icon provided with the used identifier to the original state in the field display area.
Optionally, the table field data includes a plurality of fields, each field having corresponding attribute information; the attribute information includes any one or more of the following information: the field labels, the calculation rules corresponding to the fields and the data display areas corresponding to the fields.
Corresponding to the method for generating the webpage report template in fig. 1, the embodiment of the application also provides a computer device 600, as shown in fig. 6, where the device includes a memory 601, a processor 602, and a computer program stored in the memory 601 and capable of running on the processor 602, where the method for generating the webpage report template is implemented when the processor 602 executes the computer program.
Specifically, the above memory 601 and the processor 602 can be general-purpose memories and processors, which are not limited herein, and when the processor 602 runs the computer program stored in the memory 601, the above method for generating a web page report template can be executed, thereby solving the problem of low efficiency in generating a web page report in the prior art. According to the method, the blank table with fields to be added and the fields to be added in the blank table are displayed in a visual mode, then the association of the fields and the cells of the table is realized through the dragging operation, finally the data corresponding to the webpage report is formed, the fields and the cells are not required to be associated by a developer in the process of editing codes through manual editing codes, the problem of report display caused by errors of the developer is reduced, in addition, the target report template is generated in the mode, the developer is not required to edit all codes, the professional requirements on the developer are lower, and the user experience is improved.
Corresponding to the method for generating the webpage report template in fig. 1, the embodiment of the application also provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, and the computer program executes the steps of the method for generating the webpage report template when being run by a processor.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk and the like, when a computer program on the storage medium is run, the method for generating the webpage report template can be executed, the problem of low efficiency of generating the webpage report in the prior art is solved, a blank table needing to be added with fields and fields needing to be added into the blank table are displayed in a view mode, then the association of the fields and the cells of the table is realized through a dragging operation, finally, data corresponding to the webpage report is formed, a developer does not need to associate the fields with the cells through manual editing codes in the process of editing codes, the condition that the report is problematic due to errors of the developer is reduced, the target report template is generated in the mode, the developer does not need to edit all codes, the professional requirements on the developer are low, and the user experience is improved.
In the embodiments provided in the present application, it should be understood that the disclosed method and apparatus may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments provided in the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: like reference numerals and letters in the following figures denote like items, and thus once an item is defined in one figure, no further definition or explanation of it is required in the following figures, and furthermore, the terms "first," "second," "third," etc. are used merely to distinguish one description from another and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above examples are only specific embodiments of the present application, and are not intended to limit the scope of the present application, but it should be understood by those skilled in the art that the present application is not limited thereto, and that the present application is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the corresponding technical solutions. Are intended to be encompassed within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (9)
1. The method for generating the webpage report template is characterized by being applied to terminal equipment, wherein the terminal equipment comprises a webpage interface, the webpage interface comprises a canvas area and a field display area, and the method comprises the following steps of:
acquiring form style data and form field data of a target report template;
rendering is carried out in a canvas area based on the table style data, and an initial table of a target report template is obtained; the initial table comprises a plurality of cells;
generating a field icon of each field based on each field in the table field data, and displaying the field icon in the field display area;
for each field icon in the field display area, responding to a drag operation, selecting the field icon, determining a recommended association cell in the canvas area according to attribute information of a field of the field icon, and highlighting the recommended association cell;
for each field icon in the field display area, responding to the end of the drag operation, determining a target cell to be associated with a field of the field icon according to the position of the field icon controlled by the drag operation, and associating the field of the field icon with the target cell;
and generating template data of the target report template according to the fields associated with each cell in the canvas area and the table style data of the target report template.
2. The method of claim 1, wherein generating template data for the target reporting template based on the fields associated with each cell in the canvas area and the table style data for the target reporting template, comprises:
dividing each cell in the canvas area into different rendering levels according to attribute information of a field associated with each cell in the canvas area;
taking each cell in the canvas area as a minimum node, and constructing a layer rendering structure of the canvas area according to a rendering level to which each cell belongs;
and generating template data of the target report template according to the fields associated with each cell in the canvas area, the table style data of the target report template and the layer rendering structure of the canvas area.
3. The method of claim 1, wherein for each field icon in the field display area, responsive to the end of the drag operation, determining, according to where the field icon controlled by the drag operation is located, a target cell to which a field of the field icon needs to be associated, comprises:
for each field icon in the field display area, responding to the end of the drag operation, and determining a target cell to be associated with a field of the field icon according to the position of the field icon controlled by the drag operation and a calculation rule in the field corresponding attribute information of the field icon; the calculation rule involves an operation between at least two cell correspondence data.
4. The method according to claim 1, wherein the method further comprises:
setting a used identifier for the field icon in the field display area in response to completion of association of the field icon with the target cell;
in response to a drag operation for a field icon provided with a used identifier, the field icon does not move with the drag operation.
5. The method according to claim 4, wherein the method further comprises:
and responding to the cancellation of the association of the field icon and the target cell, and restoring the field icon provided with the used identifier to the original state in the field display area.
6. The method of claim 1, wherein the form field data comprises a plurality of fields, each field having corresponding attribute information; the attribute information includes any one or more of the following information: the field labels, the calculation rules corresponding to the fields and the data display areas corresponding to the fields.
7. The device for generating the webpage report template is characterized by being applied to terminal equipment, wherein the terminal equipment comprises a graphical user interface, the graphical user interface comprises a canvas area and a field display area, and the device comprises:
the acquisition module is used for acquiring the form style data and the form field data of the target webpage report;
the rendering module is used for rendering in the canvas area based on the table style data to obtain an initial table of the target webpage report; the initial table comprises a plurality of cells;
the generation module is used for generating a field icon of each field based on each field in the table field data and displaying the field icon in the field display area;
the dragging module is used for responding to the dragging operation to select each field icon in the field display area, determining a recommendation associated cell in the canvas area according to the attribute information of the field icon, and highlighting the recommendation associated cell;
the association module is used for responding to the end of the drag operation aiming at each field icon in the field display area, determining a target cell which needs to be associated with the field of the field icon according to the position of the field icon controlled by the drag operation, and associating the field of the field icon with the target cell;
and the generating module is used for generating a webpage report template of the target webpage report according to the field associated with each cell in the canvas area.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of the preceding claims 1-6 when the computer program is executed.
9. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor performs the steps of the method of any of the preceding claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310652603.9A CN116383545B (en) | 2023-06-05 | 2023-06-05 | Webpage report template generation method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310652603.9A CN116383545B (en) | 2023-06-05 | 2023-06-05 | Webpage report template generation method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116383545A CN116383545A (en) | 2023-07-04 |
CN116383545B true CN116383545B (en) | 2023-08-25 |
Family
ID=86975446
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310652603.9A Active CN116383545B (en) | 2023-06-05 | 2023-06-05 | Webpage report template generation method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116383545B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111596913A (en) * | 2020-05-22 | 2020-08-28 | 北京达佳互联信息技术有限公司 | Visual component framework arrangement method and device |
CN112650966A (en) * | 2020-12-28 | 2021-04-13 | 珠海新华通软件股份有限公司 | Method, generator and medium for generating dynamic list page of online design |
CN114925665A (en) * | 2022-06-08 | 2022-08-19 | 杭州比智科技有限公司 | Graph data editing method and system based on web table |
CN115081414A (en) * | 2022-08-17 | 2022-09-20 | 广州思迈特软件有限公司 | Spreadsheet generation method, device, equipment and medium based on data model |
CN115982266A (en) * | 2022-12-02 | 2023-04-18 | 中孚安全技术有限公司 | Page dynamic rendering method and system based on custom configuration attribute field |
WO2023071452A1 (en) * | 2021-10-28 | 2023-05-04 | 北京字跳网络技术有限公司 | Component control method and apparatus, electronic device, and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160012030A1 (en) * | 2014-07-08 | 2016-01-14 | Tuyen Tran | Data form generation and gathering |
US20210174004A1 (en) * | 2019-12-05 | 2021-06-10 | Brad Sherp | Methods and systems for dynamic customization of independent webpage section templates |
-
2023
- 2023-06-05 CN CN202310652603.9A patent/CN116383545B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111596913A (en) * | 2020-05-22 | 2020-08-28 | 北京达佳互联信息技术有限公司 | Visual component framework arrangement method and device |
CN112650966A (en) * | 2020-12-28 | 2021-04-13 | 珠海新华通软件股份有限公司 | Method, generator and medium for generating dynamic list page of online design |
WO2023071452A1 (en) * | 2021-10-28 | 2023-05-04 | 北京字跳网络技术有限公司 | Component control method and apparatus, electronic device, and storage medium |
CN114925665A (en) * | 2022-06-08 | 2022-08-19 | 杭州比智科技有限公司 | Graph data editing method and system based on web table |
CN115081414A (en) * | 2022-08-17 | 2022-09-20 | 广州思迈特软件有限公司 | Spreadsheet generation method, device, equipment and medium based on data model |
CN115982266A (en) * | 2022-12-02 | 2023-04-18 | 中孚安全技术有限公司 | Page dynamic rendering method and system based on custom configuration attribute field |
Non-Patent Citations (1)
Title |
---|
单元格式动态报表的实现原理探究;贺华涛;仇少敏;;城建档案(第04期);第73-75页 * |
Also Published As
Publication number | Publication date |
---|---|
CN116383545A (en) | 2023-07-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113094037B (en) | Interaction method, development platform, equipment and storage medium for forms and workflows | |
CN109614424B (en) | Page layout generation method, device, computing equipment and medium | |
US9058307B2 (en) | Presentation generation using scorecard elements | |
KR101644418B1 (en) | Visualizing relationships between data elements and graphical representations of data element attributes | |
US8217945B1 (en) | Social annotation of a single evolving visual representation of a changing dataset | |
CN109408764B (en) | Page area dividing method, device, computing equipment and medium | |
US11270066B2 (en) | Temporary formatting and charting of selected data | |
US20080189632A1 (en) | Severity Assessment For Performance Metrics Using Quantitative Model | |
US20080120257A1 (en) | Automatic online form filling using semantic inference | |
CN111125560B (en) | Data visualization processing method, device and computer system | |
CN105760290B (en) | The problem of being tested based on webpage front-end localization method and relevant apparatus, system | |
CN111126019B (en) | Report generation method and device based on mode customization and electronic equipment | |
US11029806B1 (en) | Digital product navigation tool | |
KR101773574B1 (en) | Method for chart visualizing of data table | |
CN104182225B (en) | A kind of General Mobile information system adaptation method and device | |
CN112241265A (en) | Visual page processing method and equipment | |
CN110806866A (en) | Generation method and device of front-end management system | |
CN112241263A (en) | Visual page processing method and equipment | |
CN111124564A (en) | Method and device for displaying user interface | |
US8230319B2 (en) | Web-based visualization, refresh, and consumption of data-linked diagrams | |
CN113255302A (en) | Method for operating tissue architecture diagram, computer device and computer storage medium | |
CN102902500B (en) | Display method and device of data matrix information | |
CN116383545B (en) | Webpage report template generation method, device, equipment and medium | |
KR20220083185A (en) | An online report creation system using Excel tool | |
US20160299880A1 (en) | Method and device for updating web page |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |