CN116166904A - Web page report generation method, device, equipment and medium - Google Patents

Web page report generation method, device, equipment and medium Download PDF

Info

Publication number
CN116166904A
CN116166904A CN202211694373.4A CN202211694373A CN116166904A CN 116166904 A CN116166904 A CN 116166904A CN 202211694373 A CN202211694373 A CN 202211694373A CN 116166904 A CN116166904 A CN 116166904A
Authority
CN
China
Prior art keywords
cell
report
sequence
formula
cells
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
CN202211694373.4A
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.)
Nanjing Suning Electronic Information Technology Co ltd
Original Assignee
Nanjing Suning Electronic Information Technology 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 Nanjing Suning Electronic Information Technology Co ltd filed Critical Nanjing Suning Electronic Information Technology Co ltd
Priority to CN202211694373.4A priority Critical patent/CN116166904A/en
Publication of CN116166904A publication Critical patent/CN116166904A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The application relates to a web page report generation method, device, equipment and medium. The method comprises the following steps: the front end sends a request to the rear end to acquire a current report template; rendering a data input interface by the front end according to the report template through a VUE technology; the front end transmits the data input by the user according to the data input interface to the rear end; the back end calls a formula calculation engine, and a result value is generated according to the front end input data; the front end renders the result value returned by the back end to generate a report; the formula calculation engine traverses the cells to be calculated based on the Googleavator technology, and generates a result value according to the sequence of calculation of each cell and the parameter value in the formula. By adopting the method, the labor cost during development can be saved, the page style is more personalized, and the modification is convenient under the condition of report structure and formula logic change.

Description

Web page report generation method, device, equipment and medium
Technical Field
The present invention relates to the field of report generation technologies, and in particular, to a method, an apparatus, a device, and a medium for generating a web page report.
Background
Google averager technology. Aviator is a high-performance, lightweight, java language-implemented expression evaluation engine that is primarily used for dynamic evaluation of various expressions. The basic process of the Aviator is to directly translate an expression into a corresponding java byte code for execution, and the whole process is performed in two passes at most, namely, the execution priority mode is started, and if the execution priority mode is compiled, the execution priority mode is started, so that the performance of the Aviator exceeds that of most of explanatory expression engines, the whole is very lightweight, and the whole jar packet is 430K. Meanwhile, the function library built in the Aviator is not available for use like file IO, network and the like except necessary character string processing, mathematical functions and collection processing, so that the safety of the operation period can be ensured.
AlibabaJSONPath. The version after alibabafasstjson 1.2.0 supports JSONPath. This is a powerful function that can be used in the java framework as the object query language OQL. JsonPath analyzes Json by referring to an XPath analysis xml mode, and reads and modifies the value of a specific key.
Front-end and back-end separation techniques. The front end and the rear end are separated, the front end is mainly based on VUE, the rear end is based on java, and json text is used as a medium between the front end and the rear end to realize data interaction, transmission, generation and warehousing.
The traditional web page report project has three general realization modes for report data input, mutual operation, cross-table access requirement and the like:
1. using an online Excel, such as sprejjs, jExcel implementation.
2. And developing a vst plug-in based on Excel, and performing operation by adopting a CS structure.
The calculation mode of the value of each cell is analyzed in a 'hard coding' mode, and the calculation mode is defined at the back end and is operated one by one.
These solutions have good expressive power in their respective environments, while at the same time have certain drawbacks in particular needs.
1. Page style, i.e., CSS optimization, is more difficult to customize. Free edition learning is costly. SpreadJs are paid.
2. The page style is difficult to customize, and a vst plug-in is required to be installed on each client based on a CS structure developed by C#.
3. Hard coding, "dead writing" remembers the acquisition mode of each cell value, including formulas and functions. And returning to the front end for display after calculation. In the case of a large number of cells, the cells are prone to error, difficult to change and difficult to get flexible. If the report structure and formula logic change need to be developed and revised, the source codes are reissued.
Disclosure of Invention
Based on the above, it is necessary to provide a web page report generation method, device, equipment and medium capable of saving labor cost during development, enabling page styles to be more personalized, and facilitating modification under the condition of report structure and formula logic change.
In a first aspect, a web page report generating method is provided, the method including:
the front end sends a request to the rear end to acquire a current report template;
rendering a data input interface by the front end according to the report template through a VUE technology;
the front end transmits the data input by the user according to the data input interface to the rear end;
the back end calls a formula calculation engine, and a result value is generated according to the front end input data;
the front end renders the result value returned by the back end to generate a report;
the formula calculation engine traverses the cells to be calculated based on the Googleavator technology, and generates a result value according to the sequence of calculation of each cell and the parameter value in the formula.
In one embodiment, the cells to be calculated are three cells including formulas, functions, and cross-table numbers.
In one embodiment, the generating the result value according to the sequence calculated by each cell in the formula and the parameter value includes:
obtaining a tree relation between the cell and the cell depending on the cell according to a formula contained in the cell, wherein the execution sequence of the cell is tree depth;
determining the sequence of calculation of each cell according to the tree depth, wherein the sequence comprises the 1 st sequence to the N th sequence, and the cell directly input by a user is the 1 st sequence;
and starting calculation according to the 2 nd sequence to the N th sequence to obtain the value of the cell.
In one embodiment, the back-end invokes a formula calculation engine, and generating the result value from the front-end input data includes:
and counting the cells to be calculated by applying regular matching analysis according to the functions contained in the cells.
In one embodiment, the back-end invokes a formula calculation engine, and generating a result value from the front-end input data further includes:
reading the value of a cell in another table stored in advance according to the value of the cell in the original table as the value of the cell in the other table;
in response to completion of the calculation in the other table, the data in the original table is recalculated and updated.
In one embodiment, the report template generating method includes:
fixing the report structure and the number of rows and columns through setting the appointed rows and columns;
calling a table attribute setting interface on the right side by clicking a table attribute button, wherein the table attribute setting interface comprises a table unique number, a table name, a dynamic table, a style and a background;
and waking up a right row attribute setting page and setting the right row attribute setting page by clicking a left row number, wherein the row attribute setting page comprises a template row and a pattern.
In one embodiment, the report template generating method further includes:
calling a right cell attribute setting page and setting the right cell attribute setting page by clicking the cell;
wherein the cell property settings page includes type, content, default values, formatting values, merge mode, store alone, markup, and style.
In a second aspect, there is provided a web page report generating apparatus, the apparatus comprising:
the request acquisition module is used for sending a request to the rear end by the front end and acquiring the current report template;
the rendering module is used for rendering the data input interface by the front end according to the report template through a VUE technology;
the transmission module is used for transmitting the data input by the user according to the data input interface to the rear end by the front end;
the calling generation module is used for calling the formula calculation engine by the rear end and generating a result value according to the front end input data;
the rendering generation module is used for rendering the result value returned by the rear end by the front end to generate a report;
the formula calculation engine traverses the cells to be calculated based on the Googleavator technology, and generates a result value according to the sequence of calculation of each cell and the parameter value in the formula.
In a third aspect, a computer device is provided, the computer device comprising one or more processors; and a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the steps of the web page report generating method of any of the first aspects above.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the web page report generating method according to any of the first aspects above.
The method, the device, the equipment and the medium for generating the web page report form can freely customize the page style based on the template; by calling the formula calculation engine, the front end and the rear end do not need to pay attention to formulas and functions among specific cells and cross-table number calculation logic; based on the front-end and back-end separation technology, the report structure or formula logic is changed by only changing the template without development intervention.
Drawings
FIG. 1 is a flow diagram of a method for web page report generation in one embodiment;
FIG. 2 is a block diagram of an apparatus for generating a web page report in one embodiment;
FIG. 3 is an internal block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The method is firstly applied to adjacent items of the department of China, and can be widely applied to a large number of data input, associated data formula operation, cross-table number taking, display and other similar requirement items of web page Excel report forms after revising.
The scheme provides a new webexcel-like implementation mode based on the template. Based on the template, the CSS interface is opened, and the page style can be freely customized. And realizing accurate control on each cell in the page report by configuring formulas, functions, cross-table logic and the like. After the data is input, the front-end and back-end separation technology and real-time calculation are used for automatically generating the current report related cell data and other related report data.
The problem of "automatic calculation is difficult after Excel-like data report page data is input" is solved, namely, the front end and the back end do not need to pay attention to a formula, a function and cross-table number taking calculation logic among specific cells, and the front end only needs to input user input into the back end. The back end does not need to care about specific logic, and can directly call a common template engine method to obtain a final result. Delivering front end displays.
The problem of personalized customized report style is solved, namely a report style interface is provided, the report style interface is thinned to the cell level, and style customization is realized on the whole report.
The problems of personalized customized report structure and value logic are solved, namely, a report formula can change at any time, and the report formula comprises the number of rows and columns of a report, the value logic of a cell and the like. The method can be used without development intervention by only changing the template.
The method, apparatus, device and medium for generating web page report form will be further described with reference to specific embodiments.
Example 1
In one embodiment, as shown in fig. 1, there is provided a web page report generation method, the method comprising the steps of:
s11, the front end sends a request to the rear end to acquire a current report template;
s12, rendering a data input interface by the front end according to the report template through a VUE technology;
specifically, whether the cell is a common input box, a drop-down box, a date control, a read-only text, or a formula to be calculated is specified by the template. The front end does not need to care, and only needs to render different components according to different specified contents of the template to generate different verification modes.
S13, the front end transmits the data input by the user according to the data input interface to the rear end;
s14, the back end calls a formula calculation engine, and a result value is generated according to front end input data;
s15, rendering the result value returned by the rear end by the front end to generate a report;
the formula calculation engine traverses the cells to be calculated based on the Googleavator technology, and generates a result value according to the sequence of calculation of each cell and the parameter value in the formula.
In one embodiment, the cells to be calculated include three types of cells including formulas, functions, and cross-table numbers.
The implementation process of generating the result value according to the sequence calculated by each cell in the formula and the parameter value comprises the following steps:
s141, obtaining a tree relation between the cell and the cell depending on the cell according to a formula contained in the cell, wherein the execution sequence of the cell is tree depth;
s142, determining the sequence of calculation of each cell according to the tree depth, wherein the sequence comprises the 1 st sequence to the N th sequence, and the cell directly input by a user is the 1 st sequence;
and S143, starting calculation according to the 2 nd sequence to the N th sequence to obtain the value of the cell.
Specifically, for example, the value of the cell D1 is calculated, which is a value by the formula: d1 A2=a3 and a2=b1+b2+b3, which means that A2 must be taken first, B1, B2, B3 must be taken first, and so on to calculate D1.
According to the formula, a tree relationship is generated between D1 and other cells depending on the formula, and in this relationship, the leaf node of the lowest level is the cell directly input by the user, and they do not need to be calculated. Directly designate their calculation order as 1. Then the order of execution of D1 is the depth of the entire tree. As long as the tree depth is known, the order of computation is also determined.
Thus, each cell to be calculated is traversed, and the calculation order of each cell is obtained by calculating the attribute relationship between the cell and its dependent cell.
This is where the problem of cyclic dependencies in the template settings is to be avoided, such as: a1 B1, b1=c1, c1=a1. When the template is stored after being found in the program, the method prompts that: and the template cannot be saved due to circular dependence.
Specifically, the order of all the cells is determined, and there is an order maximum N. The loop starts from sequence 2 to this maximum N. Since 1 is user input or is dead directly on our page, no calculation is needed, the cell needed to be calculated, and the tree depth is at least 2, so the calculation starts from 2.
Starting from sequence 2, the values of 2 are determined, 3 are obtained from 2, 4 are obtained from 3, and all cell values are obtained by circularly calculating N.
Specifically, after the order is determined, the calculation may be started, for example, a certain cell D1 has a calculation order of 2, and three types of "types" are currently used: formulas, functions, cross-table fetches.
The formula: for example, his formula is A5-B5C 5. From the above statistics, it can be seen that the D1 calculation order is 2, and then his dependent A5, B5, C5 calculation order must be 1, which is 1-that is, they are all bright and sloshing, without the actual value being calculated. The background program only needs to call the open source program averager, and the actual values of the character string A5-B5C 5 and the character strings A5, B5 and C5 are transmitted to the method provided by the averager, so that the correct value can be obtained. Without the need for us to care about first computing the multiplication, then the subtraction, bracketed first computing brackets, etc.
The step S14 of the back end calling the formula calculation engine, the step of generating a result value according to the front end input data comprises the following steps:
s144, performing regular matching analysis according to functions contained in the cells, and counting the cells needing to be calculated.
Specifically, the cell type is a function: the functions supported at present are SUM, AVG and formulas of functions are all configured in the 'content' attribute of the cell. The background program uses regular matching analysis by reading character strings in the content function, and if the content is SUM (), a self-defined accumulation processing program is called, the content in a ' SUM () ' bracket ' is analyzed, cells needing accumulation are obtained, and statistics is carried out on the cells.
The step S14 of the back end calling the formula calculation engine, the step of generating a result value according to the front end input data comprises the following steps:
s145, reading the value of the cell in the other table stored in advance according to the value of the cell in the original table as the value of the cell in the other table;
s146, recalculating and updating the data in the original table in response to the completion of calculation in the other table.
Specifically, the cell type is a cross-table fetch. For example, the type of cell D1 of the dept table is "cross-table fetch", which value is the value of cell A1 of another table user. This only requires that the value of A1 in the user table be stored in advance, where it is read. This is where the order of precedence is to be noted. It is necessary to count which other tables A1 of the user table are associated with. When the calculation of the user table is completed, the recalculation of the dept table is triggered, otherwise, the data of the dept table cannot be updated.
Specifically, after the calculation is completed, the alibabaajson path technology is utilized to update and store JSON.
Specifically, JSON text is used as a medium between the front end and the rear end, so that data interaction, transmission, generation and warehousing are realized.
Specifically, from the three previous steps, the user input, background operation and interface rendering are all separated from a core structure called a template JSON. A complex report structure contains a large number of cells, and the JSON not only considers whether the display mode of each cell is text or control, decimal or percentage, but also calculates whether the calculation mode is a formula or a function, and whether the value is a current report or a source of other reports. And furthermore, the sequence of calculation among the cells is considered, the value of A is derived from B, the value of B is derived from C, the value of C is derived from user input, and if the calculation sequence is wrong, the wrong value can be caused. Therefore, the JSON can be purely manually woven, but is easy to mistake, difficult to debug and huge in workload.
In one embodiment, JSON is obtained by generating a report template, and the method for generating the report template includes the following steps:
s1, fixing a report structure and the number of rows and columns through setting the designated rows and columns;
s2, calling a table attribute setting interface on the right side by clicking a table attribute button, and setting the table attribute setting interface, wherein the table attribute setting interface comprises a table unique number, a table name, a dynamic table, a style and a background;
s3, waking up a right row attribute setting page and setting the right row attribute setting page by clicking a left row number, wherein the row attribute setting page comprises a template row and a pattern.
In one embodiment, the report template generating method further includes the following steps:
s4, calling a right cell attribute setting page and setting the right cell attribute setting page by clicking the cell;
wherein the cell property settings page includes type, content, default values, formatting values, merge mode, store alone, markup, and style.
Specifically, the "template JSON" of this core is generated by an interface to the function of the design template, i.e., the template designer. Freely customizing the report style according to the generating step of the report template, wherein the style comprises template structure customization, cell attribute specification, CSS style customization and the like.
Specifically, the table attributes include:
table unique number: globally unique and cannot be the same as other tables.
Table name: chinese name.
Dynamic table: if the rows and columns of the report form are fixed, called as a fixed table, the rows are fixed, and the rows are not fixed, in actual use, the rows need to be newly added and reduced according to the actual situation of a client, and the rows are called as a dynamic table. When the dynamic table renders the template at the front end, a button for 'adding one row' is displayed, and a newly added row is clicked.
"class", "style" custom adjusts the style of the overall report through these two properties. Such as specifying the width, height, spacing, background, frame style, etc. of the cells of the entire report. In the figure, a report background is designated by an example of "background-color: #F4F4F4".
Specifically, the row attributes include:
template row: the dynamic table must specify the template row. When the user clicks the "add line" button, the program templates the template with a new line that will replicate all the attributes in the template line, including the line attributes, and the attributes of each cell. But each cell code in a row is regenerated so that the formulas and functions of the individual cells in the new row will also change. Such as: one cell in the template row is D3, and the value of D1+D2 is required to be taken, and the formula is as follows: d1+d2. And the new row of cells E3 that is copied should take the value e1+e2 instead of d1+d2. These are all accomplished by program automated analysis.
"class", "style" specifies the style of the current line. For example, the line is a title line, the text needs to be bolded, and the background needs to be bolded. The pattern of the row may be set separately. Without affecting other rows.
Specifically, the cell attributes include:
the unique key in the table, the globally unique key, is not repeated in all reports.
Type (2): specifying in what form the current cell is presented when rendered. Whether text, number, formula, date. Such as: if "date" is selected here. After the program is loaded into the template and the cell is read, a date control is displayed for the user to select the date. If the selection is "attachment" here, the user will be presented with the effect of uploading an attachment. The program will determine the corresponding mode of each cell type through different cell types. The method can control read-only, digital type, text input box, progress bar and the like, and has better expansibility.
The content is as follows: and the value logic is used for controlling formulas, functions, drop-down boxes and the like. Such as: the "type" selection is a drop-down box, which can be specified in the "content" for what each option is to be presented by the drop-down box. Such as a gender drop down box, where the content is entered: "Male, female, unknown". Three options are presented in the drop down box presented to the user: male, female, unknown.
Sometimes, for data, a male or female is represented by 1,0, but the male or female is necessarily shown to the user, but not 1,0, then the "content" is input: "Man=1, woman=0", so that 1,0 is sent to the background instead of "Man, woman".
These are all accomplished by analyzing the templates after the program has loaded the templates, and analyzing the strings in the "content" prior to rendering.
Value: a default value for the current cell is specified.
Formatting values: formatting the value, such as computing, yields the value: 0.07. but the page needs to exhibit 7% and can be specified here.
Colspan/rowspan: and designating the transverse and longitudinal merging of the current cell, and realizing the merging cell effect similar to that in Excel.
And (3) separately storing: in general, the values of all cells of the entire report are stored in one large JSON string. If the value of a cell needs to be used by other reports. Such as a cross-table fetch, then the value of this cell, along with his key, is stored separately in the designated database table to improve read efficiency. While they may have their own "name".
Marking: if a particular number of unordered cells in a table are to be lifted for statistics, they are marked with the same "label". Thus, the cells can be queried through the markers for subsequent statistical analysis. "class", "style" customizes each cell style. Such as adding up to be bolded and highlighted. Only these two styles need to be specified.
In the web page report generation method, the page style can be freely customized based on the report template; by calling the formula calculation engine, the front end and the rear end do not need to pay attention to formulas and functions among specific cells and cross-table number calculation logic; based on the front-end and back-end separation technology, the report structure or formula logic is changed by only changing the template without development intervention.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in sequence as indicated by the arrows, the steps are not necessarily performed in sequence as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 1 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily performed in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps of other steps.
Example two
In one embodiment, as shown in fig. 2, there is provided a web page report generating apparatus, including: a request acquisition module 21, a rendering module 22, a delivery module 23, a call generation module 24 and a rendering generation module 25, wherein:
the request acquisition module 21 is used for sending a request to the rear end by the front end to acquire the current report template;
the rendering module 22 is used for rendering the data input interface by the front end according to the report template through a VUE technology;
a transmitting module 23, configured to transmit, by the front end, data input by the user according to the data input interface to the back end;
the call generation module 24 is used for calling the formula calculation engine by the back end and generating a result value according to the front end input data;
the rendering generation module 25 is configured to render the result value returned by the back end by the front end, and generate a report;
the formula calculation engine traverses the cells to be calculated based on the Googleavator technology, and generates a result value according to the sequence of calculation of each cell and the parameter value in the formula.
In one embodiment, the apparatus further comprises;
the setting module 26 is configured to set the cells to be calculated into three types of cells including formulas, functions and cross-table numbers.
The generating result value according to the sequence calculated by each cell in the formula and the parameter value comprises the following submodules:
an obtaining module 241, configured to obtain a tree relationship between a cell and a cell on which the cell depends according to a formula contained in the cell, where an execution order of the cell is a tree depth;
a determining module 242, configured to determine a sequence calculated by each cell according to the tree depth, where the sequence includes a1 st sequence to an nth sequence, and the cell directly input by the user is the 1 st sequence;
the calculation obtaining module 243 is configured to start calculation according to the order 2 to the order N, and obtain the value of the cell.
The call generation module 24 is configured to invoke the formula calculation engine by the back end, and generate a result value according to the front end input data, and includes the following submodules:
the analysis and statistics module 244 is configured to apply a regular matching analysis according to the functions included in the cells, and count the cells that need to be calculated.
In one embodiment, the call generation module 24 is configured to call the formula calculation engine by the back end, generate a result value according to the front end input data, and further includes the following sub-modules:
a reading module 245, configured to read a value of a cell in another table stored in advance according to the value of the cell in the original table being the value of the cell in the other table;
a recalculation update module 246 for recalculating and updating the data in the original table in response to completion of the calculation in the other table.
In one embodiment, the report template generating device includes:
a setting fixing module 27 for fixing the report structure and the number of rows and columns by setting the designated rows and columns;
a first evoked setting module 28 for evoked and set a right side list attribute setting interface by clicking a list attribute button, wherein the list attribute setting interface includes a list unique number, a list name, a dynamic list, a style and a background;
the second arousing setting module 29 is configured to arouse and set a right row attribute setting page by clicking on a left row number, where the row attribute setting page includes a template row and a style.
In one embodiment, the report template generating device further includes:
a third arousing setting module 2A for arousing and setting a right cell attribute setting page by clicking a cell;
wherein the cell property settings page includes type, content, default values, formatting values, merge mode, store alone, markup, and style.
The specific limitation of the web page report generating apparatus may be referred to the limitation of the web page report generating method hereinabove, and will not be described herein. The various modules in the web page report generating device can be fully or partially implemented by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
Example III
Corresponding to the first embodiment and the second embodiment, the present embodiment provides a computer device for generating a web page report. In one example, as shown in fig. 3, the present application provides a computer device comprising:
one or more processors;
and a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the steps of:
the front end sends a request to the rear end to acquire a current report template;
rendering a data input interface by the front end according to the report template through a VUE technology;
the front end transmits the data input by the user according to the data input interface to the rear end;
the back end calls a formula calculation engine, and a result value is generated according to the front end input data;
the front end renders the result value returned by the back end to generate a report;
the formula calculation engine traverses the cells to be calculated based on the Googleavator technology, and generates a result value according to the sequence of calculation of each cell and the parameter value in the formula.
In one embodiment, the processor when executing the computer program further performs the steps of:
the cells to be calculated are three cells including formulas, functions and cross-table access numbers.
In one embodiment, the processor when executing the computer program further performs the steps of:
obtaining a tree relation between the cell and the cell depending on the cell according to a formula contained in the cell, wherein the execution sequence of the cell is tree depth;
determining the sequence of calculation of each cell according to the tree depth, wherein the sequence comprises the 1 st sequence to the N th sequence, and the cell directly input by a user is the 1 st sequence;
and starting calculation according to the 2 nd sequence to the N th sequence to obtain the value of the cell.
In one embodiment, the processor when executing the computer program further performs the steps of:
and counting the cells to be calculated by applying regular matching analysis according to the functions contained in the cells.
In one embodiment, the processor when executing the computer program further performs the steps of:
reading the value of a cell in another table stored in advance according to the value of the cell in the original table as the value of the cell in the other table;
in response to completion of the calculation in the other table, the data in the original table is recalculated and updated.
In one embodiment, the processor when executing the computer program further performs the steps of:
fixing the report structure and the number of rows and columns through setting the appointed rows and columns;
calling a table attribute setting interface on the right side by clicking a table attribute button, wherein the table attribute setting interface comprises a table unique number, a table name, a dynamic table, a style and a background;
and waking up a right row attribute setting page and setting the right row attribute setting page by clicking a left row number, wherein the row attribute setting page comprises a template row and a pattern.
In one embodiment, the processor when executing the computer program further performs the steps of:
calling a right cell attribute setting page and setting the right cell attribute setting page by clicking the cell;
wherein the cell property settings page includes type, content, default values, formatting values, merge mode, store alone, markup, and style.
The program instructions, when read and executed by the one or more processors, may further perform operations corresponding to the steps in the foregoing method embodiments, and reference may be made to the foregoing description, which is not repeated herein. Referring to FIG. 3, which illustrates an exemplary architecture for a computer device, may include a processor 310, a video display adapter 311, a disk drive 312, an input/output interface 313, a network interface 314, and a memory 320. The processor 310, the video display adapter 311, the disk drive 312, the input/output interface 313, the network interface 314, and the memory 320 may be communicatively connected by a communication bus 330.
The processor 310 may be implemented by a general-purpose central processing unit (CentralProcessingUnit, CPU), a microprocessor, an application specific integrated circuit (ApplicationSpecificIntegratedCircuit, ASIC), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided in the present application.
The memory 320 may be implemented in the form of read-only memory (ReadOnlyMemory, ROM), random access memory (RandomAccessMemory, RAM), static storage devices, dynamic storage devices, and the like. The memory 320 may store an operating system 321 for controlling the operation of the computer device 300, and a Basic Input Output System (BIOS) 322 for controlling the low-level operation of the computer device 300. In addition, a web browser 323, data storage management 324, and an icon font processing system 325, etc. may also be stored. The icon font processing system 325 may be an application program that specifically implements the operations of the foregoing steps in the embodiments of the present application. In general, when the technical solutions provided in the present application are implemented by software or firmware, relevant program codes are stored in the memory 320 and invoked by the processor 310 for execution.
The input/output interface 313 is used to connect with an input/output module to realize information input and output. The input/output module may be configured as a component in a 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 types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
The network interface 314 is used to connect communication modules (not shown) to enable communication interactions of the device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
Bus 330 includes a path to transfer information between various components of the device (e.g., processor 310, video display adapter 311, disk drive 312, input/output interface 313, network interface 314, and memory 320).
In addition, the computer device 300 may also obtain information of specific acquisition conditions from the virtual resource object acquisition condition information database 341 for making condition judgment, and so on.
It should be noted that although the above-described computer device 300 only shows the processor 310, the video display adapter 311, the disk drive 312, the input/output interface 313, the network interface 314, the memory 320, the bus 330, etc., the computer device may include other components necessary for achieving normal operation in the specific implementation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the present application, and not all the components shown in the drawings.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., and include several instructions to cause a computer device (which may be a personal computer, a cloud server, or a network device, etc.) to perform the methods described in the various embodiments or some parts of the embodiments of the present application.
Example IV
In correspondence with the first to third embodiments described above, the present embodiment provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the web page report generating method in the above embodiments, such as the other extensions of the methods of step S11 to step S15 and the extensions of the related steps. Alternatively, the computer program when executed by the processor implements the functions of the respective modules/units of the web page report generating apparatus in the above embodiment, such as the functions of the modules 21 to 2A. In order to avoid repetition, a description thereof is omitted.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the various embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples merely represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the invention. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application is to be determined by the claims appended hereto.

Claims (10)

1. A web page report generation method, comprising:
the front end sends a request to the rear end to acquire a current report template;
rendering a data input interface by the front end according to the report template through a VUE technology;
the front end transmits the data input by the user according to the data input interface to the rear end;
the back end calls a formula calculation engine, and a result value is generated according to the front end input data;
the front end renders the result value returned by the back end to generate a report;
the formula calculation engine traverses the cells to be calculated based on the Googleavator technology, and generates a result value according to the sequence of calculation of each cell and the parameter value in the formula.
2. The method of claim 1, wherein the cells to be calculated are three cells comprising formulas, functions, and cross-table fetches.
3. The method of claim 1, wherein generating the result value based on the calculated order of the cells in the formula and the parameter value comprises:
obtaining a tree relation between the cell and the cell depending on the cell according to a formula contained in the cell, wherein the execution sequence of the cell is tree depth;
determining the sequence of calculation of each cell according to the tree depth, wherein the sequence comprises the 1 st sequence to the N th sequence, and the cell directly input by a user is the 1 st sequence;
and starting calculation according to the 2 nd sequence to the N th sequence to obtain the value of the cell.
4. The method of claim 1, wherein the back-end invoking a formula calculation engine to generate a result value from the front-end input data comprises:
and counting the cells to be calculated by applying regular matching analysis according to the functions contained in the cells.
5. The method of claim 4, wherein the back-end invokes a formula calculation engine, the generating a result value from the front-end input data further comprising:
reading the value of a cell in another table stored in advance according to the value of the cell in the original table as the value of the cell in the other table;
in response to completion of the calculation in the other table, the data in the original table is recalculated and updated.
6. The method of claim 1, wherein the report template generation method comprises:
fixing the report structure and the number of rows and columns through setting the appointed rows and columns;
calling a table attribute setting interface on the right side by clicking a table attribute button, wherein the table attribute setting interface comprises a table unique number, a table name, a dynamic table, a style and a background;
and waking up a right row attribute setting page and setting the right row attribute setting page by clicking a left row number, wherein the row attribute setting page comprises a template row and a pattern.
7. The method of claim 6, wherein the generating the reporting model further comprises:
calling a right cell attribute setting page and setting the right cell attribute setting page by clicking the cell;
wherein the cell property settings page includes type, content, default values, formatting values, merge mode, store alone, markup, and style.
8. A web page report generating apparatus, the apparatus comprising:
the request acquisition module is used for sending a request to the rear end by the front end and acquiring the current report template;
the rendering module is used for rendering the data input interface by the front end according to the report template through a VUE technology;
the transmission module is used for transmitting the data input by the user according to the data input interface to the rear end by the front end;
the calling generation module is used for calling the formula calculation engine by the rear end and generating a result value according to the front end input data;
the rendering generation module is used for rendering the result value returned by the rear end by the front end to generate a report;
the formula calculation engine traverses the cells to be calculated based on the Googleavator technology, and generates a result value according to the sequence of calculation of each cell and the parameter value in the formula.
9. A computer device, the computer device comprising:
one or more processors;
and a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the steps of the web page report generating method of any of claims 1 to 7.
10. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program when executed by a processor realizes the steps of the web page report generating method of any of claims 1 to 7.
CN202211694373.4A 2022-12-28 2022-12-28 Web page report generation method, device, equipment and medium Pending CN116166904A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211694373.4A CN116166904A (en) 2022-12-28 2022-12-28 Web page report generation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211694373.4A CN116166904A (en) 2022-12-28 2022-12-28 Web page report generation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN116166904A true CN116166904A (en) 2023-05-26

Family

ID=86415628

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211694373.4A Pending CN116166904A (en) 2022-12-28 2022-12-28 Web page report generation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN116166904A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116628067A (en) * 2023-07-25 2023-08-22 苏州万店掌网络科技有限公司 Form data processing method, device, equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116628067A (en) * 2023-07-25 2023-08-22 苏州万店掌网络科技有限公司 Form data processing method, device, equipment and storage medium
CN116628067B (en) * 2023-07-25 2023-10-31 苏州万店掌网络科技有限公司 Form data processing method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109471890A (en) Generation method, terminal device and the medium of report file
CN110806863A (en) Interface document generation method and device, electronic equipment and storage medium
CN112416339A (en) Page development method and device and computer equipment
CN108762743B (en) Data table operation code generation method and device
US9898259B2 (en) Data binding for model-based code generation
CN112148356B (en) Document generation method, interface development method, device, server and storage medium
US9940182B1 (en) Business rule engine validation systems and related methods
US10277665B1 (en) Mechanism for webpage composition
CN108399086B (en) Widget management method, server and computer readable storage medium
CN108255479B (en) Creation method, device, storage medium and the terminal of cube file
CN111581920A (en) Document conversion method, device, equipment and computer storage medium
CN116166904A (en) Web page report generation method, device, equipment and medium
CN114201615B (en) Scientific research data change review method and server based on data snapshot
CN109829141B (en) Project table generation method and device
US9990343B2 (en) System and method for in-browser editing
CN113282656A (en) Dragging type visualization method and system based on big data
US20230195825A1 (en) Browser extension with automation testing support
CN116909553A (en) Page online development and local compiling operation system
Trotter et al. Modular Assessment of Rainfall–Runoff Models Toolbox (MARRMoT) v2. 1: an object-oriented implementation of 47 established hydrological models for improved speed and readability
US11977473B2 (en) Providing a pseudo language for manipulating complex variables of an orchestration flow
Haller et al. RaUL: RDFa User Interface Language–A data processing model for web applications
CN112732643B (en) Method for interconversion of flow chart graphic file data and S1000D standard XML format data
Bakaev et al. Component-based engineering of web user interface designs for evolutionary optimization
JP2015162218A (en) Software development apparatus and software development method
CN112130841B (en) SQL development method and device and terminal equipment

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