CN115712422A - Form page generation method and device, computer equipment and storage medium - Google Patents

Form page generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN115712422A
CN115712422A CN202211387041.1A CN202211387041A CN115712422A CN 115712422 A CN115712422 A CN 115712422A CN 202211387041 A CN202211387041 A CN 202211387041A CN 115712422 A CN115712422 A CN 115712422A
Authority
CN
China
Prior art keywords
configuration
component
page
target
field
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
CN202211387041.1A
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.)
Ping An Property and Casualty Insurance Company of China Ltd
Original Assignee
Ping An Property and Casualty Insurance Company of China 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 Ping An Property and Casualty Insurance Company of China Ltd filed Critical Ping An Property and Casualty Insurance Company of China Ltd
Priority to CN202211387041.1A priority Critical patent/CN115712422A/en
Publication of CN115712422A publication Critical patent/CN115712422A/en
Pending legal-status Critical Current

Links

Images

Abstract

The embodiment of the application belongs to the field of big data, and relates to a method for generating a form page, which comprises the following steps: judging whether a form page configuration request input by a user is received or not; if yes, displaying a preset configuration page, and receiving a form configuration item input by a user in the configuration page; analyzing the form configuration items based on preset configuration rules, and analyzing form item type fields and form content fields from the form configuration items; acquiring a target form component corresponding to the form item type field; acquiring a target configuration field corresponding to a form content field; and carrying out form configuration based on the target form component and the target configuration field to generate a corresponding target form page. The application also provides a form page generation device, computer equipment and a storage medium. In addition, the present application also relates to a blockchain technique, and the target table can be stored in the blockchain. According to the form page generation method and device, the form page can be automatically generated based on the form configuration items input by the user, and the generation efficiency of the form page is improved.

Description

Form page generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of big data technologies, and in particular, to a method and an apparatus for generating a form page, a computer device, and a storage medium.
Background
The form page is mainly used for realizing a data acquisition function, with the development of an artificial intelligence technology and a mobile information system, a plurality of functions can complete data display or collection by means of the form, and a management system of a plurality of insurance companies needs to describe data by describing some characteristic information of the data to complete data perception. Usually, the form page occupies most of the pages in the entire management system of the insurance company, and is a common page. If there is no unified design and development control over the form page, the style of the entire management system will be affected.
Currently, there are many open-source frameworks on the market that are suitable for management systems, all of which have their own set of styles. For form pages with similar control styles, different developers have different thinking, so that the developed form page styles and code styles are different, and the consistency of the system styles and the maintainability of codes are difficult to realize. Moreover, each form page needs to be developed independently by a developer, so that a large amount of codes are repeated, the developer has a large amount of repeated labor in the development process, the labor cost is increased, the resources are wasted, and the development efficiency of the form page is low.
Disclosure of Invention
An object of the embodiment of the present application is to provide a form page generation method, an apparatus, a computer device, and a storage medium, so as to solve the technical problems that an existing form page needs to be developed by a developer alone, and thus a large amount of codes are repeated, so that the developer has a large amount of repeated labor in a development process, labor cost is increased, resources are wasted, and development efficiency of the form page is low.
In order to solve the above technical problem, an embodiment of the present application provides a method for generating a form page, which adopts the following technical solutions:
judging whether a form page configuration request input by a user is received or not;
if yes, displaying a preset configuration page, and receiving a form configuration item input by the user in the configuration page;
analyzing the form configuration item based on a preset configuration rule, and analyzing form item type fields and form content fields from the form configuration item;
acquiring a target form component corresponding to the form item type field;
acquiring a target configuration field corresponding to the form content field;
and carrying out form configuration on the basis of the target form component and the target configuration field, and generating a corresponding target form page.
Further, the step of obtaining the target form component corresponding to the form item type field specifically includes:
acquiring a first configuration parameter corresponding to the form item type field from the form configuration item;
calling a preset first mapping table;
acquiring component information corresponding to the first configuration parameter from the first mapping table;
and acquiring a component corresponding to the component information to obtain the target form component.
Further, the step of obtaining the component corresponding to the component information to obtain the target form component specifically includes:
calling a preset component file;
performing query processing on the component file based on the component information, and acquiring a component corresponding to the component information from the component file;
and taking the component corresponding to the component information as the target form component.
Further, before the step of calling the preset component file, the method further includes:
judging whether a form component configuration request triggered by a specified user is received;
if yes, acquiring a preset component configuration file; the component configuration file comprises form items of form components to be configured, and the number of the form components to be configured comprises a plurality of form items;
calling a function configuration code corresponding to the form item of the form component to be configured;
generating a source code of the form component to be configured based on the function configuration code corresponding to the form component to be configured;
rendering the source code of the form component to be configured to obtain a configured form component;
and storing the form component into a preset file to obtain the component file.
Further, the step of obtaining the target configuration field corresponding to the form content field specifically includes:
acquiring a second configuration parameter corresponding to the form content field from the form configuration item;
calling a preset second mapping table;
acquiring field information corresponding to the second configuration parameter from the second mapping table;
and acquiring a field corresponding to the field information to obtain the target configuration field.
Further, the step of performing form configuration based on the target form component and the target configuration field to generate a corresponding target form page specifically includes:
calling a preset initial page;
rendering the target configuration field in the initial page; and the number of the first and second groups,
and rendering the target form component in the initial page to obtain the target form page.
Further, the step of analyzing the form configuration item based on a preset configuration rule, analyzing a form item type field from the form configuration item, and analyzing a form content field from the form configuration item specifically includes:
acquiring a preset configuration standard condition;
verifying the form configuration item based on the configuration specification condition, and judging whether the form configuration item meets the configuration specification condition;
and if the configuration standard condition is met, analyzing the form configuration item based on the preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item.
In order to solve the above technical problem, an embodiment of the present application further provides a device for generating a form page, where the following technical solutions are adopted:
the judging module is used for judging whether a form page configuration request input by a user is received or not;
the receiving module is used for displaying a preset configuration page and receiving the form configuration items input by the user in the configuration page if the preset configuration page is displayed;
the analysis module is used for analyzing the form configuration item based on a preset configuration rule and analyzing a form item type field and a form content field from the form configuration item;
the first acquisition module is used for acquiring a target form component corresponding to the form item type field;
the second acquisition module is used for acquiring a target configuration field corresponding to the form content field;
and the generating module is used for carrying out form configuration on the basis of the target form component and the target configuration field and generating a corresponding target form page.
In order to solve the above technical problem, an embodiment of the present application further provides a computer device, which adopts the following technical solutions:
judging whether a form page configuration request input by a user is received or not;
if yes, displaying a preset configuration page, and receiving a form configuration item input by the user in the configuration page;
analyzing the form configuration item based on a preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item;
acquiring a target form component corresponding to the form item type field;
acquiring a target configuration field corresponding to the form content field;
and performing form configuration on the basis of the target form component and the target configuration field to generate a corresponding target form page.
In order to solve the foregoing technical problem, an embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solutions:
judging whether a form page configuration request input by a user is received or not;
if yes, displaying a preset configuration page, and receiving a form configuration item input by the user in the configuration page;
analyzing the form configuration item based on a preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item;
acquiring a target form component corresponding to the form item type field;
acquiring a target configuration field corresponding to the form content field;
and carrying out form configuration on the basis of the target form component and the target configuration field, and generating a corresponding target form page.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
after receiving a form page configuration request input by a user, the embodiment of the application firstly displays a preset configuration page and receives form configuration items input by the user in the configuration page; then analyzing the form configuration item based on a preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item; then acquiring a target form component corresponding to the form item type field; subsequently acquiring a target configuration field corresponding to the form content field; and finally, carrying out form configuration based on the target form component and the target configuration field to generate a corresponding target form page. According to the form page generation method and device, the corresponding target form page can be quickly and automatically generated based on the form configuration items input by the user, so that the repetition of codes is greatly reduced, the generation efficiency of the form page is improved, the unification of the form page style is facilitated, and meanwhile, the later maintenance of the form page codes is facilitated.
Drawings
In order to more clearly illustrate the solution of the present application, the drawings needed for describing the embodiments of the present application will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow diagram of one embodiment of a method for generating a form page according to the present application;
FIG. 3 is a schematic diagram illustrating an embodiment of an apparatus for generating a form page according to the present application;
FIG. 4 is a schematic block diagram of one embodiment of a computer device according to the present application.
Detailed Description
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions. The terms "first," "second," and the like in the description and claims of this application or in the above-described drawings are used for distinguishing between different objects and not for describing a particular order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may use terminal devices 101, 102, 103 to interact with a server 105 over a network 104 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping application, a search application, an instant messaging tool, a mailbox client, social platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture experts Group Audio Layer III, mpeg compression standard Audio Layer 3), MP4 players (Moving Picture experts Group Audio Layer IV, mpeg compression standard Audio Layer 4), laptop portable computers, desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that the method for generating a form page provided in the embodiment of the present application is generally executed by a server/terminal device, and accordingly, the apparatus for generating a form page is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow diagram of one embodiment of a method of generating a form page in accordance with the present application is shown. The method for generating the form page comprises the following steps:
step S201, determining whether a form page configuration request input by a user is received.
In this embodiment, an electronic device (for example, a server/terminal device shown in fig. 1) on which the form page generation method operates may obtain the form page configuration request in a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G/5G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, an UWB (ultra wideband) connection, and other wireless connection means now known or developed in the future. The form page configuration request is a request triggered by a user and used for configuring and generating a required form page.
Step S202, if yes, a preset configuration page is displayed, and form configuration items input by the user in the configuration page are received.
In this embodiment, while the configuration page is displayed, content input reminding information may be generated and displayed, where the content input reminding information is used for reminding a user to input information of a form configuration item of a form page required for generating the configuration page on the configuration page. The form configuration item at least comprises data such as a form item type field, a first configuration parameter of the form item type field, a form content field, a second configuration parameter of the form content field and the like. For example, form configuration items may include: const file = [ { name: 'userName', label: 'name', type: 'input' ], or may include const file = [ { name: 'userType', label: 'user type', type: 'select' ].
Step S203, analyzing the form configuration item based on a preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item.
In this embodiment, the configuration rule is a rule preset according to actual service usage requirements and used for specifying a filling order of data in the form configuration item. For example, the configuration rule may include: the first part of content in the form configuration item comprises a form content field and configuration parameters of the form content field, the second part of content in the form configuration item comprises a configuration field and the configuration parameters of the configuration field, and the third part of content in the form configuration item comprises a form item type field and the configuration parameters of the form item type field. The form items of the form page may be pre-arranged, for example, the form items include an input box, a search box, a selection component, a date selector, etc., and are collectively referred to as form item types. Then, the form item type is preset, and a field name type is set for the form item type. And different mapping relationships can be given to different form item types according to the type, for example, the type of the input box is 'input', and the type of the search box is 'search'. And unifying the field names of the form contents into names, for example, the name of the name is mapped into a user name, and the name of the identity card number is mapped into a user ID.
And step S204, acquiring a target form component corresponding to the form item type field.
In this embodiment, the above-mentioned specific implementation process of obtaining the target form component corresponding to the form item type field is further described in detail in the following specific embodiments, and is not set forth herein more extensively.
And step S205, acquiring a target configuration field corresponding to the form content field.
In this embodiment, the above-mentioned specific implementation process of obtaining the target configuration field corresponding to the form content field is further described in detail in the following specific embodiments, and is not set forth herein more extensively.
And step S206, performing form configuration on the basis of the target form component and the target configuration field, and generating a corresponding target form page.
In this embodiment, the specific implementation process of performing form configuration based on the target form component and the target configuration field to generate a corresponding target form page is described in further detail in the following specific embodiments, and will not be described in detail herein.
After receiving a form page configuration request input by a user, the method firstly displays a preset configuration page and receives form configuration items input by the user in the configuration page; then analyzing the form configuration items based on preset configuration rules, and analyzing form item type fields and form content fields from the form configuration items; then acquiring a target form component corresponding to the form item type field; subsequently acquiring a target configuration field corresponding to the form content field; and finally, carrying out form configuration based on the target form component and the target configuration field to generate a corresponding target form page. According to the method and the device, the corresponding target form page can be quickly and automatically generated based on the form configuration items input by the user, so that the repetition of codes is greatly reduced, the generation efficiency of the form page is improved, the unification of the form page style is facilitated, and meanwhile, the maintenance of the form page codes in the later stage is facilitated.
In some optional implementations, step S204 includes the following steps:
and acquiring a first configuration parameter corresponding to the form item type field from the form configuration item.
In this embodiment, for example, if the contents of the form configuration item include: const file = [ { name: 'userName', label: 'name', type: 'input' }. Then the form type field can be parsed out from the form configuration item, which is "type", and the first configuration parameter corresponding to the form type field "type" is 'input'.
And calling a preset first mapping table.
In this embodiment, the first mapping table is a mapping table which is created in advance according to actual service usage requirements and stores configuration parameters of a plurality of components and component information corresponding to the configuration parameters of each component one to one. Specifically, different mapping relationships can be respectively constructed for different form item types, for example, if the type of the input box is 'input', then the component information corresponding to the configuration parameter 'input' is the input box; and if the type of the search box is 'search', the component information corresponding to the parameter 'search' is configured as the search box.
And acquiring component information corresponding to the first configuration parameter from the first mapping table.
In this embodiment, the first mapping table may be queried by using the first configuration parameter, so as to obtain the component information corresponding to the first configuration parameter from the first mapping table.
And acquiring a component corresponding to the component information to obtain the target form component.
In this embodiment, the specific implementation process of obtaining the target form component by obtaining the component corresponding to the component information is described in further detail in the following specific embodiments, and will not be elaborated herein.
According to the method and device for obtaining the target form component, the first configuration parameter corresponding to the form type field is obtained from the form configuration item, the component information corresponding to the first configuration parameter is obtained from the preset first mapping table, the component corresponding to the component information is further obtained, and the target form component is obtained, so that the target form component required by the construction of the target form can be quickly obtained based on the form configuration item input by a user, the corresponding target form page can be quickly, conveniently and automatically configured and generated based on the obtained target form component, and the generation efficiency of the target form page is improved.
In some optional implementation manners of this embodiment, the obtaining the component corresponding to the component information to obtain the target form component includes the following steps:
and calling a preset component file.
In this embodiment, the component file is a file that is constructed in advance and stores a plurality of form components for constructing a form. The form components may include an input box, a search box, a selection component, a date selector, a remark box, a drop-down box, a file save box, a file upload box, and the like. In addition, the construction process of the above component file will be further described in detail in the following specific embodiments, which are not set forth herein too much.
And performing query processing on the component file based on the component information, and acquiring a component corresponding to the component information from the component file.
In the present embodiment, the component file stores a plurality of form components for constructing the form, and component information corresponding to the form components one to one.
And taking the component corresponding to the component information as the target form component.
This application is through calling preset subassembly file, then based on the subassembly information is right the subassembly file is carried out inquiry processing, follow in the subassembly file acquire with the subassembly that the subassembly information corresponds, and will with the subassembly that the subassembly information corresponds is as target form subassembly, realized the form configuration item based on user input, obtain fast through inquiring the subassembly file and establish the required target form subassembly of target form for follow-up can realize fast convenient automatic configuration based on the target form subassembly that obtains and generate corresponding target form page, be favorable to improving the generating efficiency of target form page.
In some optional implementations, before the step of calling the preset component file, the electronic device may further perform the following steps:
and judging whether a form component configuration request triggered by a specified user is received.
In this embodiment, the designated user may be the same user or a different user. The form component configuration request is a request triggered by the specified user for configuring the form component.
If so, acquiring a preset component configuration file; the component configuration file comprises form items of form components to be configured, and the number of the form components to be configured comprises a plurality of.
In this embodiment, the number of the above list items may also include a plurality. The obtaining method of the component configuration file is not limited, for example, the component configuration file may be input into the electronic device by a specified user, or the component configuration file may be obtained by reading the component configuration file from a preset storage air through an interface by the electronic device. In addition, the component configuration file comprises a form item of the form component to be configured, which is input by a specified user in a text mode, and the form item can comprise an input box, a search box, a selection component, a date selector and the like. In addition, the component configuration file can also comprise configuration values of form items of the form components to be configured, and the configuration values of the form items are used for describing specific attributes of the form items. For example, for a search box, the configuration value of the search box may be the size of the search box.
And calling a function configuration code corresponding to the form item of the form component to be configured.
In this embodiment, the function configuration code of each form item is configured in advance. The function configuration code of the form item refers to a general code configured for the function of the form item. The function configuration code of each form item can be written and generated in advance according to the business requirements.
And generating the source code of the form component to be configured based on the function configuration code corresponding to the form component to be configured.
In this embodiment, the configuration value of the form item of the form component to be configured may be used as the entry parameter value of the function configuration code corresponding to the form component to be configured, so as to obtain the assigned function configuration code after assignment of the form item of the form component to be configured. And then integrating the specified function configuration codes corresponding to the form components to be configured to obtain the source codes of the form components to be configured. The method includes the steps that the designated function codes of the multiple form items can be integrated according to the incidence relation of the form items contained in each form item to be configured in a component configuration file, namely the function codes of the form items are mutually called, and then the source code of each form item to be configured is obtained.
And rendering the source code of the form component to be configured to obtain the configured form component.
In this embodiment, after the source code of the form component to be configured is obtained, the source code may be rendered by a js tool to obtain the configured form component.
And storing the form component into a preset file to obtain the component file.
In this embodiment, the preset file is a file created in advance for storing the configured form components.
When a triggered form component configuration request is received, a configured form component is generated by calling a preset component configuration file and a function configuration code corresponding to the component configuration file, and then the form component is stored in the preset file to generate the component file, so that when a form configuration item input by a user is received in the form configuration process, a target form component required for constructing a target form can be quickly acquired by inquiring the component file, and then, a corresponding target form page can be quickly, conveniently and automatically configured and generated based on the obtained target form component, and the generation efficiency of the target form page is favorably improved.
In some optional implementations, step S205 includes the following steps:
and acquiring a second configuration parameter corresponding to the form content field from the form configuration item.
In this embodiment, for example, if the contents of the form configuration item include: const file = [ { name: 'userType', label: 'user type', type: 'select' }. Then the form content field can be analyzed from the form configuration item to be "name", and the second configuration parameter corresponding to the form content field "name" is 'userType'.
And calling a preset second mapping table.
In this embodiment, the second mapping table is a mapping table that is created in advance according to actual service usage requirements and stores configuration parameters of a plurality of configuration fields and field information corresponding to the configuration parameters of each configuration field one to one. Specifically, different mapping relationships are respectively constructed for different configuration fields, for example, if the mapping corresponding to the name of the name is userName, the field information corresponding to the configuration parameter 'userName' is the name; and if the mapping corresponding to the name of the identity card number is userID, the field information corresponding to the parameter 'userID' is configured as the identity card number.
And acquiring field information corresponding to the second configuration parameter from the second mapping table.
In this embodiment, the second mapping table may be queried by using the second configuration parameter, so as to obtain the field information corresponding to the second configuration parameter from the second mapping table.
And acquiring a field corresponding to the field information to obtain the target configuration field.
In this embodiment, a preset field library may be queried, and a field corresponding to the field information may be queried from the field library, so as to obtain the target configuration field. The field library is a database which is created in advance according to actual service use requirements and stores a plurality of fields and field information which corresponds to the fields one by one.
According to the method and the device, the second configuration parameters corresponding to the form content fields are obtained from the form configuration items, the field information corresponding to the second configuration parameters is obtained from the preset second mapping table, the fields corresponding to the field information are further obtained, and the target configuration fields are obtained, so that the target configuration fields required by constructing the target form are quickly obtained based on the form configuration items input by a user, the corresponding target form pages can be quickly, conveniently and automatically configured and generated based on the obtained target configuration fields, and the generation efficiency of the target form pages is improved.
In some optional implementations of this embodiment, step S206 includes the following steps:
and calling a preset initial page.
In this embodiment, the initial page is a pre-constructed front-end page used for generating a form page.
Rendering the target configuration field in the initial page. And the number of the first and second groups,
and rendering the target form component in the initial page to obtain the target form page.
In this embodiment, the electronic device may send the target configuration field and the target form component to the front end, so as to render the target configuration field and the target form component in a front end page through the front end, thereby generating the target form page.
According to the method and the device, the preset initial page is called, the target configuration field is rendered in the initial page, and the target form component is rendered in the initial page, so that the corresponding target form page is quickly generated on the basis of the form configuration item input by a user, and the generation efficiency of the target form page is improved.
In some optional implementations of this embodiment, step S203 includes the following steps:
and acquiring a preset configuration standard condition.
In this embodiment, the configuration specification condition is a specification condition created in advance according to actual service usage requirements to specify a data format of a form configuration item input by a user.
And verifying the form configuration item based on the configuration specification condition, and judging whether the form configuration item meets the configuration specification condition.
In this embodiment, when the electronic device acquires a form configuration item that does not meet the configuration specification condition, processing exception may occur, and even a program may be crashed. Thus requiring verification of the form configuration items entered by the user. Specifically, after the user inputs the form configuration item, the form configuration item is checked and verified based on the configuration specification condition, for example, whether data in the input form configuration item meets a format requirement, whether the data meets a value range, and the like.
And if the configuration standard condition is met, analyzing the form configuration item based on the preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item.
In this embodiment, if it is verified that the form configuration item input by the user does not satisfy the requirement, the user is timely prompted and warned to correct the form configuration item, so as to avoid generating errors.
According to the method and the device, the preset configuration standard condition is obtained, the form configuration item is verified based on the configuration standard condition, only when the form configuration item is judged to be in accordance with the configuration standard condition, the follow-up execution is carried out, the form configuration item is analyzed based on the preset configuration rule, and the form type field and the form content field are analyzed from the form configuration item, so that the abnormal processing request can be effectively avoided when the form page configuration request is processed, the intelligence of form page configuration processing is improved, and the use experience of a user is improved.
It is emphasized that the target form may also be stored in a node of a blockchain in order to further ensure the privacy and security of the target form.
The block chain referred by the application is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. A block chain (Blockchain), which is essentially a decentralized database, is a string of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, which is used for verifying the validity (anti-counterfeiting) of the information and generating a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence base technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware that is configured to be instructed by computer-readable instructions, which can be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and may be performed in other orders unless explicitly stated herein. Moreover, at least a portion of the steps in the flow chart of the figure may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of execution is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
With further reference to fig. 3, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an apparatus for generating a form page, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various electronic devices.
As shown in fig. 3, the apparatus 300 for generating a form page according to this embodiment includes: the device comprises a judging module 301, a receiving module 302, a resolving module 303, a first obtaining module 304, a second obtaining module 305 and a generating module 306. Wherein:
the judging module 301 is configured to judge whether a form page configuration request input by a user is received;
a receiving module 302, configured to, if yes, display a preset configuration page, and receive a form configuration item input by the user in the configuration page;
the parsing module 303 is configured to parse the form configuration item based on a preset configuration rule, and parse a form item type field and a form content field from the form configuration item;
a first obtaining module 304, configured to obtain a target form component corresponding to the form item type field;
a second obtaining module 305, configured to obtain a target configuration field corresponding to the form content field;
and the generating module 306 is configured to perform form configuration based on the target form component and the target configuration field, and generate a corresponding target form page.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the method for generating a form page in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the first obtaining module 304 includes:
the first acquisition sub-module is used for acquiring a first configuration parameter corresponding to the form item type field from the form configuration item;
the first calling submodule is used for calling a preset first mapping table;
the second obtaining submodule is used for obtaining component information corresponding to the first configuration parameter from the first mapping table;
and the third obtaining submodule is used for obtaining the component corresponding to the component information to obtain the target form component.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the method for generating a form page in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the third obtaining sub-module includes:
the first calling unit is used for calling a preset component file;
the query unit is used for performing query processing on the component file based on the component information and acquiring a component corresponding to the component information from the component file;
and the determining unit is used for taking the component corresponding to the component information as the target form component.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the method for generating a form page in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the third obtaining sub-module further includes:
the judging unit is used for judging whether a form component configuration request triggered by a specified user is received;
the acquisition unit is used for acquiring a preset component configuration file if the preset component configuration file is acquired; the component configuration file comprises form items of form components to be configured, and the number of the form components to be configured comprises a plurality of form items;
the second calling unit is used for calling the function configuration code corresponding to the form item of the form component to be configured;
the generating unit is used for generating a source code of the form component to be configured based on the function configuration code corresponding to the form component to be configured;
the processing unit is used for rendering the source code of the list component to be configured to obtain a configured list component;
and the storage unit is used for storing the form component into a preset file to obtain the component file.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the method for generating a form page in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the second obtaining module 305 includes:
the fourth obtaining sub-module is used for obtaining a second configuration parameter corresponding to the form content field from the form configuration item;
the second calling submodule is used for calling a preset second mapping table;
a fifth obtaining submodule, configured to obtain field information corresponding to the second configuration parameter from the second mapping table;
and the sixth obtaining submodule is used for obtaining the field corresponding to the field information to obtain the target configuration field.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the method for generating a form page in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the generating module 306 includes:
the third calling submodule is used for calling a preset initial page;
a first rendering submodule, configured to render the target configuration field in the initial page; and the number of the first and second groups,
and the second rendering submodule is used for rendering the target form component in the initial page to obtain the target form page.
In this embodiment, the operations respectively executed by the modules or units correspond to the steps of the method for generating a form page in the foregoing embodiment one by one, and are not described herein again.
In some optional implementations of this embodiment, the parsing module 303 includes:
a seventh obtaining sub-module, configured to obtain a preset configuration specification condition;
the verification sub-module is used for verifying the form configuration item based on the configuration specification condition and judging whether the form configuration item meets the configuration specification condition;
and the execution sub-module is used for executing the step of analyzing the form configuration item based on the preset configuration rule and analyzing the form item type field and the form content field from the form configuration item if the configuration specification condition is met.
In this embodiment, the operations that the modules or units are respectively configured to execute correspond to the steps of the method for generating a form page in the foregoing embodiment one by one, and are not described herein again.
In order to solve the technical problem, the embodiment of the application further provides computer equipment. Referring to fig. 4, fig. 4 is a block diagram of a basic structure of a computer device according to the present embodiment.
The computer device 4 comprises a memory 41, a processor 42, a network interface 43 communicatively connected to each other via a system bus. It is noted that only computer device 4 having components 41-43 is shown, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components may be implemented instead. As will be understood by those skilled in the art, the computer device is a device capable of automatically performing numerical calculation and/or information processing according to instructions set or stored in advance, and the hardware thereof includes but is not limited to a microprocessor, an Application Specific Integrated Circuit (ASIC), a Programmable Gate Array (FPGA), a Digital Signal Processor (DSP), an embedded device, and the like.
The computer device can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The computer equipment can carry out man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch panel or voice control equipment and the like.
The memory 41 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 41 may be an internal storage unit of the computer device 4, such as a hard disk or a memory of the computer device 4. In other embodiments, the memory 41 may also be an external storage device of the computer device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the computer device 4. Of course, the memory 41 may also include both an internal storage unit of the computer device 4 and an external storage device thereof. In this embodiment, the memory 41 is generally used for storing an operating system installed in the computer device 4 and various application software, such as computer readable instructions of a method for generating a form page. Further, the memory 41 may also be used to temporarily store various types of data that have been output or are to be output.
The processor 42 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 42 is typically used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is configured to execute computer readable instructions stored in the memory 41 or process data, for example, execute computer readable instructions of the method for generating the form page.
The network interface 43 may comprise a wireless network interface or a wired network interface, and the network interface 43 is generally used for establishing communication connection between the computer device 4 and other electronic devices.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
in the embodiment of the application, after a form page configuration request input by a user is received, a preset configuration page is displayed firstly, and form configuration items input by the user in the configuration page are received; then analyzing the form configuration item based on a preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item; then acquiring a target form component corresponding to the form item type field; subsequently acquiring a target configuration field corresponding to the form content field; and finally, carrying out form configuration based on the target form component and the target configuration field to generate a corresponding target form page. According to the form page generation method and device, the corresponding target form page can be rapidly and automatically generated based on the form configuration items input by the user, so that the repetition of codes is greatly reduced, the generation efficiency of the form page is improved, the unification of the form page style is facilitated, and meanwhile, the later maintenance of the form page codes is facilitated.
The present application further provides another embodiment, which is to provide a computer-readable storage medium storing computer-readable instructions executable by at least one processor to cause the at least one processor to perform the steps of the method for generating a form page as described above.
Compared with the prior art, the embodiment of the application mainly has the following beneficial effects:
in the embodiment of the application, after a form page configuration request input by a user is received, a preset configuration page is displayed firstly, and form configuration items input by the user in the configuration page are received; then analyzing the form configuration item based on a preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item; then acquiring a target form component corresponding to the form item type field; subsequently acquiring a target configuration field corresponding to the form content field; and finally, carrying out form configuration based on the target form component and the target configuration field to generate a corresponding target form page. According to the form page generation method and device, the corresponding target form page can be quickly and automatically generated based on the form configuration items input by the user, so that the repetition of codes is greatly reduced, the generation efficiency of the form page is improved, the unification of the form page style is facilitated, and meanwhile, the later maintenance of the form page codes is facilitated.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
It should be understood that the above-described embodiments are merely exemplary of some, and not all, embodiments of the present application, and that the drawings illustrate preferred embodiments of the present application without limiting the scope of the claims appended hereto. This application is capable of embodiments in many different forms and is provided for the purpose of enabling a thorough understanding of the disclosure of the application. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to one skilled in the art that the present application may be practiced without modification or with equivalents of some of the features described in the foregoing embodiments. All equivalent structures made by using the contents of the specification and the drawings of the present application are directly or indirectly applied to other related technical fields and are within the protection scope of the present application.

Claims (10)

1. A method for generating a form page is characterized by comprising the following steps:
judging whether a form page configuration request input by a user is received or not;
if yes, displaying a preset configuration page, and receiving a form configuration item input by the user in the configuration page;
analyzing the form configuration item based on a preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item;
acquiring a target form component corresponding to the form item type field;
acquiring a target configuration field corresponding to the form content field;
and carrying out form configuration on the basis of the target form component and the target configuration field, and generating a corresponding target form page.
2. The method for generating a form page according to claim 1, wherein the step of obtaining the target form component corresponding to the form item type field specifically includes:
acquiring a first configuration parameter corresponding to the form item type field from the form configuration item;
calling a preset first mapping table;
acquiring component information corresponding to the first configuration parameter from the first mapping table;
and acquiring a component corresponding to the component information to obtain the target form component.
3. The method for generating a form page according to claim 2, wherein the step of obtaining the component corresponding to the component information to obtain the target form component specifically includes:
calling a preset component file;
inquiring the component file based on the component information, and acquiring a component corresponding to the component information from the component file;
and taking the component corresponding to the component information as the target form component.
4. The method for generating a form page according to claim 3, wherein before the step of calling the preset component file, the method further comprises:
judging whether a form component configuration request triggered by a specified user is received;
if so, acquiring a preset component configuration file; the component configuration file comprises form items of form components to be configured, and the number of the form components to be configured comprises a plurality of form items;
calling a function configuration code corresponding to the form item of the form component to be configured;
generating a source code of the form component to be configured based on the function configuration code corresponding to the form component to be configured;
rendering the source code of the form component to be configured to obtain a configured form component;
and storing the form component into a preset file to obtain the component file.
5. The method for generating a form page according to claim 1, wherein the step of obtaining the target configuration field corresponding to the form content field specifically includes:
acquiring a second configuration parameter corresponding to the form content field from the form configuration item;
calling a preset second mapping table;
acquiring field information corresponding to the second configuration parameter from the second mapping table;
and acquiring a field corresponding to the field information to obtain the target configuration field.
6. The method for generating a form page according to claim 1, wherein the step of performing form configuration based on the target form component and the target configuration field to generate a corresponding target form page specifically includes:
calling a preset initial page;
rendering the target configuration field in the initial page; and (c) a second step of,
and rendering the target form component in the initial page to obtain the target form page.
7. The method for generating a form page according to claim 1, wherein the steps of parsing the form configuration item based on a preset configuration rule, parsing a form item type field from the form configuration item, and parsing a form content field from the form configuration item specifically include:
acquiring a preset configuration standard condition;
verifying the form configuration item based on the configuration specification condition, and judging whether the form configuration item meets the configuration specification condition;
and if the configuration standard condition is met, analyzing the form configuration item based on the preset configuration rule, and analyzing a form item type field and a form content field from the form configuration item.
8. An apparatus for generating a form page, comprising:
the judging module is used for judging whether a form page configuration request input by a user is received or not;
the receiving module is used for displaying a preset configuration page and receiving a form configuration item input by the user in the configuration page if the preset configuration page is displayed;
the analysis module is used for analyzing the form configuration item based on a preset configuration rule and analyzing a form item type field and a form content field from the form configuration item;
the first acquisition module is used for acquiring a target form component corresponding to the form item type field;
the second acquisition module is used for acquiring a target configuration field corresponding to the form content field;
and the generating module is used for carrying out form configuration on the basis of the target form component and the target configuration field and generating a corresponding target form page.
9. A computer device comprising a memory having computer readable instructions stored therein and a processor which when executed implements the steps of the method of generating a form page as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, having computer-readable instructions stored thereon, which, when executed by a processor, implement the steps of the method of generating a form page according to any one of claims 1 to 7.
CN202211387041.1A 2022-11-07 2022-11-07 Form page generation method and device, computer equipment and storage medium Pending CN115712422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211387041.1A CN115712422A (en) 2022-11-07 2022-11-07 Form page generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211387041.1A CN115712422A (en) 2022-11-07 2022-11-07 Form page generation method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115712422A true CN115712422A (en) 2023-02-24

Family

ID=85232557

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211387041.1A Pending CN115712422A (en) 2022-11-07 2022-11-07 Form page generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115712422A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501318A (en) * 2023-06-27 2023-07-28 蘑菇车联信息科技有限公司 Form creation method, form creation device, electronic equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116501318A (en) * 2023-06-27 2023-07-28 蘑菇车联信息科技有限公司 Form creation method, form creation device, electronic equipment and computer readable storage medium
CN116501318B (en) * 2023-06-27 2023-11-28 蘑菇车联信息科技有限公司 Form creation method, form creation device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN115712422A (en) Form page generation method and device, computer equipment and storage medium
CN113010542A (en) Service data processing method and device, computer equipment and storage medium
CN112685115A (en) International cue language generating method, system, computer equipment and storage medium
CN117195886A (en) Text data processing method, device, equipment and medium based on artificial intelligence
CN116661936A (en) Page data processing method and device, computer equipment and storage medium
CN116383787A (en) Page creation method, page creation device, computer equipment and storage medium
CN116450723A (en) Data extraction method, device, computer equipment and storage medium
CN114968725A (en) Task dependency relationship correction method and device, computer equipment and storage medium
CN115546356A (en) Animation generation method and device, computer equipment and storage medium
CN115080045A (en) Link generation method and device, computer equipment and storage medium
CN115309649A (en) Test case generation method and device, computer equipment and storage medium
CN115731057A (en) Information generation method and device, computer equipment and storage medium
CN115829768A (en) Data calculation method, device and equipment based on rule engine and storage medium
CN115408638A (en) Compatible method, device and related equipment for webp format background picture browser
CN115562662A (en) Application page creating method and device, computer equipment and storage medium
CN116932486A (en) File generation method, device, computer equipment and storage medium
CN115809241A (en) Data storage method and device, computer equipment and storage medium
CN115756640A (en) Method for automatically generating job scheduling configuration and related equipment thereof
CN117421233A (en) Annotation-based code generation method, annotation-based code generation device, computer equipment and storage medium
CN117217684A (en) Index data processing method and device, computer equipment and storage medium
CN114969482A (en) Method for automatically completing request by online configuration interface and related equipment thereof
CN116820443A (en) Data analysis method, device, computer equipment and storage medium
CN116611936A (en) Data analysis method, device, computer equipment and storage medium
CN114510908A (en) Data export method and device, computer equipment and storage medium
CN116738084A (en) Buried data processing method, buried data processing device, computer equipment and storage medium

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