Form generation method and device, electronic equipment and storage medium
By obtaining the changed business condition values on the client and obtaining the form parameter configuration item list from the server, and generating the target form, the problem of cumbersome and lack of flexibility in form generation in the existing technology is solved, and more efficient form generation and development efficiency is achieved.
Patent Information
- Application Number
- CN202510220639.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-13
AI Technical Summary
In the prior art, corresponding forms need to be established in advance for different business condition values, resulting in the need to write a large number of verification rule codes and form organization codes, which are more cumbersome and lack of flexibility.
By obtaining the changed business condition value on the client and passing it to the server, the corresponding form parameter configuration item list is obtained, and the target form is generated based on the list. There is no need to pre-establish forms for each business condition value, simplifying code writing and form management.
It improves the flexibility and development efficiency of form generation, reduces the workload of writing verification logic and organizing form lists, and allows the system to quickly adapt to changing business scenarios.
Smart Images

Figure CN120146013A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and particularly to a form generation method, apparatus, electronic device, and storage medium. Background Art
[0002] In many computing scenarios, it is necessary to display different forms according to different business condition values to implement parameter setting and passing. In the related art, corresponding forms are established in advance for different business condition values, and corresponding verification rules are defined for the forms corresponding to different business condition values to process and verify the data submitted by users based on the forms.
[0003] However, this way of establishing corresponding forms in advance for different business condition values requires writing a large amount of verification rule code and form organization code, which is rather cumbersome and lacks flexibility. Summary of the Invention
[0004] This application provides a form generation method, apparatus, electronic device, and storage medium to at least solve the problem that in the related art, the way of establishing corresponding forms in advance for different business condition values requires writing a large amount of verification rule code and form organization code, which is rather cumbersome and lacks flexibility.
[0005] This application provides a form generation method, including:
[0006] For any business component in the application program of the client, if the business condition value of the business component changes, obtain the changed target business condition value, where different business components are used to implement different business functions;
[0007] Based on the target business condition value, obtain a list of form parameter configuration items corresponding to the target business condition value from the server, where the list of form parameter configuration items includes multiple form parameter configuration items corresponding to the target business condition value;
[0008] Generate a target form corresponding to the target business condition value based on the list of form parameter configuration items.
[0009] This application also provides a form generation apparatus, including:
[0010] A first acquisition module, configured to, for any business component in the application program of the client, if the business condition value of the business component changes, obtain the changed target business condition value, where different business components are used to implement different business functions;
[0011] A second acquisition module, configured to obtain a list of form parameter configuration items corresponding to the target business condition value from the server based on the target business condition value, where the list of form parameter configuration items includes multiple form parameter configuration items corresponding to the target business condition value;
[0012] A generation module, configured to generate a target form corresponding to a target business condition value based on a list of form parameter configuration items.
[0013] This application also provides an electronic device, including: a memory for storing a computer program; a processor for implementing the steps of any of the above form generation methods when executing the computer program.
[0014] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program implements the steps of any of the above form generation methods when executed by a processor.
[0015] This application also provides a computer program product including a computer program that implements the steps of any of the above form generation methods when executed by a processor.
[0016] Through this application, since if the business condition value of a business component changes, the changed target business condition value is obtained and passed as a parameter to the server to obtain a list of form parameter configuration items corresponding to the target business condition value from the server, and a target form corresponding to the target business condition value is generated according to the obtained list of form parameter configuration items. There is no need to pre-establish corresponding forms for different business condition values. Instead, the corresponding list of form parameter configuration items can be obtained from the server according to different business condition values, and forms can be generated based on the list of form parameter configuration items. There is no need to spend a lot of effort writing verification logic and organizing form lists, separating the logic for obtaining the list of form parameter configuration items from the form organization logic, solving the technical problem in the related art that the method of pre-establishing corresponding forms for different business condition values is relatively cumbersome and lacks flexibility, and achieving the technical effects of improving flexibility and development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] To more clearly illustrate the embodiments of this application, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0018] Figure 1 A schematic diagram showing the display of a corresponding form according to a business condition value provided by an embodiment of this application;
[0019] Figure 2 A schematic structural diagram of a form generation system provided by an embodiment of this application;
[0020] Figure 3 A schematic flowchart of a form generation method provided by an embodiment of this application;
[0021] Figure 4 It is a schematic flowchart of another form generation method provided by an embodiment of the present application;
[0022] Figure 5 It is a schematic flowchart of another form generation method provided by an embodiment of the present application;
[0023] Figure 6 It is a schematic flowchart of yet another form generation method provided by an embodiment of the present application;
[0024] Figure 7 It is a structural block diagram of a form generation device provided by an embodiment of the present application;
[0025] Figure 8 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
[0026] Figure 9 It is a business system architecture diagram of a computer program provided by an embodiment of the present application. Detailed implementation manners
[0027] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0028] It should be noted that in the description of the present application, the terms "include", "comprise" or any other variant thereof are intended to cover a non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or device. The terms "first", "second", etc. in the present application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0029] In order to enable those skilled in the art of the present technology to better understand the solution of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific implementation manners.
[0030] In many computing scenarios, there are cases where different forms are displayed based on different business condition values to set form parameters and transfer a large amount of form parameter data. Exemplarily, in an Artificial Intelligence (AI) platform, for a business component provided by the platform for implementing the model fine-tuning function, when using this business component for model fine-tuning, it is necessary to first select a fine-tuning method. Among them, different fine-tuning methods are different business condition values. Different forms are switched according to different fine-tuning methods, so that users can fill in the corresponding task parameters according to the form to create a fine-tuning task, improve the performance of the model on specific tasks, and enable the model to better adapt to and complete tasks in specific fields.
[0031] Exemplarily, Figure 1 is a schematic diagram showing the corresponding form according to the business condition value provided by the embodiment of the present application. As Figure 1 shown, the business component is a business component for implementing the model fine-tuning function, the business condition value of the business component is the fine-tuning method of the business component, and the fine-tuning methods include full-parameter fine-tuning, partial-parameter fine-tuning, and Low-Rank Adaptation (LoRA) fine-tuning. When the business condition value, that is, the fine-tuning method of the business component, is full-parameter fine-tuning, the form shown in Figure 1 is displayed, so that users can fill in the corresponding task parameters according to the form to create a fine-tuning task.
[0032] Among them, since the number of form parameters involved in the form is relatively large, in order to improve the user experience, the form parameters are often displayed by grouping the form parameters.
[0033] It should be noted that the scenario of displaying different forms based on different business condition values to transfer form parameter data generally has certain regularity. Specifically, the form parameter data transferred is often the data corresponding to relatively regular form parameters such as strings, numbers, and boolean values in terms of data type, and the editing and transfer of the form parameter data can be completed using the types of the form parameters of the form. Among them, the types of form parameters can be text boxes, drop-down selection boxes, number input boxes, switches, etc.
[0034] In the related art, for different business condition values, their corresponding forms are established in advance, and corresponding verification rules are defined for different business condition values and their corresponding forms to process and verify the data submitted by users based on the forms.
[0035] However, this method of pre-establishing a corresponding form for any business condition value requires technicians to spend a great deal of effort in writing the verification logic code for the form parameters of each form and the form list organization code. When writing the verification logic code for the form parameters of each form and the form list organization code, it is necessary to copy and paste relevant code or rewrite the form parameter configuration items to generate the form corresponding to any business condition value. This method is rather cumbersome and lacks flexibility.
[0036] Since the number of form parameters set through the form and the form parameter data transmitted is large, and the form parameters may also be frequently adjusted according to business requirements, when modifying the form parameters, it is necessary to manually modify the code corresponding to the form parameters and repackage and deploy it as a form. This method has low flexibility and is rather cumbersome.
[0037] In view of the above problems, the embodiments of the present application provide a form generation method, which includes: for any business component in the application program of the client, if the business condition value of the business component changes, obtain the changed target business condition value, where different business components are used to implement different business functions; based on the target business condition value, obtain the list of form parameter configuration items corresponding to the target business condition value from the server, the list of form parameter configuration items includes multiple form parameter configuration items corresponding to the target business condition value, and based on the list of form parameter configuration items, generate the target form corresponding to the target business condition value. By obtaining the corresponding list of form parameter configuration items from the server according to different business condition values and generating forms according to the list of form parameter configuration items, it is not necessary to spend a great deal of effort in writing verification logic and organizing form lists, solving the technical problem that the method of pre-establishing corresponding forms for different business condition values in the related art is rather cumbersome and lacks flexibility, and achieving the technical effects of improving flexibility and development efficiency.
[0038] The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in some embodiments. The embodiments of the present invention will be described below with reference to the accompanying drawings.
[0039] First, the structure of the form generation system based on the present application will be described: The form generation method, device, electronic device and storage medium provided by the embodiments of the present application are applicable to generating corresponding forms according to different business condition values of business components. As Figure 2As shown in the figure, it is a schematic structural diagram of a form generation system based on the embodiments of the present application. The form generation system mainly includes a client, a form generation device, and a server. The client can include multiple application programs, such as an AI platform, etc. Each application program includes multiple business components, and the business components are used to implement business functions. The form generation device is used to obtain a list of form parameter configuration items corresponding to the target business condition value from the server according to the changed target business condition value when the business condition value of any business component changes, and generate a target form corresponding to the target business condition value based on the list of form parameter configuration items.
[0040] An embodiment of the present application provides a form generation method, and this method can be used in the above-mentioned client. Figure 3 It is a schematic flowchart of a form generation method provided by an embodiment of the present application. As Figure 3 shown, this process includes the following steps:
[0041] Step S301, for any business component in the application program of the client, if the business condition value of the business component changes, obtain the changed target business condition value. Different business components are used to implement different business functions.
[0042] Among them, the application program is a Vue.js application program. A business component refers to a component in a Vue.js application program used to implement specific business functions. These components are usually associated with specific business logics, data models, and user interaction pages, aiming to solve practical business problems in the application program. Business components may contain complex logics, data processing, application programming interface (API) calls, and interactions with backend services. Vue is a progressive JavaScript framework. It is built based on standard HTML, CSS, and JavaScript, and provides a declarative and component-based programming model to help developers efficiently develop user interfaces.
[0043] The change in the business condition value of the business component can occur when the business component is initialized or when the user switches the business condition value of the business component.
[0044] The client includes: a parameter acquisition module, a parameter configuration proxy module, and a parameter form control module. Among them, in the parameter acquisition module, register and use the parameter configuration proxy module component, and set a reference name paramsRef for the parameter configuration proxy module component through the ref attribute. When the business condition value of the business component changes, the parameter acquisition module calls the event handling function of the parameter configuration proxy module through paramsRef.value, and this event handling function is used to pass the target business condition value to the server to obtain a list of form parameter configuration items.
[0045] That is to say, when the business component is initialized or the business condition value is switched, the parameter acquisition module calls the event handling function of the parameter configuration proxy module to obtain the list of form parameter configuration items.
[0046] It should be noted that the parameter acquisition module, the parameter configuration proxy module, and the parameter form control module are Vue components. Vue components are the basic building blocks in the Vue.js framework and are used to build reusable parts of the user interface. Each Vue component contains its own template (HTML), logic (JavaScript), and style (CSS), enabling developers to build complex web applications more efficiently and flexibly. In the template of the parent component, the child component can be used like an HTML tag. Data can be passed from the parent component to the child component through attributes (props), and events emitted by the child component can also be listened to. In the child component, the data expected to be received from the parent component can be declared through the props option. Data can be received from the parent component through props and then used in the template and logic of the child component.
[0047] In Vue, the parent component sets a reference name for the child component through the ref attribute. The parent component can obtain the instance of the child component through ref and interact with it to perform operations on the child component, such as calling the methods of the child component and passing data. The parent component sets a reference name for the child component through the ref = "childRef" attribute. Then, in the parent component, a reactive reference childRef is created using the ref function to point to the instance of the child component. The attributes of the child component can be accessed or the methods of the child component can be called, and data can be passed through childRef.value. The child component can use the $emit method to trigger events and send data to the parent component. The parent component can respond to the behavior of the child component by listening to these events.
[0048] The Vue instance is the entry point of the Vue.js application and the core of the Vue.js application. It is responsible for connecting Vue components and the Document Object Model layer (DOM layer) and managing the state and behavior of the components.
[0049] The parameter acquisition module only needs to focus on the business logic and does not need to pay attention to the display and verification logic of form parameters, making the business logic clear and improving the readability and maintainability of the code.
[0050] Step S302: Based on the target business condition value, obtain the list of form parameter configuration items corresponding to the target business condition value from the server. The list of form parameter configuration items includes multiple form parameter configuration items corresponding to the target business condition value.
[0051] Among them, within the parameter configuration proxy module, the parameter form control module component is registered, and a reference name `dynamicFormRef` is set for it through the `ref` attribute. When the parameter configuration proxy module monitors the event handling function called by the parameter acquisition module, it calls the API interface to pass the target business condition value to the server to obtain the list of form parameter configuration items corresponding to the target business condition value from the server.
[0052] It can be understood that the parameter configuration proxy module is the middle layer connecting the parameter acquisition module and the parameter form control module.
[0053] The list of form parameter configuration items is the form parameter configuration content returned by the server. The form parameter configuration items include: display name, i.e., the form parameter name, the key value corresponding to the form parameter, the type of the form parameter, whether it is required, etc.
[0054] After receiving the list of form parameter configuration items, the parameter configuration proxy module sends the list of form parameter configuration items to the parameter form control module.
[0055] The parameter configuration proxy module extracts the acquisition logic and processing logic of the list of form parameter configuration items into a separate component, improving the readability and maintainability of the code.
[0056] Step S303: Generate a target form corresponding to the target business condition value based on the list of form parameter configuration items.
[0057] Among them, the parameter form control module receives the list of form parameter configuration items sent by the parameter configuration proxy module, parses the list of form parameter configuration items, and generates a target form corresponding to the target business condition value. The target form includes grouped form items and the corresponding verification logic for the form items. The form items correspond one-to-one with the form parameter configuration items.
[0058] The parameter form control module generates a target form corresponding to the target business condition value according to the received list of form parameter configuration items, taking different relevant businesses into consideration, improving the readability and flexibility of the code, making it easier to understand, and the code is easy to reuse, test, and maintain.
[0059] The form generation method provided by this application obtains the changed target business condition value if the business condition value of a business component changes, and passes the changed target business condition value as a parameter to the server to obtain the list of form parameter configuration items corresponding to the target business condition value from the server. According to the obtained list of form parameter configuration items, a target form corresponding to the target business condition value is generated. There is no need to pre - establish corresponding forms for different business condition values. Instead, the list of form parameter configuration items corresponding to different business condition values is obtained from the server, and forms are generated according to the list of form parameter configuration items. It is not necessary to spend a lot of effort writing verification logic and organizing form lists. Separating the logic for obtaining the list of form parameter configuration items from the form organization logic solves the technical problem in the related art that the method of pre - establishing corresponding forms for different business condition values is relatively cumbersome and lacks flexibility, achieving the technical effects of improving flexibility and development efficiency.
[0060] An embodiment of this application provides a form generation method, which can be used in the above - mentioned client. Figure 4 It is a schematic flowchart of a form generation method provided by an embodiment of this application, as Figure 4 shown. The process includes the following steps:
[0061] Step S401: For any business component in the application program of the client, if the business condition value of the business component changes, obtain the changed target business condition value. Different business components are used to implement different business functions. For details, please refer to Figure 3 step S301 in the shown embodiment, which will not be elaborated here.
[0062] Step S402: Based on the target business condition value, obtain the list of form parameter configuration items corresponding to the target business condition value from the server. The list of form parameter configuration items includes multiple form parameter configuration items corresponding to the target business condition value.
[0063] Specifically, the above - mentioned step S402 includes:
[0064] Step S4021: Send a request for obtaining the list of form parameter configuration items to the server. The request for obtaining the list of form parameter configuration items includes the target business condition value, so that the server, in response to the request for obtaining the list of form parameter configuration items, determines the list of form parameter configuration items corresponding to the target business condition value based on the correspondence between different business condition values and different lists of form parameter configuration items, and sends the list of form parameter configuration items to the client.
[0065] Among them, when the parameter configuration proxy module monitors that the parameter acquisition module calls the event processing function, it calls the API interface to send a request for obtaining the form parameter configuration item list to the server, so that the server, in response to the request for obtaining the form parameter configuration item list, determines the form parameter configuration item list corresponding to the target business condition value based on the correspondence between different business condition values and different form parameter configuration item lists, and sends the form parameter configuration item list to the client.
[0066] It should be noted that the correspondence between different business condition values and different form parameter configuration item lists is pre-set by technicians on the server.
[0067] Step S4022: Receive the form parameter configuration item list corresponding to the target business condition value.
[0068] Receive the form parameter configuration item list corresponding to the target business condition value returned by the server.
[0069] Step S403: Generate a target form corresponding to the target business condition value based on the form parameter configuration item list. For details, please refer to Figure 3 Step S303 of the illustrated embodiment, which will not be elaborated here.
[0070] The form generation method provided by this application sets the correspondence between different business condition values and different form parameter configuration item lists on the server, determines the form parameter configuration item list corresponding to the target business condition value in response to the request for obtaining the form parameter configuration item list, and sends the form parameter configuration item list to the client. When it is necessary to adjust the verification logic and configuration information of the form parameters, it is only necessary to modify the form parameter configuration items in the form parameter configuration item list on the server, without having to rewrite the code or repackage and deploy to generate the form corresponding to the business condition value, making the code easier to maintain, having higher flexibility, simplifying the development process, and improving the development efficiency.
[0071] In some optional embodiments, the form parameter configuration item includes the configuration information of the form parameter, and the configuration information of the form parameter includes the grouping information and grouping sorting information of the form parameter; before generating a target form corresponding to the target business condition value based on the form parameter configuration item list, the method further includes:
[0072] Step a1: Divide the form parameter configuration item list into multiple form parameter configuration item sub-lists based on the grouping information of the form parameters in the form parameter configuration item, where the grouping information and grouping sorting information of the form parameter configuration items in each form parameter configuration item sub-list are the same.
[0073] Among them, after the parameter configuration proxy module obtains the form parameter configuration item list from the server, it is also used to process the form parameter configuration item list and pass the processed form parameter configuration item list to the parameter form control module. Among them, processing the form parameter configuration item list includes: sorting processing, filtering processing, etc. on the form parameter configuration item list.
[0074] Here, taking the sorting process of the form parameter configuration item list as an example for illustration.
[0075] The form parameter configuration item list includes the grouping information of form parameters. The grouping information of the form parameters includes the grouping name name, the grouping explanation item desc, the grouped form parameter list, etc. Among them, the form parameter configuration item list can be as follows:
[0076]
[0077] According to the grouping name in the grouping information of the form parameters in the form parameter configuration item, the form parameter configuration item list is divided into multiple form parameter configuration item sub-lists, that is, the grouped form parameter list.
[0078] Step a2, based on the grouping sorting information in the form parameter configuration items in the form parameter configuration item sub-list, sort the multiple form parameter configuration item sub-lists to obtain a form parameter configuration item list including the sorted multiple form parameter configuration item sub-lists.
[0079] Among them, the form parameter configuration item list also includes the grouping sorting information (grouping sorting field order) of the form parameters. After dividing the form parameter configuration item list into multiple form parameter configuration item sub-lists, that is, after completing the grouping of the form parameter configuration items, sort the multiple form parameter configuration item sub-lists according to the grouping sorting information to obtain a form parameter configuration item list including the sorted multiple form parameter configuration item sub-lists. It should be noted that the multiple form parameter configuration item sub-lists can be sorted in ascending order or descending order according to the grouping sorting field.
[0080] The form generation method provided by this application divides the form parameter configuration item list into multiple form parameter configuration item sub-lists, and sorts the multiple form parameter configuration item sub-lists based on the grouping sorting information in the form parameter configuration items in the form parameter configuration item sub-lists, making the form parameter configuration item list more structured, making the generated form more organized and easier to maintain, and significantly improving the user experience.
[0081] In some alternative embodiments, the form parameter configuration item further includes the verification logic of the form parameter, and the configuration information of the form parameter further includes the name of the form parameter, the type of the form parameter, the initial value information of the form parameter, and the key of the form parameter. Generating a target form corresponding to the target business condition value based on the list of form parameter configuration items includes:
[0082] Step b1, for any form parameter configuration item in the list of form parameter configuration items, use the name of the form parameter in the form parameter configuration item as the name of the form item corresponding to the form parameter configuration item in the target form.
[0083] Among them, after receiving the list of form parameter configuration items sent by the parameter configuration proxy module, the parameter form control module calls the initialization function to traverse and parse the first layer of the list of form parameter configuration items to obtain the grouping information of the form parameters in the form parameter configuration item. Within the first-layer grouping information, traverse the second layer, and by parsing the configuration information of the form parameters in the form parameter configuration item, parse out the initial value information of each form parameter and the verification logic of each form parameter.
[0084] The parameter form control module traverses and parses the first layer of the list of form parameter configuration items in the Document Object Model layer (DOM layer) to obtain the grouping information of the form (Form) parameter configuration items. Within the first-layer grouping information, traverse the second layer, and by parsing the form parameter configuration item information, parse out the specific display form of each form. Associate the initial value information of the Form form parameter with each Form form item, and associate the verification logic of the Form form parameter with each form item to obtain the target form.
[0085] Specifically, in the first step, the parameter form control module receives the list of form parameter configuration items passed by the parameter configuration proxy module through the props attribute declaration, sets the default value to an empty array, and parses the list of form parameter configuration items. The grouping information of the form parameters includes a list of grouping parameters.
[0086] The list of grouping parameters includes the name of the form parameter, whether the form parameter is required, the type of the form parameter, the form parameter explanation item, and the key value of the form parameter.
[0087] Among them, the name of the form parameter is used to display the label name of the form item.
[0088] The type of the form parameter inputType includes number box (number), text box (text), switch (selector), dropdown selection box (dropdown), etc.
[0089] Whether the form parameter is required (required) is used to determine whether the form parameter is a required item.
[0090] The initial value information of form parameters is the default value of form parameters.
[0091] The form parameter explanation item is used to display the meaning of the form parameter, the default value and other annotation items.
[0092] The key value of the form parameter is used to mark the unique key value of the form parameter when the form parameter is passed to the server during form parameter passing.
[0093] When the type inputType of the form parameter is the following values, the form parameter verification logic includes:
[0094] Drop-down box: scope represents the list of optional items for this parameter, which is of array type, and each item contains a name attribute and a value (value) attribute.
[0095] Number box: minimum value, maximum value, step size.
[0096] Text box: minimum length, maximum length, regular expression, error prompt message when the regular expression is not satisfied.
[0097] Second step: Define a form component, set a reference name ruleFormRef for it through the ref attribute, and set the model attribute for it to associate with the form parameter object ruleForm. This form parameter object is the form item.
[0098] Set the rules attribute to define the verification logic of the form. rules is an array of objects, and each object represents the verification logic of a form item. Each object can contain multiple verification logics, such as: min, max, required, etc. Among them, in Element UI, the el-form component is used to create a form, and the rules attribute is used to define the rules for form verification, that is, the verification logic of the form. The Element framework is a relatively popular UI component library developed based on Vue.js, providing rich interface components and styles. The Form form contains components for user input such as input boxes, radio boxes, drop-down selections, and check boxes, which can be implemented through the Element framework.
[0099] It should be noted that in the el-form component of Element UI, if you want to define custom verification logic for form items, you can use the validator function in the rules attribute to achieve this. This function accepts three parameters: rule (the description object of the current verification logic), value (the value to be verified), and callback (the callback function used to return the verification result).
[0100] Step 3: Set up a monitoring event. When the change of the form parameter configuration item list is monitored, that is, when the form parameter configuration item list is received, call the initialization function to re-parse the form parameter configuration item list and set the verification logic.
[0101] Traverse the form parameter configuration item list, which includes one or more groups. Under each group, there are one or more parameter configuration information, that is, form parameter configuration items. Traverse each group groupConfig to obtain each parameter configuration information valConfig.
[0102] Set the initial value for the form parameter: The parameter configuration information valConfig contains at least one key value, which represents the unique key value for marking this form parameter when passing parameters to the backend interface; an initial value origin, which represents the initial value of this form parameter. Set the initial value for the form parameter object ruleForm, extract the key value of the parameter configuration information as the key of ruleForm; the origin value of the parameter configuration information as the initial value of ruleForm, that is: ruleForm[valConfig.key] = valConfig.origin, to associate the form item with the initial value of the form parameter.
[0103] Set the verification logic for the form parameter: Obtain the inputType of the form parameter of the parameter configuration information valConfig, and the type may be a text box, a drop-down selection box, a number input box, a switch, etc.
[0104] According to the types of different form parameters, integrate the verification logic list, assign the verification logic list to the verification logic object rules, and use valConfig.key as the key value; that is, rules[valConfig.key].
[0105] Then the verification logic list includes:
[0106] Text box: min minimum length, max maximum length, regex regular expression, message as the error prompt message, required whether it is required to form a verification rule array.
[0107] Number box: min minimum value, max maximum value, mustBeNumber must be a number, required whether it is required.
[0108] Drop-down box: required whether it is required.
[0109] Set form display items: Based on the second step, inside the form component, use the v-for directive to render the form parameter configuration item list dataList. Among them, the v-for directive can be used to render a list based on an array. The value of the v-for directive needs to use the special syntax of item in items, where items is the array of source data, and item is the alias of the iteration item.
[0110] Specifically:
[0111] Use the v-for directive to render the first-level grouping information item in the form parameter configuration item list dataList, including the grouping name item.name, the grouping explanation item item.desc. Judge the length of the grouping explanation item item.desc. If the length is not 0, then display it.
[0112] Use the v-for directive to traverse item.list inside the first-level grouping information to render form items: sItem in item.list, where item.list is the grouping parameter list, and sItem is the alias of each form parameter item, corresponding to the aforementioned valConfig. Specifically:
[0113] (1) Set el-form-item for each form parameter item sItem, and set the label attribute to sItem.name.
[0114] (2) Set the prop attribute to the special key value sItem.key that needs to be verified, corresponding to the verification logic rules[valConfig.key] in the verification logic of the form parameter.
[0115] (3) The rendering format of form items includes:
[0116] If the type of sItem.inputType is a text box, then set it to an input box, and bind the form item to the corresponding value ruleForm[sItem.key] of the parameter object ruleForm.
[0117] If the type is a number box, then set it to an Input Number numeric input box, and bind the form item to the variable ruleForm[sItem.key]. Set the min attribute to the minimum allowed value sItem.min, the max attribute to the maximum allowed value sItem.max, and the step attribute to the step sItem.step.
[0118] If the type is a switch: then set it to a Switch switch, and bind the form item to ruleForm[sItem.key].
[0119] If the type is a drop-down selection box: then set it as a Select selector, and bind the form item to ruleForm[sItem.key]; set sItem.scope as the set of selection items for the drop-down option option, and the bound value is the option value of the currently selected option.
[0120] Step b2, render the input type of the form item corresponding to the form parameter based on the type of the form parameter in the form parameter configuration item, where the type of the form parameter includes a text box, a number input box, and a drop-down selection box.
[0121] Step b3, associate the initial value information of the form parameter in the form parameter configuration item with the form item corresponding to the form parameter, and use the key of the form parameter in the form parameter configuration item as the key of the form item corresponding to the form parameter.
[0122] Step b4, associate the verification logic of the form parameter in the form parameter configuration item with the form item corresponding to the form parameter to generate a target form corresponding to the target business condition value. The target form includes multiple form items, and one form item corresponds to one form parameter configuration item.
[0123] The form generation method provided by this application ensures that users have a reasonable default value when filling out the form by associating the initial value information of the form parameter with the form item, reducing the possibility of omission and incorrect input. Associating the verification logic of the form parameter with the form item can perform real-time verification during user input and promptly feedback error information, improving the accuracy and integrity of the data. The form parameter configuration item list can be flexibly adjusted according to different target business condition value requirements, simplifying the form generation logic, enabling the system to quickly adapt to changing business scenarios, and improving flexibility.
[0124] In some alternative embodiments, the configuration information of the form parameter further includes a form parameter explanation item, and the method further includes:
[0125] Step c1, obtain the information length of the form parameter explanation item.
[0126] Step c2, when the information length of the form parameter explanation item is a preset value, determine not to display the form parameter explanation item in the target form.
[0127] Wherein, the preset value is 0.
[0128] Step c3, when the information length of the form parameter explanation item is not the preset value, determine to display the form parameter explanation item at the explanation position of the form item corresponding to the form parameter in the target form.
[0129] The form generation method provided by this application avoids displaying long or unnecessary explanatory content in the target form by judging the information length of the form parameter interpretation items, reduces the cognitive burden of users, and improves the user experience. The explanatory items are only displayed when needed, ensuring that users can focus on important information when filling out the form, and improving the readability and usability of the form.
[0130] In some alternative embodiments, the method further includes:
[0131] Step d1, in response to the user's data submission operation based on the form item of the target form, obtain the target form item data.
[0132] Among them, the parameter acquisition module obtains the target form item data when the user submits the form item data of the target form.
[0133] Step d2, obtain the verification logic of the form parameters associated with the form item.
[0134] The parameter acquisition module calls the verification event of the parameter configuration proxy module through paramsRef.value. In response to the parameter acquisition module's call to its verification event, the parameter configuration proxy module calls the verification logic of the form parameters of the parameter form control module through dynamicFormRef.value.
[0135] Step d3, based on the verification logic of the form parameters associated with the form item, verify the target form item data to obtain a verification result.
[0136] In response to the parameter configuration proxy module's call operation of the verification logic of the form parameters, the parameter form control module verifies the target form item data based on the verification logic of the form parameters associated with the form item to obtain a verification result. The verification result is passed to the parameter configuration proxy module in the form of a callback function, and within the callback function, the parameter transfer event is triggered to enable the parameter configuration proxy module to return the verification result to the parameter acquisition module.
[0137] Step d4, in the case where the verification result is verification passed, submit the target form item data to the server based on the key of the form item.
[0138] The parameter acquisition module obtains the verification result by listening to the parameter transfer event. In the case where the verification result is verification passed, it submits the target form item data to the server for subsequent processing based on the key of the form item.
[0139] It should be noted that the parameter acquisition module integrates the target form item data into the server interface convention format based on the key of the form item, and passes the target form item data to the server by calling the API.
[0140] The form generation method provided by this application obtains the verification logic of form parameters associated with form items, and verifies the target form item data based on the verification logic of form parameters, ensuring that the data entered by the user conforms to predefined rules and formats, reducing the submission of invalid or incorrect data, and improving the accuracy and integrity of the data.
[0141] In some alternative embodiments, the method further includes:
[0142] Step e1, when the verification result is verification failure, display an error message for the data on the target form to prompt the user that the verification of the target form item data fails.
[0143] The parameter acquisition module obtains the verification result by listening to the parameter passing event. When the verification result is verification failure, set the verification failure flag to true, display an error message for the data on the target form, and prompt the user that the form verification fails, that is, prompt the user that the verification of the target form item data fails.
[0144] The form generation method provided by this application, by displaying an error message for the data on the target form in case of verification failure, enables the user to quickly understand the error message, timely discover and correct the input error based on the error message for the data, ensuring the accuracy of the finally submitted data, and significantly improving the user experience and system performance.
[0145] In some alternative embodiments, based on the target business condition value, obtain the list of form parameter configuration items corresponding to the target business condition value from the server, including:
[0146] Judge whether the list of form parameter configuration items corresponding to the target business condition value is stored in the cache area of the client.
[0147] Wherein, whenever the list of form parameter configuration items corresponding to the target business condition value is obtained from the server, cache the list of form parameter configuration items corresponding to the target business condition value in the cache area, and associate the list of form parameter configuration items with the target business condition value, so that when switching to the target business condition value next time, directly obtain the list of form parameter configuration items corresponding to the target business condition value from the cache area.
[0148] If the list of form parameter configuration items corresponding to the target business condition value is stored in the cache area, obtain the list of form parameter configuration items corresponding to the target business condition value from the cache area.
[0149] If the list of form parameter configuration items corresponding to the target business condition value is not stored in the cache area, obtain the list of form parameter configuration items corresponding to the target business condition value from the server.
[0150] The form generation method provided by the embodiments of the present application, when the client needs to obtain a list of form parameter configuration items corresponding to specific business condition values, first checks the cache area. If there is corresponding data in the cache area, it can be directly obtained from the cache area without sending a request to the server. This greatly reduces the time consumption of network communication. Especially in the case of poor network environment, it can significantly improve the speed at which the client obtains data, make the response of the application more rapid, and enhance the user experience. For business components that users frequently operate or switch, since the relevant list of form parameter configuration items has been cached, when switching to the same business condition value next time, the form can be quickly loaded without waiting for the server response, realizing the rapid presentation of the form.
[0151] An embodiment of the present application provides a form generation method, which can be used in the above-mentioned client. Figure 5 It is a schematic flowchart of a form generation method provided by an embodiment of the present application, as Figure 5 shown, and this process includes the following steps:
[0152] Step S501, when the business condition switches, the parameter acquisition module calls the event handling function of the parameter configuration proxy module to pass the target business condition value to obtain a list of form parameter configuration items. The relevant description of this step can refer to the relevant description of the foregoing step S401, and will not be elaborated here.
[0153] Step S502, the parameter configuration proxy module obtains the list of form parameter configuration items and makes processing, and passes the processed list of form parameter configuration items to the parameter form control module.
[0154] Among them, the relevant description of this step can refer to the relevant descriptions of the foregoing steps a1 and a2, and will not be elaborated here.
[0155] Step S503, the parameter form control module is used to receive the list of form parameter configuration items processed by the parameter configuration proxy module, parse the list of form parameter configuration items, set the initial values of the form parameters, and generate grouped form form items and form verification logics. Among them, the relevant description of this step can refer to the relevant description of the foregoing step S403, and will not be elaborated here.
[0156] Step S504, when submitting the form, the parameter acquisition module listens for the parameter passing event to obtain the parameter configuration result.
[0157] Step S505, when submitting the form, the parameter configuration proxy module further calls the verification function of the parameter form control module through the verification event. If the verification passes, it passes the parameter configuration result to the parameter acquisition module.
[0158] For the relevant descriptions of step S504 and step S505, reference can be made to the relevant descriptions of the foregoing steps d1 to d3, which will not be elaborated here.
[0159] The form generation method provided by the embodiment of the present application passes the selected business condition value as a parameter to the server, obtains the form parameter configuration item list from the server, and generates a form corresponding to the business condition value based on the form parameter configuration item list through the Form form configuration component of elementUI and the component mechanism of Vue. A large number of form parameters can be flexibly set and passed. When it is necessary to adjust the form parameter range and default value, only the form parameter configuration item on the server needs to be modified, and the Web (network) side code does not need to be modified or packaged and deployed, making the code easier to maintain, with high flexibility, simplifying the development process, and improving the development efficiency.
[0160] An embodiment of the present application provides a form generation method, which can be used for the above-mentioned client. Figure 6 It is a schematic flowchart of a form generation method provided by an embodiment of the present application. As Figure 6 shown, the process includes the following steps:
[0161] Step 001, the parameter acquisition module responds to the event of triggering the acquisition of the form parameter configuration item list, and passes the business condition parameter, that is, the target business condition value, to the parameter configuration proxy module.
[0162] Step 002, the parameter configuration proxy module obtains the form parameter configuration item list through the business condition parameter, and passes the form parameter configuration item list to the parameter form control module.
[0163] Step 003, the parameter form control module parses the form parameter configuration item list, obtains the form parameter initial value, that is, the form parameter initial value information, and generates a form form and form verification logic.
[0164] Step 004, the parameter acquisition module responds to the event of submitting form parameter data, and triggers the verification event of the parameter configuration proxy module.
[0165] Step 005, the verification event of the parameter configuration proxy module verifies the form parameter data by calling the verification function of the parameter form control module.
[0166] Step 006, if the verification passes, the callback function is called, and the parameter configuration result is passed.
[0167] Step 007, the parameter configuration proxy module responds to the callback function, and sends a parameter transfer event, and sends the parameter configuration result to the parameter acquisition module.
[0168] Step 008: The parameter acquisition module integrates the form parameter data and the parameter configuration result, and calls the API interface to submit the target data to the server.
[0169] Among them, the parameter configuration result is the verification result.
[0170] Step 009: If the verification fails, the error message flag is set to True in the parameter form control module, and a verification error is prompted.
[0171] For the relevant descriptions of the above steps, reference can be made to the relevant descriptions of the form generation method in other embodiments, which will not be elaborated here one by one.
[0172] The form generation method provided by this application can automatically generate a dynamic grouped parameter form by calling the server interface to obtain the form parameter configuration item list according to the switched target business condition value, and separates the form parameter acquisition logic from the form parameter organization logic, improving the flexibility of the code.
[0173] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation manner.
[0174] An embodiment of this application also provides a form generation device, as Figure 7 shown, including:
[0175] The first acquisition module 701 is used to obtain the changed target business condition value for any business component in the application program of the client. Different business components are used to implement different business functions.
[0176] The second acquisition module 702 is used to obtain the form parameter configuration item list corresponding to the target business condition value from the server based on the target business condition value. The form parameter configuration item list includes multiple form parameter configuration items corresponding to the target business condition value.
[0177] The generation module 703 is used to generate the target form corresponding to the target business condition value based on the form parameter configuration item list.
[0178] In some optional embodiments, the second acquisition module 702 includes:
[0179] A first sending unit, configured to send a request for obtaining a list of form parameter configuration items to a server, where the request for obtaining a list of form parameter configuration items includes a target business condition value, so that the server, in response to the request for obtaining a list of form parameter configuration items, determines a list of form parameter configuration items corresponding to the target business condition value based on the correspondence between different business condition values and different lists of form parameter configuration items, and sends the list of form parameter configuration items to the client.
[0180] A first receiving unit, configured to receive a list of form parameter configuration items corresponding to a target business condition value.
[0181] In some alternative embodiments, the form generation device further includes:
[0182] A division module, configured to divide the list of form parameter configuration items into multiple sub-lists of form parameter configuration items based on the grouping information of the form parameters in the form parameter configuration items, where the grouping information and grouping sorting information of the form parameter configuration items in each sub-list of form parameter configuration items are the same.
[0183] A sorting module, configured to sort the multiple sub-lists of form parameter configuration items based on the grouping sorting information of the form parameter configuration items in the sub-lists of form parameter configuration items, so as to obtain a list of form parameter configuration items including the sorted multiple sub-lists of form parameter configuration items.
[0184] In some alternative embodiments, the generation module 703 includes:
[0185] A first determination unit, configured to, for any form parameter configuration item in the list of form parameter configuration items, use the name of the form parameter in the form parameter configuration item as the name of the form item corresponding to the form parameter configuration item in the target form.
[0186] A rendering unit, configured to render the input type of the form item corresponding to the form parameter based on the type of the form parameter in the form parameter configuration item, where the type of the form parameter includes a text box, a numeric input box, and a drop-down selection box.
[0187] A first association unit, configured to associate the initial value information of the form parameter in the form parameter configuration item with the form item corresponding to the form parameter, and use the key of the form parameter in the form parameter configuration item as the key of the form item corresponding to the form parameter.
[0188] A second association unit, configured to associate the verification logic of the form parameter in the form parameter configuration item with the form item corresponding to the form parameter, so as to generate a target form corresponding to the target business condition value, where the target form includes multiple form items, and one form item corresponds to one form parameter configuration item.
[0189] In some alternative embodiments, the form generation device further includes:
[0190] A third acquisition module, configured to acquire the information length of the form parameter interpretation item.
[0191] A first determination module, configured to determine not to display the form parameter interpretation item in the target form when the information length of the form parameter interpretation item is a preset value.
[0192] A second determination module, configured to determine to display the form parameter interpretation item at the interpretation position of the form item corresponding to the form parameter in the target form when the information length of the form parameter interpretation item is not a preset value.
[0193] In some alternative embodiments, the form generation device further includes:
[0194] A fourth acquisition module, configured to obtain target form item data in response to a data submission operation of a user based on a form item of a target form.
[0195] A fifth acquisition module, configured to acquire the verification logic of the form parameter associated with the form item.
[0196] A sixth acquisition module, configured to verify the target form item data based on the verification logic of the form parameter associated with the form item, and obtain a verification result.
[0197] A submission module, configured to submit the target form item data to a server based on the key of the form item when the verification result is verification passed.
[0198] In some alternative embodiments, the form generation device further includes:
[0199] A prompt module, configured to display an error message in the target form to prompt the user that the verification of the target form item data fails when the verification result is verification failed.
[0200] For the descriptions of the features in the embodiments corresponding to the form generation device, reference may be made to the relevant descriptions of the embodiments corresponding to the form generation method, which will not be elaborated herein one by one.
[0201] An embodiment of the present application further provides an electronic device, as Figure 8 shown, including a processor 801 and a memory 802. The memory 802 stores a computer program 803 and an operating system 804. The processor 801 is configured to run the computer program 803 to execute the steps in any of the above-described form generation method embodiments.
[0202] The electronic device further includes a communication bus 805 and a communication interface 806. Among them, the communication bus 805 is an information transmission line between the processor 801, the communication interface 806, and the memory 802. The processor 801, the communication interface 806, and the memory 802 complete mutual communication through the communication bus 805.
[0203] The communication interface 806 is a signal transmission channel for data and information exchange between external devices such as external clients or other servers and the CPU. The processor 801 is the core of the computer for data processing and control, and can be a central processing unit (CPU), etc. The operating system 804 is basic software for executing the computer program 803, responsible for controlling and coordinating the work of the processor 801. Specifically, the scheduling, allocation, and management of the memory of the computer program 803 process can be performed through the operating system 804.
[0204] Figure 9 is the business system architecture diagram of the computer program in the embodiment of the present application. As Figure 9 shown, the computer program includes a service layer, a tool (util) layer, a page container layer, a compilation layer, and a view layer. Among them, the view layer is responsible for rendering the static resource pages of the browser. Among them, the static resource pages include pages such as Page A and Page B. The compilation layer is responsible for packaging the dependencies of each module of the application program through Vite to generate static resources. The page container layer includes various basic components and page components of the application program. Various basic components constitute common components, and the page components include a business A page component and a business B page component. The business A page component includes business components A, B, etc. In the page component, a form generation method and device can be used to send a data request to the API of the service layer to obtain a list of form parameter configuration items and submit form item data. Among them, VueRouter is a routing configuration manager for navigating to different page views. Vuex is a state management tool for data sharing and communication between different components, increasing the independence of the components. The util layer contains a configuration module, that is, global configuration information related to the application program, third-party libraries, self-defined tool classes, self-defined configuration information, and plugins (plugin) for extending the program function, and is responsible for quickly providing specific functions to improve development efficiency. The service layer is responsible for providing a set of interface specifications, enabling the computer application program to communicate with the background service through the HyperText Transfer Protocol (HTTP) request or other protocols. Among them, the background service is responsible for processing the business logic from the API request, and the data storage is responsible for data persistence, retrieval, backup, and recovery.
[0205] Embodiments of the present application also provide a computer-readable storage medium storing a computer program, where the computer program is configured to execute the steps in any of the above-described method embodiments for generating a form when running.
[0206] In an exemplary embodiment, the above computer-readable storage medium may include, but is not limited to: various media such as USB flash drives, read-only memory (ROM for short), random access memory (RAM for short), mobile hard disks, magnetic disks, or optical discs that can store computer programs.
[0207] Embodiments of the present application also provide a computer program product, where the computer program product includes a computer program that implements the steps in any of the above-described method embodiments for generating a form when executed by a processor.
[0208] Embodiments of the present application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program that implements the steps in any of the above-described method embodiments for generating a form when executed by a processor.
[0209] Those skilled in the art can further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0210] The above has introduced in detail a method, apparatus, electronic device, and storage medium for generating a form provided by the present application. Specific examples are used herein to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
Claims
1. A form generation method, characterized in that: include: For any business component in the client application, if the business condition value of the business component changes, the changed target business condition value is obtained, and different business components are used to implement different business functions; Based on the target business condition value, obtaining from the server a list of form parameter configuration items corresponding to the target business condition value, the list of form parameter configuration items including a plurality of form parameter configuration items corresponding to the target business condition value; Based on the form parameter configuration item list, a target form corresponding to the target business condition value is generated.
2. The method according to claim 1, characterized in that: The acquiring, based on the target business condition value, from the server a list of form parameter configuration items corresponding to the target business condition value comprises: Sending a request for obtaining a form parameter configuration item list to the server, wherein the request for obtaining a form parameter configuration item list includes the target business condition value, so that the server responds to the request for obtaining a form parameter configuration item list, determines a form parameter configuration item list corresponding to the target business condition value based on a correspondence between different business condition values and different form parameter configuration item lists, and sends the form parameter configuration item list to the client; A list of form parameter configuration items corresponding to the target business condition value is received.
3. The method according to claim 1, characterized in that The form parameter configuration item includes configuration information of the form parameters, and the configuration information of the form parameters includes grouping information and group sorting information of the form parameters; Before generating a target form corresponding to the target business condition value based on the form parameter configuration item list, the method further includes: Based on the grouping information of the form parameters in the form parameter configuration items, the form parameter configuration item list is divided into a plurality of form parameter configuration item sub-lists, wherein the grouping information and group sorting information of the form parameter configuration items in each form parameter configuration item sub-list are the same; Based on the grouping and sorting information in the form parameter configuration items in the form parameter configuration item sub-list, the plurality of form parameter configuration item sub-lists are sorted to obtain a form parameter configuration item list including the sorted plurality of form parameter configuration item sub-lists.
4. The method according to claim 3, characterized in that The form parameter configuration item also includes the verification logic of the form parameter, and the configuration information of the form parameter also includes the name of the form parameter, the type of the form parameter, the initial value information of the form parameter and the key of the form parameter. The generating of the target form corresponding to the target business condition value based on the form parameter configuration item list includes: For any form parameter configuration item in the form parameter configuration item list, using the name of the form parameter in the form parameter configuration item as the name of the form item corresponding to the form parameter configuration item in the target form; Rendering the input type of the form item corresponding to the form parameter based on the type of the form parameter in the form parameter configuration item, wherein the type of the form parameter includes a text box, a number input box, and a drop-down selection box; Associating the form parameter initial value information in the form parameter configuration item with the form item corresponding to the form parameter, and using the key of the form parameter in the form parameter configuration item as the key of the form item corresponding to the form parameter; The verification logic of the form parameters in the form parameter configuration item is associated with the form item corresponding to the form parameter to generate a target form corresponding to the target business condition value, wherein the target form includes a plurality of form items, and one form item corresponds to one form parameter configuration item.
5. The method according to claim 4, characterized in that The configuration information of the form parameters also includes a form parameter explanation item, and the method further includes: Get the information length of the form parameter interpretation item; When the information length of the form parameter explanation item is a preset value, determining not to display the form parameter explanation item in the target form; When the information length of the form parameter explanation item is not a preset value, it is determined to display the form parameter explanation item at the explanation position of the form item corresponding to the form parameter in the target form.
6. The method according to claim 4, characterized in that The method further comprises: In response to a user's data submission operation based on a form item of the target form, obtaining target form item data; Obtaining validation logic for form parameters associated with the form item; Based on the verification logic of the form parameters associated with the form item, verify the target form item data to obtain a verification result; When the verification result is that the verification is passed, the target form item data is submitted to the server based on the key of the form item.
7. The method according to claim 6, characterized in that The method further comprises: When the verification result is a verification failure, a data error message is displayed in the target form to prompt the user that the data verification of the target form item has failed.
8. A form generating device, characterized in that: include: A first acquisition module is used for acquiring a target business condition value after the change for any business component in the client application program if the business condition value of the business component changes, and different business components are used to implement different business functions; A second acquisition module is used to acquire, based on the target business condition value, a form parameter configuration item list corresponding to the target business condition value from a server, wherein the form parameter configuration item list includes multiple form parameter configuration items corresponding to the target business condition value; A generating module is used to generate a target form corresponding to the target business condition value based on the form parameter configuration item list.
9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the form generation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the form generating method according to any one of claims 1 to 7.
Citation Information
Cited By
Obtaining method and system of target form
CN121300892A