CN114266233A - Form generation method, device, equipment and medium - Google Patents
Form generation method, device, equipment and medium Download PDFInfo
- Publication number
- CN114266233A CN114266233A CN202111429320.5A CN202111429320A CN114266233A CN 114266233 A CN114266233 A CN 114266233A CN 202111429320 A CN202111429320 A CN 202111429320A CN 114266233 A CN114266233 A CN 114266233A
- Authority
- CN
- China
- Prior art keywords
- preset
- component
- preset form
- components
- generated
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 64
- 238000009877 rendering Methods 0.000 claims abstract description 30
- 238000012795 verification Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 11
- 238000011161 development Methods 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 238000010276 construction Methods 0.000 description 4
- 238000004590 computer program Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000008093 supporting effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005265 energy consumption Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008571 general function Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000011835 investigation Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
The invention provides a form generation method, a form generation device and a form generation medium, wherein the method comprises the following steps: acquiring the type of a form to be generated; determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated; responding to the dragging operation of a user on the plurality of preset form components, and moving the plurality of preset form components to a dragging terminal area; and rendering each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a form. According to the form generation method, when the form is generated, only the matched multiple preset form components and the preset form instance data need to be determined, re-development is not needed, and the form configuration efficiency is high.
Description
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a form generation method, apparatus, device, and medium.
Background
The form is generally used for collecting data, for example, collecting related business data when conducting business processing, thereby providing a basis for subsequent data statistics, analysis, and the like.
At present, forms need customized development during configuration, and for example, users need to configure different forms for product promotion, product investigation and the like, and need to develop the forms separately. The form construction requirement is accompanied by massive background logic, and the form configuration efficiency is low.
Disclosure of Invention
The invention provides a form generation method, a form generation device and a form generation medium, which are used for solving the problems that the construction requirement of the current form page is accompanied by heavy background logic and the form configuration efficiency is low.
The first aspect of the present invention provides a form generation method, including:
acquiring the type of a form to be generated;
determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated;
responding to the dragging operation of a user on the plurality of preset form components, and moving the plurality of preset form components to a dragging terminal area;
and rendering each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a form.
Further, the method for determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated includes:
determining a plurality of matched preset form components and preset form component identifications according to the type of the form to be generated;
and determining the matched preset form instance data according to the preset form component identification.
Further, the method for responding to the drag operation of the user on the preset form components and moving the preset form components to the drag destination area includes:
responding to the dragging operation of a user on a plurality of preset form components, and determining a dragging sequence according to the dragging operation;
and sequentially moving the preset form components to a dragging terminal area according to the dragging sequence.
Further, the method for rendering each preset form component dragged to the drag destination area and corresponding preset form instance data to generate a form includes:
respectively combining each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a corresponding intermediate form component;
and constructing linkage logic among the intermediate form components to generate the form.
Further, the method, after rendering each preset form component dragged to the drag destination area and corresponding preset form instance data to generate a form, further includes:
carrying out logic verification processing on the generated form;
and if the generated form passes the logic verification, storing the form in a preset database.
Further, the method as described above, further comprising:
receiving user-defined component generation information input by a user;
determining a preset form component matched with the custom component generation information from a back-end database in which the preset form component is stored;
and rendering the preset form component matched with the custom component generation information and the custom component generation information to generate a corresponding custom component.
Further, the method for determining the preset form component matched with the custom component generation information from the back-end database in which the preset form component is stored includes:
determining the type of the custom assembly to be generated according to the custom assembly generation information;
determining a plurality of preset form components related to the category of the to-be-generated custom component from a back-end database in which the preset form components are stored;
and selecting a preset form component with the highest matching degree from a plurality of preset form components related to the category of the to-be-generated custom component according to a preset selection strategy.
Further, the method for rendering the preset form component matched with the custom component generation information and the custom component generation information to generate the corresponding custom component includes:
and rendering the preset form component matched with the custom component generation information and the custom component generation information by adopting a React front-end framework to generate a corresponding custom component.
A second aspect of the present invention provides a form generation apparatus, including:
the acquisition module is used for acquiring the type of the form to be generated;
the determining module is used for determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated;
the dragging module is used for responding to dragging operation of a user on the preset form components and moving the preset form components to a dragging terminal area;
and the form generation module is used for rendering each preset form component dragged to the dragging terminal area and corresponding preset form instance data so as to generate a form.
Further, in the apparatus described above, the determining module is specifically configured to:
determining a plurality of matched preset form components and preset form component identifications according to the type of the form to be generated; and determining the matched preset form instance data according to the preset form component identification.
Further, in the apparatus described above, the dragging module is specifically configured to:
responding to the dragging operation of a user on a plurality of preset form components, and determining a dragging sequence according to the dragging operation; and sequentially moving the preset form components to a dragging terminal area according to the dragging sequence.
Further, in the apparatus described above, the form generation module is specifically configured to:
respectively combining each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a corresponding intermediate form component; and constructing linkage logic among the intermediate form components to generate the form.
Further, the apparatus as described above, further comprising:
the verification module is used for performing logic verification processing on the generated form; and if the generated form passes the logic verification, storing the form in a preset database.
Further, the apparatus as described above, further comprising:
the user-defined component generation module is used for receiving user-defined component generation information input by a user; determining a preset form component matched with the custom component generation information from a back-end database in which the preset form component is stored; and rendering the preset form component matched with the custom component generation information and the custom component generation information to generate a corresponding custom component.
Further, in the apparatus as described above, when determining the preset form component matching the custom component generation information from the back-end database storing the preset form component, the custom component generation module is specifically configured to:
determining the type of the custom assembly to be generated according to the custom assembly generation information; determining a plurality of preset form components related to the category of the to-be-generated custom component from a back-end database in which the preset form components are stored; and selecting a preset form component with the highest matching degree from a plurality of preset form components related to the category of the to-be-generated custom component according to a preset selection strategy.
Further, in the apparatus as described above, the custom component generation module is specifically configured to, when rendering the preset form component matched with the custom component generation information and the custom component generation information to generate a corresponding custom component:
and rendering the preset form component matched with the custom component generation information and the custom component generation information by adopting a React front-end framework to generate a corresponding custom component.
A third aspect of the present invention provides an electronic device comprising: a memory, a processor;
a memory; a memory for storing the processor-executable instructions;
wherein the processor is configured to perform the form generation method of any of the first aspect by the processor.
A fourth aspect of the present invention provides a computer-readable storage medium having stored therein computer-executable instructions for implementing the form generation method of any one of the first aspects when executed by a processor.
A fifth aspect of the invention provides a computer program product comprising a computer program which, when executed by a processor, implements the form generation method of any of the first aspects.
The invention provides a form generation method, a form generation device and a form generation medium, wherein the method comprises the following steps: acquiring the type of a form to be generated; determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated; responding to the dragging operation of a user on the plurality of preset form components, and moving the plurality of preset form components to a dragging terminal area; and rendering each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a form. According to the form generation method, the matched multiple preset form components and the preset form instance data can be determined through the acquired type of the form to be generated, and then the multiple preset form components are moved to the dragging terminal area in response to the dragging operation of a user on the multiple preset form components, so that the preset form components dragged to the dragging terminal area and the corresponding preset form instance data generate the form. According to the form generation method, when the form is generated, only the matched multiple preset form components and the preset form instance data need to be determined, re-development is not needed, and the form configuration efficiency is high.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a diagram of a scenario in which a form generation method according to an embodiment of the present invention may be implemented;
fig. 2 is a flowchart illustrating a form generating method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a form generating method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a form generation apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a form generation apparatus according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present invention will be described below with reference to the accompanying drawings.
For a clear understanding of the technical solutions of the present application, a detailed description of the prior art solutions is first provided. The form can be used for collecting data, for example, when a new product is released, a product release form is set, suggestions of a plurality of users on product release can be collected, for example, after-sale of the product, suggestions of the plurality of users on after-sale of the product can be collected through the after-sale form, and the like.
At present, forms need to be developed independently during configuration, for example, a user needs to develop a new form from program editing, the form construction requirement is accompanied by heavy background logic, and the form configuration efficiency is low.
Therefore, aiming at the problems that the construction requirement of the form in the prior art is accompanied by massive background logic and the form configuration efficiency is low, the inventor finds that in order to solve the problems, a plurality of form components and form instance data can be constructed in advance, and the form can be constructed more efficiently only by calling the form components and the form instance data in a mode of separating the back-end data from the front-end form page when the form is constructed.
Specifically, firstly, a plurality of matched preset form components and preset form instance data can be determined through the acquired type of the form to be generated, and then the preset form components are moved to a dragging terminal area in response to the dragging operation of a user on the preset form components, so that the preset form components dragged to the dragging terminal area and the corresponding preset form instance data generate the form. According to the form generation method, when the form is generated, only the matched multiple preset form components and the preset form instance data need to be determined, re-development is not needed, and the form configuration efficiency is high.
The inventor proposes a technical scheme of the application based on the creative discovery.
An application scenario of the form generation method provided by the embodiment of the present invention is described below. As shown in fig. 1, 10 is an electronic device, and 20 is a user. The electronic device 10 stores a plurality of preset form components and preset form instance data which are set in advance. When a user needs to generate a form, the type of the form to be generated may be input to the electronic device 10, or the type of the form to be generated may be acquired by the electronic device 10. And then the electronic equipment 10 determines a plurality of matched preset form components and preset form instance data according to the type of the form to be generated. At this time, the user 20 may continue to drag the plurality of preset form components, and when receiving the drag operation of the user, the electronic device 10 may respond to the drag operation of the user on the plurality of preset form components, and move the plurality of preset form components to the drag destination area. Finally, the electronic device 10 performs rendering processing on each preset form component dragged to the dragging destination area and corresponding preset form instance data to generate a form.
The embodiments of the present invention will be described with reference to the accompanying drawings.
Fig. 2 is a schematic flow diagram of a form generating method according to a first embodiment of the present invention, and as shown in fig. 2, in this embodiment, an execution subject of the embodiment of the present invention is a form generating apparatus, and the form generating apparatus may be integrated in an electronic device. The form generation method provided by this embodiment includes the following steps:
and S101, acquiring the type of the form to be generated.
In this embodiment, the manner of obtaining the type of the form to be generated may be to obtain the type of the form to be generated input by the user, or may be to obtain the type of the form to be generated from a database in which the type of the form to be generated is stored, which is not limited in this embodiment.
The type of the form to be generated can be set according to the requirements of users, such as product promotion, after-sale of products, product research, test questions and the like. The form components required for each type are typically not identical, and there may be the same and different form components.
And S102, determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated.
In this embodiment, the preset form component, for example, the form for product promotion, may be product performance, product structure, product specification, product price, and the like. The preset form example data is actual data, such as product performance data, product specification data, product price data and the like in a product popularization form. If the product specification data is the length, width, height and the like.
And step S103, responding to the dragging operation of the user on the preset form components, and moving the preset form components to a dragging terminal area.
In this embodiment, after the preset form components are determined, a user can drag a plurality of preset form components, so as to drag the preset form components to the middle area of the form, and drag the preset form components to a specific drag destination area according to the user's requirements. Meanwhile, the dragging sequence during dragging can be determined according to the requirements of the user.
And step S104, rendering each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a form.
In this embodiment, since each preset form component dragged to the drag destination area has no correlation with each other and also has no preset form instance data, each preset form component and the corresponding preset form instance data need to be rendered, thereby generating a form.
The embodiment of the invention provides a form generation method, which comprises the following steps: and obtaining the type of the form to be generated. And determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated. And responding to the dragging operation of the user on the preset form components, and moving the preset form components to a dragging terminal area. And rendering each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a form.
According to the form generation method, the matched multiple preset form components and the preset form instance data can be determined through the acquired type of the form to be generated, and then the multiple preset form components are moved to the dragging terminal area in response to the dragging operation of a user on the multiple preset form components, so that the preset form components dragged to the dragging terminal area and the corresponding preset form instance data generate the form. According to the form generation method, when the form is generated, only the matched multiple preset form components and the preset form instance data need to be determined, re-development is not needed, and the form configuration efficiency is high.
According to the form generation method, the calculation requirements of the calculation tasks of each mobile terminal are considered, and meanwhile, the preset system overall consumption calculation model is combined to determine the task execution mode corresponding to each mobile terminal when the overall consumption of the mobile edge calculation system is minimum, so that the energy consumption of the mobile edge calculation system is low, and the time delay can meet the calculation task requirements.
Fig. 3 is a schematic flow chart of a form generating method according to a second embodiment of the present invention, and as shown in fig. 3, the form generating method according to this embodiment further refines each step on the basis of the form generating method according to the previous embodiment of the present invention. The form generation method provided by this embodiment includes the following steps.
Step S201, a type of the form to be generated is obtained.
In this embodiment, the implementation manner of step 201 is similar to that of step 101 in the previous embodiment of the present invention, and is not described in detail here.
And S202, determining a plurality of matched preset form components and preset form component identifications according to the type of the form to be generated.
In this embodiment, the form is composed of a plurality of form components, and after the type of the form to be generated is determined, a plurality of preset form components and preset form component identifications which are matched with each other can be determined according to the type of the form to be generated. And determining corresponding preset form instance data according to the preset form component identification.
And step S203, determining matched preset form instance data according to the preset form component identification.
In this embodiment, a database storing the preset form component and the preset form instance data may be pre-constructed, and meanwhile, the preset form component and the preset form instance data have a mapping relationship, and the matched preset form instance data may be determined by the preset form component identifier.
And step S204, responding to the dragging operation of the user on the plurality of preset form components, and determining a dragging sequence according to the dragging operation.
In this embodiment, since the form to be generated is composed of a plurality of preset form components, when a user drags the preset form components, the drag sequence of the preset form components needs to be determined, so that the component formation sequence of the form meets the user requirements.
And S205, sequentially moving the preset form components to a dragging terminal area according to a dragging sequence.
In this embodiment, after the dragging sequence is determined, the plurality of preset form components may be moved to the dragging destination area, so as to provide a basis for subsequently establishing linkage between each of the preset form components.
And S206, combining each preset form component dragged to the dragging terminal area and corresponding preset form instance data respectively to generate a corresponding intermediate form component.
In this embodiment, when each preset form component is dragged to the dragging destination area, each preset form component and corresponding preset form instance data are respectively combined, so as to generate a corresponding intermediate form component. Assuming the default form assembly is product scale, the middle form assembly is product scale 10 cm high, 20 cm long and 30 cm wide.
And step S207, constructing linkage logic among the intermediate form components to generate the form.
In this embodiment, since there is no relationship between the current intermediate form components, it is necessary to construct a linkage logic between the intermediate form components, so that the generated form is a whole.
Optionally, in this embodiment, after rendering each preset form component dragged to the dragging destination area and corresponding preset form instance data to generate a form, the form may also be logically verified, which is specifically as follows:
and performing logic verification processing on the generated form.
And if the generated form passes the logical verification, storing the form in a preset database.
In this embodiment, after the form is generated, the logic of the form may be checked, for example, whether the linkage between the preset form components in the form meets the preset linkage logic standard may be checked, so as to determine the quality of the generated form.
Optionally, in this embodiment, the method further includes:
and receiving the custom component generation information input by the user.
And determining the preset form component matched with the self-defined component generation information from a back-end database in which the preset form component is stored.
And rendering the preset form component matched with the custom component generation information and the custom component generation information to generate a corresponding custom component.
In this embodiment, a custom component may also be generated according to the requirement of the user, where the custom component is not stored in the database and does not have a matching relationship with the form category. Meanwhile, the generated custom component can also be stored in a database for subsequent use.
The custom component generation information comprises the category of the custom component and the form component attribute.
Optionally, in this embodiment, determining the preset form component matched with the custom component generation information from the back-end database in which the preset form component is stored includes:
and determining the type of the custom assembly to be generated according to the custom assembly generation information.
And determining a plurality of preset form components related to the category of the self-defined component to be generated from a back-end database in which the preset form components are stored.
And selecting a preset form component with the highest matching degree from a plurality of preset form components related to the category of the user-defined component to be generated according to a preset selection strategy.
In this embodiment, since the custom component is a form component that is not stored in the database, a plurality of preset form components related to the category of the custom component to be generated can be determined from the back-end database in which the preset form components are stored, so that the custom component is generated based on the preset form component with the highest matching degree among the plurality of preset form components.
The preset selection strategy can be that a plurality of preset form components are scored according to the similarity between the user-defined component category and the category of the preset form components so as to select the preset form component with the highest matching degree.
Optionally, in this embodiment, the preset form component and the custom component generation information that are matched with the custom component generation information are rendered to generate a corresponding custom component, including:
and rendering the preset form component matched with the custom component generation information and the custom component generation information by adopting the React front-end framework to generate a corresponding custom component.
In this embodiment, the read front-end framework can be used to generate the custom component, so that the separation of the back-end data from the front-end framework is realized, and the development and generation efficiency of the custom component is improved. Similarly, for the form, the React front-end framework can be adopted to improve the efficiency of form development.
In order to better understand the form generation method of the present embodiment, the form will be described in detail below. One form can be composed of one or more form components, each form component is formed by packaging one business object, therefore, each form determines to configure one or more business objects according to business requirements, each form field corresponds to the attribute specification under the business object, and if the attribute specification is of a pull-down box, a check box and other enumeration type, the attribute value specification needs to be configured. The plurality of object components can correspond to the same business object (for example, client contact persons and developer object components all correspond to the same contact person business object), and the adding, deleting, modifying, checking, object attribute component types, whether to fill in, whether to read only, whether to display and other setting operations of the object components are supported. The universal self-defining component needs to be developed for a certain complex or universal function in a form page, and forms with the same function can be reused. The user-defined button management supports five types of button management including returning, submitting, storing, popup and interface, and can support common form service scenes.
The visual form configuration of the form in the embodiment supports quick drag and drawing of rich form basic components and user-defined components such as input boxes, radio boxes, check boxes, drop-down boxes, tree drop-down boxes, pop-up selection boxes, rich texts, editable forms, attachments and the like, and can configure form linkage rules to quickly complete form configuration.
In the embodiment, the form components can comprise basic configurations such as a custom component and a custom button component, a canvas is constructed by using the function of act-dnd in a reach front end frame and is used for immediately rendering the form components dragged each time, the form components in the canvas support dragging sequencing and nesting, the form components support configuration of general attributes such as title, width, hiding, initial value, whether to be filled or not, regular checking and the like, and the component linkage rule configuration and form preview are supported, so that the free design of a user on the form is met. And acquiring form component and form example data according to the type of the form, and analyzing the standard protocol specification by a react-schema-render to realize the rendering of the form page element component and the form example data.
Configuring a custom component: the user-defined component is suitable for a certain module with complex functions or general functions on a form interface, and user-defined development is required, for example, personnel components are selected, post components are selected, and the like.
Button assembly configuration: the user-defined button configuration provides 5 common types of buttons including submission, storage, return, interface and popup, and supports setting different button names and service interaction logics according to the actual service form. The popup window type button supports that after the click button can select and call the back-end service verification, a specified page is popped up for operation. And an interface class button supporting the request initiating backend service.
Linkage rule configuration: the method supports the setting of form linkage rules, supports the rule matching of the target assembly, and sets different action types of the target assembly: hiding, displaying, filling, calculating the amount of money, setting options (setting pull-down option values), setting states (cascading pull-down linkage and the like), and meeting the linkage logic of the form internal operation. For example: different card information is displayed according to different values of a certain field drop-down frame, and the hiding and displaying actions are supported and set for the card. And aiming at other target components, supporting actions of setting hiding, displaying, setting values, setting required filling, setting non-required filling and the like.
Fig. 4 is a schematic structural diagram of a form generating apparatus according to a third embodiment of the present invention, and as shown in fig. 4, in this embodiment, the form generating apparatus 300 includes:
the obtaining module 301 is configured to obtain a type of a form to be generated.
The determining module 302 is configured to determine a plurality of matched preset form components and preset form instance data according to the type of the form to be generated.
The dragging module 303 is configured to respond to a dragging operation of a user on a plurality of preset form components, and move the plurality of preset form components to a dragging destination area.
The form generation module 304 is configured to perform rendering processing on each preset form component dragged to the dragging destination area and corresponding preset form instance data to generate a form.
The form generating apparatus provided in this embodiment may execute the technical solution of the method embodiment shown in fig. 2, and the implementation principle and the technical effect of the form generating apparatus are similar to those of the method embodiment shown in fig. 2, which are not described in detail herein.
Meanwhile, fig. 5 is a schematic structural diagram of a form generating apparatus according to a fourth embodiment of the present invention, and as shown in fig. 5, in order to better distinguish the form generating apparatus according to the present embodiment from the form generating apparatus according to the previous embodiment, the form generating apparatus according to the previous embodiment is a form generating apparatus 300, and the form generating apparatus according to the present invention is a form generating apparatus 400. Both refer to the form generation apparatus, but the modules involved are not identical.
The form generation apparatus 400 provided by the present invention further refines the form generation apparatus 300 on the basis of the form generation apparatus 300 provided by the previous embodiment.
Optionally, in this embodiment, the determining module 302 is specifically configured to:
and determining a plurality of matched preset form components and preset form component identifications according to the type of the form to be generated. And determining the matched preset form instance data according to the preset form component identification.
Optionally, in this embodiment, the dragging module 303 is specifically configured to:
and responding to the dragging operation of the user on the plurality of preset form components, and determining the dragging sequence according to the dragging operation. And sequentially moving the preset form components to a dragging terminal area according to the dragging sequence.
Optionally, in this embodiment, the form generating module 304 is specifically configured to:
and respectively combining each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a corresponding intermediate form component. And constructing linkage logic among the intermediate form components to generate the form.
Optionally, in this embodiment, the form generating apparatus 400 further includes:
and the verification module 401 is configured to perform logic verification processing on the generated form. And if the generated form passes the logical verification, storing the form in a preset database.
Optionally, in this embodiment, the form generating apparatus 400 further includes:
and the custom component generation module 402 is used for receiving the custom component generation information input by the user. And determining the preset form component matched with the self-defined component generation information from a back-end database in which the preset form component is stored. And rendering the preset form component matched with the custom component generation information and the custom component generation information to generate a corresponding custom component.
Optionally, in this embodiment, when determining the preset form component matching the custom component generation information from the back-end database in which the preset form component is stored, the custom component generation module 402 is specifically configured to:
and determining the type of the custom assembly to be generated according to the custom assembly generation information. And determining a plurality of preset form components related to the category of the self-defined component to be generated from a back-end database in which the preset form components are stored. And selecting a preset form component with the highest matching degree from a plurality of preset form components related to the category of the user-defined component to be generated according to a preset selection strategy.
Optionally, in this embodiment, the custom component generation module 402 is configured to render the preset form component and the custom component generation information that are matched with the custom component generation information, so as to generate a corresponding custom component, and specifically configured to:
and rendering the preset form component matched with the custom component generation information and the custom component generation information by adopting the React front-end framework to generate a corresponding custom component.
The form generating apparatus provided in this embodiment may execute the technical solution of the method embodiments shown in fig. 2 to fig. 3, and the implementation principle and the technical effect of the form generating apparatus are similar to those of the method embodiments shown in fig. 2 to fig. 3, and are not described in detail here.
The invention also provides an electronic device, a computer readable storage medium and a computer program product according to the embodiments of the invention.
As shown in fig. 6, fig. 6 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention. Electronic devices are intended for various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 6, the electronic apparatus includes: a processor 501 and a memory 502. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device.
The memory 502 is a non-transitory computer readable storage medium provided by the present invention. The memory stores instructions executable by the at least one processor, so that the at least one processor executes the form generation method provided by the invention. The non-transitory computer-readable storage medium of the present invention stores computer instructions for causing a computer to execute the form generation method provided by the present invention.
The memory 502, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the form generation method in the embodiment of the present invention (for example, the obtaining module 301, the determining module 302, the dragging module 303, and the form generation module 304 shown in fig. 4). The processor 501 executes various functional applications of the server and data processing by running non-transitory software programs, instructions, and modules stored in the memory 502, that is, implements the form generation method in the above-described method embodiments.
Meanwhile, the embodiment also provides a computer product, and when instructions in the computer product are executed by a processor of the electronic device, the electronic device is enabled to execute the form generation methods of the first to second embodiments.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the embodiments of the invention following, in general, the principles of the embodiments of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the embodiments of the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of embodiments of the invention being indicated by the following claims.
It is to be understood that the embodiments of the present invention are not limited to the precise arrangements described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of embodiments of the invention is limited only by the appended claims.
Claims (11)
1. A form generation method, comprising:
acquiring the type of a form to be generated;
determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated;
responding to the dragging operation of a user on the plurality of preset form components, and moving the plurality of preset form components to a dragging terminal area;
and rendering each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a form.
2. The method according to claim 1, wherein the determining the matched plurality of preset form components and preset form instance data according to the type of the form to be generated comprises:
determining a plurality of matched preset form components and preset form component identifications according to the type of the form to be generated;
and determining the matched preset form instance data according to the preset form component identification.
3. The method according to claim 2, wherein the responding to the drag operation of the user on the plurality of preset form components and moving the plurality of preset form components to the drag destination area comprises:
responding to the dragging operation of a user on a plurality of preset form components, and determining a dragging sequence according to the dragging operation;
and sequentially moving the preset form components to a dragging terminal area according to the dragging sequence.
4. The method according to claim 3, wherein the rendering processing of each preset form component dragged to the drag destination area and corresponding preset form instance data to generate a form includes:
respectively combining each preset form component dragged to the dragging terminal area and corresponding preset form instance data to generate a corresponding intermediate form component;
and constructing linkage logic among the intermediate form components to generate the form.
5. The method according to claim 4, wherein after rendering each preset form component dragged to the drag destination area and corresponding preset form instance data to generate a form, the method further comprises:
carrying out logic verification processing on the generated form;
and if the generated form passes the logic verification, storing the form in a preset database.
6. The method of claim 4, further comprising:
receiving user-defined component generation information input by a user;
determining a preset form component matched with the custom component generation information from a back-end database in which the preset form component is stored;
and rendering the preset form component matched with the custom component generation information and the custom component generation information to generate a corresponding custom component.
7. The method of claim 6, wherein determining the preset form component matching the custom component generation information from a back-end database storing preset form components comprises:
determining the type of the custom assembly to be generated according to the custom assembly generation information;
determining a plurality of preset form components related to the category of the to-be-generated custom component from a back-end database in which the preset form components are stored;
and selecting a preset form component with the highest matching degree from a plurality of preset form components related to the category of the to-be-generated custom component according to a preset selection strategy.
8. The method of claim 7, wherein the rendering the preset form component matched with the custom component generation information and the custom component generation information to generate a corresponding custom component comprises:
and rendering the preset form component matched with the custom component generation information and the custom component generation information by adopting a React front-end framework to generate a corresponding custom component.
9. A form generation apparatus, comprising:
the acquisition module is used for acquiring the type of the form to be generated;
the determining module is used for determining a plurality of matched preset form components and preset form instance data according to the type of the form to be generated;
the dragging module is used for responding to dragging operation of a user on the preset form components and moving the preset form components to a dragging terminal area;
and the form generation module is used for rendering each preset form component dragged to the dragging terminal area and corresponding preset form instance data so as to generate a form.
10. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the form generation method of any of claims 1 to 8.
11. A computer-readable storage medium having computer-executable instructions stored thereon, which when executed by a processor, implement the form generation method of any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111429320.5A CN114266233A (en) | 2021-11-29 | 2021-11-29 | Form generation method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111429320.5A CN114266233A (en) | 2021-11-29 | 2021-11-29 | Form generation method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114266233A true CN114266233A (en) | 2022-04-01 |
Family
ID=80825708
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111429320.5A Pending CN114266233A (en) | 2021-11-29 | 2021-11-29 | Form generation method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114266233A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024087909A1 (en) * | 2022-10-27 | 2024-05-02 | 中通服软件科技有限公司 | Attribute linkage rule-based page data processing method, and medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107122173A (en) * | 2017-03-28 | 2017-09-01 | 成都优易数据有限公司 | A kind of adaptation activiti, the list generation method that can be pulled |
CN110618813A (en) * | 2019-09-02 | 2019-12-27 | 恩亿科(北京)数据科技有限公司 | Method, device and equipment for quickly generating docking media interface and storage medium |
CN111597489A (en) * | 2020-05-12 | 2020-08-28 | 湖北美和易思教育科技有限公司 | Realization method and device based on mobile terminal draggable user-defined form component |
CN113238741A (en) * | 2021-05-12 | 2021-08-10 | 平安科技(深圳)有限公司 | Form configuration method and device, electronic equipment and storage medium |
-
2021
- 2021-11-29 CN CN202111429320.5A patent/CN114266233A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107122173A (en) * | 2017-03-28 | 2017-09-01 | 成都优易数据有限公司 | A kind of adaptation activiti, the list generation method that can be pulled |
CN110618813A (en) * | 2019-09-02 | 2019-12-27 | 恩亿科(北京)数据科技有限公司 | Method, device and equipment for quickly generating docking media interface and storage medium |
CN111597489A (en) * | 2020-05-12 | 2020-08-28 | 湖北美和易思教育科技有限公司 | Realization method and device based on mobile terminal draggable user-defined form component |
CN113238741A (en) * | 2021-05-12 | 2021-08-10 | 平安科技(深圳)有限公司 | Form configuration method and device, electronic equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024087909A1 (en) * | 2022-10-27 | 2024-05-02 | 中通服软件科技有限公司 | Attribute linkage rule-based page data processing method, and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111045653B (en) | System generation method and device, computer readable medium and electronic equipment | |
CN112561640A (en) | Commodity page template generation method and device, computer equipment and storage medium | |
CN114239504A (en) | Form configuration method, device, equipment, readable storage medium and program product | |
CN108536467A (en) | Location processing method, device, terminal device and the storage medium of code | |
CN114266233A (en) | Form generation method, device, equipment and medium | |
CN113407254B (en) | Form generation method and device, electronic equipment and storage medium | |
CN114296737A (en) | Service code generation method, device, equipment and storage medium | |
CN117931188A (en) | Front-end layout code automatic generation method and device, electronic equipment and medium | |
CN113591934A (en) | Method, device and equipment for arranging business analysis model and storage medium | |
US20230384910A1 (en) | Using Attributes for Font Recommendations | |
US12050634B2 (en) | Method and apparatus for distributing content across platforms, device and storage medium | |
CN105450501A (en) | Method and apparatus for setting customized reply function | |
CN115238652A (en) | Table data generation method and device, electronic equipment and readable storage medium | |
CN112163843B (en) | Transfer method, electronic device and storage medium | |
CN109492747A (en) | A kind of the network structure generation method and device of neural network | |
CN112597377A (en) | Information extraction module generation method, information extraction method and device | |
CN112783483A (en) | Function creating method, device, equipment and medium based on suspension button assembly | |
CN112328837A (en) | Data display method, device, equipment and storage medium | |
CN111737372A (en) | Map data generation method and device | |
CN116339733B (en) | Application page generation method, system, electronic device and medium | |
CN113672223B (en) | Data display method, device, equipment and storage medium | |
US20230119741A1 (en) | Picture annotation method, apparatus, electronic device, and storage medium | |
CN111581093B (en) | Method, device, equipment and medium for generating test record list | |
CN117406985A (en) | Page batch generation method and device | |
CN117667030A (en) | Questionnaire generation method, device, system 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 |