Method and device for processing newly-added data in table, equipment and storage medium

By using table components in the table to display the original data and adding new data operations through form components when needed, the problem of cumbersome and difficult addition of new data operations in the existing technology is solved, and simple and convenient new data functions are realized .

CN119494327APending Publication Date: 2025-02-21CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411469701.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

In the prior art, the method of implementing new data in tables is cumbersome and difficult, especially when there is a lot of data, it is difficult to maintain the form.

Method used

Display the original data through the table component. If you perform new data operations, use the form component to display the form at the preset location of the table, obtain and display the new data, and save the data to the database after confirming the operation, hide the form and update the table data. .

Benefits of technology

It simplifies the implementation process, reduces the amount of code and implementation difficulty, improves development efficiency, and can help developers quickly implement the functions of adding new data in the table.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494327A_ABST
    Figure CN119494327A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for processing newly-added data in a table, equipment and a storage medium, and the method comprises the steps: carrying out table display on original data through a table component, and obtaining a table of the original data; if the operation of newly adding the data is executed, displaying a form which takes all the form columns as fields at a first preset position of the form through a form component; in the form, acquiring input newly-added data through an editable area corresponding to the field, and displaying the newly-added data; if the operation of confirming the newly added data is executed, storing the newly added data to a database, hiding the form and performing table display on the latest data through the table component; wherein the latest data comprises the original data and the newly added data. Therefore, the realization difficulty is reduced, simplicity and convenience are realized, and developers can be helped to quickly realize development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for processing newly added data in a table. Background Art

[0002] With the continuous development of web technology, the React framework has been widely used in the field of front-end development due to its high efficiency and flexibility. In many web applications, tables are important components for data display, and their operation efficiency and user experience have a significant impact on the overall performance of the application. As one of the common operations in tables, adding data is usually implemented in the form of adding edits in the table.

[0003] There are two ways to implement it in the prior art. One is to implement it through the table component function that comes with antd, and the other is to implement the table in the form of a form so that the table can be edited in the form of a form, so that new data can be added.

[0004] However, among the methods in the prior art, in the first method mentioned above, it is extremely cumbersome to realize an editable table component, and it is difficult to realize it; in the second method, when there is a little more data, a large number of forms are difficult to maintain, and it is also difficult to realize it. Summary of the invention

[0005] The present application provides a method, apparatus, device and storage medium for processing new data in a table, which is simple and convenient to implement and can help developers quickly implement development.

[0006] In a first aspect, the present application provides a method for processing newly added data in a table, comprising:

[0007] The original data is displayed in a table through the table component to obtain a table of the original data;

[0008] If an operation of adding new data is performed, a form with all table columns as fields is displayed at a first preset position of the table through a form component;

[0009] In the form, the newly added data input is obtained through the editable area corresponding to the field, and the newly added data is displayed;

[0010] If the operation of confirming the newly added data is performed, the newly added data is saved to the database, the form is hidden, and the latest data is displayed in a table through the table component; wherein the latest data includes the original data and the newly added data.

[0011] In a possible embodiment, if the operation of adding new data is performed, a form with all table columns as fields is displayed at a first preset position of the form through a form component, including:

[0012] Displaying a newly added control at a second preset position of the table;

[0013] If the newly added control is triggered, a form with all table columns as fields is displayed at a first preset position of the form.

[0014] In a possible embodiment, if the operation of confirming the newly added data is performed, saving the newly added data to the database includes:

[0015] displaying a confirmation control at a third preset position of the table;

[0016] If the confirmation control is triggered, the newly added data is verified by the verification function in the form component;

[0017] If the verification is successful, the newly added data is saved in the database.

[0018] In a possible embodiment, it further includes:

[0019] displaying a cancel control at a fourth preset position of the table;

[0020] If the cancel control is triggered, the newly added data in the editable area of ​​the form is cleared and the form is hidden.

[0021] In a possible embodiment, the newly added control is a newly added control for adding a row;

[0022] A form with all table columns as fields is displayed at a first preset position of the table, including:

[0023] Displaying a form with all table columns as fields and a newly added row at a first preset position of the table;

[0024] Correspondingly, after displaying a form with all table columns as fields and a newly added row at the first preset position of the table, the method further includes: setting the newly added control to a disabled state;

[0025] Correspondingly, after hiding the form, the method further includes: restoring the newly added control to an activated state.

[0026] In a possible embodiment, displaying a form with all table columns as fields and a newly added row at a first preset position of the table, and setting the newly added control to a disabled state, includes:

[0027] By controlling the control variable to be a first preset value, a form with all table columns as fields and a newly added row is displayed at a first preset position of the table, and the newly added control is set to a disabled state;

[0028] Accordingly, hiding the form and restoring the newly added control to an activated state includes:

[0029] By controlling the control variable to be a second preset value, the form is hidden and the newly added control is controlled to restore the activation state.

[0030] In a possible embodiment, saving the newly added data to a database includes:

[0031] Calling the back-end interface through the first preset function saves the newly added data to the database;

[0032] Accordingly, the latest data is displayed in a table through the table component, including:

[0033] When a message indicating successful saving is received through the back-end interface, a second preset function is called to obtain the latest data from the database, and the latest data is displayed in a table through the table component.

[0034] In a second aspect, an embodiment of the present application provides a device for processing newly added data in a table, including:

[0035] The table display module is used to display the original data in a table through the table component to obtain the table of the original data;

[0036] A form display module, for displaying a form with all table columns as fields at a first preset position of the table through a form component when an operation of adding new data is performed;

[0037] A new data display module is used to obtain the input new data through the editable area corresponding to the field in the form and display the new data;

[0038] The table refresh module is used to save the newly added data to the database, hide the form, and display the latest data in a table through the table component if the operation of confirming the newly added data is performed; wherein the latest data includes the original data and the newly added data.

[0039] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0040] Memory for storing computer programs;

[0041] The processor is used to execute the computer program stored in the memory, and when the computer program is executed, the method provided in the embodiment of the present application is implemented.

[0042] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.

[0043] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages over the prior art: the technical scheme provided by the embodiment of the present application displays the original data in a table through a table component. It only needs to directly pass the obtained original data into the table component to display the original data. Compared with the method of using form display, it is no longer necessary to traverse the original data, which reduces the difficulty of implementation and facilitates maintenance; the form is displayed through the form component, the input new data is obtained in the editable area of ​​the form, the new data is saved to the database and the form is hidden, that is, the new data is input through the form and the new data is displayed. There is no need to set editable cells for the table component and disable the editing function of other rows except the new rows, which reduces the amount of code and the difficulty of implementation. It is simple and convenient, and can help developers to develop quickly. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0046] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0047] Figure 1 A flow chart of a method for processing newly added data in a table provided in an embodiment of the present application;

[0048] Figure 2 A flow chart of a method for processing newly added data in a table provided in an embodiment of the present application;

[0049] Figure 3 It is a schematic diagram of the initial state of the table;

[0050] Figure 4 It is a schematic diagram of adding a form in the table;

[0051] Figure 5 This is a schematic diagram of the table after adding data;

[0052] Figure 6 A flow chart of a method for processing newly added data in a table provided in an embodiment of the present application;

[0053] Figure 7 A flow chart of a method for processing newly added data in a table provided in an embodiment of the present application;

[0054] Figure 8 A structural block diagram of a device for processing newly added data in a table provided in an embodiment of the present application;

[0055] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0057] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0058] In order to solve the technical problem in the prior art that it is difficult to add new data to a table, the present application provides a method, device, equipment and storage medium for processing new data in a table, which is simple and convenient to implement and can help developers quickly realize development.

[0059] Figure 1 A flow chart of a method for processing newly added data in a table provided in an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0060] Step 101: Display the original data in a table using a table component to obtain a table of the original data.

[0061] In the technical solution of the embodiment of the present application, the parent component can call the backend interface to obtain the original data, and pass it to the table component by setting parameters, and the table component can display the original data in a table to obtain a table of the original data. Among them, the table can be a react table. The table component can be an antd table component; the parent component can be the upper layer component of the table component, and the setting parameter can be a props parameter, which is set by the props parameter in the component to pass data.

[0062] In the technical solution of the embodiment of the present application, the table component can be configured first, which can also be understood as writing the code for the table component. Specifically, the class name of the table row in the table component can be configured, the data source can be configured, the table columns can be configured, and the like. By configuring the acquisition of the data source, the table component can obtain data from the parent component; wherein, configuring the table columns can specifically configure the fields of the table columns, the column width of the table columns, the rendering form, and the like. After the table component is configured, the table component can display the original data in a table based on the configured information. Among them, the fields of the configured table columns can be fields such as version number and description, and the fields of the table columns can be configured as needed.

[0063] Step 102: If an operation of adding data is performed, a form with all table columns as fields is displayed at a first preset position of the table through a form component.

[0064] In the technical solution of the embodiment of the present application, a form with all table columns as fields can be displayed below the table. The fields of the table columns can be fields such as version number and description. By displaying a form with all table columns as fields, the form can keep the same fields as those in the table to maintain a similar style.

[0065] As a possible implementation, the operation performed on the newly added data may be an operation of adding a new row, or an operation of adding multiple rows. The triggering condition for the operation performed on the newly added data may be a triggering of a new control, or a triggering operation of a preset position in the table, or a triggering operation of a mouse, etc.

[0066] Before displaying the form, the form component needs to be configured. In the form component, you can configure the form fields, form style configuration, etc. The form style configuration can specifically include the settings of the form's borders, display, spacing, editable area information, width, and other information. Some configuration information in the form style is the same as the table style configuration, for example, information such as width, which can unify the styles of the form and the table and improve the user experience.

[0067] Step 103: In the form, the input new data is obtained through the editable area corresponding to the field, and the new data is displayed.

[0068] In the technical solution of the present application, an editable area is displayed in the form, and a fill portion exists in the editable area, which can facilitate identification of the editable area, and the user can enter new data in the editable area; optionally, the editable area may also contain prompt information for prompting the user to enter the corresponding new data. The new data entered by the user is obtained through the editable area, and the new data is displayed through the form.

[0069] Step 104: If the operation of confirming the newly added data is performed, the newly added data is saved to the database, the form is hidden, and the latest data is displayed in a table through the table component; wherein the latest data includes the original data and the newly added data.

[0070] In the technical solution of the present application, the trigger condition for executing the operation of determining the newly added data may be a trigger confirmation control, or may be automatically triggered, or may exist in other forms.

[0071] As an optional implementation, optionally, saving the newly added data to the database includes: calling the backend interface through a first preset function to save the newly added data to the database; correspondingly, displaying the latest data in a table through the table component includes: when receiving a successful save message through the backend interface, calling a second preset function to obtain the latest data from the database, and displaying the latest data in a table through the table component. The first preset function includes the addVersion function, and the second preset function includes the getVersionListFunc function.

[0072] Among them, the saving form of the newly added data is set in the first preset function. For example, the newly added data includes a version name and description. Then, the version name and description can be saved to the database through this function. If the saving is successful, the second preset function is used to operate, that is, the second preset function is used to obtain the latest data from the database, pass it to the table component, and the latest data is displayed in a table through the table component. Therefore, it is relatively easy to implement the operation of saving the newly added data and refreshing the table by using two functions, and the editing of the two functions is relatively simple. After the newly added data is saved to the database, the form needs to be hidden and no longer displayed. At this time, the latest data can be displayed through the table component to realize the realization of the newly added data.

[0073] In the prior art, in the method of adding new data through the function of the table component, the code document of the table component only provides the implementation method of editable cells, and the editing and modification of the new data are realized through editable cells. However, after using this method, every row in the table is editable. If the modification of the original data is not supported, the editing function of other rows except the newly added rows needs to be prohibited. The amount of code is large, the implementation is difficult, and it takes a lot of time to understand.

[0074] In the process of adding new data through the form, the form is arranged according to the table design style, and the number of rows is determined by the number of data returned. When adding new data, this method can realize the addition of new rows of data in the table, but the data obtained from the back-end database needs to be processed once: traverse each data, and then each data is passed to the form in turn. When there is a lot of data, a large number of forms are difficult to maintain and difficult to implement.

[0075] The technical solution provided in the embodiment of the present application uses a table component to display the original data in a table. It only needs to directly pass the obtained original data into the table component to display the original data. Compared with the method of using a form display, it is no longer necessary to traverse the original data, which reduces the difficulty of implementation. The form is displayed by the form component, and the input new data is obtained in the editable area of ​​the form, and the new data is saved to the database and the form is hidden. That is, the new data is input through the form and displayed. There is no need to set editable cells for the table component and disable the editing function of other rows except the new rows. The amount of code is reduced, and the difficulty of implementation is also reduced. It is simple and convenient, and can help developers to develop quickly.

[0076] Figure 2 It is a flow chart of a method for processing newly added data in a table provided in an embodiment of the present application. In this embodiment, a new control, a confirmation control and a cancel control are displayed in the table.

[0077] like Figure 2 As shown, the method comprises the following steps:

[0078] Step 201: Display the original data in a table through a table component to obtain a table of the original data.

[0079] Step 202: Display a newly added control at a second preset position of the table.

[0080] In this embodiment, the newly added controls can be displayed below the table to facilitate user identification. Figure 3 As shown, a new control is displayed at the lower left of the table, and the operation of adding new data can be triggered by triggering the new control.

[0081] Step 203: If the newly added control is triggered, a form with all table columns as fields is displayed at a first preset position of the form.

[0082] In this embodiment, triggering the new control and displaying the form can refer to Figure 4 ,like Figure 4 As shown, there is an editable area form, wherein the editable area may be V2 and the editable area corresponding to the file of version V2.

[0083] In this embodiment, the newly added control can be a control for adding a new row. When the control is triggered, a form for the newly added row can be displayed in the table; or the newly added control can be a new control for adding a preset row, which can be set as needed. Correspondingly, when the control is triggered, a form for the newly added preset row can be displayed in the table.

[0084] In this embodiment, if the newly added control is a newly added control for adding a new row, when displaying the form, the disabled state can be set for the newly added control, or the disabled state can be not set. If the disabled state is not set for the newly added control, if the user wants to add multiple rows of new data, the new control can be triggered multiple times, thereby displaying multiple forms in the table.

[0085] As an optional implementation, a menu of new rows corresponding to the new controls is displayed in the interface where the table is located. The user can select the number of new rows in the menu. After selection, the form with the corresponding number of rows is displayed in the table by triggering the new controls. This method can set the number of new rows according to user needs and improve the efficiency of adding new data.

[0086] Step 204: Display a confirmation control at a third preset position of the table.

[0087] In this embodiment, if Figure 4 As shown, the confirmation control can be below the newly added control, and specifically, the confirmation control can be at the lower right of the table. By displaying the confirmation control, it is convenient for users to confirm the operation of adding new data, which can effectively avoid the situation of adding new data errors.

[0088] Step 205: If the confirmation control is triggered, the newly added data is verified through the verification function in the form component.

[0089] In this embodiment, the verification function may be a validateFields function, and the verification rules may be set as needed, for example, a non-null check may be performed. Specifically, if the newly added data is not a null value, the verification succeeds, and if the newly added data is a null value, the verification fails. By verifying the newly added data through the verification function, errors in the newly added data are further avoided, effectively avoiding abnormal situations.

[0090] Step 206: If the verification is successful, the newly added data is saved to the database, the form is hidden, and the latest data is displayed in a table through the table component; wherein the latest data includes the original data and the newly added data.

[0091] In this embodiment, if the verification fails, a prompt message can be sent and the newly added data will not be saved. Thus, by sending a prompt message to remind the user of the abnormal situation, it is convenient to avoid the situation where the newly added data is entered incorrectly. The final display of the newly added data can be referred to Figure 5 .

[0092] Step 207: Display a cancel control at a fourth preset position of the table.

[0093] In this embodiment, the cancel control can be displayed below the newly added control, and the specific cancel control can be displayed in the lower right corner of the table. Or it can be displayed in other locations as needed to facilitate user identification. Figure 3 , Figure 4 and Figure 5 .

[0094] Step 208: If the cancel control is triggered, the newly added data in the editable area of ​​the form is cleared and the form is hidden.

[0095] In this embodiment, if the cancel control is triggered, the operation of adding new data is canceled, so the newly added data needs to be cleared to facilitate users to make timely changes. Specifically, it can be cleared and reset through a reset function, where the reset function can be the resetFields function that comes with the form component; the form component can be an antd form component.

[0096] It should be noted that the execution order of step 202 , step 204 and step 207 is only an example, wherein step 204 , step 207 and step 202 may be executed simultaneously and after step 201 .

[0097] Figure 6 It is a flow chart of a method for processing newly added data in a table provided in an embodiment of the present application. In this embodiment, the newly added control is a newly added control for adding a new row.

[0098] Step 601: Display the original data in a table through a table component to obtain a table of the original data.

[0099] Step 602: Display a newly added control at a second preset position of the table.

[0100] refer to Figure 3 To illustrate, the newly added control is activated.

[0101] Step 603: If the newly added control is a newly added control for adding a row and the newly added control is triggered, a form with all table columns as fields and a newly added row is displayed at a first preset position of the table.

[0102] In this embodiment, in order to facilitate code writing and user routine operation needs, the new control can be set as a new control for adding a new row, and a form for adding a new row is displayed in the table. If the user continues to add data, the new control can be triggered again later.

[0103] Step 604: Set the newly added control to a disabled state.

[0104] In this embodiment, in order to avoid the situation where the form is added incorrectly due to accidental touch, when displaying a form with a new row in the table, the new control needs to be set to a disabled state. Figure 4 As shown, the new control is disabled.

[0105] Step 605: Display a confirmation control at a third preset position of the table.

[0106] Step 606: If the confirmation control is triggered, the newly added data is verified through the verification function in the form component.

[0107] Step 607: If the verification is successful, the newly added data is saved to the database, the form is hidden, the newly added control is restored to an activated state, and the latest data is displayed in a table through the table component; wherein the latest data includes the original data and the newly added data.

[0108] When hiding the form, the newly added control needs to be restored to an activated state to facilitate the user to perform the next step of adding operations.

[0109] Step 608: Display a cancel control at a fourth preset position of the table.

[0110] Step 609: If the cancel control is triggered, the newly added data in the editable area of ​​the form is cleared.

[0111] Step 610: Hide the form and restore the newly added control to an activated state.

[0112] In this embodiment, as an optional implementation, displaying a form with all table columns as fields and a newly added row at a first preset position of the table, and setting the newly added control to a disabled state, includes: controlling a control variable to a first preset value, displaying a form with all table columns as fields and a newly added row at a first preset position of the table, and setting the newly added control to a disabled state;

[0113] Correspondingly, hiding the form and restoring the newly added control to an activated state includes: hiding the form and controlling the newly added control to restore the activated state by controlling the control variable to a second preset value.

[0114] Among them, Figure 5 As shown, the newly added control is in the activated state. You can use control variables to associate the hidden / displayed state of the form with the state of the newly added control. For example, when the control variable is true, the form is hidden and the newly added control is restored to the activated state. When the control variable is false, the form is displayed in the table and the newly added control is set to the disabled state. The control variable can be the newline variable. Thus, the hidden / displayed state of the form and the state of the newly added control can be controlled by the control variable, which is simple and convenient and saves the amount of code.

[0115] Figure 7 is a flow chart of a method for processing newly added data in a table provided in an embodiment of the present application, such as Figure 7 As shown, the process includes the configuration process flow and the display process flow. For details, please refer to Figure 7 It should be noted that the controls described in the embodiments of the present application may be in the form of buttons or other forms.

[0116] Figure 8 : is a structural block diagram of a device for processing newly added data in a table provided in an embodiment of the present application, the device comprising:

[0117] The table display module 801 is used to display the original data in a table through a table component to obtain a table of the original data;

[0118] A form display module 802, for displaying a form with all table columns as fields at a first preset position of the table through a form component when an operation of adding new data is performed;

[0119] A new data display module 803 is used to obtain the input new data through the editable area corresponding to the field in the form, and display the new data;

[0120] The table refresh module 804 is used to save the newly added data to the database, hide the form, and display the latest data in a table through the table component if the operation of confirming the newly added data is executed; wherein the latest data includes the original data and the newly added data.

[0121] In a possible embodiment, the form display module 802 is specifically configured to display a newly added control at a second preset position of the form;

[0122] If the newly added control is triggered, a form with all table columns as fields is displayed at a first preset position of the form.

[0123] In a possible embodiment, the table refresh module 804 is specifically used to:

[0124] displaying a confirmation control at a third preset position of the table;

[0125] If the confirmation control is triggered, the newly added data is verified by the verification function in the form component;

[0126] If the verification is successful, the newly added data is saved in the database.

[0127] In a possible embodiment, a cancellation module is further included, which is used to:

[0128] displaying a cancel control at a fourth preset position of the table;

[0129] If the cancel control is triggered, the newly added data in the editable area of ​​the form is cleared and the form is hidden.

[0130] In a possible embodiment, the newly added control is a newly added control for adding a row;

[0131] A form with all table columns as fields is displayed at a first preset position of the table, including:

[0132] Displaying a form with all table columns as fields and a newly added row at a first preset position of the table;

[0133] Correspondingly, it also includes a disabling module, which is used to set the newly added control to a disabled state after a form with all table columns as fields and a newly added row is displayed at the first preset position of the form;

[0134] Correspondingly, a recovery module is also included, which is used to restore the newly added control to an activated state after hiding the form.

[0135] In a possible embodiment, displaying a form with all table columns as fields and a newly added row at a first preset position of the table, and setting the newly added control to a disabled state, includes:

[0136] By controlling the control variable to be a first preset value, a form with all table columns as fields and a newly added row is displayed at a first preset position of the table, and the newly added control is set to a disabled state;

[0137] Accordingly, hiding the form and restoring the newly added control to an activated state includes:

[0138] By controlling the control variable to be a second preset value, the form is hidden and the newly added control is controlled to restore the activation state.

[0139] In a possible embodiment, saving the newly added data to a database includes:

[0140] Calling the back-end interface through the first preset function saves the newly added data to the database;

[0141] Accordingly, the latest data is displayed in a table through the table component, including:

[0142] When a message indicating successful saving is received through the back-end interface, a second preset function is called to obtain the latest data from the database, and the latest data is displayed in a table through the table component.

[0143] like Fig. 9 As shown, an embodiment of the present application provides an electronic device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.

[0144] A memory 113, for storing computer programs;

[0145] In one embodiment of the present application, the processor 111 is used to execute the program stored in the memory 113 to implement the method for processing newly added data in the table provided by any one of the aforementioned method embodiments, including:

[0146] The original data is displayed in a table through the table component to obtain a table of the original data;

[0147] If an operation of adding new data is performed, a form with all table columns as fields is displayed at a first preset position of the table through a form component;

[0148] In the form, the newly added data input is obtained through the editable area corresponding to the field, and the newly added data is displayed;

[0149] If the operation of confirming the newly added data is performed, the newly added data is saved to the database, the form is hidden, and the latest data is displayed in a table through the table component; wherein the latest data includes the original data and the newly added data.

[0150] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method for processing newly added data in a table provided in any of the aforementioned method embodiments are implemented.

[0151] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0152] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0153] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0154] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for processing newly added data in a table, characterized in that: include: The original data is displayed in a table through the table component to obtain a table of the original data; If an operation of adding new data is performed, a form with all table columns as fields is displayed at a first preset position of the table through a form component; In the form, the newly added data input is obtained through the editable area corresponding to the field, and the newly added data is displayed; If the operation of confirming the newly added data is performed, the newly added data is saved to the database, the form is hidden, and the latest data is displayed in a table through the table component; wherein the latest data includes the original data and the newly added data.

2. The method according to claim 1, characterized in that If the operation of adding new data is performed, a form with all table columns as fields is displayed at a first preset position of the form through a form component, including: Displaying a newly added control at a second preset position of the table; If the newly added control is triggered, a form with all table columns as fields is displayed at a first preset position of the form.

3. The method according to claim 2, characterized in that If the operation of confirming the newly added data is performed, the newly added data is saved in the database, including: displaying a confirmation control at a third preset position of the table; If the confirmation control is triggered, the newly added data is verified by the verification function in the form component; If the verification is successful, the newly added data is saved in the database.

4. The method according to claim 3, characterized in that Also includes: displaying a cancel control at a fourth preset position of the table; If the cancel control is triggered, the newly added data in the editable area of ​​the form is cleared and the form is hidden.

5. The method according to claim 4, characterized in that The newly added control is a newly added control for adding a new row; A form with all table columns as fields is displayed at a first preset position of the table, including: Displaying a form with all table columns as fields and a newly added row at a first preset position of the table; Correspondingly, after displaying a form with all table columns as fields and a newly added row at the first preset position of the table, the method further includes: setting the newly added control to a disabled state; Correspondingly, after hiding the form, the method further includes: restoring the newly added control to an activated state.

6. The method according to claim 5, characterized in that Displaying a form with all table columns as fields and a newly added row at a first preset position of the table, and setting the newly added control to a disabled state, includes: By controlling the control variable to be a first preset value, a form with all table columns as fields and a newly added row is displayed at a first preset position of the table, and the newly added control is set to a disabled state; Accordingly, hiding the form and restoring the newly added control to an activated state includes: By controlling the control variable to be a second preset value, the form is hidden and the newly added control is controlled to restore the activation state.

7. The method according to claim 1, characterized in that Saving the newly added data to a database includes: Calling the back-end interface through the first preset function saves the newly added data to the database; Accordingly, the latest data is displayed in a table through the table component, including: When a message indicating successful saving is received through the back-end interface, a second preset function is called to obtain the latest data from the database, and the latest data is displayed in a table through the table component.

8. A device for processing newly added data in a table, characterized in that: include: The table display module is used to display the original data in a table through the table component to obtain the table of the original data; A form display module, for displaying a form with all table columns as fields at a first preset position of the table through a form component when an operation of adding new data is performed; A new data display module is used to obtain the input new data through the editable area corresponding to the field in the form and display the new data; The table refresh module is used to save the newly added data to the database, hide the form, and display the latest data in a table through the table component if the operation of confirming the newly added data is performed; wherein the latest data includes the original data and the newly added data.

9. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory, and when the computer program is executed, implement the method described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.