CN118170370A - Page development method and device and computer readable storage medium - Google Patents

Page development method and device and computer readable storage medium Download PDF

Info

Publication number
CN118170370A
CN118170370A CN202211589281.XA CN202211589281A CN118170370A CN 118170370 A CN118170370 A CN 118170370A CN 202211589281 A CN202211589281 A CN 202211589281A CN 118170370 A CN118170370 A CN 118170370A
Authority
CN
China
Prior art keywords
data
query
page
report
query statement
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
CN202211589281.XA
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.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi 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 Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202211589281.XA priority Critical patent/CN118170370A/en
Publication of CN118170370A publication Critical patent/CN118170370A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a page development method, a page development device and a computer readable storage medium, wherein the method comprises the following steps: receiving a report data request sent by a front end; the report data request carries a report identifier and query parameters; the report data request is obtained in response to the front-end universal page trigger; determining a template configuration strategy according to the report identity; acquiring configuration data and query data according to a template configuration strategy and query parameters; and transmitting the configuration data and the query data to the front end so that the front end performs page rendering on the configuration data and the query data based on the universal template. Through the scheme, the flexibility and the efficiency of page development are improved.

Description

Page development method and device and computer readable storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and apparatus for developing a page, and a computer readable storage medium.
Background
The general front-end display page needs to be composed of a front-end page and a back-end data interface. The front-end page is responsible for displaying data, and the back-end data interface is responsible for providing data. Typically, a front-end page is developed, first by a front-end web engineer, and then by a back-end engineer, a data interface. Finally, one page is developed after the joint debugging test of the front page development device.
In the related art, on one hand, a front-end engineer needs 3 to 4 working days to develop a page, and the development period is uncertain according to the complexity of the front-end page. A back-end engineer develops a back-end data interface, which requires 3-4 working days, development cycles, and logic complexity is uncertain. On the other hand, after the later online, if small changes of some demands are met, such as modification of changes of page form titles, the changes need to be rewritten, tested and online, the configurability is poor, and the flexibility is poor.
Disclosure of Invention
The embodiment of the invention provides a page development method, a page development device and a computer readable storage medium, which can improve the flexibility and the efficiency of page development.
The technical scheme of the invention is realized as follows:
the embodiment of the invention provides a page development method, which comprises the following steps:
Receiving a report data request sent by a front end; the report data request carries a report identifier and query parameters; the report data request is obtained in response to front-end universal page triggering;
Determining a template configuration strategy according to the report identity;
acquiring configuration data and query data according to the template configuration strategy and the query parameters;
and transmitting the configuration data and the query data to the front end so that the front end performs page rendering on the configuration data and the query data based on a universal template.
The embodiment of the invention provides a page development device, which comprises: the device comprises a receiving unit, a determining unit, an acquiring unit, a sending unit and a rendering unit; wherein,
The receiving unit is used for receiving the report data request sent by the front end; the report data request carries a report identifier and query parameters; the report data request is obtained in response to front-end universal page triggering;
the determining unit is used for determining a template configuration strategy according to the report identifier;
the acquisition unit is used for acquiring configuration data and query data according to the template configuration strategy and the query parameters;
the sending unit is used for transmitting the configuration data and the query data to the front end;
and the rendering unit is used for rendering the page by the front end based on the configuration data and the query data through a universal template.
The embodiment of the invention provides a page development device, which comprises:
A memory for storing executable instructions;
and a processor for executing the executable instructions stored in the memory, the processor executing the page development method when the executable instructions are executed.
Embodiments of the present invention provide a computer readable storage medium storing executable instructions that, when executed, are configured to cause a processor to perform a page development method according to embodiments of the present invention.
The embodiment of the invention provides a page development method, a page development device and a computer readable storage medium, wherein the method comprises the following steps: receiving a report data request sent by a front end; the report data request carries a report identifier and query parameters; the report data request is obtained in response to front-end universal page triggering; determining a template configuration strategy according to the report identity; acquiring configuration data and query data according to the template configuration strategy and the query parameters; and transmitting the configuration data and the query data to the front end so that the front end performs page rendering on the configuration data and the query data based on a universal template. According to the method, the interaction between data is carried out through the front-end general page and the page development device template configuration strategy existing in the front end, and if the logic requirement of the page or the page development device is subsequently modified, only the corresponding configuration parameters are required to be modified, so that page development resources are saved, and page development efficiency and flexibility are improved.
Drawings
Fig. 1 is a schematic flow chart of a page development method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram showing a page effect of a data table according to an embodiment of the present invention;
FIG. 3 is a second schematic diagram of a page effect of a data table according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of an employee type selection effect provided by an embodiment of the present invention;
FIG. 5 is a schematic view of an effect of date selection according to an embodiment of the present invention;
FIG. 6 is a schematic flow chart of an overall optimization scheme design provided by an embodiment of the present invention;
FIG. 7 is a schematic flow chart of a general template code data acquisition according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of the effect of a front-end template design according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a design effect of a data interface module of a page development device according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a template configuration policy effect according to an embodiment of the present invention;
FIG. 11 is a schematic diagram of an entity effect of a template configuration strategy according to an embodiment of the present invention;
FIG. 12 is a schematic diagram of a table data header display effect according to an embodiment of the present invention;
FIG. 13 is a second schematic flow chart of a page development method according to an embodiment of the present invention;
fig. 14 is a schematic structural diagram of a page developing apparatus according to an embodiment of the present invention;
Fig. 15 is a schematic structural diagram of another page development device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without making any inventive effort are within the scope of the present invention.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description. Fig. 1 is a schematic flow chart of a page development method according to an embodiment of the present invention, which will be specifically described with reference to the following steps.
S101, receiving a report data request sent by a front end; the report data request carries a report identifier and query parameters; the report data request is obtained in response to a front-end generic page trigger.
In the embodiment of the invention, a user inputs a query parameter value in a front-end general page, the front-end general page responds to a user touch operation to generate a report data request, the report data request carries a report identifier and the query parameter, the report data request is sent to a page development device, and the page development device receives the report data request sent by the front end.
In the embodiment of the present invention, as shown in fig. 2 and fig. 3, fig. 2 is a schematic diagram of a page effect of a data table provided in the embodiment of the present invention, and fig. 2 includes a data table. Fig. 3 is a schematic diagram of a page effect of a data table according to an embodiment of the present invention, and fig. 3 includes two data tables. In fig. 2 and 3, the page header 1, i.e. the first line employment structure and employee employment duty cycle setting, is dynamically configurable; query condition 2, namely, the type of staff, date, distribution center, warehouse and other query conditions can be configured; the supported controls include an input box, a time selection box, a drop-down box single selection and multiple selections, and drop-down box selection values are configurable. By analogy, the table page position display 5, the table header display 6, the paging bar number 7, the header and the data table header display 8 in fig. 3 are all configurable, and support the common function buttons 3 such as reset and inquiry and the general function 4 of deriving excel.
In the embodiment of the present invention, fig. 4 is a schematic diagram of an effect of employee type selection provided in the embodiment of the present invention, that is, employee type 2 in fig. 3. In fig. 4, including an employee type input box control 9 and an employee type drop-down selection box control 10, the employee type drop-down selection box control 10 includes: full-day labor contractors, labor dispatch, other forms of labor outsourcing, and non-full-day labor contractors. The user selects corresponding parameters, such as full-time labor contractors, in the drop-down selection box control 10 of the employee type, and inputs the parameters in the employee type input box control 9, so that employees belonging to the full-time labor contractors in a certain area or all areas can be searched.
In an embodiment of the present invention, fig. 5 is a schematic diagram of an effect of date selection according to an embodiment of the present invention. I.e. date 2 in fig. 3. In fig. 5, the selection of time may be made in a set option box. If the user inputs 5 on the start date 11 and 2 on the end date 12, this indicates that he wants to search for incumbent staff between 5 on 11 and 2 on 2021 and 12 on 2021, and selects the ok button 13 in fig. 5, he can search for the time, and if he wants to re-input the time, he can click the clear button 14 to delete the original time. In fig. 5, year 15 and month 16 may vary.
S102, determining a template configuration strategy according to the report identity.
In the embodiment of the invention, the page development device determines the template configuration strategy corresponding to the report according to the received report identifier.
S103, acquiring configuration data and query data according to the template configuration strategy and the query parameters.
In the embodiment of the invention, the page development device acquires configuration data and query data according to the template configuration strategy corresponding to the report and the query parameters input by the user.
In an embodiment of the present invention, as shown in FIG. 3, configuration data 6 and 8 are included in FIG. 3, and the query data is specific data in the tables 2021-11-10, huadong, full-day labor contract, 290, 235, etc.
And S104, transmitting the configuration data and the query data to the front end so that the front end performs page rendering on the configuration data and the query data based on the universal template.
In the embodiment of the invention, after the page development device acquires the configuration data and the query data, the configuration data and the query data are transmitted to the front end, and after the data are acquired by the universal template at the front end, the page rendering is performed by using the data.
In the embodiment of the present invention, as shown in fig. 6, fig. 6 is a schematic flow chart of a general optimization scheme design provided in the embodiment of the present invention. In fig. 6, the user inputs query parameters. The page development device template code acquires the query parameters input by the user and transmits the query parameters to a template configuration strategy, wherein the template configuration strategy is mainly used for configurable generation of back-end data. And carrying out the configuration of header display, form url and form title display from a display design module in the template configuration strategy. The data design module mainly comprises form data, paging data, parameter design and data sources. After the page development device template codes obtain the data template strategy, obtaining page development device data through the strategy, and rendering a front page through the page development device data.
It can be appreciated that in the embodiment of the present invention, a report data request sent by a front end is received; the report data request carries a report identifier and query parameters; the report data request is obtained in response to the front-end universal page trigger; determining a template configuration strategy according to the report identity; acquiring configuration data and query data according to a template configuration strategy and query parameters; and transmitting the configuration data and the query data to the front end so that the front end performs page rendering on the configuration data and the query data based on the universal template. According to the method, the interaction between data is carried out through the front-end general page and the page development device template configuration strategy existing in the front end, and if the logic requirement of the page or the page development device is subsequently modified, only the corresponding configuration parameters are required to be modified, so that page development resources are saved, and page development efficiency is improved.
In some embodiments of the present invention, S102 may be implemented by S1021, which will be specifically described in connection with the following steps.
S1021, determining a template configuration strategy according to the report identity from the template configuration strategy library.
In some embodiments of the present invention, according to the report identity, a search is performed in a template configuration policy library to determine a template configuration policy corresponding to the report.
In some embodiments of the present invention, S103 may be implemented through S1031 to S1032, which are specifically described in connection with the following steps.
S1031, matching the query parameters with a plurality of keywords in the template configuration strategy, and determining configuration data and query sentences.
In some embodiments of the invention, the page development device matches the query parameters with a plurality of keywords in the template configuration policy to determine query statements and configuration data that can be rendered directly through the generic template.
S1032, carrying out data query based on the query statement to obtain query data.
In some embodiments of the present invention, after obtaining the query statement, data query is performed according to the query statement to obtain query data, and then the query data is sent to the front end.
In some embodiments of the present invention, as shown in fig. 7, fig. 7 is a schematic flow chart of a general template code obtaining data according to an embodiment of the present invention. Requesting url from the first front end page; finding a corresponding template configuration strategy according to url; and reading the template strategy data. And directly inquiring and returning a part of the read template strategy data to the front-end universal template. The method mainly comprises 3 parts, namely header display, form title and query parameter display, wherein the data of the part is directly returned to a foreground, and the foreground is directly rendered and used for displaying. The other part is to load table data, wherein 4 parameters, data strategies, query parameters, databases and data sources need to be read for the loading of the table data. And then determining the type of the database according to the read database, wherein a java annotation mode is adopted, and corresponding implementation classes are dynamically loaded according to the type of the database, so that different implementation classes are loaded. Currently, the types of databases such as ES, mysql, sqlserver and the like are supported, and a specific data source is determined according to the read data source. And fusing the query parameters and the policies to generate a final data query sql, and returning the table data. And finally, transmitting the data to a front-end universal page (namely, a front-end universal template), and rendering the data returned by the page development device by the front-end universal page (namely, rendering the front-end page) to generate a final front-end page.
In some embodiments of the present invention, S1032 may be implemented through S10321 to S10322, which are specifically described in connection with the following steps.
S10321, replacing parameters in the parameter query statement by adopting the query parameters to obtain the target query statement.
In some embodiments of the present invention, after the page development device obtains the parameter query statement, the parameter in the parameter query statement is replaced by the query parameter input by the user, so as to obtain the target query statement.
S10322, carrying out data query through the target query statement to obtain query data.
In some embodiments of the present invention, after the target query statement is obtained, the data query is performed through the target query statement, so as to obtain query data.
In some embodiments of the invention, the parametric query statement comprises: a data query statement. S10321 can be implemented by S201 to S202, and is specifically described in connection with the following steps.
S201, replacing parameters in the data query statement by adopting query parameters to obtain a replaced data query statement.
In some embodiments of the present invention, the parameter query statement includes a data query statement, and the parameters in the data query statement are replaced by the query parameters input by the user, so as to obtain a replaced data query statement. The page development device returns the result of the query statement to the front-end table data to render the front-end table.
In some embodiments of the present invention, the parameters used to configure the front-end interface to pass to the back-end may be: keywords, names corresponding to the keywords, and types. Such as: when the page requirement needs to fill in an area to inquire staff, the keyword is area_no, the name is the area, and the corresponding types are as follows: SELECTAREA. When a specific employee type query is performed, the keyword is user_type, the name is employee type, and if the corresponding type is select type, a configuration SELECTITEM attribute is required, and the attribute represents an enumeration value of a drop-down box. When the employee types are multiple, the employee type comprises multiple keywords and corresponding names, and if the keywords are A, the corresponding names are full-time labor contractors; when the keyword is E, the corresponding name is labor dispatch; and when the keyword is P, the corresponding name is other forms of labor service outsourcing. When the date is selected, the keyword is business_date, the corresponding name is date, and the corresponding type is DATETIMERANGE. Wherein A, E, P can be set by itself, the invention is not limited.
S202, obtaining a target query statement based on the replaced data query statement.
In some embodiments of the present invention, the target query statement is derived based on the replaced data query statement.
In some embodiments of the invention, the parametric query statement comprises: the table page number query term and the table group number query term, S202 can be implemented by S2021 to S2023, and the following steps are specifically described.
S2021, replacing the parameters in the table paging number query statement with the query parameters to obtain a replaced table paging number query statement.
In some embodiments of the present invention, the parameter query statement includes a table paging count query statement, the table paging count query statement is replaced by a query parameter input by a user, a replaced table paging count query statement is obtained, and the page development device returns a result queried by the query statement to the front-end paging control, and renders the front-end table paging control.
In some embodiments of the present invention, the table paging number query statement is used to configure the number of table queries, mainly for paging use, to return the total number of tables. When specific query is carried out, according to a specific value input by a user, replacing corresponding parameters in the statement, if a full-time labor service contractor is input, replacing a user_type in the query statement by the full-time labor service contractor.
S2022, replacing the parameters in the table grouping number query statement with the query parameters to obtain a replaced table grouping number query statement.
In some embodiments of the present invention, the parameter query statement comprises a table grouping entry query statement that is used to query data of a grouping table. And replacing parameters in the table grouping number query statement by using the query parameters input by the user to obtain a replaced table grouping number query statement.
S2023, fusing the replaced data query statement, the replaced table paging number query statement and the replaced table grouping number query statement to obtain a target query statement.
In some embodiments of the present invention, the replaced data query statement, the replaced table paging number query statement, and the replaced table grouping number query statement are fused to obtain the target query statement.
In some embodiments of the present invention, S10322 may be implemented through S103221, which will be specifically described in connection with the following steps.
S103221, according to the target query statement, carrying out data query in the corresponding database to obtain query data.
In some embodiments of the present invention, according to the target query statement, data query is performed in the corresponding database to obtain query data.
In some embodiments of the present invention, the page development method further includes S301 before S101, and S301 may be implemented through S301 to S303, which are specifically described in connection with the following steps.
S301, acquiring respective page functions of a plurality of report pages.
In some embodiments of the present invention, a plurality of report pages are collected, and respective page functions of the plurality of report pages are obtained.
S302, comparing the respective page functions with a preset threshold value to determine the general page functions.
In some embodiments of the present invention, the page functions of the report form are compared with a preset threshold, and the general page function is determined according to the comparison result. The preset threshold is the frequency of the page function being used.
S303, integrating the general page functions to obtain a front-end general page.
In some embodiments of the present invention, the obtained generic page functions are integrated to obtain a front-end generic page.
In some embodiments of the invention, the front-end generic page generally includes query terms, regions, distribution centers, warehouses, and the list presentation includes warehouse data, region data.
In some embodiments of the present invention, S104 further includes S1041, which is specifically described by the following steps.
S1041, after the page function on the front-end general page or the data logic function in the configuration strategy is modified, receiving the modified front-end general page or the modified template configuration strategy.
In some embodiments of the present invention, if the logic requirement of the page or the page development device is modified, only the corresponding configuration parameters need to be modified, and finally the modified front-end generic page or the modified template configuration policy is received.
In some embodiments of the present invention, as shown in fig. 8, fig. 8 is a schematic diagram illustrating an effect of front-end template design according to an embodiment of the present invention. The functional modules of the front-end general page are divided into 3 modules in total, namely an input parameter module, a data display module and a functional button module. The input parameter module mainly comprises report query parameters, and the supported front-end plug-ins mainly comprise an input frame, a start date frame and 3 plug-ins of a drop-down selection frame (drop-down value support configuration in the selection frame). The data display module is mainly responsible for displaying list data, supporting the configurable title display, header display and paging function of the configured title with the list data. The function button module mainly comprises functions commonly used by front-end pages, such as inquiry, reset and export functions, and the current export functions support asynchronous export and synchronous export. When the data of the query is larger than 2W, the asynchronous export is automatically triggered, a link of a file system is generated, and the file system is directly downloaded.
In some embodiments of the present invention, the front-end generic page uses vue language, 3 functional modules, no fixed tags, the tag display content obtains data from the page development device, and the display tag of each module obtains data from the page development device and dynamically renders.
In some embodiments of the present invention, as shown in fig. 9, fig. 9 is a schematic diagram of a design effect of a data interface module of a page development device according to an embodiment of the present invention. The page development device mainly comprises 2 modules, namely a general template code design and a template configuration strategy design. The universal template code is used for analyzing the template configuration strategy, and finally, data which can be analyzed by the front-end universal page is generated.
In some embodiments of the present invention, the template configuration policy mainly comprises 2 modules: the design module and the data design module are shown.
In some embodiments of the present invention, as shown in fig. 10, fig. 10 is a schematic diagram of a template configuration policy effect provided in an embodiment of the present invention, including a display design module and a data design module.
In some embodiments of the present invention, the display design module of FIG. 10 is used to configure the page display of the front-end generic page. Mainly contains 3 attributes: the header display, such as the header of the front-end general page and the data table, can achieve the purpose of modifying the content of the header display by modifying the attribute. The title of the table is displayed mainly for displaying column names of the data table in json format. The form url is used to uniquely mark the page, and the page development device needs to search the front page through the form url when loading data.
In some embodiments of the present invention, the data design module in fig. 10 is configured to configure the page display of the front-end generic page, and mainly includes table data, data source, paging data and parameter design.
In some embodiments of the present invention, fig. 11 is a schematic illustration of an entity effect of a template configuration policy provided in an embodiment of the present invention, where the template configuration policy includes: report key, report name, number of table bars query number sql, query data sql, grouping query data sql, enter parameters, column header display, report data type, data source, number of table data bars above sql. The report key can be a central junction structure; report names may be a first-line tooling structure in FIG. 3; the table number sql is used for configuring dynamic data of the table paging number, the field data type is database script language, a corresponding sql is configured, the page development device returns the result of the sql query to the front-end paging control, and the front-end table paging control is rendered, such as the total number of warehouse data in fig. 3. The query data sql is used for configuring dynamic data sql of the form, the field data type is database script language, a corresponding sql is configured, and the page development device returns the result of the sql query to the front-end form data to render the front-end form. The packet query data sql functions similarly to the query data sql, except that the packet query data sql is used to represent data of a packet table. The parameter control is used for marking the front-end page query parameter control, and the parameter frame displayed on the front-end page can be dynamically configured through the attribute. The query parameters mainly contain 3 attributes: a parameter id; parameter name: the display value and the parameter frame type displayed on the front page. The parameter frame types include: an input box control, a drop down selection box control, and a time selection box control. Drop-down option options of the selection frame; the report data types in the configuration strategy are used for marking database types and supporting common databases such as ES, mysql, sqlserver, oracle and the like; the data source configures a specific data source. If the data source selects mysql, a database with appointed access can be configured, and the pre-warning database is supported currently: lasalarm and a centralized management database wmsun. The table data number sql is used to configure the number of table queries, and is mainly used for paging, and the total number of table data, such as the number of data in the region data in fig. 3, is returned.
In some embodiments of the present invention, fig. 12 is a schematic diagram of a table data column header display effect provided in the embodiment of the present invention, namely, content 8 in fig. 3. Column head display: the list of data for configuring the following table is displayed as date, area, employee type, attendance, etc., and the present invention is not limited thereto.
It can be understood that in the embodiment of the invention, a user can input query parameters on the existing front-end general page, the page development device receives a report data request carrying report identifiers and query parameters, and finds a corresponding template configuration strategy according to the report identifiers; and finally, the page development device transmits the configuration data and the query data to the front end so that the front end performs page rendering on the configuration data and the query data based on the universal template. By inquiring the data on the existing front-end general page, the development period of the front-end general page is reduced, and the page development efficiency is improved.
The embodiment of the invention provides a page development method, as shown in fig. 13, fig. 13 is a schematic flow chart of the page development method provided by the embodiment of the invention, and the following steps are specifically described.
S1, a front end sends a report data request carrying report identifiers and user query parameters.
In the embodiment of the invention, a user inputs parameters to be queried in a front-end general page, the front-end general page responds to the touch of the user, generates a report data request, and sends the report data request to a page development device.
S2, after the page development device acquires the report mark, the configuration strategy is found in the template configuration strategy library according to the report mark.
S3, the page development device acquires the target query statement and the configuration data according to the parameter query statement and the user query parameter in the template configuration strategy.
And S4, the page development device searches in a corresponding database according to the target query statement to acquire query data.
And S5, the page development device sends the query data and the configuration data to the front end so that the front end performs page rendering on the configuration data and the query data based on the universal template.
In the embodiment of the present invention, after S5, after the page function on the front-end generic page or the data logic function in the configuration policy is modified, the modified front-end generic page or the modified template configuration policy is received.
It can be understood that in the embodiment of the invention, the method performs the interaction between the data through the front-end general page and the page development device template configuration strategy existing at the front end, and only the corresponding configuration parameters need to be modified if the logic requirement of the page or the page development device is subsequently modified, thereby saving the page development resources and improving the page development efficiency.
An embodiment of the present invention provides a page developing apparatus, as shown in fig. 14, fig. 14 is a schematic structural diagram of the page developing apparatus, where the page developing apparatus includes: a receiving unit 1401, a determining unit 1402, an acquiring unit 1403, a transmitting unit 1404, and a rendering unit 1405; wherein,
The receiving unit 1401 is configured to receive a report data request sent by a front end; the report data request carries a report identifier and query parameters; the report data request is obtained in response to front-end universal page triggering;
the determining unit 1402 is configured to determine the template configuration policy according to the report identifier;
The obtaining unit 1403 is configured to obtain configuration data and query data according to the template configuration policy and the query parameter;
the sending unit 1404 is configured to transmit the configuration data and the query data to the front end;
the rendering unit 1405 renders pages of the configuration data and the query data by the front end based on a common template.
In some embodiments of the present invention, the determining unit 1402 is further configured to determine a template configuration policy from a template configuration policy library according to the report identifier.
In some embodiments of the present invention, the determining unit 1402 is further configured to match the query parameter with a plurality of keywords in the template configuration policy, and determine the configuration data and a query statement; and carrying out data query based on the query statement to obtain the query data.
In some embodiments of the invention, the query statement comprises: a parameter query statement; the determining unit 1402 is further configured to replace a parameter in the parameter query statement with the query parameter to obtain a target query statement; and carrying out data query through the target query statement to obtain the query data.
In some embodiments of the invention, the parametric query statement comprises: a data query statement; the determining unit 1402 is further configured to replace parameters in the data query statement with the query parameters to obtain a replaced data query statement; and obtaining the target query statement based on the replaced data query statement.
In some embodiments of the invention, the parametric query statement comprises: a table paging number inquiry statement and a table grouping number inquiry statement; the determining unit 1402 is further configured to replace the query parameter with a parameter in the table paging number query statement to obtain a replaced table paging number query statement; and replacing the parameters in the table grouping number query statement with the query parameters to obtain a replaced table grouping number query statement; and fusing the replaced data query statement, the replaced table paging number query statement and the replaced table grouping number query statement to obtain the target query statement.
In some embodiments of the present invention, the determining unit 1402 is further configured to perform data query in a corresponding database according to the target query statement, to obtain the query data.
In some embodiments of the present invention, the determining unit 1402 is further configured to obtain a page function of each of the plurality of report pages before receiving the report data request sent by the front end; comparing the respective page functions with a preset threshold value to determine a general page function; and integrating the general page functions to obtain the front-end general page.
In some embodiments of the invention, the page developing apparatus further includes a modification unit; the modifying unit is used for receiving the modified front-end general page or the modified template configuration strategy after the page function on the front-end general page or the data logic function in the configuration strategy is modified after the configuration data and the query data are transmitted to the front end so that the front end performs page rendering on the configuration data and the query data based on the general template.
In some embodiments of the invention, the front-end generic page comprises: inputting parameter controls, data presentation controls and the function button controls; the input parameter control comprises: an input box plug-in, a start date box plug-in and a drop-down selection box plug-in; the data display control is used for configuring the title display, the header display and the paging function of the list data; the function button control comprises: query controls, reset controls, and export controls.
In some embodiments of the invention, the template configuration policy includes: displaying the design control and the data design control; the display design control is used for configuring configuration data for page display of the front-end general page; the page display includes: header display, form header display, and form identification; the data design control is used for acquiring form data, paging data, parameter design and data sources through query sentences.
It can be understood that in the implementation scheme of the device, the report data request sent by the front end is received; the report data request carries a report identifier and query parameters; the report data request is obtained in response to the front-end universal page trigger; determining a template configuration strategy according to the report identity; acquiring configuration data and query data according to a template configuration strategy and query parameters; and transmitting the configuration data and the query data to the front end so that the front end performs page rendering on the configuration data and the query data based on the universal template. According to the method, the interaction between data is carried out through the existing general page and page development device template configuration strategy at the front end, and if the logic requirement of the page or the page development device is subsequently modified, only the corresponding configuration parameters are required to be modified, so that page development resources are saved, and page development efficiency is improved.
Based on the method of the foregoing embodiment, as shown in fig. 15, fig. 15 is a schematic structural diagram of a page development device according to the embodiment of the present invention, where the schematic structural diagram includes: a processor 1501 and a memory 1502; the memory 1502 stores one or more programs executable by the processor 1501, and when the one or more programs are executed, a page development method corresponding to the foregoing embodiment is executed by the processor 1501.
The embodiment of the invention provides a computer readable storage medium which stores executable instructions for realizing the page development method when being executed by a processor.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention.

Claims (14)

1.A method of developing a page, comprising:
Receiving a report data request sent by a front end; the report data request carries a report identifier and query parameters; the report data request is obtained in response to front-end universal page triggering;
Determining a template configuration strategy according to the report identity;
acquiring configuration data and query data according to the template configuration strategy and the query parameters;
and transmitting the configuration data and the query data to the front end so that the front end performs page rendering on the configuration data and the query data based on a universal template.
2. The method of claim 1, wherein determining a template configuration policy based on the report identity comprises:
and determining the template configuration strategy according to the report identity from a template configuration strategy library.
3. The method according to claim 1 or 2, wherein the obtaining configuration data and query data according to the template configuration policy and the query parameters comprises:
matching the query parameters with a plurality of keywords in the template configuration strategy, and determining the configuration data and query sentences;
and carrying out data query based on the query statement to obtain the query data.
4. A method according to claim 3, wherein the query statement comprises: a parameter query statement;
the step of carrying out data query based on the query statement to obtain the query data comprises the following steps:
replacing parameters in the parameter query statement by adopting the query parameters to obtain a target query statement;
and carrying out data query through the target query statement to obtain the query data.
5. The method of claim 4, wherein the parametric query statement comprises: a data query statement;
The step of replacing parameters in the parameter query statement by the query parameters to obtain a target query statement comprises the following steps:
replacing parameters in the data query statement by adopting the query parameters to obtain a replaced data query statement;
and obtaining the target query statement based on the replaced data query statement.
6. The method of claim 5, wherein the parametric query statement comprises: a table paging number inquiry statement and a table grouping number inquiry statement;
the obtaining the target query statement based on the replaced data query statement includes:
replacing the parameters in the table paging number query statement with the query parameters to obtain a replaced table paging number query statement;
Replacing the parameters in the table grouping number query statement with the query parameters to obtain a replaced table grouping number query statement;
And fusing the replaced data query statement, the replaced table paging number query statement and the replaced table grouping number query statement to obtain the target query statement.
7. The method according to claim 4, wherein said performing a data query by said target query statement to obtain said query data comprises:
and according to the target query statement, carrying out data query in a corresponding database to obtain the query data.
8. The method of claim 1, wherein prior to receiving the report data request sent by the front end, the method further comprises:
acquiring respective page functions of a plurality of report pages;
Comparing the respective page functions with a preset threshold value to determine a general page function;
and integrating the general page functions to obtain the front-end general page.
9. The method of claim 1, wherein after the transmitting the configuration data and the query data to the front end, the method further comprises:
And when the page function on the front-end general page or the data logic function in the configuration strategy is modified, receiving the modified front-end general page or the modified template configuration strategy.
10. The method according to any one of claims 1 to 9, wherein,
The front-end generic page comprises: inputting parameter controls, data presentation controls and function button controls;
the input parameter control comprises: an input box plug-in, a start date box plug-in and a drop-down selection box plug-in;
the data display control is used for configuring the title display, the header display and the paging function of the list data;
the function button control comprises: query controls, reset controls, and export controls.
11. The method according to any one of claims 1 to 9, wherein,
The template configuration strategy comprises the following steps: displaying the design control and the data design control;
the display design control is used for configuring configuration data for page display of the front-end general page; the page display includes: header display, form header display, and form identification;
the data design control is used for acquiring form data, paging data, parameter design and data sources through query sentences.
12. A page development device, comprising: the device comprises a receiving unit, a determining unit, an acquiring unit, a sending unit and a rendering unit; wherein,
The receiving unit is used for receiving the report data request sent by the front end; the report data request carries a report identifier and query parameters; the report data request is obtained in response to front-end universal page triggering;
the determining unit is used for determining a template configuration strategy according to the report identifier;
the acquisition unit is used for acquiring configuration data and query data according to the template configuration strategy and the query parameters;
the sending unit is used for transmitting the configuration data and the query data to the front end;
The rendering unit is used for rendering the page by the front end based on the configuration data and the query data by the universal template.
13. A page development device, comprising:
A memory for storing executable instructions;
a processor for implementing the page development method of any one of claims 1-11 when executing executable instructions stored in the memory.
14. A computer readable storage medium storing executable instructions which, when executed, are adapted to cause a processor to perform the page development method of any one of claims 1-11.
CN202211589281.XA 2022-12-09 2022-12-09 Page development method and device and computer readable storage medium Pending CN118170370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211589281.XA CN118170370A (en) 2022-12-09 2022-12-09 Page development method and device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211589281.XA CN118170370A (en) 2022-12-09 2022-12-09 Page development method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN118170370A true CN118170370A (en) 2024-06-11

Family

ID=91347473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211589281.XA Pending CN118170370A (en) 2022-12-09 2022-12-09 Page development method and device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN118170370A (en)

Similar Documents

Publication Publication Date Title
US11720631B2 (en) Tool to build and store a data model and queries for a graph database
CN106951430B (en) Account table query method and device
CN104572122B (en) A kind of generating means and method of software application data
US20160173122A1 (en) System That Reconfigures Usage of a Storage Device and Method Thereof
US20120215751A1 (en) Transaction prediction modeling method
US7624122B2 (en) Method and system for querying a database
CN102810094A (en) Report generation method and device
CN109815382B (en) Method and system for sensing and acquiring large-scale network data
CN106293891B (en) Multidimensional investment index monitoring method
CN111061733B (en) Data processing method, device, electronic equipment and computer readable storage medium
CN109753596B (en) Information source management and configuration method and system for large-scale network data acquisition
US20060129609A1 (en) Database synchronization using change log
KR101877828B1 (en) User interface integrated platform system based on artificial intelligence
CN109308258A (en) Building method, device, computer equipment and the storage medium of test data
CN113608955B (en) Log recording method, device, equipment and storage medium
CN112148343A (en) Rule issuing method and device and terminal equipment
CN109086476B (en) Data processing method for drawing design, PLM plug-in and computing equipment
CN109636303B (en) Storage method and system for semi-automatically extracting and structuring document information
CN104462461A (en) Form null value check processing method and device
CN118170370A (en) Page development method and device and computer readable storage medium
EP1901219A1 (en) Workflow management system
CN114185987B (en) Data development visualization method, device, equipment and storage medium
Marotta et al. Managing source schema evolution in web warehouses
CN114546220A (en) Page configuration method and device, storage medium and computer equipment
CN112633894A (en) Method, device, equipment and computer storage medium for pressure testing of repayment capacity

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