CN115220618A - Form generation method and device - Google Patents

Form generation method and device Download PDF

Info

Publication number
CN115220618A
CN115220618A CN202110405882.XA CN202110405882A CN115220618A CN 115220618 A CN115220618 A CN 115220618A CN 202110405882 A CN202110405882 A CN 202110405882A CN 115220618 A CN115220618 A CN 115220618A
Authority
CN
China
Prior art keywords
component
configuration
target
area
layout
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
CN202110405882.XA
Other languages
Chinese (zh)
Inventor
何波
梁永贤
林少微
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110405882.XA priority Critical patent/CN115220618A/en
Publication of CN115220618A publication Critical patent/CN115220618A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the application discloses a form generation method and a form generation device; the method and the device can receive a form configuration triggering instruction; displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component; responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component in the component attribute configuration area; responding to configuration operation aiming at the attribute configuration field, and acquiring attribute configuration information of the target form component; and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form, so that the operation difficulty of form development is reduced.

Description

Form generation method and device
Technical Field
The application relates to the technical field of communication, in particular to a form generation method and device.
Background
The form includes data structures in the web page that are responsible for data collection functions, which can be used to collect, store, organize, and analyze data. Forms are the most common information carriers and are widely used in various fields. For example, forms may be used by schools to collect personal information for students and businesses to collect personal information for employees, etc. The form is mainly developed by means of programming languages, such as HyperText Markup Language (HTML) and JavaScript, which may cause the form to be developed by a program developer skilled in the programming languages, thereby increasing the operation difficulty of form development.
Disclosure of Invention
The embodiment of the application provides a form generation method and a form generation device, and the operation difficulty of form development is reduced.
The embodiment of the application provides a form generation method, which comprises the following steps:
receiving a form configuration triggering instruction;
displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component;
responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component on the component attribute configuration area;
responding to the configuration operation aiming at the attribute configuration field, and acquiring the attribute configuration information of the target form component;
and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form.
Correspondingly, an embodiment of the present application further provides a form generating apparatus, including:
the receiving unit is used for receiving a form configuration triggering instruction;
the interface display unit is used for displaying a form configuration interface according to the form configuration triggering instruction, and the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component;
the component display unit is used for responding to the dragging operation of a target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component in the component attribute configuration area;
the acquisition unit is used for responding to the configuration operation aiming at the attribute configuration field and acquiring the attribute configuration information of the target form component;
and the rendering processing unit is used for responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form.
In one embodiment, the component display unit includes:
the basic attribute configuration control display subunit is used for responding to the dragging operation of a target form component to the form layout area and displaying a basic attribute configuration control in the component attribute configuration area;
and the basic attribute configuration field display subunit is used for responding to the triggering operation aiming at the basic attribute configuration control and displaying the basic attribute configuration field in the attribute configuration area.
In one embodiment, the component display unit includes:
the system comprises a global property configuration control display subunit, a component property configuration area and a control display subunit, wherein the global property configuration control display subunit is used for responding to the dragging operation of a target form component to the form layout area and displaying a global property configuration control in the component property configuration area;
and the global property configuration field is used for responding to the triggering operation aiming at the global property configuration control and displaying the global property configuration field in the global property configuration area.
In one embodiment, the component display unit includes:
the target detection subunit is used for responding to the dragging operation of a target form component to the form layout area and carrying out target detection on the target form component in the form layout area;
the position identification subunit is used for identifying the position of the target form component when the target form component is detected in the form layout area to obtain the layout information of the target form component in the form layout area;
and the component display subunit is used for displaying the target form component on the form layout area according to the layout information.
In one embodiment, the component display unit includes:
the identification subunit is used for responding to the dragging operation of a target form component to the form layout area, and identifying the target form component to obtain the identification information of the target form;
the matching subunit is used for matching the identification information of the target form with the preset identification information in a preset field display mapping table;
and the field display subunit is used for displaying the attribute configuration field corresponding to the preset identification information in the component attribute configuration area when the preset identification information matched with the identification information exists in the preset field display mapping table.
In one embodiment, the rendering processing unit includes:
the configuration subunit is configured to, in response to the generation operation for the form configuration interface, obtain the target form component from a preset component library, and configure the target form component according to the attribute configuration information to obtain a configured form component;
and the rendering processing subunit is used for performing form rendering processing on the configured form component based on the layout information to generate the target form.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the method provided in the various alternatives of the above aspect.
Correspondingly, the embodiment of the present application further provides a storage medium, where the storage medium stores instructions, and the instructions, when executed by a processor, implement the form generation method provided in any of the embodiments of the present application.
The method and the device can receive a form configuration triggering instruction; displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component; responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component in the component attribute configuration area; responding to configuration operation aiming at the attribute configuration field, and acquiring attribute configuration information of the target form component; and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form, thereby reducing the operation difficulty of form development.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a form engine platform provided by an embodiment of the present application;
fig. 2 is a schematic view of a scene of a form generation method provided in an embodiment of the present application;
FIG. 3 is a flowchart illustrating a method for generating a form according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a scenario of a form provided by an embodiment of the present application;
FIG. 5 is a schematic diagram of another scenario of a form provided by an embodiment of the present application;
FIG. 6 is a diagram illustrating a layout area of a form and a scene of a target form according to an embodiment of the present application;
FIG. 7 is a schematic view of a component property configuration area according to an embodiment of the present application;
FIG. 8 is a schematic diagram of another scenario of a component property configuration area according to an embodiment of the present application;
FIG. 9 is a schematic diagram of a scenario of a component layout provided in an embodiment of the present application;
FIG. 10 is a schematic diagram of a scenario of selecting a region by a component according to an embodiment of the present application;
FIG. 11 is a schematic diagram of another scenario of a component selection area provided in an embodiment of the present application;
FIG. 12 is a schematic diagram of another scenario of a component selection area provided in an embodiment of the present application;
FIG. 13 is a schematic illustration of a layout provided by an embodiment of the present application;
FIG. 14 is a further flowchart illustrating a method for generating a form according to an embodiment of the present application;
FIG. 15 is a schematic diagram of another scenario of a form generation method according to an embodiment of the present application;
FIG. 16 is a schematic diagram of another scenario of a form generation method provided in the embodiment of the present application;
FIG. 17 is a schematic structural diagram of a form generation apparatus according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, however, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a form generation method, which can be implemented by a form engine platform, and the form engine platform can be installed in a computer device. The computer device may include at least one of a terminal and a server. That is, the form engine platform may be installed in a terminal, a server, or a terminal and a server capable of communicating with each other, so that the form generation method provided in the embodiment of the present application may be executed not only by the terminal but also by the server.
The terminal can be a smart phone, a tablet Computer, a notebook Computer, a Personal Computer (PC), a smart home, a wearable electronic device, a VR/AR device, a vehicle-mounted Computer, and the like. The server may be an interworking server among a plurality of heterogeneous systems or a background server of a product verification test system, may be an independent physical server, may also be a server cluster or distributed system formed by a plurality of physical servers, and may also be a cloud server providing basic cloud computing services such as cloud service, a cloud database, cloud computing, cloud functions, cloud storage, network service, cloud communication, middleware service, domain name service, security service, big data, an artificial intelligence platform, and the like.
In one embodiment, the form engine platform can be a separate system platform for running configuration independently, and rapidly realizing the creation of business forms, management and application forms and creation and management modules. Form view design tools can be provided for the form configuration objects through the form engine platform, so that the form configuration objects can be quickly configured and generate needed forms through the form engine platform.
In an embodiment, the form engine platform can be further embedded into each business system, so that the original business system has a form generation function, and quick integration of form business is realized. In addition, by embedding the form engine platform into each business system, the development cost can be reduced, the functions of the original business system can be enhanced, and the processing capacity of the original business system for dealing with complex business forms can be improved.
In one embodiment, the form engine platform may include an editing side and a rendering side, for example, as described in FIG. 1. The editing end can provide a visual form configuration interface for a user, and through the form configuration interface, a form configuration object can be deployed and developed without a programming language, so that the operation difficulty of form development is reduced. And the rendering end is used for generating the form, so that the form which is deployed and developed by the form configuration object at the editing end can be stably and correctly generated.
In an embodiment, as described in fig. 2, the form engine platform may be integrated on a computer device such as a terminal or a server to implement the form generation method provided in the embodiment of the present application. Specifically, the computer device may receive a form configuration trigger instruction; displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component; responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component in the component attribute configuration area; responding to configuration operation aiming at the attribute configuration field, and acquiring attribute configuration information of the target form component; and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form.
The following detailed descriptions are provided separately, and it should be noted that the description sequence of the following examples is not intended to limit the preferred sequence of the examples.
The embodiment of the present application will be described from the perspective of a form engine platform, where the form engine platform may be installed in a computer device, and the computer device may be a server or a terminal.
As shown in fig. 3, a form generation method is provided, and the specific process includes:
101. and receiving a form configuration triggering instruction.
The form includes a data structure in the web page that is responsible for the data collection function, which can be used to collect, store, organize, and analyze data.
In an embodiment, the form may be applied to different business scenarios. For example, forms may be used by schools to collect personal information for students and businesses to collect personal information for employees, etc. As another example, the form may be used for a user to fill out a questionnaire or question feedback form, and the like.
The form has different representation forms according to different service scenes. For example, as shown in FIG. 4, when a user logs into an account, the account login interface may be a representation of a form. For another example, as shown in fig. 5, when the user has a problem with a certain product and needs to feedback, the problem can be fed back through the problem feedback form.
In one embodiment, the form's constituent elements may include form fields, form controls, and hints information.
Wherein, the form field comprises an operation area with specific functions in the form. Through the form field, the user can perform operations such as inputting information and selecting information. For example, form fields include text entry boxes, password entry boxes, drop down boxes, radio boxes, check boxes, search boxes, and the like.
Wherein the text entry box includes an area in the form where text can be entered. The password entry box includes an area in the form where the password can be entered. The selection box includes an area in the form where multiple options may be selected. The drop-down box includes an area that, when clicked, displays a plurality of options. The radio box includes an area where only one of the options can be selected. The check box includes an area where a plurality of options can be selected. The search box includes an area in which the content can be searched.
For example, as shown in fig. 4, 1001 may be a text entry box and 1002 may be a password entry box. For another example, as shown in fig. 5, 1003 may be a radio box, and 1004 may be a drop-down box.
The form control comprises an operation control of a specific function in the form. Through the form control, the user may perform operations of submitting or resetting the information filled in on the form. For example, form controls may include a submit control, a reset control, and a register control, among others.
For example, as shown in FIG. 4, 1005 may be a registration control. For another example, as shown in FIG. 5, 1006 may be a submit control and 1007 may be a reset control.
The prompt message may include a descriptive text and a prompt symbol in the form. A form will typically include some descriptive text and prompt symbols as necessary to remind the user to fill in and manipulate the form based on the descriptive text. For example, "user name" and "password" in fig. 4 are both prompt messages. For another example, the contents of "reporter", "gender", and "mailbox" in fig. 5 are all prompt messages. For another example, as shown in fig. 4, the cue symbol dividing line 1008 may be cue information.
The form configuration triggering instruction comprises an instruction for triggering a form engine platform to perform form configuration. Through the form configuration triggering instruction, the form engine platform can know that a form configuration object triggers the form engine platform, and plans to configure the form by using the form engine platform.
The form configuration object may include an object for performing form configuration and form generation using the form engine platform. The form configuration objects may be of different types depending on the embedding of the form engine platform into different business systems. For example, when the form engine platform is embedded in a government administration system, the form configuration object may include government personnel. As another example, when the form engine platform is embedded in an information management system of a school, the form configuration object may include a staff member of the school, and so on.
And the user in the embodiment of the present application includes a person who enters data on the form.
In one embodiment, through the form configuration triggering instruction, the form engine platform can be used for carrying out configuration modification on the existing form. In addition, through the form configuration triggering instruction, a new form can be developed by utilizing a form engine platform, and the new form is configured and generated.
In one embodiment, the form engine platform may include an editing side and a rendering side. The editing end can be used for configuring the form, and the rendering end can be used for generating the form.
In one embodiment, the editor may be a form configuration interface that includes interfaces through which forms may be developed, configured, and managed.
In one embodiment, when the form configuration object triggers the form configuration platform to perform form configuration, the form engine platform receives the form configuration triggering instruction.
102. And displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area.
The form configuration interface comprises an interface which can develop, configure and manage the form.
In an embodiment, the form configuration interface may include a component selection area, a component properties configuration area, and a form layout area.
The component selection area comprises at least one form component, so that the form components required in the form can be selected in the component selection area by using the object in the process of configuring the form by using the form configuration interface, and the form components do not need to be developed through a programming language.
Wherein the form components include components that can implement specific functionality on the form. For example, form components may include form fields and form controls, may also include components to set form layouts, and so on. For example, a text entry box, a multi-line text entry box, a multi-selection box, a cascade selector, a date, a split line, a multi-line drop-down box, a card layout component, a grid layout component, a people selector, a department selector, a post selector, a supplies selector, and the like may be included in the form components.
The form layout area includes an area in which a target form component dragged into the area can be displayed and laid out.
In one embodiment, the form layout area may be a canvas, and the content displayed within the form layout area is consistent with the content ultimately rendered on the target form. Namely, in the process of configuring the form by the user, the form layout area provides a preview area for the user, and through the form layout area, the user can preview in advance whether the configured form is matched with the target form of the user. If the form is generated by using the programming language, after the form is configured each time, the presentation content of the form can be browsed only after the form is generated, and the configuration information of the form can be seen without generating the form through the form layout area, so that the form configuration efficiency is improved.
For example, as shown in fig. 6, in the process of configuring the form, the target form component is laid out to the upper left of the form layout area, and then the target form component is laid out to the upper left of the target form in the generated target form.
The component attribute configuration area comprises an area capable of configuring the attributes of the target form component.
For example, the properties of the form component may be the title, prompt information, presentation style, maximum and/or minimum input length, whether read only, colon, etc. of the form component.
In one embodiment, the properties configured as the target form component in the component property configuration area may also be displayed in the form layout area accordingly.
For example, if the form configuration object is set to "name" for the title of the target form component in the component property configuration area, the title of the target form component will be displayed as "name" in the form layout area.
For another example, if the form layout object sets the presentation style of the target form component to a rectangle in the component attribute layout area, the presentation style of the target form component is also a rectangle in the form layout area.
According to the embodiment of the application, the component selection area, the component attribute configuration area and the form layout area are set in the form setting platform, so that the form configuration object can drag a target form component required by the target form to the form layout area for display after the target form component is selected in the component selection area. Since the content displayed in the form layout area is consistent with the content finally presented on the target form, the form configuration object moves to the target form component in the form layout area in the component selection area, and the attribute configured for the target form component in the component attribute configuration area is displayed in the form layout area. Therefore, a user can view the finally generated presentation content of the target form in advance through the form layout area, and can adjust the target form assembly in the form layout area in the process of configuring the form, so that the adjustment of the target form is realized, and the form development efficiency is improved.
103. And responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component on the component attribute configuration area.
In an embodiment, according to the component selection area, the component attribute configuration area and the form layout area on the form configuration interface, the form configuration object may select a target form component in the component selection area, drag the target form component to the form layout area for display according to the requirement of the target form, and configure the attribute of the target form component in the component attribute configuration area. Accordingly, in response to a drag operation for the target form component to the form layout area, the target form component is displayed on the form layout area, and the property configuration field of the target form component is displayed on the component property configuration area.
The target form component comprises components required in the process of configuring the target form.
In an embodiment, in the process that the form configuration object drags the form component in the form selection area to the form layout area each time, the form component corresponding to the dragging operation may be the target form component.
Wherein the drag operation comprises an operation of dragging the target form component from the form selection area into the form layout area.
In an embodiment, the drag operation may be arbitrarily dragged as long as the target form component can be dragged into the form layout area.
The property configuration field comprises a data item which can acquire the configuration information of the target form component from the user in the component property configuration interface.
In one embodiment, the form configuration object may perform a target form component configuration operation on the property configuration field. For example, the form configuration object may perform an input operation, a selection operation, and the like on the property configuration field to implement the configuration of the target form component.
Wherein the properties of the form components may include properties of the form components in multiple dimensions. For example, the properties of the form component may include properties in various dimensions of the form component's presentation style, name, functionality, and so on.
In one embodiment, there may be different attribute configuration fields depending on the attributes of the form components in different dimensions.
For example, when the property of the form component is a presentation style of the form component, the property configuration field may be a selector that performs a selection operation on a plurality of styles, e.g., as in 1010 of fig. 7. For another example, when the attribute of the form component is the name of the form component, the attribute configuration field may be an input area where an input operation may be performed, for example, as 1009 in fig. 7.
In one embodiment, the attributes of the form components may be divided into base attributes and global attributes.
Wherein the base properties include properties for individual form components in the form layout area. For example, the base properties can include the title, identification information, associated identification, default values, placeholders, hints information, presentation style, maximum and/or minimum input length, whether read-only, disabled, fill-necessary, invisibility, etc. of an individual component in the form layout area.
Wherein the title of the component comprises the title of the component in the form. For example, when the title of a component is set to "name" in the component property configuration area, the title of the component is "name" in the generated target form.
The identification information includes information that can identify the component. The identification information can identify which component the current component is. For example, the current component is a text entry box titled "name" and its identification information is "001". Then when the target form is generated, the rendering side can know that the current component is a text input box titled "name" through "001".
The association identifier includes an identifier when the component has an association relationship with other components.
Wherein the global properties include properties for all form components in the form layout area. For example, the global attributes may include the tag locations of all form components in the form layout area, whether to colon, whether to have a submit button, whether to remotely initialize a data source, whether to enable the form data storage service, and so forth.
Wherein the label position comprises the position relation between the components in the form. For example, the tag position may include a positional relationship of whether the components are placed up and down or left and right.
In an embodiment, the form engine platform provided in the embodiment of the present application provides an expression data storage function for the form configuration object, that is, the form configuration object may store the form data configured by the form engine platform in a storage server specified by the form engine platform, or may store the form data in a server specified by the use object itself. If the form configuration object stores the form data in a storage server designated by the form engine platform, the form configuration object may start the form data storage service when configuring the global attribute. The form data is stored in the server designated by the form engine platform, so that a storage space can be provided for the form data configured by the form configuration object, the form configured by the form configuration object can be further developed subsequently without redevelopment, and the efficiency and the repeated utilization rate of form configuration are improved.
In an embodiment, when configuring the form, the form configuration object may be configured locally in the editing section, and may also obtain configuration data from a non-local end through a remote interface. When the non-local terminal requests to acquire the configuration data, the get method can be used for requesting to acquire the configuration data, and the post method can be used for requesting to acquire the configuration data.
In an embodiment, in order to further meet the requirement of using an object for form development, the form engine platform provided in the embodiment of the present application further provides a function of configuring a custom attribute for a form component.
The user-defined attributes comprise attributes which can be used by the object to perform user-defined configuration on the form components. For example, the custom attributes may include verification, linkage, remote interface configuration, and the like.
The verification may refer to that when the target form is configured, the form configuration object may set whether to verify information entered by the user through the target form. For example, when the form configuration object initiates a verification function in the configuration form, the generated target form has the function of verifying the information entered by the user. For example, it may be verified whether the data entered by the user in the form complies with specifications, and so on.
The linkage may refer to a linkage relationship between a current target form component and other form components that may be set when the form configuration object configures the target form. Wherein the linkage relationship may include changes to the components with which the target form component has a linkage relationship when the target form component changes. For example, when the component to the target form is a radio box, the component to which it is linked is a text entry box. And only when the target form component is selected, the text input box linked with the target form component can be displayed, and otherwise, the text input box is not displayed. For another example, the text input box linked with the target form component can only input text after the target form component is selected, otherwise, the text cannot be input, and the like.
In one embodiment, when configuring the linkage in the form component, there may be one-to-one linkage control, many-to-one linkage control, and one-to-many linkage control. One-to-one coordinated control can mean that one form component and another form component are in coordinated control, that is, a change in one form component can affect another form component. Many-to-one coordinated control may mean that a plurality of form components perform coordinated control on one form component. The one-to-many linkage control may refer to linkage control of a plurality of form components by one form component.
The many-to-one linkage control and the one-to-many linkage control may be and control, or may be or control. For example, in many-to-one coordinated control, an and control may refer to a change in all of a plurality of form components before affecting another form component. And control may refer to the effect that whenever one of the form components changes in a plurality of forms, another form component is affected.
In one embodiment, the component property configuration region can include a base property configuration control, a global property configuration control, for example, as shown in FIG. 7. In response to a drag operation on the form layout area for a target form component, a base property configuration control and a global property configuration control may be displayed on the component property configuration area. For example, as shown in fig. 7, when the form configuration object triggers the basic property configuration control, in response to a triggering operation for the basic property configuration control, a basic property configuration field may be displayed in the property configuration area, so that the form configuration object configures the basic property through the basic property configuration field. When the form configuration object triggers the global property configuration control, in response to the triggering operation for the global property configuration control, a global property configuration field may be displayed in the property configuration area, so that the form configuration object configures the global property through the global property configuration field, for example, as shown in fig. 8.
In one embodiment, the component property configuration region can include a base property configuration control, a global property configuration control, and a custom property configuration control. In response to a drag operation on the form layout area for a target form component, a base property configuration control, a global property configuration control, and a base property configuration control may be displayed on the component property configuration area. When the form configuration object triggers the basic property configuration control, in response to the trigger operation for the basic property configuration control, a basic property configuration field may be displayed in the property configuration area, so that the form configuration object configures the basic property through the basic property configuration field. When the form configuration object triggers the global property configuration control, a global property configuration field can be displayed in the property configuration area in response to the triggering operation for the global property configuration control, so that the form configuration object configures the basic property through the global property configuration field. When the form configuration object triggers the custom attribute configuration control, the user-defined attribute configuration field can be displayed in the attribute configuration area in response to the triggering operation aiming at the custom attribute configuration control, so that the form configuration object carries out the configuration of the user-defined attribute through the user-defined attribute configuration field.
It should be noted that, the application is not limited to the property configuration control displayed on the component property configuration area. Different attribute configuration controls can be adaptively displayed on the component attribute configuration area according to the business requirements of form development.
In an embodiment, the display position relationship between the attribute configuration controls and the attribute configuration fields corresponding to the attribute configuration controls are not limited in the present application. In the figure, only one position relationship is shown, and various display position relationships can be formed between the attribute configuration controls and the attribute configuration fields corresponding to the attribute configuration controls.
In an embodiment, since different form components that need to be used in the process of configuring a form in different business scenarios are different, the plurality of form components developed in the embodiment of the present application display the developed form components in the form selection area, which is convenient for a user to select.
Wherein different form components are of different types according to their function and scope of action. For example, in embodiments of the present application, the forms in the form selection area may be divided into a base form component, a global form component, and a layout form component.
The basic form component comprises a common form component in the form, namely the basic form component can be used for the forms of different application scenes. For example, the underlying form components may include a text entry box, a multi-line text entry box, a multi-selection box, a cascade selector, a date configurator, a date range configurator, a split line, a title text configurator, a multi-selection drop-down box, a number configurator, a radio box, a single selection drop-down box, a switch configurator, and so forth.
Wherein the layout form component comprises a component that sets the layout of the form component in the form. For example, the layout components can include card layout components, grid layout components, custom layout components, and the like.
Therein, the card layout component can place the content displayed in the target form in the form of a card, for example, as shown at 1011 in FIG. 9. The grid layout component may place the form components in the target form in a grid, for example, as shown at 1012 in FIG. 9. The custom layout component includes a form component that can set the form in the target form into a custom layout, for example, as shown by 1013 in FIG. 9.
Wherein the business components include functionality and business related components.
In an embodiment, since the form may be applied to different business scenarios, different functional components may be required in configuring the form for different business scenarios. For example, business components may include personnel selectors, department selectors, station selectors, materials selectors, region selectors, and the like.
In an embodiment, the component selection area may further include a custom component addition control, and by triggering the custom component addition control, a custom component acquisition interface may be displayed, so that a user acquires a custom component through the custom component acquisition interface.
When the basic component, the layout component and the business component in the component selection area cannot meet the development requirement of the form, a user can display a custom component acquisition interface by triggering a custom component adding control in the component selection area, and add the custom component to the custom component acquisition interface, so that the form engine platform can acquire the custom component through the custom component acquisition interface and upload the custom component to the component selection area of the form configuration interface. Therefore, the user-defined components added by the user can be displayed in the component selection area of the form configuration interface, and the functions of the form are improved.
In one embodiment, the custom component uploaded to the form configuration interface by the form configuration object may be related only to the form developed by the form configuration object. Namely, the custom component can be only used in the form developed by the user, but not used in other developed forms, so that the custom component uploaded by the user is protected.
By displaying at least one form component in the component selection area, when the form component configuration is performed by using the form configuration interface provided by the embodiment of the application, the generated target form can have the function of the target form component only by selecting the target form component in the component selection area, and the target form is not required to be developed by using a programming language, so that the operation difficulty of form development is reduced.
In addition, the form components in the component selection area can include basic components, layout components, business components and custom components, so that the form components in the component selection area can meet the form development requirements of different business scenes, and the application range of the form generation method and the form engine platform provided by the embodiment of the application is expanded.
In one embodiment, because the component selection area includes a plurality of different types of form components, for example, a base form component, a layout form component, and a business form component. In order to make the component selection area appear neat and orderly and to make the form configuration object quickly determine the target form component among the plurality of form components in the component selection area, the component selection area may include at least one form component type trigger control such that in response to a drag operation for the target form component to the form layout area, before displaying the target form component on the form layout area, it may include:
responding to the trigger operation of triggering the control aiming at the type of the target form component, and displaying at least one form component matched with the type of the target form component in a form selection area;
in response to a selection operation of a form component that matches the target form component type, a target form component is determined among the at least one form component and displayed as a selected state.
And the component type triggering control can be a control for selecting the type of the component of the form. For example, the component-type trigger controls can include a base component trigger control, a layout component trigger control, and a business component trigger control. For example, as shown in FIG. 10, a base component trigger control, a layout component trigger control, and a business component trigger control may be included in the form layout area.
In one embodiment, each type of component-type-triggering control corresponds to at least one form component that matches the component type.
For example, when a base component is triggered to trigger a control, the base form component is displayed in the form selection area. For another example, when the layout component is triggered to trigger the control, the layout form components are displayed in the form selection area.
The triggering operation of the target form component type triggering control comprises an operation capable of triggering the target form component type triggering control. For example, the trigger operation may include a click operation, a slide operation, a rotate operation, a custom operation, and so on.
The selection operation of the form component comprises an operation that the form component can be selected in a form selection area. For example, the selection operation may include a click operation, a slide operation, a rotation operation, a custom operation, and so on.
Wherein the selected state may include a state that is distinct from the unselected state. For example, when a form component is not selected, the color of the form component in the form selection area may be white, and when the form component is selected, the color of the form component in the form selection area may be a color other than white, by which the form component changes from the unselected state to the selected state.
For another example, when a form component is not selected, the shape of the form component in the form selection area may be a rectangle, and when the form component is selected, the shape of the form component in the form selection area may be a circle, indicating by the shape that the form component changes from an unselected state to a selected state.
In an embodiment, when the form configuration object performs a trigger operation on the component type trigger control in the form layout area, at least one form component type trigger control may be displayed in the form layout area in response to the trigger operation on the component type trigger control on the form layout area.
For example, when a base component is triggered to trigger a control, a base type of form component may be displayed in the form selection area. For another example, when a layout component is triggered to trigger a control, the layout type of form components may be restricted in the form selection area.
For example, as shown in FIG. 11, when the base component triggers the control, the base form components are displayed in the form selection area, and when the layout component triggers the control, the layout form components may be displayed in the form selection area.
In one embodiment, when the form configuration object performs a selection operation on a form component in the form layout area, in response to the selection operation on the form component matched with the target form component type, a target form component is determined in at least one form component, and the target form component is displayed in a selected state.
For example, as shown in FIG. 12, when the form configuration object performs a check operation on a text entry box in the underlying form component, the text entry box may be determined to be the target form component and displayed from white to gray in response to the check operation on the text entry box.
In an embodiment, in the form configuration interface provided by the present application, the form configuration object may select one target form component in the component selection area, or may select a plurality of target form components in the component selection area, and drag the selected target form components to the form layout area. When the form configuration object selects multiple target form components in the component selection area, multiple target form components can be determined in at least one form component in response to a selection operation for the form components, and the multiple target form components are displayed in a selected state.
In one embodiment, in response to a drag operation directed to a target form component to the form layout area, target detection may be performed on the target form component in the form layout area. When the target form component is detected in the form layout area, the target form component may be subjected to position recognition, so as to obtain layout information of the target form component in the form layout area, and the target form component is displayed in the form layout area according to the layout information. Specifically, the step "displaying the target form component on the form layout area in response to a drag operation to the form layout area with respect to the target form component" includes:
responding to the dragging operation of the target form component to the form layout area, and carrying out target detection on the target form component in the form layout area;
when a target form component is detected in the form layout area, carrying out position identification on the target form component to obtain layout information of the target form component in the form layout area;
and displaying the target form component on the form layout area according to the layout information.
Wherein the layout information includes information that can represent a location of the target form component in the form layout area.
In one embodiment, since the form layout area may be a canvas, the form layout area may be set to a rectangular coordinate system, the lower left corner of the form layout area may be the origin of coordinates, and the layout information of the target form component in the form layout area may be represented by coordinate information on coordinate axes.
For example, as shown in FIG. 13, the position information of the target form component in the form layout area may be represented by a Rectangle (Rect) object. The Rect object corresponding to the target form component may include four parameters, which are (x, y, width, height). Wherein x may represent the abscissa of the upper left corner of the rectangle, i.e., the abscissa of the target form component in the form layout area; y may represent the ordinate of the upper left corner of the rectangle, i.e., the ordinate of the target form component in the form layout area; width may represent the width of the rectangle and height may represent the height of the rectangle.
The layout information of the target form component in the form layout area may be determined according to a set coordinate system, for example, as shown in fig. 13, the form layout area is set to a rectangular coordinate system, where the value range of the x-axis is 0 to 50000, and the value range of the y-axis is 0 to 30000. At this time, the layout information of the text input box may be (100, 28000, 20, 35).
In one embodiment, target detection of target form components in the form layout area may be performed in a variety of ways. For example, target detection of target form components may be performed in the form layout area using image detection techniques. For another example, a trigger may be added to the target form component to enable detection of the trigger in the form layout area, and when the trigger is detected, the detection of the target form component is declared.
In one embodiment, when a target form component is detected in the form layout area, the target form component may be identified in position to obtain layout information of the target form component in the form layout area.
For example, the target form component may be identified in position using image recognition techniques, resulting in layout information for the target form component in the form layout area.
For another example, a (DOM) traversal may be performed on the form layout area, and the location information of the target form component in the form layout area is obtained through the DOM traversal.
In one embodiment, the target form components may be displayed in the form layout area according to the layout information. For example, when the layout information of the present input box is (100, 28000, 20, 35), the coordinate information may be (100, 28000, 20, 35) in the form layout area to display the text input box.
In one embodiment, the property configuration fields displayed in the component property configuration area may be different due to different form components.
For example, when the target form component is a text entry box, the property configuration fields displayed in the component property configuration area may include a title, identification information, a presentation style, a maximum and/or minimum input length, whether padding is necessary, whether colon is applied, whether a submit button is available, and whether form data repository services are enabled.
As another example, when the target form component is a radio box, the property configuration fields displayed in the component property configuration area may include a title, identification information, a presentation style, whether to fill, whether to enable the form data storage service.
Therefore, the step "displaying the property configuration field of the target form component in the component property configuration area in response to the drag operation for the target form component to the form layout area" may include:
responding to the dragging operation of the target form component to the form layout area, and identifying the target form component to obtain the identification information of the target form component;
matching the identification information of the target form component with the preset identification information in the preset field display mapping table;
and when the preset identification information matched with the identification information exists in the preset field display mapping table, displaying the attribute configuration field corresponding to the preset identification information in the component attribute configuration area.
The preset field display mapping table comprises attribute configuration fields displayed by each form component in a component attribute configuration area.
The identification information of the target form component may include information that has an identifying effect on the target form, i.e., it may be determined what the target form component is through the identification information.
Wherein the identification information may be represented in a variety of forms. For example, the identification information may be represented by a character string, other symbols, and the like.
For example, the identification information of the text input box is "1000", and the identification information of the radio box is "0001". In response to a drag operation directed to the form layout area for the target form component, the target form component may be identified. When the identification information of the target form component is recognized as "1000", the "1000" and the preset identification information may be matched. Through matching, the fact that the preset field display mapping table contains identification information '1000' is obtained, and when the attribute configuration field corresponding to the '1000' is a title, the identification information, a presentation style, the maximum and/or minimum input length, whether to fill in, whether to add a colon, whether to have a submit button and whether to enable the form data storage service, corresponding content is displayed in the component attribute configuration area.
For another example, when the identification information of the target form component is identified as "0001", the attribute configuration field corresponding to "0001" is obtained by matching as a title, the identification information, the presentation style, whether to fill in, whether to enable the form data storage service, and the corresponding content is displayed in the component attribute configuration area.
104. And responding to the configuration operation aiming at the attribute configuration field, and acquiring the attribute configuration information of the target form component.
The configuration operation of the attribute configuration field comprises an operation capable of configuring the attribute configuration field. For example, the configuration operation may include a text input operation, a selection operation, a picture input operation, a link input operation, and so on.
In an embodiment, there may be different configuration operations for different attribute configuration fields.
For example, when the attribute configuration field is a selector that performs a selection operation on a plurality of styles, the corresponding configuration operation may be a selection operation.
For another example, when the attribute configuration field is an input area where a text input operation can be performed, the configuration operation may be a text input operation.
In one embodiment, in response to a configuration operation directed to the property configuration field, property configuration information for the target form component may be obtained.
For example, when the attribute configuration field is a selector for performing a selection operation on a plurality of styles, when the form configuration object performs a selection operation on the selector, the attribute configuration information of the form configuration object can be acquired.
For example, when the attribute configuration field is to select whether a form component is necessary, and when the form configuration object selects a yes operation for the attribute configuration field, the attribute configuration information that the form component is necessary is acquired.
105. And responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information and the attribute configuration information of the target form component in the form layout area to generate a target form.
The generation operation of the form configuration interface comprises an operation capable of generating a target form. For example, the generating operation may include a clicking operation, a sliding operation, and the like.
In an embodiment, the form configuration interface may further include a form generation control, and after the form configuration object triggers the form generation control, in response to a generation operation for the form configuration interface, form rendering processing may be performed according to layout information and attribute configuration information of the target form component in the form layout area, so as to generate the target form.
In one embodiment, the target form may be generated directly after the target form is configured. Specifically, the step "responding to the generation operation for the form configuration interface, performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate the target form", may include:
responding to the generation operation of the needle form configuration interface, acquiring a target form component from a preset component library, and configuring the target form component according to the attribute configuration information to obtain a configured form component;
and performing form rendering processing on the configured form single component based on the layout information to generate a target form.
The preset component library comprises all the form components in the form selection area. For example, the preset component library comprises a basic component, a layout component, a business component and a custom component in a form selection area.
In one embodiment, in response to a generating operation directed to the form configuration interface, a target form component may be obtained from a preset component library. For example, the target form component includes a text entry box and a radio box. Therefore, when the target form is generated, the text input box and the radio box can be acquired from the preset component library, so that the text input box and the radio box are displayed in the target form.
After the target form component is obtained, the target form component can be configured according to the attribute configuration information, and the configured form component is obtained. For example, the title of the text entry box is "name" because the title of the text entry box can be displayed as a name on the target form.
In an embodiment, the configured form component may be subjected to form rendering processing based on the layout information to generate a target form. For example, the layout information of the text input box is (100, 28000, 20, 35), the layout information of the radio box is (100, 9000, 20, 35), and the target form may be subjected to form rendering processing according to the layout information, so that the text input box and the radio box are displayed at positions in the target form that match the layout information.
In an embodiment, after the target form is configured, if the target form does not need to be generated immediately, a form configuration file may be generated according to the layout information and the attribute configuration information of the target form component in the form layout area, and the form configuration file may be sent to the storage server, so that the target form may be generated as needed. Specifically, the form generation method provided by the embodiment of the present application further includes:
responding to the storage operation aiming at the form configuration interface, and generating a form configuration file according to the layout information and the attribute configuration information of the target form component in the form layout area;
sending the form configuration file to a storage server;
when a form generation triggering instruction is received, sending a form configuration file acquisition request to a storage server;
and receiving the form configuration file returned by the storage server, and generating a target form according to the form configuration file.
The form configuration file may include a programming file having a data structure. For example, the form configuration file may be a Json Schema file.
In an embodiment, after the form configuration file is generated to the storage server, when a form generation trigger instruction is received, a form configuration file acquisition request may be sent to the storage server. And when the form configuration file returned by the storage server is received, generating a target form according to the form configuration file.
In one embodiment, when the form configuration object is directly generating a target form, a form configuration file may also be generated. By generating the form configuration file, the layout information and the attribute configuration information of the target form can be stored in the form configuration file. Wherein one form configuration file has multiple uses. For example, the same form configuration file can be applied to other service scenes, so that repeated development is avoided, the form development efficiency is improved, and the development resources are saved.
In an embodiment, when the form configuration file is generated, an identification mark may be added to the form configuration file, so that when the form configuration file acquisition request is sent to the storage server, the identification mark may be sent to the storage server, and the originally generated form configuration file may be obtained according to the identification mark.
In one embodiment, each time a target form or form configuration file is generated, a history list, version release history and version number are generated for the target form and form configuration file.
For example, after a target form is first generated, a history list, version release history, and version number may be generated for the target form. And when the target form is modified subsequently and a target form is regenerated, a version is generated for the regenerated target form, and the version number of the historical target form is added into the version release history.
Similarly, for example, after a form configuration file is generated for the first time, a history list, version release history and version number may be generated for the form configuration file. And when the target form is modified subsequently and a form configuration file is regenerated, a version number is generated for the regenerated form configuration file, and the historical form configuration file is added into the historical saving list.
Through the arrangement, the form configuration object can acquire the historical target form and the form configuration file through the history saving list, the version release history and the version number, so that the historical target form and the form configuration file cannot be lost, and when the form configuration object uses the historical target form and the form configuration file, the form configuration object can be directly acquired from the history saving list, so that the efficiency of the form configuration object in the form development process is improved, and the operation difficulty is reduced.
The embodiment of the application provides a form generation method, which can comprise the steps of receiving a form configuration triggering instruction, and generating a form configuration triggering instruction according to the form configuration triggering instruction; displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component; responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component in the component attribute configuration area; responding to configuration operation aiming at the attribute configuration field, and acquiring attribute configuration information of the target form component; and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate the target form. According to the embodiment of the application, a visual form configuration interface is provided, and the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area, so that a user can generate a target form by dragging components in the component selection area and configuring components in the component attribute configuration area on the form configuration interface. By the form generation method provided by the embodiment of the application, the form configuration object without programming basis in the technology can develop the required form, and the operation difficulty of form development is reduced.
In addition, by displaying at least one form component in the component selection area, when the form component configuration is performed by using the form configuration interface provided by the embodiment of the application, the form configuration object can enable the generated target form to have the function of the target form component only by selecting the target form component in the component selection area, and the target form is not required to be developed by using a programming language, so that the operation difficulty of form development is reduced.
In addition, the form components in the component selection area can include a basic component, a layout component, a business component and a custom component, so that the form components in the component selection area can meet the form development requirements of different business scenes, and the application range of the form generation method and the form engine platform provided by the embodiment of the application is expanded.
The method described in the above examples is further illustrated in detail below by way of example.
The method of the embodiment of the present application will be described by taking the form engine platform integrated on the terminal as an example.
In an embodiment, as shown in fig. 14, a form generation method includes the following specific processes:
201. and the terminal receives the form configuration triggering instruction.
In an embodiment, the form engine platform provided in the embodiment of the present application may be integrated on a terminal in the form of an application program, or may be embedded in each business system on the terminal as a tool plug-in.
For example, when the form engine platform is integrated on the terminal in the form of an application program, the form engine platform may have a trigger control on the terminal. When the form configuration object is triggered to the trigger control, the terminal receives a form configuration trigger instruction and displays a form configuration interface according to the form configuration trigger instruction.
For another example, when the form engine platform is embedded as a tool plug-in into the business system on the terminal, the form engine platform may also have a trigger control in the business system. When the form configuration object triggers the trigger control in the service system, the terminal receives the form configuration trigger instruction and displays the form configuration platform.
202. And the terminal displays a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area.
For example, as shown in fig. 15, a component selection area 2001, a component property configuration area 2002, and a form layout area 2003 are included on the form configuration platform.
Wherein, the component selection area comprises at least one form component.
In one embodiment, multiple form components may be sorted. For example, form components are divided into layout form components, base form components, and business form components, and a form component type trigger control is displayed for each type of form component. For example, as shown in FIG. 15, a layout component trigger control, a base component trigger control, and a business component trigger control are included in the form layout area. When the layout component is triggered to trigger the control, the form components of the layout type are displayed. Similarly, when the basic component is triggered to trigger the control or the business component triggers the control, the form component of the basic type or the form component of the business type is displayed.
In an embodiment, the form configuration object may perform PC-side form development and mobile-side form development through the form configuration platform provided in the embodiment of the present application. The PC side form development can comprise development of a form displayed on the PC side, and the mobile side form development can comprise development of a form displayed on the mobile terminal.
For example, as shown in fig. 15, a PC-side trigger control 2004 and a mobile-side trigger control 2005 are included on the form layout area. When the form configuration object triggers the PC-side trigger control 2004 on the form layout area, the form layout developed for the PC side is displayed in the form layout area. When the form configuration object triggers the mobile terminal trigger control 2005 on the form layout area, the form layout developed for the mobile terminal is displayed in the form layout area.
In one embodiment, as shown in FIG. 15, the component property configuration region may include a base property configuration control and a global property configuration control. The base property configuration fields are displayed when the form configuration object triggers the base property configuration control, and the global property configuration fields are displayed when the form configuration object triggers the global property configuration control.
In an embodiment, as shown in fig. 15, a history control 2006, a view source code control 2007, a version list control 2008, a preview control 2009, a save control 2010, and a publish control 2011 may also be included on the form configuration interface.
When the form configuration object triggers the history control 2006, the terminal displays the history of the current configuration form.
When the form configuration object triggers view source control 2007, the terminal displays the source file of the currently configured form. The source code file may refer to a form configuration file of a currently configured form, but the form configuration file is a program of a programming language, and the programming language may be a language such as Javascript.
When the form configuration object triggers the version list control 2008, the terminal displays the historical version of the current configuration form.
When the form configuration object triggers the preview control 2009, the terminal displays a preview screen of the currently configured form. And the preview screen is matched with the form configured by the form configuration object on the form layout area and the finally generated form.
When the form configuration object triggers the save control 2010, the terminal saves the layout information and the attribute configuration information of the currently configured form, and updates the form configuration file according to the layout information and the attribute configuration information of the form.
When the form configuration object triggers the issue control 2011, the terminal generates the currently configured form.
203. And the terminal responds to the dragging operation of the target form component to the form layout area, displays the target form component on the form layout area, and displays the attribute configuration field of the target form component in the component attribute configuration area.
In an embodiment, the form configuration object may implement the configuration of the target form through operations of targeting the form component on the component selection area and dragging the target component onto the form layout area.
For example, as shown in fig. 16, when the form configuration object drags the input box to the form layout area in the component selection area, the terminal displays the target form component on the form layout area and the property configuration field of the target form component in the component property configuration area in response to a drag operation with respect to the target form component and the form layout area.
In an embodiment, the component property configuration region can include a base property configuration control and a global property configuration control. In response to a drag operation on the form layout area for a target form component, a base property configuration control and a global property configuration control may be displayed on the component property configuration area. For example, as shown in FIG. 16, a base property configuration control and a global property configuration control can be included on the component property configuration interface.
When a user triggers the basic property configuration control, a basic property configuration field can be displayed in the property configuration area in response to the triggering operation for the basic property configuration control, so that the user can configure the basic property through the basic property configuration field. When the user triggers the global property configuration control, the global property configuration field can be displayed in the property configuration area in response to the triggering operation of the global property configuration control, so that the user can configure the basic property through the global property configuration field.
204. And the terminal responds to the configuration operation aiming at the attribute configuration field and acquires the attribute configuration information of the target form component.
For example, when the attribute configuration field is a selector for performing a selection operation on a plurality of styles, the terminal may acquire the attribute configuration information of the user when the user performs the selection operation on the selector.
For example, when the attribute configuration field is selected whether the form component is necessary, and when the user selects the operation of "yes" to the attribute configuration field, the terminal acquires the attribute configuration information that the form component is necessary.
For example, as shown in fig. 16, when the form configuration object sets the title of the target form component as "name component", the terminal acquires the title configuration information of the target form component, and displays the title of the target form component in the form layout area. When the form configuration object configures the "identification information" to be "001", the terminal acquires the identification information of the target form component.
205. And the terminal responds to the generation operation aiming at the form configuration interface, and performs form rendering processing according to the layout information and the attribute configuration information of the target form component in the form layout area so as to generate the target form.
In an embodiment, the generation operation for the form configuration interface may be responded, the target form component may be obtained from a preset component library, and the target form component may be configured according to the attribute configuration information, so as to obtain the configured form component. And performing form rendering processing on the configured form single component based on the layout information to generate a target form.
For example, the target form component includes a text entry box and a radio box. Therefore, when the target form is generated, the text input box and the radio box can be acquired from the preset component library, so that the text input box and the radio box are displayed in the target form.
After the target form component is obtained, the target form component can be configured according to the attribute configuration information, and the configured form component is obtained. For example, the name of the text entry box is "name" because the name of the text entry box can be displayed as a name on the target form.
In one embodiment, the configured form component may be subjected to form rendering processing based on the layout information to generate the target form. For example, the layout information of the text input box is (100, 28000, 20, 35), the layout information of the radio box is (100, 9000, 20, 35), and the target form may be subjected to form rendering processing according to the layout information, so that the text input box and the radio box are displayed at positions in the target form that match the layout information.
The embodiment of the application provides a form generation method, which comprises the steps that a terminal receives a form configuration triggering instruction; the terminal displays a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component; responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area by the terminal, and displaying the attribute configuration field of the target form component in the component attribute configuration area; responding to configuration operation aiming at the attribute configuration field, and acquiring attribute configuration information of the target form component by the terminal; and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing by the terminal according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form, so that the operation difficulty of form development is reduced.
In order to better implement the form generation method provided by the embodiment of the present application, in an embodiment, a form generation apparatus is further provided, and the form generation apparatus may be integrated in a computer device. The meaning of the noun is the same as that in the above form generation method, and specific implementation details can refer to the description in the method embodiment.
In an embodiment, a form generating apparatus is provided, and the form generating apparatus may be specifically integrated in a computer device, as shown in fig. 17, and the form generating apparatus includes: the receiving unit 301, the interface display unit 302, the component display unit 303, the obtaining unit 304, and the rendering processing unit 305 are specifically as follows:
a receiving unit 301, configured to receive a form configuration trigger instruction;
the interface display unit 302 is configured to display a form configuration interface according to the form configuration trigger instruction, where the form configuration interface includes a component selection area, a component attribute configuration area, and a form layout area; the component selection area comprises at least one form component;
a component display unit 303, configured to display a target form component on the form layout area in response to a drag operation on the form layout area for the target form component, and display an attribute configuration field of the target form component on the component attribute configuration area;
an obtaining unit 304, configured to obtain, in response to a configuration operation for the attribute configuration field, attribute configuration information of the target form component;
the rendering processing unit 305 is configured to, in response to a form generation operation for the form configuration interface, perform form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information, so as to generate a target form.
In one embodiment, the component display unit includes:
a basic attribute configuration control display subunit, configured to respond to a drag operation on the form layout area for a target form component, and display a basic attribute configuration control in the component attribute configuration area;
and the basic attribute configuration field display subunit is used for responding to the triggering operation aiming at the basic attribute configuration control and displaying the basic attribute configuration field in the attribute configuration area.
In one embodiment, the component display unit includes:
the system comprises a global property configuration control display subunit, a component property configuration area and a control display subunit, wherein the global property configuration control display subunit is used for responding to the dragging operation of a target form component to the form layout area and displaying a global property configuration control in the component property configuration area;
and the global property configuration field is used for responding to the triggering operation aiming at the global property configuration control and displaying the global property configuration field in the global property configuration area.
In one embodiment, the component display unit includes:
the target detection subunit is used for responding to the dragging operation of a target form component to the form layout area and carrying out target detection on the target form component in the form layout area;
the position identification subunit is used for identifying the position of the target form component when the target form component is detected in the form layout area to obtain the layout information of the target form component in the form layout area;
and the component display subunit is used for displaying the target form component on the form layout area according to the layout information.
In one embodiment, the component display unit includes:
the identification subunit is used for responding to the dragging operation of a target form component to the form layout area, and identifying the target form component to obtain the identification information of the target form;
the matching subunit is used for matching the identification information of the target form with the preset identification information in a preset field display mapping table;
and the field display subunit is used for displaying the attribute configuration field corresponding to the preset identification information in the component attribute configuration area when the preset identification information matched with the identification information exists in the preset field display mapping table.
In one embodiment, the rendering processing unit includes:
the configuration subunit is configured to, in response to the generation operation for the form configuration interface, obtain the target form component from a preset component library, and configure the target form component according to the attribute configuration information to obtain a configured form component;
and the rendering processing subunit is used for performing form rendering processing on the configured form component based on the layout information to generate the target form.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
The form generation device can reduce the operation difficulty of form development. .
The embodiment of the present application further provides a computer device, where the computer device may include a terminal or a server, for example, the computer device may be used as a form generation terminal, and the terminal may be a mobile phone, a tablet computer, or the like; also for example, the computer device may be a server, such as a form generation server. As shown in fig. 18, it shows a schematic structural diagram of a terminal according to an embodiment of the present application, specifically:
the computer device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 18 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components in combination, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby monitoring the computer device as a whole. Alternatively, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user pages, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 via a power management system, so that functions of managing charging, discharging, and power consumption are implemented via the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The computer device may also include an input unit 404, the input unit 404 being operable to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the computer device loads the executable file corresponding to the process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing various functions as follows:
receiving a form configuration triggering instruction;
displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component;
responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component on the component attribute configuration area;
responding to the configuration operation aiming at the attribute configuration field, and acquiring the attribute configuration information of the target form component;
and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in the various alternative implementations of the above embodiments.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by a computer program, which may be stored in a computer-readable storage medium and loaded and executed by a processor, or by related hardware controlled by the computer program.
To this end, embodiments of the present application further provide a storage medium, in which a computer program is stored, where the computer program can be loaded by a processor to execute the steps in any form generation method provided in the embodiments of the present application. For example, the computer program may perform the steps of:
receiving a form configuration triggering instruction;
displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component;
responding to the dragging operation of the target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component on the component attribute configuration area;
responding to the configuration operation aiming at the attribute configuration field, and acquiring the attribute configuration information of the target form component;
and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Since the computer program stored in the storage medium can execute the steps in any form generation method provided in the embodiments of the present application, beneficial effects that can be achieved by any form generation method provided in the embodiments of the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The method and the apparatus for generating a form provided in the embodiments of the present application are described in detail above, and specific examples are applied in the description to explain the principles and embodiments of the present application, and the description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A form generation method, comprising:
receiving a form configuration triggering instruction;
displaying a form configuration interface according to the form configuration triggering instruction, wherein the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component;
responding to the dragging operation of a target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component in the component attribute configuration area;
responding to the configuration operation aiming at the attribute configuration field, and acquiring the attribute configuration information of the target form component;
and responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form.
2. The form generation method of claim 1, wherein the component property configuration area includes a base property configuration control; the attribute configuration field comprises a basic attribute configuration field;
the responding to the drag operation of the target form component to the form layout area, and displaying the attribute configuration field of the target form component in the component attribute configuration area, wherein the method comprises the following steps:
responding to the dragging operation of a target form component to the form layout area, and displaying a basic attribute configuration control in the component attribute configuration area;
and responding to the trigger operation of the basic attribute configuration control, and displaying a basic attribute configuration field in the attribute configuration area.
3. The form generation method of claim 2, wherein the component property configuration region further comprises a global property configuration control; the attribute configuration field further comprises a global attribute configuration field;
the responding is to drag operation of the target form component to the form layout area, and the attribute configuration field of the target form component is displayed in the component attribute configuration area, and the method further comprises the following steps:
responding to the dragging operation of a target form component to the form layout area, and displaying a global property configuration control in the component property configuration area;
and responding to the triggering operation aiming at the global property configuration control, and displaying a global property configuration field in the global property configuration area.
4. The form generation method of claim 1, wherein the component selection area further comprises a custom component addition control; the responding to the drag operation of the target form component to the form layout area and before the target form component is displayed on the form layout area further comprises:
responding to the trigger operation of adding the control aiming at the custom component, and displaying a custom component acquisition interface;
and acquiring the custom assembly through the custom assembly acquisition interface.
5. The form generation method of claim 1, wherein the component selection area further comprises at least one form component type trigger control;
the responding to the drag operation of the target form component to the form layout area and before the target form component is displayed on the form layout area further comprises:
responding to the trigger operation of triggering the control aiming at the type of the target form component, and displaying at least one form component matched with the type of the target form component in the form selection area;
in response to the selection operation for the form component, a target form component is determined among the at least one form component and displayed as a selected state.
6. The form generation method of claim 1, wherein the displaying the target form component on the form layout area in response to a drag operation of the target form component to the form layout area comprises:
responding to the dragging operation of a target form component to the form layout area, and performing target detection on the target form component in the form layout area;
when the target form component is detected in the form layout area, performing position recognition on the target form component to obtain layout information of the target form component in the form layout area;
and displaying the target form component on the form layout area according to the layout information.
7. The form generation method of claim 1, wherein the displaying the property configuration fields of the target form component in the component property configuration area in response to the drag operation of the target form component to the form layout area comprises:
responding to the dragging operation of a target form component to the form layout area, and identifying the target form component to obtain the identification information of the target form component;
matching the identification information of the target form component with preset identification information in a preset field display mapping table;
and when preset identification information matched with the identification information exists in the preset field display mapping table, displaying an attribute configuration field corresponding to the preset identification information in a component attribute configuration area.
8. The form generation method of claim 1, wherein the performing, in response to the generation operation for the form configuration interface, a form rendering process according to the layout information of the target form component in the form layout area and the attribute configuration information to generate the target form comprises:
responding to the generation operation aiming at the form configuration interface, acquiring the target form component from a preset component library, and configuring the target form component according to the attribute configuration information to obtain a configured form component;
and performing form rendering processing on the configured form components based on the layout information to generate the target form.
9. The form generation method of claim 1, the method further comprising:
responding to the storage operation aiming at the form configuration interface, and generating a form configuration file according to the layout information of the target form component in the form layout area and the attribute configuration information;
sending the form configuration file to a storage server;
when a form generation triggering instruction is received, sending a form configuration file acquisition request to the storage server;
and receiving the form configuration file returned by the storage server, and generating a target form according to the form configuration file.
10. A form generation apparatus, characterized in that the form generation apparatus comprises:
the receiving unit is used for receiving a form configuration triggering instruction;
the interface display unit is used for displaying a form configuration interface according to the form configuration triggering instruction, and the form configuration interface comprises a component selection area, a component attribute configuration area and a form layout area; the component selection area comprises at least one form component;
the component display unit is used for responding to the dragging operation of a target form component to the form layout area, displaying the target form component on the form layout area, and displaying the attribute configuration field of the target form component in the component attribute configuration area;
the acquisition unit is used for responding to the configuration operation aiming at the attribute configuration field and acquiring the attribute configuration information of the target form component;
and the rendering processing unit is used for responding to the form generation operation aiming at the form configuration interface, and performing form rendering processing according to the layout information of the target form component in the form layout area and the attribute configuration information to generate a target form.
CN202110405882.XA 2021-04-15 2021-04-15 Form generation method and device Pending CN115220618A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110405882.XA CN115220618A (en) 2021-04-15 2021-04-15 Form generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110405882.XA CN115220618A (en) 2021-04-15 2021-04-15 Form generation method and device

Publications (1)

Publication Number Publication Date
CN115220618A true CN115220618A (en) 2022-10-21

Family

ID=83604340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110405882.XA Pending CN115220618A (en) 2021-04-15 2021-04-15 Form generation method and device

Country Status (1)

Country Link
CN (1) CN115220618A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115618144A (en) * 2022-12-20 2023-01-17 冠骋信息技术(苏州)有限公司 Dynamic layout method, system, device and medium based on webpage

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115618144A (en) * 2022-12-20 2023-01-17 冠骋信息技术(苏州)有限公司 Dynamic layout method, system, device and medium based on webpage
CN115618144B (en) * 2022-12-20 2023-03-28 冠骋信息技术(苏州)有限公司 Dynamic layout method, system, equipment and medium based on webpage

Similar Documents

Publication Publication Date Title
CN107818143B (en) Page configuration and generation method and device
CN106708480B (en) Management platform implementation method and device
US11132114B2 (en) Method and apparatus for generating customized visualization component
CN111767563A (en) Method, device, terminal and storage medium for setting authority of online document
CN107391134B (en) Method and device for automatically generating and dynamically transforming universal mobile application interactive interface
CN104321743B (en) For developing the method and system for inquiring the application program of content and service on a communication network
CN108292231A (en) It generates and applies from data
CN102520841A (en) Collection user interface
US11797258B2 (en) Conversational analytics with data visualization snapshots
CN111881662A (en) Form generation method, device, processing equipment and storage medium
CN113268226A (en) Page data generation method and device, storage medium and equipment
CN111324535B (en) Control abnormity detection method and device and computer equipment
CN111679818A (en) Method and system for editing display software
CN113535165A (en) Interface generation method and device, electronic equipment and computer readable storage medium
CN106227553A (en) For describing and perform the data driven mode of management role in graphic user interface
CN113407284A (en) Navigation interface generation method and device, storage medium and electronic equipment
CN111427577A (en) Code processing method and device and server
CN115220618A (en) Form generation method and device
CN113971191A (en) Data import method and device and computer readable storage medium
CN113868565A (en) Skin style file editing method and device
CN114118042A (en) Language design and application method of open geographic information collection template supporting complex multitask definition
CN114327709A (en) Control page generation method and device, intelligent device and storage medium
KR101242878B1 (en) Method and system for extracting and providing item having annotation on electronic book
CN113608737A (en) Page generation method, device, equipment and medium
US10452683B2 (en) Selectively synchronizing data on computing devices based on selective sync templates

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