CN110008455B - Table editing method, apparatus, computer device and storage medium - Google Patents

Table editing method, apparatus, computer device and storage medium Download PDF

Info

Publication number
CN110008455B
CN110008455B CN201910188335.3A CN201910188335A CN110008455B CN 110008455 B CN110008455 B CN 110008455B CN 201910188335 A CN201910188335 A CN 201910188335A CN 110008455 B CN110008455 B CN 110008455B
Authority
CN
China
Prior art keywords
editing
editable
edited
data
cell
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910188335.3A
Other languages
Chinese (zh)
Other versions
CN110008455A (en
Inventor
孙强
朱方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201910188335.3A priority Critical patent/CN110008455B/en
Publication of CN110008455A publication Critical patent/CN110008455A/en
Application granted granted Critical
Publication of CN110008455B publication Critical patent/CN110008455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/177Editing, e.g. inserting or deleting of tables; using ruled lines
    • G06F40/18Editing, e.g. inserting or deleting of tables; using ruled lines of spreadsheets

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to a process optimization technology and provides a table editing method, a table editing device, computer equipment and a storage medium. The method comprises the following steps: detecting preset trigger operation triggered by a user to a form to be edited in real time, and acquiring the current editing state of the form to be edited when the preset trigger operation is detected; when the current editing state is non-editable, modifying the current editing state of the table to be edited into editable state, and acquiring configuration information corresponding to the table to be edited; determining an editable cell and an editing type corresponding to the editable cell according to the configuration information, and displaying the editable cell according to a display form corresponding to the editing type; and detecting an editing operation corresponding to the editable cell, acquiring editing data corresponding to the editing operation, and displaying the editing data in the editable cell. By adopting the method, the table editing efficiency can be improved.

Description

Table editing method, apparatus, computer device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for editing a table, a computer device, and a storage medium.
Background
The table is a table formed by a plurality of cells, and each cell can display data according to a certain rule, so that a user can intuitively know the data represented by the table, and further index and analyze the data rapidly. To accommodate customer needs, the forms are typically editable.
At present, the editing function of the table is single, and the common editing mode is that when the terminal detects the triggering operation of a user for a specific cell, the terminal jumps to an editing page corresponding to the specific cell, the editing page detects the editing data input by the user and stores the editing data, and when the terminal detects the storing operation of the user triggered by the editing page for the input editing data, the terminal jumps to the table page again and displays the editing data input by the user in the specific cell, so that the editing function of the table is realized. In this way, when editing a form, a jump between the form and the editing page is involved, and there is a problem in that the form editing efficiency is low.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a form editing method, apparatus, computer device, and storage medium that can improve the form editing efficiency.
A method of table editing, the method comprising:
Detecting preset trigger operation triggered by a user to a form to be edited in real time, and acquiring the current editing state of the form to be edited when the preset trigger operation is detected;
When the current editing state is non-editable, modifying the current editing state of the table to be edited into editable state, and acquiring configuration information corresponding to the table to be edited;
determining an editable cell and an editing type corresponding to the editable cell according to the configuration information, and displaying the editable cell according to a display form corresponding to the editing type;
And detecting an editing operation corresponding to the editable cell, acquiring editing data corresponding to the editing operation, and displaying the editing data in the editable cell.
In one embodiment, after the obtaining the current editing state of the table to be edited, the method further includes:
When the current editing state is editable, acquiring a verification rule parameter corresponding to an editable cell of the table to be edited;
checking whether the editable unit cell displays editing data or not based on the checking rule parameters, and checking whether the displayed editing data accords with preset data conditions or not;
And when the verification is passed, modifying the current editing state of the table to be edited into non-editable state.
In one embodiment, when the verification passes, modifying the current editing state of the table to be edited to be non-editable includes:
when the verification is passed, transmitting the edited data passing the verification to a server for storage;
Receiving prompt information fed back by the server;
when the prompt information indicates that the editing data passing the verification is successfully stored, the current editing state of the table to be edited is modified to be non-editable.
In one embodiment, the editable cell has a plurality of cells; after checking whether the displayed editing data meets the preset data condition, the method further comprises the following steps:
when the editing data displayed by the editable cell has editing data which are not checked, generating prompt information which indicates that the editing data are not checked, and displaying the prompt information;
and keeping the current editing state of the table to be edited to be editable.
In one embodiment, the method further comprises:
acquiring a cell configuration instruction corresponding to the table to be edited;
determining non-editable cells, editable cells and editing types corresponding to the editable cells of the to-be-edited form according to the cell configuration instruction;
And storing the determined non-editable cells, the editable cells and the editing types corresponding to the editable cells in a correlated manner with the table to be edited.
In one embodiment, the table to be edited includes a table header, a table column and a cell; table column attributes of the table columns are defined in the table header; the method further comprises the steps of:
Acquiring a configuration instruction corresponding to the table header;
Determining table column attributes contained in the table header according to the configuration instruction;
When the table column attributes contain the father attribute and the child attribute with father-son relationship, and different child attributes correspond to the same father attribute, merging the cells corresponding to the same father attribute, so that the same father attribute is associated with a plurality of child attributes at the same time.
In one embodiment, the method further comprises:
receiving a form acquisition instruction corresponding to the form to be edited;
calling a corresponding form component according to the form acquisition instruction;
acquiring cell data and table configuration information of the table to be edited through the table component;
And generating an initial table according to the table configuration information, and displaying the cell data in the initial table.
A form editing apparatus, the apparatus comprising:
the detection module is used for detecting preset trigger operation triggered by a user to-be-edited form in real time, and acquiring the current editing state of the to-be-edited form when the preset trigger operation is detected;
The modification module is used for modifying the current editing state of the table to be edited into editable state when the current editing state is non-editable, and acquiring configuration information corresponding to the table to be edited;
The determining module is used for determining the editable unit cell and the editing type corresponding to the editable unit cell according to the configuration information, and displaying the editable unit cell according to the display form corresponding to the editing type;
And the acquisition module is used for detecting the editing operation corresponding to the editable cell, acquiring the editing data corresponding to the editing operation, and displaying the editing data in the editable cell.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the form editing method described in the various embodiments above when the computer program is executed.
A computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the form editing method described in the respective embodiments above.
According to the method, the device, the computer equipment and the storage medium for editing the table, the current editing state of the table to be edited is obtained according to the detected preset triggering operation, the obtained current editing state is automatically modified, and corresponding operation is executed according to the modified current editing state, so that the editing efficiency of the table is improved. When the current editing state is non-editable, modifying the current editing state into editable, determining editable cells and corresponding editing types of the table to be edited according to configuration information pre-configured corresponding to the table to be edited, and displaying the editable cells according to display forms corresponding to the corresponding editing types. Further, editing operations corresponding to the editable cells are detected in real time, corresponding editing data are obtained according to the detected editing operations, and the obtained editing data are displayed in the corresponding editable cells. And displaying the editable cells according to a preset display form for the table to be edited in the editable state, so that a user can conveniently execute corresponding editing operation on the displayed editable cells, and the table editing efficiency is improved.
Drawings
FIG. 1 is an application scenario diagram of a table editing method in one embodiment;
FIG. 2 is a flow diagram of a table editing method in one embodiment;
FIG. 3 is a flow chart of a table editing method in another embodiment;
FIG. 4 is a block diagram showing the structure of a table editing apparatus in one embodiment;
FIG. 5 is a block diagram showing the structure of a table editing apparatus in another embodiment;
fig. 6 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The table editing method provided by the application can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The terminal 102 obtains the current editing state of the table to be edited according to the preset triggering operation detected in real time, when the current editing state is non-editable, the terminal modifies the current editing state of the table to be edited into editable, determines editable cells and corresponding editing types according to configuration information of the table to be edited, and displays the editable cells according to display forms corresponding to the editing types. Further, the terminal 102 detects an editing operation corresponding to the editable cell in real time, acquires editing data corresponding to the editing operation, and displays the acquired editing data in the corresponding editable cell. It will be appreciated that the terminal 102 may send the edited form to be edited to the server 104 for storage. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, and the server 104 may be implemented by a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a table editing method is provided, and the method is applied to the terminal in fig. 1 for illustration, and includes the following steps:
S202, detecting preset trigger operation triggered by a user to the form to be edited in real time, and acquiring the current editing state of the form to be edited when the preset trigger operation is detected.
The preset triggering operation is a triggering operation of a user for a specific control in the table to be edited, such as a clicking operation of an editing control or a saving control in an operation column of the table to be edited. The current editing state refers to an editing state corresponding to a table to be edited when a preset trigger operation is detected. The current edit status includes both editable and non-editable edit status.
Specifically, the terminal generates a corresponding form to be edited according to a form acquisition instruction triggered by a user, displays the acquired form to be edited to the user through a user operation interface, and detects preset triggering operation executed by the user on the currently displayed form to be edited in real time. When the preset trigger operation of the user is detected, the terminal locally acquires the editing state parameters of the form to be edited according to the detected preset trigger operation, and determines the current editing state of the form to be edited according to the editing state parameters.
For example, when the edit status parameter is true or false, determining that the current edit status of the table to be edited is editable, wherein the editable status indicates that the table to be edited is in an editing status or an opened editing status; when the edit status parameter is false, the current edit status of the table to be edited is judged to be non-editable, and the non-editable status indicates that the table to be edited is in a state that the editing has not been started or ended.
It can be understood that when the current editing state of the table to be edited is editable, the terminal displays "save" in a specific control in the user operation interface, otherwise "edit" is displayed.
S204, when the current editing state is non-editable, modifying the current editing state of the table to be edited into editable state, and acquiring configuration information corresponding to the table to be edited.
The configuration information comprises editable cells contained in the table to be edited and editing types corresponding to the editable cells. The edit type is used to specify the manner in which the user enters edit data in the editable cell, such as manual entry, drop-down box selection, or toggle selection.
Specifically, when the current editing state of the table to be edited is non-editable, the terminal modifies the current editing state of the table to be edited to be editable, and correspondingly modifies the editing state parameter of the table to be edited, for example, modifies the editing state parameter from false to true. Further, the terminal locally inquires configuration information corresponding to the pre-configuration of the table to be edited according to the table identification of the table to be edited.
In one embodiment, the server is pre-configured with corresponding configuration information in the database corresponding to the table to be edited. When the current editing state is non-editable, the terminal generates a corresponding configuration information acquisition request according to the table identification of the table to be edited, sends the request to the server, and receives the configuration information of the table to be edited fed back by the server corresponding to the configuration information acquisition request.
In one embodiment, the table body of the table to be edited contains a plurality of table rows. When a preset trigger operation corresponding to a table to be edited is detected, the terminal determines a target table row corresponding to the preset trigger operation and acquires the current editing state of the target table row. When the current editing state of the target table row is non-editable, the terminal modifies the current editing state of the target table row into editable, and acquires preconfigured configuration information according to the table to be edited and the target table row.
S206, determining the editable cells and the editing types corresponding to the editable cells according to the configuration information, and displaying the editable cells according to the display forms corresponding to the editing types.
Specifically, after acquiring configuration information corresponding to a table to be edited, the terminal analyzes the acquired configuration information to obtain editable cells of the table to be edited and editing types corresponding to the editable cells, determines display forms of the corresponding editable cells according to the editing types, and displays the editable cells to a user on a user operation interface according to the determined display forms.
For example, when the edit type is manual entry, an input box is shown in an editable cell; when the editing type is the selection of the drop-down frame, displaying the selected drop-down frame in the editable unit lattice, and hiding and displaying candidate editing data which can be selected in the selected drop-down frame; when the editing type is switching selection, displaying a switching control in the editable cell, pre-configuring a plurality of candidate editing data which can be selected corresponding to the switching control, and switching the editing data currently displayed in the editable cell according to the triggering operation of the user corresponding to the switching control.
In one embodiment, the form to be edited includes editable cells and non-editable cells. And the terminal responds to the detected table acquisition instruction and displays corresponding data in the non-editable cells of the table to be edited. It can be understood that if the editable cell corresponding to the table to be edited is pre-stored with the initial data, the corresponding initial data is displayed in the editable cell, and if the pre-stored initial data is not present, the editable cell is displayed as empty.
S208, detecting the editing operation corresponding to the editable cell, acquiring the editing data corresponding to the editing operation, and displaying the editing data in the editable cell.
Specifically, when the corresponding editable cell is displayed in the table to be edited according to the determined display form, the terminal detects an editing operation of the user corresponding to the currently displayed editable cell in real time. When the editing operation is detected, the terminal acquires corresponding editing data according to the detected editing operation, and displays the acquired editing data in the corresponding editable cells.
For an editable cell with an editing type manually input, the terminal detects editing data manually input by a user in the editable cell; for the editable cell with the editing type selected by the drop-down frame, when the user clicks the selected drop-down frame in the editable cell, the terminal displays the candidate editing data hidden and displayed in the selected drop-down frame to the user, and when the user selects editing data from the displayed candidate editing data, the selected editing data is displayed in the editable cell.
Taking an online service as an example, in the online service handling process, a user needs to input relevant service data, such as user basic information, for example, a loan product application service, and user basic information, such as a name, an age, a sex, a work type or income of the user, etc., at a terminal. When detecting a service application operation triggered by a user, the terminal inquires preset form configuration information according to the service application operation, displays a corresponding form to be edited to the user according to the form configuration information, and further executes relevant steps of the form editing method according to the preset trigger operation of the user on the form to be edited, so that the user can conveniently input corresponding service data in the form to be edited. When the terminal detects the service inquiring operation triggered by the user, the terminal can also inquire a prestored form to be edited according to the service inquiring operation and display the prestored form to the user so as to be convenient for checking or modifying the service data in the form to be edited, and execute the relevant steps of the form editing method according to the preset triggering operation of the user. Both the business application operation and the business query operation may trigger the generation of a form acquisition instruction.
According to the table editing method, the current editing state of the table to be edited is obtained according to the detected preset triggering operation, the obtained current editing state is automatically modified, and then corresponding operation is executed according to the modified current editing state, so that the editing efficiency of the table is improved. When the current editing state is non-editable, modifying the current editing state into editable, determining editable cells and corresponding editing types of the table to be edited according to configuration information pre-configured corresponding to the table to be edited, and displaying the editable cells according to display forms corresponding to the corresponding editing types. Further, editing operations corresponding to the editable cells are detected in real time, corresponding editing data are obtained according to the detected editing operations, and the obtained editing data are displayed in the corresponding editable cells. And displaying the editable cells according to a preset display form for the table to be edited in the editable state, so that a user can conveniently execute corresponding editing operation on the displayed editable cells, and the table editing efficiency is improved.
In one embodiment, after obtaining the current editing state of the table to be edited, the table editing method further includes: when the current editing state is editable, acquiring a verification rule parameter corresponding to an editable cell of the form to be edited; checking whether the editable unit cell displays the editing data or not based on the checking rule parameters, and checking whether the displayed editing data accords with preset data conditions or not; when the verification passes, the current editing state of the table to be edited is modified to be non-editable.
The check rule parameter is a quantization parameter of a rule according to which the edit data in the editable cell is checked, and is used for indicating how the terminal checks the edit data displayed in the editable cell. And checking rule parameters such as checking whether the editable cells display the edited data or not, and/or checking whether the edited data displayed in the editable cells meet preset data conditions such as character types or character string lengths corresponding to the edited data or not. The check rule parameter may specifically be to check whether the editable cell corresponding to the necessary filling item has the edit data displayed therein.
Specifically, when the current editing state of the table to be edited is obtained according to the detected preset triggering operation and is editable, the terminal queries preset configuration information according to the table identification of the table to be edited, and determines one or more editable cells of the table to be edited according to the configuration information. And the terminal locally inquires corresponding check rule parameters according to the table identification and the cell identifications of the editable cells, and checks the edit data displayed in the corresponding editable cells based on the check rule parameters. The terminal respectively checks whether the edit data are displayed in the corresponding editable cells based on the check rule parameters, and further checks whether the edit data meet preset data conditions when the edit data are displayed in the editable cells. When the editable cells are verified to display the editing data and the editing data accords with the preset data conditions, judging that the verification result of the editing data displayed in the editable cells is verification passing. When the editing data displayed in each editable cell passes the verification, the terminal modifies the current editing state of the table to be edited into non-editable state, and correspondingly modifies the editing state parameters of the table to be edited, such as modifying the editing state parameters from true to false. When the current editing state of the table to be edited is modified, the terminal switches the content displayed by the specific control in the user operation interface, for example, the displayed content of the specific control is switched from 'save' to 'edit'.
In one embodiment, the terminal determines editable cells corresponding to the necessary entries in the table to be edited based on the respective check rule parameters, and checks whether edit data is displayed in the editable cells based on the respective check rule parameters. When the editable cell displays the edited data, the terminal matches the edited data with preset data conditions specified by corresponding check rule parameters so as to check whether the edited data accords with the preset data conditions. When the editing data accords with the preset data condition, judging that the verification result of the editing data is verification passing. When the edit data is not displayed in the editable cell or the displayed edit data does not accord with the preset data condition, judging that the check result of the edit data is that the check is failed.
In one embodiment, the terminal determines editable cells corresponding to unnecessary entries in the table to be edited based on each verification rule parameter, and verifies whether the editable cells display editing data; if yes, checking whether the editing data accords with the preset data condition or not based on the corresponding checking rule parameters. When the editing data accords with the preset data condition or the editing data is not displayed in the editing unit cells, judging that the verification result of the editing data is verification passing; when the editing data does not accord with the preset data condition, judging that the verification result of the editing data is that the verification is not passed. It is understood that the verification result of the edit data in the editable cell may be used as the verification result of the editable cell. The edit data verified is the edit data currently presented in the editable cell.
In one embodiment, when a table body of a table to be edited includes a plurality of table rows and a current editing state of a target table row corresponding to a preset trigger operation is editable, the terminal acquires a verification rule parameter corresponding to an editable cell of the target table row and verifies corresponding editing data based on the verification rule parameter. When all the editing data pass the verification, the terminal modifies the current editing state of the target table row into non-editable state.
In the above embodiment, when the preset trigger operation of the user is detected in the editable state, the edit data acquired in the editable state is checked based on the preset check rule parameter, and the current edit state is modified when the check is passed, so as to ensure that the edit data accords with the preset data condition.
In one embodiment, when the verification passes, modifying the current edit status of the form to be edited to non-editable, comprising: when the verification is passed, transmitting the edited data passing the verification to a server for storage; receiving prompt information fed back by the server; when the prompt information indicates that the checked editing data is successfully stored, the current editing state of the table to be edited is modified to be non-editable.
Specifically, when each edit data passes the verification, the terminal transmits the verified edit data to the server. The server stores the received editing data according to a preset storage mode, and if the editing data is successfully stored in the database, the server feeds back prompt information indicating that the editing data passing verification is successfully stored to the terminal; if the editing data is not successfully stored in the database, the server feeds back prompt information indicating that the editing data passing verification fails to be stored to the terminal. When receiving prompt information indicating successful storage of editing data passing verification, the terminal modifies the current editing state of the form to be edited into non-editable state; when receiving prompt information indicating that the storage of the editing data passing the verification fails, the terminal stores the current editing state of the table to be edited as editable, and displays the prompt information indicating that the storage fails to the user through a user operation interface.
In one embodiment, when the verification is passed, the terminal invokes a preset interface to send the edited data passed by the verification to the server for storage. When the call of the preset interface fails or connection with the server is not successfully established, the terminal keeps the current editing state of the form to be edited so as to be editable, and displays corresponding prompt information, such as prompt information of the interface call failure or connection establishment failure, through the user operation interface.
In the above embodiment, the current editing state of the table to be edited is modified only when the edited data passing through the verification is successfully stored in the server, so that the edited data is prevented from being lost in the storage process, and the integrity of the data is ensured.
In one embodiment, there are a plurality of editable cells; after checking whether the displayed editing data accords with the preset data condition, the table editing method further comprises the following steps: when editing data which is displayed by the editable cell and fails to pass the verification exists in the editing data, generating prompt information which indicates that the editing data fails to pass the verification, and displaying the prompt information; the current editing state of the table to be edited is kept editable.
Specifically, for the edit data displayed by each editable cell in the plurality of editable cells, the terminal respectively checks the edit data based on the corresponding check rule parameters to obtain a check result corresponding to each edit data. When the editing data which is not checked is in the plurality of editing data, the terminal generates prompt information which indicates that the editing data is not checked according to the editing data which is not checked, the prompt information is displayed to a user through a user operation interface, and the current editing state of the table to be edited is kept editable.
In one embodiment, when there is editing data that fails the verification among the plurality of editing data, the terminal keeps the current editing state of the table to be edited as editable, and returns to the step of detecting the editing operation corresponding to the editable cell to continue execution. Specifically, when editing data which fails to pass the verification exists in the plurality of editing data, the terminal keeps the current editing state of the table to be edited as editable, detects editing operation of a user corresponding to the editable cell in real time, and acquires the editing data corresponding to the editing operation. Further, the terminal detects preset trigger operation of the user corresponding to the table to be edited in the editable state in real time, when the preset trigger operation is detected, the obtained edited data is checked according to the checking mode, and the related operation is executed according to the checking result. The prompt information indicating that the edit data fails to pass the verification may include a cell identifier of an editable cell that the edit data fails to pass the verification, and a preset data condition that the edit data of the editable cell should conform to. The data conditions such as the character string length or the character type are preset.
It can be understood that the terminal may generate a corresponding boolean value according to the verification result of each edit data, for example, when the verification result is that the verification is passed, the corresponding boolean value is true, and when the verification result is that the verification is not passed, the corresponding boolean value is false. And the terminal calls the editing state management component to acquire the Boolean value corresponding to the verification result, and executes related operations for modifying or maintaining the current editing state according to the Boolean value. The terminal can also generate a corresponding Boolean value according to prompt information fed back by the server corresponding to the editing data passing the verification.
In the above embodiment, when there is editing data that fails to pass the verification, the editable state of the table to be edited is maintained, and updated editing data is detected in real time, until the updated editing data passes the verification, the current editing state is modified to be non-editable, so as to obtain editing data that meets the preset data condition.
In one embodiment, the method for editing a table further includes: acquiring a cell configuration instruction corresponding to a table to be edited; determining non-editable cells, editable cells and editing types corresponding to the editable cells of the table to be edited according to the cell configuration instruction; and storing the determined non-editable cells, the editable cells and the editing types corresponding to the editable cells in a correlated manner with the table to be edited.
The cell configuration instruction is used for triggering cell configuration operation of the table to be edited. Specifically, the terminal triggers and generates a cell configuration instruction according to cell configuration triggering operation of a user, invokes a corresponding cell configuration function according to the cell configuration instruction to obtain non-editable cells and editable cells of a form to be edited and editing types corresponding to the editable cells, and correspondingly configures the obtained non-editable cells, editable cells and the corresponding editing types into a configuration file. The terminal can also obtain the data corresponding to the non-editable cells by calling the cell configuration function.
It can be appreciated that in cell configuration, a user can manually enter non-editable cells, and corresponding editing types of a form to be edited via a user operation interface.
In one embodiment, the table body of the table to be edited contains one or more table rows. The terminal obtains the table row configuration data corresponding to one or more table rows according to the cell configuration instruction, and correspondingly configures each table row and the corresponding table row configuration data into a configuration file. The table row configuration data comprises non-editable cells of the table row, data corresponding to the non-editable cells, and editing types corresponding to the editable cells and the editable cells. The terminal may send the table row configuration data acquired corresponding to the table row to the server for storage.
In the above embodiment, the cell data of the form to be edited is preconfigured according to the preset configuration mode, so that the cell data can be rapidly positioned when the form is edited, and thus the form editing efficiency is improved.
In one embodiment, a form to be edited includes a form header, a form column, and cells; table column attributes of the table columns are defined in the table header; the above table editing method further includes: acquiring a configuration instruction corresponding to a table header; determining table column attributes contained in the table header according to the configuration instruction; when the table column attributes contain the father attribute and the son attribute with father-son relationship, and different son attributes correspond to the same father attribute, merging the cells corresponding to the same father attribute, so that the same father attribute is associated with a plurality of son attributes at the same time.
Specifically, the table to be edited includes a table header, a table column and a table body, the table body includes one or more table rows, the table header may also include one or more table rows, the intersection portion of the table row and the table column forms a cell, and the table column attribute of the table column is defined in the cell of the table header. The terminal triggers and generates a corresponding configuration instruction according to the configuration triggering operation of the table head of the user, and determines the table column attribute corresponding to each cell of the table head according to the configuration instruction. When the plurality of table column attributes contain father attributes and child attributes with father-child relationships and more than one child attributes correspond to the same father attributes, the terminal merges the cells corresponding to the same father attributes, so that the same father attributes are simultaneously associated with a plurality of child attributes, and the merging of the cells corresponding to the father attributes corresponding to the plurality of child attributes is realized.
For example, assume that the table column attributes include name, age, gender, service type company, manufacturing type company and company, where the company and service type company have a parent-child relationship, and the company and manufacturing type company have a parent-child relationship, and the corresponding cells of the company are merged due to the existence of the same parent attribute, namely, the company.
It will be appreciated that the configuration operation of the table header and the merging operation of the cells described above may also be performed when the configuration operation of the cells is performed according to the cell configuration instruction. When the terminal executes the cell configuration operation according to the cell configuration instruction, the configuration operation for the table header and the merging operation for the cells may also be executed.
In the above embodiment, the cells corresponding to the same parent attribute are combined to increase the readability of the table to be edited.
In one embodiment, the method for editing a table further includes: receiving a form acquisition instruction corresponding to a form to be edited; calling a corresponding form component according to the form acquisition instruction; acquiring cell data and table configuration information of a table to be edited through a table component; generating an initial table according to the table configuration information, and displaying cell data in the initial table.
The table configuration information may include table column attributes, table row attributes, toolbar attributes, paging configuration information, and the like. The page configuration information includes the total number of pages, options for the total number of rows of the form displayed per page, and options for jumping to the specified number of pages, etc. The cell data comprise configuration information of the cells and data to be displayed corresponding to the cells. Configuration information of the unit cell such as row 3 and column 2.
Specifically, the terminal triggers and generates a table acquisition instruction corresponding to the table to be edited according to the specified trigger operation of the user, and invokes a corresponding table component according to the table acquisition instruction so as to acquire cell data and table configuration information of the table to be edited through the table component. The terminal determines the table column attribute, the table row attribute, the toolbar attribute and the paging configuration information according to the table configuration information, generates an initial table according to the table configuration information, and displays each data to be displayed in the initial table according to the configuration information of the corresponding cell.
In the above embodiment, the single table component obtains the table configuration information including the table main body configuration information and the paging configuration information, so that the problems of complex call flow and low call efficiency caused by respectively setting the table main body component and the table paging component are avoided, and the table obtaining efficiency can be improved.
As shown in fig. 3, in one embodiment, a method for editing a table is provided, which specifically includes the following steps:
s302, detecting preset trigger operation triggered by a user to the form to be edited in real time, and acquiring the current editing state of the form to be edited when the preset trigger operation is detected.
S304, when the current editing state is non-editable, modifying the current editing state of the table to be edited into editable state, and acquiring configuration information corresponding to the table to be edited.
S306, determining the editable cells and the editing types corresponding to the editable cells according to the configuration information, and displaying the editable cells according to the display forms corresponding to the editing types.
S308, detecting the editing operation corresponding to the editable cell, acquiring the editing data corresponding to the editing operation, and displaying the editing data in the editable cell.
S310, when the current editing state is editable, acquiring a verification rule parameter corresponding to an editable cell of the table to be edited.
S312, checking whether the editable cells show the edit data or not based on the check rule parameters, and checking whether the displayed edit data meets the preset data conditions or not.
And S314, when the verification is passed, transmitting the edited data passing the verification to a server for storage.
S316, receiving prompt information fed back by the server.
And S318, when the prompt information indicates that the verified editing data is successfully stored, the current editing state of the table to be edited is modified to be non-editable.
S320, when editing data which is displayed by the editable cell and fails to pass the verification exists in the editing data, generating prompt information which indicates that the editing data fails to pass the verification, and displaying the prompt information; there are a plurality of editable cells.
S322, keeping the current editing state of the table to be edited as editable.
It should be understood that, although the steps in the flowcharts of fig. 2-3 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor do the order in which the sub-steps or stages are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the sub-steps or stages of other steps or steps.
In one embodiment, as shown in fig. 4, there is provided a form editing apparatus 400 including: a detection module 402, a modification module 404, a determination module 406, and an acquisition module 408, wherein:
The detection module 402 is configured to detect a preset trigger operation triggered by a user to edit a form in real time, and acquire a current editing state of the form to be edited when the preset trigger operation is detected.
And a modifying module 404, configured to modify the current editing state of the table to be edited to be editable when the current editing state is non-editable, and obtain configuration information corresponding to the table to be edited.
The determining module 406 is configured to determine the editable unit and the edit type corresponding to the editable unit according to the configuration information, and display the editable unit according to the display form corresponding to the edit type.
The obtaining module 408 is configured to detect an editing operation corresponding to an editable cell, obtain editing data corresponding to the editing operation, and display the editing data in the editable cell.
As shown in fig. 5, in one embodiment, the table editing apparatus 400 further includes: a verification module 410;
The verification module 410 is configured to obtain a verification rule parameter corresponding to an editable cell of the table to be edited when the current editing state is editable; checking whether the editable unit cell displays the editing data or not based on the checking rule parameters, and checking whether the displayed editing data accords with preset data conditions or not; when the verification passes, the current editing state of the table to be edited is modified to be non-editable.
In one embodiment, the verification module 410 is further configured to send the edited data passing the verification to the server for storage when the verification passes; receiving prompt information fed back by the server; when the prompt information indicates that the checked editing data is successfully stored, the current editing state of the table to be edited is modified to be non-editable.
In one embodiment, there are a plurality of editable cells; the verification module 410 is further configured to generate a prompt message indicating that the edit data fails to be verified, and display the prompt message when the edit data displayed in the editable cell has the edit data that fails to be verified; the current editing state of the table to be edited is kept editable.
In one embodiment, the form editing apparatus 400 further includes: a configuration module 412;
A configuration module 412, configured to obtain a cell configuration instruction corresponding to a table to be edited; determining non-editable cells, editable cells and editing types corresponding to the editable cells of the table to be edited according to the cell configuration instruction; and storing the determined non-editable cells, the editable cells and the editing types corresponding to the editable cells in a correlated manner with the table to be edited.
In one embodiment, a form to be edited includes a form header, a form column, and cells; table column attributes of the table columns are defined in the table header; the configuration module 412 is further configured to obtain a configuration instruction corresponding to the table header; determining table column attributes contained in the table header according to the configuration instruction; when the table column attributes contain the father attribute and the son attribute with father-son relationship, and different son attributes correspond to the same father attribute, merging the cells corresponding to the same father attribute, so that the same father attribute is associated with a plurality of son attributes at the same time.
In one embodiment, the form editing apparatus 400 further includes: a display module 414;
A display module 414, configured to receive a table acquisition instruction corresponding to a table to be edited; calling a corresponding form component according to the form acquisition instruction; acquiring cell data and table configuration information of a table to be edited through a table component; generating an initial table according to the table configuration information, and displaying cell data in the initial table.
For specific limitations of the form editing apparatus, reference may be made to the above limitations of the form editing method, and no further description is given here. The respective modules in the above-described table editing apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a form editing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be keys, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in FIG. 6 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, a computer device is provided, comprising a memory storing a computer program and a processor implementing the steps of the table editing method in the respective embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the form editing method in the respective embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SYNCHLINK) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. A method of table editing, the method comprising:
Detecting preset trigger operation triggered by a user to a form to be edited in real time, and acquiring the current editing state of the form to be edited when the preset trigger operation is detected;
When the current editing state is non-editable, modifying the current editing state of the table to be edited into editable state, and acquiring configuration information corresponding to the table to be edited; wherein the table to be edited comprises editable cells and non-editable cells;
determining the editable unit cell and the editing type corresponding to the editable unit cell according to the configuration information, and displaying the editable unit cell according to the display form corresponding to the editing type;
Detecting an editing operation corresponding to the editable cell, acquiring editing data corresponding to the editing operation, and displaying the editing data in the editable cell;
wherein the method further comprises:
acquiring a cell configuration instruction corresponding to the table to be edited;
determining non-editable cells, editable cells and editing types corresponding to the editable cells of the to-be-edited form according to the cell configuration instruction;
And storing the determined non-editable cells, the editable cells and the editing types corresponding to the editable cells in a correlated manner with the table to be edited.
2. The method of claim 1, wherein after the obtaining the current editing state of the form to be edited, the method further comprises:
When the current editing state is editable, acquiring a verification rule parameter corresponding to an editable cell of the table to be edited;
checking whether the editable unit cell displays editing data or not based on the checking rule parameters, and checking whether the displayed editing data accords with preset data conditions or not;
And when the verification is passed, modifying the current editing state of the table to be edited into non-editable state.
3. The method of claim 2, wherein modifying the current edit status of the form to be edited to uneditable when the verification passes comprises:
when the verification is passed, transmitting the edited data passing the verification to a server for storage;
Receiving prompt information fed back by the server;
when the prompt information indicates that the editing data passing the verification is successfully stored, the current editing state of the table to be edited is modified to be non-editable.
4. The method of claim 2, wherein the editable cell has a plurality of cells; after checking whether the displayed editing data meets the preset data condition, the method further comprises the following steps:
when the editing data displayed by the editable cell has editing data which are not checked, generating prompt information which indicates that the editing data are not checked, and displaying the prompt information;
and keeping the current editing state of the table to be edited to be editable.
5. The method according to claim 1, wherein the obtaining the current editing state of the form to be edited when the preset trigger operation is detected includes:
When the preset trigger operation is detected, acquiring editing state parameters of the form to be edited from local according to the detected preset trigger operation;
and determining the current editing state of the table to be edited according to the editing state parameters.
6. The method according to any one of claims 1 to 4, wherein the form to be edited comprises a form header, a form column, and a cell; table column attributes of the table columns are defined in the table header; the method further comprises the steps of:
Acquiring a configuration instruction corresponding to the table header;
Determining table column attributes contained in the table header according to the configuration instruction;
When the table column attributes contain the father attribute and the child attribute with father-son relationship, and different child attributes correspond to the same father attribute, merging the cells corresponding to the same father attribute, so that the same father attribute is associated with a plurality of child attributes at the same time.
7. The method according to any one of claims 1 to 4, further comprising:
receiving a form acquisition instruction corresponding to the form to be edited;
calling a corresponding form component according to the form acquisition instruction;
acquiring cell data and table configuration information of the table to be edited through the table component;
And generating an initial table according to the table configuration information, and displaying the cell data in the initial table.
8. A form editing apparatus, the apparatus comprising:
the detection module is used for detecting preset trigger operation triggered by a user to-be-edited form in real time, and acquiring the current editing state of the to-be-edited form when the preset trigger operation is detected;
The modification module is used for modifying the current editing state of the table to be edited into editable state when the current editing state is non-editable, and acquiring configuration information corresponding to the table to be edited; wherein the table to be edited comprises editable cells and non-editable cells;
The determining module is used for determining the editable unit cell and the editing type corresponding to the editable unit cell according to the configuration information, and displaying the editable unit cell according to the display form corresponding to the editing type;
the acquisition module is used for detecting editing operation corresponding to the editable cell, acquiring editing data corresponding to the editing operation and displaying the editing data in the editable cell;
the configuration module is used for acquiring cell configuration instructions corresponding to the table to be edited; determining non-editable cells, editable cells and editing types corresponding to the editable cells of the to-be-edited form according to the cell configuration instruction; and storing the determined non-editable cells, the editable cells and the editing types corresponding to the editable cells in a correlated manner with the table to be edited.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 7.
CN201910188335.3A 2019-03-13 2019-03-13 Table editing method, apparatus, computer device and storage medium Active CN110008455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910188335.3A CN110008455B (en) 2019-03-13 2019-03-13 Table editing method, apparatus, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910188335.3A CN110008455B (en) 2019-03-13 2019-03-13 Table editing method, apparatus, computer device and storage medium

Publications (2)

Publication Number Publication Date
CN110008455A CN110008455A (en) 2019-07-12
CN110008455B true CN110008455B (en) 2024-05-03

Family

ID=67166936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910188335.3A Active CN110008455B (en) 2019-03-13 2019-03-13 Table editing method, apparatus, computer device and storage medium

Country Status (1)

Country Link
CN (1) CN110008455B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110532483B (en) * 2019-07-25 2022-09-09 北京金堤科技有限公司 Method and device for adding simulation table, computer equipment and storage medium
CN110472200B (en) * 2019-07-29 2023-10-27 深圳市中兴新云服务有限公司 Form-based data processing method and device and electronic equipment
CN110442854B (en) * 2019-08-13 2023-04-07 北京源清慧虹信息科技有限公司 Report generation method and device, computer equipment and readable storage medium
CN112416329A (en) * 2019-08-23 2021-02-26 上海幻电信息科技有限公司 Data editing method and device and storage medium
CN112507673B (en) * 2019-08-26 2023-06-27 珠海金山办公软件有限公司 Method and device for editing form, computer storage medium and terminal
CN111352652B (en) * 2020-02-26 2023-04-28 杭州迪普科技股份有限公司 Prompting method and device for configuration item change
CN112784559A (en) * 2020-03-10 2021-05-11 珠海金山办公软件有限公司 Electronic form editing method and device and electronic equipment
CN111797603B (en) * 2020-07-02 2022-02-01 北京字节跳动网络技术有限公司 Method and device for browsing table in document, electronic equipment and storage medium
CN112800736B (en) * 2021-02-04 2022-04-08 杉数科技(北京)有限公司 Method, device, medium and computer equipment for generating cell editing assembly
CN113065082A (en) * 2021-02-26 2021-07-02 北京达佳互联信息技术有限公司 Data processing method and device, electronic equipment and storage medium
CN113407254B (en) * 2021-06-15 2022-07-29 长沙都正生物科技股份有限公司 Form generation method and device, electronic equipment and storage medium
CN114463766B (en) * 2021-07-16 2023-05-12 荣耀终端有限公司 Table processing method and electronic equipment
CN115879429B (en) * 2023-02-01 2023-06-27 天津联想协同科技有限公司 Electronic form verification method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729340A (en) * 2013-12-29 2014-04-16 上海浦东物流云计算有限公司 Method and device for editing table in webpage
CN107766310A (en) * 2017-09-26 2018-03-06 杭州迪普科技股份有限公司 A kind of grid cell lattice edit methods and device
CN109375977A (en) * 2018-10-15 2019-02-22 郑州云海信息技术有限公司 A kind of method and device for realizing page tabular editor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729340A (en) * 2013-12-29 2014-04-16 上海浦东物流云计算有限公司 Method and device for editing table in webpage
CN107766310A (en) * 2017-09-26 2018-03-06 杭州迪普科技股份有限公司 A kind of grid cell lattice edit methods and device
CN109375977A (en) * 2018-10-15 2019-02-22 郑州云海信息技术有限公司 A kind of method and device for realizing page tabular editor

Also Published As

Publication number Publication date
CN110008455A (en) 2019-07-12

Similar Documents

Publication Publication Date Title
CN110008455B (en) Table editing method, apparatus, computer device and storage medium
CN110377851B (en) Method and device for realizing multi-stage linkage drop-down frame and computer equipment
CN108848142B (en) Message pushing method and device, computer equipment and storage medium
CN110008118B (en) Page data testing method and device, computer equipment and storage medium
CN111177616B (en) Page restoration display method and device, computer equipment and storage medium
CN111078507A (en) Data monitoring method, system, computer equipment and storage medium
CN109144487B (en) Method, device, computer equipment and storage medium for developing business of parts
WO2020155771A1 (en) Spreadsheet data processing method and apparatus, computer device, and storage medium
CN111736811A (en) Form data verification method, system, server and user terminal
CN110704095A (en) Workflow-based configuration processing method and device, computer equipment and storage medium
CN112286934A (en) Database table importing method, device, equipment and medium
CN111258466A (en) Data visualization method and device, computer equipment and storage medium
CN105740219A (en) Report self-defining method and device
CN111739136B (en) Rendering method, computer device, and storage medium
CN110147354B (en) Batch data editing method, device, computer equipment and storage medium
CN109542962B (en) Data processing method, data processing device, computer equipment and storage medium
CN111176986B (en) Thread script debugging method and device, computer equipment and storage medium
CN112035113A (en) Navigation bar loading method, device, equipment and medium of H5 page
CN111522881A (en) Service data processing method, device, server and storage medium
CN110865943A (en) Interface testing method and device, computer equipment and storage medium
CN110728736A (en) Picture labeling method and device, computer equipment and storage medium
CN110222290B (en) Page generation method and device, computer equipment and storage medium
CN112463783A (en) Index data monitoring method and device, computer equipment and storage medium
CN112783866A (en) Data reading method and device, computer equipment and storage medium
CN112862453A (en) Process information display method, apparatus, computer device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant