CN115577676B - Page table control method, device, equipment and storage medium - Google Patents

Page table control method, device, equipment and storage medium Download PDF

Info

Publication number
CN115577676B
CN115577676B CN202211564499.XA CN202211564499A CN115577676B CN 115577676 B CN115577676 B CN 115577676B CN 202211564499 A CN202211564499 A CN 202211564499A CN 115577676 B CN115577676 B CN 115577676B
Authority
CN
China
Prior art keywords
control
target
column
table column
page
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
CN202211564499.XA
Other languages
Chinese (zh)
Other versions
CN115577676A (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.)
OP Retail Suzhou Technology Co Ltd
Original Assignee
OP Retail Suzhou Technology 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 OP Retail Suzhou Technology Co Ltd filed Critical OP Retail Suzhou Technology Co Ltd
Priority to CN202211564499.XA priority Critical patent/CN115577676B/en
Publication of CN115577676A publication Critical patent/CN115577676A/en
Application granted granted Critical
Publication of CN115577676B publication Critical patent/CN115577676B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/106Display of layout of documents; Previewing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2428Query predicate definition using graphical user interfaces, including menus and forms
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a page table control method, a device, equipment and a storage medium, which relate to the technical field of computer software and comprise the following steps: selecting and triggering a target control in a preset control group corresponding to a target table column, and acquiring a corresponding click event sent by the target control; the preset control group comprises a plurality of different types of controls; determining event attributes output by the click events, and determining corresponding control actions of the target control based on the event attributes; and executing the control operation corresponding to the control action on the target table column in the page table. According to the method and the device, the preset control of the target table column is selected and triggered in a user-defined mode, the target table column executes the corresponding control action of the target control, so that data screening and data display of the target table column are achieved, the problem that associated data of single data are not flexible and convenient to obtain is solved, and diversification and user-defined display of table data are achieved.

Description

Page table control method, device, equipment and storage medium
Technical Field
The invention relates to the technical field of computer software, in particular to a page table control method, a page table control device, page table control equipment and a storage medium.
Background
The shadows of the form are everywhere visible as an important component of the page layout. The probability of the appearance of the table is very high, the arrangement layout of the content information, the display of a large amount of data and the placement of the buttons operated by a plurality of functions are generally used in the corresponding table, and the style types of the table are also various. Forms are often used in conjunction with other interface elements for exposing and manipulating structured data, and often for entry of detailed information. Generally, the composition elements and related elements of the table have a plurality of parts, and the table can be summarized into four parts, namely a screening area, a header, a text and a bottom column according to the working experience of designing the table by self. However, in the prior art, the forms displayed on the page are very fixed, and the acquisition of the associated data of single data is not flexible and convenient.
Disclosure of Invention
In view of this, the present invention provides a method, an apparatus, a device and a storage medium for controlling a page table, which can solve the problem that obtaining associated data of a single data is not flexible and convenient, and implement diversification and customized display of table data. The specific scheme is as follows:
in a first aspect, the present application discloses a page table control method, including:
selecting and triggering a target control in a preset control group corresponding to a target table column, and acquiring a corresponding click event sent by the target control; the preset control group comprises a plurality of different types of controls;
determining event attributes output by the click events, and determining corresponding control actions of the target control based on the event attributes;
and executing the control operation corresponding to the control action on the target table column in the page table.
Optionally, the page table control method further includes:
the head attribute of each table column in the page table is created in a self-defined mode; the header attribute is a column name of the corresponding table column;
and creating a head function corresponding to the head attribute of each table column based on the preset control group corresponding to the table column so as to display the preset control group corresponding to the table column in the page table.
Optionally, before creating the head function corresponding to the head attribute of each table column based on the preset control group corresponding to the table column, the method further includes:
setting a plurality of different types of controls corresponding to the table columns and the control actions corresponding to the controls to form the preset control group corresponding to the table columns.
Optionally, the determining an event attribute of the click event output to determine a corresponding control action of the target control based on the event attribute includes:
if the event attribute is a display association column, determining that the control action corresponding to the target control is a display control action for displaying an association table column of the target table column;
correspondingly, the executing the control operation corresponding to the control action on the target table column in the page table includes:
adding a plurality of table columns on the right side of the target table column in the page table, and displaying the data information of the associated table column in the plurality of table columns;
and executing the control operation corresponding to the display control action on the target table column so as to set the current state of the associated table column to be the display state.
Optionally, the determining an event attribute of the click event output to determine a corresponding control action of the target control based on the event attribute includes:
if the event attribute is a hidden associated column, determining that the control action corresponding to the target control is a hidden control action for hiding an associated table column of the target table column;
correspondingly, the executing, in the page table, the control operation corresponding to the control action on the target table column includes:
the associated table column in the page table at the right side of the target table column in the display state is removed from the page table;
and executing a control operation corresponding to the hidden control action on the target table column so as to set the current state of the associated table column to be a hidden state.
Optionally, the determining an event attribute of the click event output to determine a corresponding control action of the target control based on the event attribute includes:
if the event attribute is content sorting, determining that the control action corresponding to the target control is a sorting control action for sorting the target table column;
correspondingly, the executing, in the page table, the control operation corresponding to the control action on the target table column includes:
and performing sorting operation on the data content corresponding to the target table column in the page table based on a preset arrangement rule so as to execute control operation corresponding to the sorting control action on the target table column.
Optionally, after the performing the control operation corresponding to the control action on the target table column in the page table, the method further includes:
modifying the target control currently displayed by the target table column in the page table based on the current attribute parameters of the target table column; the current attribute parameters include a current state of an associated table column corresponding to the target table column.
In a second aspect, the present application discloses a page table control apparatus, comprising:
the control selection module is used for selecting and triggering a target control in a preset control group corresponding to a target table column and acquiring a corresponding click event sent by the target control; the preset control group comprises a plurality of different types of controls;
the action determining module is used for determining the event attribute output by the click event and determining the corresponding control action of the target control based on the event attribute;
and the operation execution module is used for executing the control operation corresponding to the control action on the target table column in the page table.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for executing the computer program to realize the page table control method.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program, which when executed by a processor implements the aforementioned page table control method.
The method includes the steps that firstly, a target control in a preset control group corresponding to a target table column is selected and triggered, and a corresponding click event sent by the target control is obtained; the preset control group comprises a plurality of different types of controls; determining event attributes output by the click events, and determining corresponding control actions of the target control based on the event attributes; and executing the control operation corresponding to the control action on the target table column in the page table. Therefore, according to the method and the device, the target control in the target table column is selected, the corresponding event attribute of the target control is obtained to determine the corresponding control action, and finally the control operation is performed on the target table column based on the control action.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flowchart of a page table control method disclosed in the present application;
FIG. 2 is a flowchart of a specific page table control method disclosed in the present application;
FIG. 3 is a schematic diagram of a header attribute of a page table disclosed in the present application;
FIG. 4 is an operational diagram of a display association column as disclosed herein;
FIG. 5 is an operational diagram of a display association column as disclosed herein;
FIG. 6 is a flowchart of a specific page table control method disclosed herein;
FIG. 7 is a flowchart of a specific page table control method disclosed herein;
FIG. 8 is a schematic diagram of a page table control apparatus according to the present disclosure;
fig. 9 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The shadow of the form is everywhere visible as an important component of the page layout. The probability of the appearance of the table is very high, the arrangement layout of the content information, the display of a large amount of data and the placement of the buttons operated by a plurality of functions are generally used in the corresponding table, and the style types of the table are also various. Forms are often used in conjunction with other interface elements for exposing and manipulating structured data, and often for entry of detailed information. Generally, the composition elements and related elements of the table have a plurality of parts, and the table can be summarized into four parts, namely a screening area, a header, a text and a bottom column according to the working experience of designing the table by self. However, in the prior art, the forms displayed on the page are very fixed, and the acquisition of the associated data of single data is not flexible and convenient.
Referring to fig. 1, an embodiment of the present application discloses a page table control method, including:
step S11: selecting and triggering a target control in a preset control group corresponding to a target table column, and acquiring a corresponding click event sent by the target control; the preset control group comprises a plurality of different types of controls.
In this embodiment, a target control in a preset control group corresponding to a target table column is selected and triggered in a page table, and a corresponding click event sent by the target control is obtained, where the preset control group includes several different types of controls, that is, one or more controls with different functions, including but not limited to displaying an associated column, hiding the associated column, sorting content, positioning, setting a current icon, and the like, and a user may set the control corresponding to the target table column in advance based on a need of the user to form a corresponding preset control group, and it can be understood that the preset control groups corresponding to each table column in the page table are different from each other.
Step S12: and determining the event attribute output by the click event, and determining the corresponding control action of the target control based on the event attribute.
In this embodiment, after receiving a corresponding click event sent by the target control, the corresponding click event is transmitted to a DOM (Document Object Model) of the target table column, where the DOM includes attributes such as a class name and the like as transmission parameters, and a corresponding event attribute (even attribute) is output by using the click event, where the event attribute may be one column added or one column reduced, or may be sorting, positioning, and the like, and then a corresponding control action of the target control is determined based on the event attribute, and the control action may be displaying an associated column, hiding an associated column, sorting, and the like. Wherein part of the codes of the click events are as follows:
Figure DEST_PATH_IMAGE001
step S13: and executing the control operation corresponding to the control action on the target table column in the page table.
In this embodiment, after determining that a corresponding control action needs to be performed on the target control, a control operation corresponding to the control action is performed on the target table column in the page table, where the control operation includes, but is not limited to, displaying or hiding an associated table column of the target table column, sorting the target table column, and the like, and a user may customize a control and a corresponding control action to perform the corresponding control operation, so that one or more different types of controls are set for each target table column in advance, corresponding control attributes are defined, and data screening and data display of the target table column and one or more associated columns are implemented.
As can be seen, in this embodiment, a target control in a preset control group corresponding to a target table column is first selected and triggered, and a corresponding click event sent by the target control is obtained; the preset control group comprises a plurality of different types of controls; determining event attributes output by the click events, and determining corresponding control actions of the target control based on the event attributes; and executing the control operation corresponding to the control action on the target table column in the page table. Therefore, in the embodiment, the target control in the target table column is selected, the event attribute corresponding to the target control is obtained to determine the corresponding control action, and finally the control operation is performed on the target table column based on the control action.
With reference to the above embodiments, in the present application, corresponding control operations may be performed on a target table column by obtaining a control action of a target control, where the control action includes a control action of displaying an associated column, and then, detailed descriptions are provided for design of a table header and the control and operation of displaying the associated column. Referring to fig. 2, an embodiment of the present application discloses a specific page table control method, including:
step S21: the method comprises the steps of self-defining and creating a head attribute of each table column in a page table; the header attribute is a column name of the corresponding table column.
In this embodiment, before designing an overall page table, it is necessary to custom-create a header attribute of each table column in the page table, that is, define a column name of each table column, and it can be understood that a table header refers to a header of a page table, and fig. 3 is a schematic diagram of the table header. It should be noted that all the header attributes defined in this step are headers of fixed table columns in the page table, that is, lists and column names that are not changed due to the control action, and because some table columns have corresponding associated table columns, the associated table columns corresponding to the target table column can be expanded and displayed or hidden in the page table by the present solution, but the header attributes set in this step do not change with the expansion of the associated table columns, that is, the header attributes are fixed table columns of the page table. The part of the code in which the header attribute is created is as follows:
{
title: i18n.t('inspectShopTask.inspectPeople'),
key: 'userName',
keyWord: 'userName',
align: 'center',
tooltip: true,
renderHeader: (h, params) => {
return createTableHeaderTooltip(
h,
params,
400,
i18n.t('inspectShopTask.inspectPeople'),
'',
'md-add',
scope.showRoleCoulumn
);
},
width: 100,
resizable: true,
}
step S22: setting a plurality of different types of controls corresponding to the table columns and the control actions corresponding to the controls to form preset control groups corresponding to the table columns.
In this embodiment, after determining all fixed table columns in the page table, a plurality of different types of controls corresponding to the table columns and control actions corresponding to the controls need to be set to form preset control groups corresponding to the table columns, a user may set a corresponding control for an operation performed on a table column as needed, certainly, if a control operation is not required for a certain table column, the user may not set a control for the table column, and may set corresponding controls and control attributes and the like in a customized manner based on a control operation requirement on the table column, where the control attributes include, but are not limited to, control icons, control actions and the like, so that one or more different types of controls are set for each table column, and the control attributes are defined to implement the control operation on the table column.
Step S23: and creating a head function corresponding to the head attribute of each table column based on the preset control group corresponding to the table column so as to display the preset control group corresponding to the table column in the page table.
In this embodiment, a head function corresponding to a head attribute of the table column is created based on a corresponding preset control group set in the table column, where the head function is used to render the table head, and a parameter is introduced to determine a control icon used by the table head of the column and a name of the column, where a click event is also bound when the head function is rendered, that is, when the head function is created, the control icon corresponding to the preset control group is created in the head function to display the preset control group corresponding to the table column in the page table, and the control and the click event are bound in the head function, so that the attributes such as the control action of the corresponding clicked control can be obtained based on the click event. Wherein part of the code for creating the head function is as follows:
function createTableHeaderTooltip(
h,
params,
maxWidth,
headerText,
tooltipText,
icon,
func
) {
const iconAlertObject = {
attrs: {
type: icon||'md-alert',
},
style: {
color: '#f90',
fontSize: '18px',
top: '-2px',
position: 'relative',
marginRight: '2px',
verticalAlign: 'middle',
display:'inline-block',
cursor:'pointer',
}
};
step S24: selecting and triggering a target control in a preset control group corresponding to a target table column, and acquiring a corresponding click event sent by the target control.
Step S25: and determining an event attribute output by the click event, and if the event attribute is a display associated column, determining that a control action corresponding to the target control is a display control action for displaying an associated table column of the target table column.
In this embodiment, after a click event sent by a target control is obtained, an event attribute output by the click event is determined, and if the event attribute is a display associated column, a control action corresponding to the target control is determined to be a display control action for displaying an associated table column of the target table column, that is, a corresponding control operation can be performed on the target table column in a page table.
Step S26: adding a plurality of table columns on the right side of the target table column in the page table, and displaying the data information of the associated table column in the plurality of table columns.
In this embodiment, when the operation of controlling the display of the associated table column is performed, it is first required to determine whether the current state of the associated table column is the display state, if not, add a plurality of table columns to the right side of the target table column in the page table, and display the data information of the associated table column in the plurality of table columns, if so, it indicates that the associated table column is already displayed currently, and the operation of subsequently adding and displaying the table column is not required. It is understood that the associated table column of the target table column may be one or more columns, so that when creating the table column, the number of created table columns may be determined according to the number of associated table column columns. Therefore, data display operation of the associated table columns of the target table column can be achieved through the control, the attributes of the corresponding associated columns are modified after the control is clicked for data display, the user-defined header dynamic increase and decrease of the table columns are achieved, and the problem of inconsistency of obtaining class names caused by dynamic increase and decrease of the table columns is avoided due to the fact that the associated columns are controlled by the related target table columns.
Step S27: and executing control operation corresponding to the display control action on the target table column so as to set the current state of the associated table column to be a display state.
In this embodiment, the control operation corresponding to the display control action is executed on the target table column, and when the operation is completed, the current state of the associated table column is set to be the display state, and the state of the associated table column is updated in time, so that when a corresponding control is selected again or the control of the associated column is hidden in the following, the latest state of the associated table column is obtained, and the corresponding operation is executed based on the state of the associated table column.
Step S28: modifying the target control currently displayed by the target table column in the page table based on the current attribute parameters of the target table column; the current attribute parameters include a current state of an associated table column corresponding to the target table column.
In this embodiment, after the corresponding control operation is performed, a modification operation is performed on the control icon of the target control currently displayed in the target table column in the page table based on the current attribute parameter of the target table column, that is, after the corresponding associated column display operation is performed, if the current state of the associated table column corresponding to the target table column is the display state, the control icon representing the displayed associated column originally displayed on the page table is modified from "+" to "-" representing the hidden associated column, so that the corresponding hidden associated column operation can be performed by selecting the control representing the hidden associated column in the following process. It is understood that the display associated column is associated with the hidden associated column. For example, the current page table defaults that the A1 column is not displayed, the control icon of the a column is defaulted to be "+", the A1 column needs to be added when the a column is clicked, whether the clicked is the a column is judged at this time, if yes, the A1 column is judged to be in a display state or a hidden state, if yes, the display operation is carried out on the a column, and meanwhile, the control icon of the a column is changed and displayed to be "-". As shown in fig. 4 and 5, when the control "+" in the "inspector" table column is clicked, the associated table column "role" in the "inspector" table column is expanded and displayed in the page table, and at this time, the control icon of the inspector is changed to "-". The partial code in which the association column is expanded is as follows:
v/expand stow role
showRoleCoulumn(event) {
First, determine if there is a class name
if(!event.target.getAttributeNode('class'))return
// data is bigger, iView redraws table needs time, add a loading effect
this.loading = true;
setTimeout(() => {
this.loading = false;
}, 3000);
Whether or not the interpretation role has been exposed
if (!this.isShowRole) {
// set roles is show
this.isShowRole = true;
I/get index, add after which column
let index = this.displayTableColumn.findIndex(item => {
return item.key === 'userName';
});
// defining role column contents
let col = {
title: i18n.t('inspectShopTask.role'),
key: 'roles',
keyWord: 'roles',
align: 'center',
tooltip: true,
minWidth: 85,
};
// adding a column behind the inspector
this.displayTableColumn.splice(index + 1, 0, col);
// setting the icon of the currently clicked column as-
event.target.className = 'ivu-icon ivu-icon-md-remove';
} else {
For the specific process of step S24, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated herein.
It can be seen that in this embodiment, by setting a preset control group for a table column in advance, defining corresponding attributes of a control, implementing data screening and data display operations of the table column and one or more corresponding associated table columns, and modifying the attributes of the corresponding associated column after clicking the control to perform corresponding control operations, and implementing user-defined dynamic increase and decrease of the table column at the header.
Based on the above embodiments, the present application may implement a control operation of displaying the associated column, and a hidden associated column operation is also performed corresponding to the displayed associated column, and a detailed description will be given below of a control operation process of hiding the associated column. Referring to fig. 6, an embodiment of the present application discloses a specific page table control method, including:
step S31: selecting and triggering a target control in a preset control group corresponding to a target table column, and acquiring a corresponding click event sent by the target control.
Step S32: and determining an event attribute output by the click event, and if the event attribute is a hidden associated column, determining that a control action corresponding to the target control is a hidden control action for hiding an associated table column of the target table column.
In this embodiment, if the event attribute is a hidden associated column, it is determined that the control action corresponding to the target control is a hidden control action for hiding an associated table column of the target table column, so as to execute a corresponding hidden associated column control operation.
Step S33: the associated table column in the page table in the display state to the right of the target table column is removed from the page table.
In this embodiment, after it is determined that the hidden associated column control operation needs to be performed, it is first determined whether the current state of the associated table column is the display state, if so, the associated table column in the display state on the right side of the target table column in the page table is removed from the page table, and it is pointed out that the column number of the associated table column may be determined based on the table index number of the target table column and the column number of the associated table column corresponding to the target table column, so as to determine the table column that needs to be removed from the page table based on the column number, for example, if the column number of the target table column is 1 and the associated table column corresponding to the target table column has 2 columns, it may be determined that 1+1 and 1+2, that is, two table columns with column numbers of 2 and 3 are associated table columns of the target table column, that is, that the corresponding associated table column may be removed from the page table.
Step S34: and executing a control operation corresponding to the hidden control action on the target table column so as to set the current state of the associated table column to be a hidden state.
In this embodiment, a control operation corresponding to the hidden control action is performed on the target table column, so as to set the current state of the associated table column to be a hidden state.
Step S35: modifying the target control currently displayed by the target table column in the page table based on the current attribute parameters of the target table column; the current attribute parameters include a current state of an associated table column corresponding to the target table column.
In this embodiment, after the control operation of hiding the associated column is performed, the state of the currently associated table column is changed to the hidden state, and correspondingly, the target control currently displayed in the target table column in the page table needs to be changed from "-" to "+". Referring to fig. 8, which shows the displayed associated table column, after clicking the "-" control icon in the figure, the hidden state shown in fig. 7 can be restored.
For the specific process of step S31, reference may be made to corresponding contents disclosed in the foregoing embodiments, and details are not repeated herein.
Therefore, the table columns to be hidden can be determined based on the column numbers of the target table columns and the column numbers of the associated table columns, and the corresponding associated column hiding operation is performed, so that the associated table columns of the target table columns can be displayed and simultaneously can be hidden, the function of the user-defined control is enriched, the function is more complete, and the use experience of the user is improved.
Based on the above embodiments, the present application may display the association column and hide the association column, and may also sort the target table column, which will be described in detail below. Referring to fig. 7, an embodiment of the present application discloses a specific page table control method, including:
step S41: selecting and triggering a target control in a preset control group corresponding to a target table column, and acquiring a corresponding click event sent by the target control.
Step S42: and determining the event attribute output by the click event, and if the event attribute is content sorting, determining that the control action corresponding to the target control is a sorting control action for sorting the target table column.
In this embodiment, if the event attribute is content sorting, it may be determined that the control action corresponding to the target control is a sorting control action for sorting the target table column, so as to execute a corresponding sorting operation.
Step S43: and performing sorting operation on the data content corresponding to the target table column in the page table based on a preset arrangement rule so as to execute control operation corresponding to the sorting control action on the target table column.
In this embodiment, a sorting operation is performed on the data content corresponding to the target table column in the page table based on a preset sorting rule to execute a control operation corresponding to the sorting control action, where the preset sorting rule may be written in the control in advance, and may be that the data is sorted from large to small or from small to large.
For the specific process of the step S41, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
Therefore, in the embodiment, by selecting the control corresponding to the sorting and sorting based on the preset sorting rule, the data screening operation of the target table column and the customization of the control are realized, and the use experience of the user is improved.
Referring to fig. 8, an embodiment of the present application further discloses a page table control apparatus, which includes:
the control selection module 11 is configured to select and trigger a target control in a preset control group corresponding to a target table column, and acquire a corresponding click event sent by the target control; the preset control group comprises a plurality of different types of controls;
the action determining module 12 is configured to determine an event attribute output by the click event, and determine a control action corresponding to the target control based on the event attribute;
and the operation executing module 13 is configured to execute a control operation corresponding to the control action on the target table column in the page table.
As can be seen, in the present embodiment, a target control in a preset control group corresponding to a target table column is selected and triggered, and a corresponding click event sent by the target control is obtained; the preset control group comprises a plurality of different types of controls; determining event attributes output by the click events, and determining corresponding control actions of the target control based on the event attributes; and executing the control operation corresponding to the control action on the target table column in the page table. Therefore, in the embodiment, the target control in the target table column is selected, the event attribute corresponding to the target control is obtained to determine the corresponding control action, and finally the control operation is performed on the target table column based on the control action.
In some specific embodiments, the page table control device may further include:
the head attribute creating module is used for creating the head attribute of each table column in the page table in a self-defining manner; the header attribute is a column name of the corresponding table column;
and the head function creating module is used for creating a head function corresponding to the head attribute of each table column based on the preset control group corresponding to the table column so as to display the preset control group corresponding to the table column in the page table.
In some specific embodiments, the page table control device may further include:
and the control setting module is used for setting a plurality of different types of controls corresponding to the table columns and the control actions corresponding to the controls to form the preset control group corresponding to the table columns.
In some specific embodiments, the action determining module 12 may specifically include:
a display control action determining unit, configured to determine, if the event attribute is a display associated column, that a control action corresponding to the target control is a display control action for displaying an associated table column of the target table column;
correspondingly, the operation executing module 13 may specifically include:
a table column display unit, configured to add a plurality of table columns to the right side of the target table column in the page table, and display the data information of the associated table column in the plurality of table columns;
and the first state setting unit is used for executing control operation corresponding to the display control action on the target table column so as to set the current state of the associated table column as a display state.
In some specific embodiments, the action determining module 12 may specifically include:
a hidden control action determining unit, configured to determine, if the event attribute is a hidden associated column, that a control action corresponding to the target control is a hidden control action for hiding an associated table column of the target table column;
correspondingly, the operation executing module 13 may specifically include:
a table column removing unit configured to remove the associated table column in the page table, which is in a display state on the right side of the target table column, from the page table;
and the second state setting unit is used for executing control operation corresponding to the hiding control action on the target table column so as to set the current state of the associated table column to be a hidden state.
In some specific embodiments, the action determining module 12 may specifically include:
and the sequencing control action determining unit is used for determining that the control action corresponding to the target control is a sequencing control action for sequencing the target table column if the event attribute is content sequencing.
Correspondingly, the operation executing module 13 may specifically include:
and the table column sorting unit is used for performing sorting operation on the data content corresponding to the target table column in the page table based on a preset sorting rule so as to execute control operation corresponding to the sorting control action on the target table column.
In some specific embodiments, the page table control device may further include:
the control modification unit is used for modifying the target control currently displayed in the target table column in the page table based on the current attribute parameters of the target table column; the current attribute parameters include a current state of an associated table column corresponding to the target table column.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 9 is a block diagram of an electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 9 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. The memory 22 is used for storing a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the page table control method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to acquire external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage manner may be a transient storage manner or a permanent storage manner.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, netware, unix, linux, or the like. The computer programs 222 may further include computer programs that can be used to perform other specific tasks in addition to the computer programs that can be used to perform the page table control method performed by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the page table control method disclosed above. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The technical solutions provided by the present application are introduced in detail, and specific examples are applied in the description to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understanding the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (7)

1. A page table control method is characterized by comprising the following steps:
selecting and triggering a target control in a preset control group corresponding to a target table column, and acquiring a corresponding click event sent by the target control; the preset control group is preset for a table column in a page table, comprises a plurality of different types of controls and comprises control actions corresponding to the controls;
determining event attributes output by the click events, and determining corresponding control actions of the target control based on the event attributes;
executing control operation corresponding to the control action of the target control on the target table column in the page table;
modifying the target control currently displayed in the target table column in the page table based on the current attribute parameters of the target table column; the current attribute parameters comprise the current state of an associated table column corresponding to the target table column;
the page table control method further comprises the following steps:
custom-creating a header attribute of each table column in the page table; the header attribute is a column name of the corresponding table column;
and creating a head function corresponding to the head attribute of each table column based on the preset control group corresponding to the table column so as to display the preset control group corresponding to the table column in the page table.
2. The page form control method of claim 1, wherein the determining an event property of the click event output to determine a corresponding control action of the target control based on the event property comprises:
if the event attribute is a display association column, determining that the control action corresponding to the target control is a display control action for displaying an association table column of the target table column;
correspondingly, the executing, in the page table, a control operation corresponding to the control action of the target control on the target table column includes:
adding a plurality of table columns on the right side of the target table column in the page table, and displaying the data information of the associated table column in the plurality of table columns;
and executing the control operation corresponding to the display control action on the target table column so as to set the current state of the associated table column to be the display state.
3. The page form control method of claim 1, wherein the determining an event property of the click event output to determine a corresponding control action of the target control based on the event property comprises:
if the event attribute is a hidden associated column, determining that the control action corresponding to the target control is a hidden control action for hiding an associated table column of the target table column;
correspondingly, the executing, in the page table, a control operation corresponding to the control action of the target control on the target table column includes:
the associated table column in the page table at the right side of the target table column in the display state is removed from the page table;
and executing a control operation corresponding to the hidden control action on the target table column so as to set the current state of the associated table column to be a hidden state.
4. The page form control method of claim 1, wherein the determining an event property of the click event output to determine a corresponding control action of the target control based on the event property comprises:
if the event attribute is content sorting, determining that the control action corresponding to the target control is a sorting control action for sorting the target table column;
correspondingly, the executing, in the page table, a control operation corresponding to the control action of the target control on the target table column includes:
and performing sorting operation on the data content corresponding to the target table column in the page table based on a preset arrangement rule so as to execute control operation corresponding to the sorting control action on the target table column.
5. A page table control apparatus, comprising:
the control selection module is used for selecting and triggering a target control in a preset control group corresponding to a target table column and acquiring a corresponding click event sent by the target control; the preset control group is preset for a table column in a page table, comprises a plurality of different types of controls and comprises control actions corresponding to the controls;
the action determining module is used for determining the event attribute output by the click event and determining the corresponding control action of the target control based on the event attribute;
the operation execution module is used for executing control operation corresponding to the control action of the target control on the target table column in the page table;
the control modification unit is used for modifying the target control currently displayed in the target table column in the page table based on the current attribute parameters of the target table column; the current attribute parameters comprise the current state of an associated table column corresponding to the target table column;
wherein, the page table control device further comprises:
the head attribute creating module is used for creating the head attribute of each table column in the page table in a self-defining manner; the header attribute is a column name of the corresponding table column;
and the head function creating module is used for creating a head function corresponding to the head attribute of each table column based on the preset control group corresponding to the table column so as to display the preset control group corresponding to the table column in the page table.
6. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the page table control method of any of claims 1 to 4.
7. A computer-readable storage medium for storing a computer program which, when executed by a processor, implements the page table control method according to any one of claims 1 to 4.
CN202211564499.XA 2022-12-07 2022-12-07 Page table control method, device, equipment and storage medium Active CN115577676B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211564499.XA CN115577676B (en) 2022-12-07 2022-12-07 Page table control method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211564499.XA CN115577676B (en) 2022-12-07 2022-12-07 Page table control method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115577676A CN115577676A (en) 2023-01-06
CN115577676B true CN115577676B (en) 2023-03-28

Family

ID=84590536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211564499.XA Active CN115577676B (en) 2022-12-07 2022-12-07 Page table control method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115577676B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110705226A (en) * 2019-08-22 2020-01-17 平安科技(深圳)有限公司 Spreadsheet creating method and device and computer equipment
CN112558967A (en) * 2020-12-15 2021-03-26 中国建设银行股份有限公司 Page automatic generation method and device, electronic equipment and storage medium
CN114757159A (en) * 2022-04-22 2022-07-15 优捷特清洁能源有限公司 Packaging development method and system of multifunctional data table component

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140372856A1 (en) * 2013-06-14 2014-12-18 Microsoft Corporation Natural Quick Functions Gestures
CN103593473A (en) * 2013-11-28 2014-02-19 国家电网公司 Form displaying method and system
US10061824B2 (en) * 2015-01-30 2018-08-28 Splunk Inc. Cell-based table manipulation of event data
US20180349338A1 (en) * 2017-06-02 2018-12-06 Microsoft Technology Licensing, Llc Visualization between input table and pivoted results
CN107506457B (en) * 2017-08-29 2020-10-02 姜博 Data processing method and device
CN112799564A (en) * 2020-07-14 2021-05-14 珠海金山办公软件有限公司 Method, device, electronic equipment and medium for inserting control in table
CN112631566A (en) * 2020-12-28 2021-04-09 航天信息股份有限公司 Code generation method and device, storage medium and electronic equipment
CN112989776A (en) * 2021-03-03 2021-06-18 远光软件股份有限公司 Method and device for adjusting table columns, storage medium and terminal equipment
CN113656487A (en) * 2021-07-28 2021-11-16 北京数码大方科技股份有限公司 Object data display method and object data display device in information system
CN113743067A (en) * 2021-09-18 2021-12-03 中电科蓉威电子技术有限公司 Method for expanding function of jQuery table plug-in unit

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110705226A (en) * 2019-08-22 2020-01-17 平安科技(深圳)有限公司 Spreadsheet creating method and device and computer equipment
CN112558967A (en) * 2020-12-15 2021-03-26 中国建设银行股份有限公司 Page automatic generation method and device, electronic equipment and storage medium
CN114757159A (en) * 2022-04-22 2022-07-15 优捷特清洁能源有限公司 Packaging development method and system of multifunctional data table component

Also Published As

Publication number Publication date
CN115577676A (en) 2023-01-06

Similar Documents

Publication Publication Date Title
US7757207B2 (en) Form skin and design time WYSIWYG for .net compact framework
US6237004B1 (en) System and method for displaying data using graphical user interface control elements
US7242413B2 (en) Methods, systems and computer program products for controlling tree diagram graphical user interfaces and/or for partially collapsing tree diagrams
US9626162B2 (en) System and method for building graphical instrument panels
CA2027157C (en) Computer user interface
US8504930B1 (en) User interface substitution
US7761859B2 (en) Application development environment with features for aiding a user in writing function calls
US11016650B1 (en) Building data metric objects through user interactions with data marks of displayed visual representations of data sources
US20070240100A1 (en) Computer software adaptation method and system
EP3805909B1 (en) Display control device, display control method, and display control program
US20030081007A1 (en) Object oriented explorer type environment
US7739620B1 (en) Method of setting alternate style assignments to menu elements of an application
US10289388B2 (en) Process visualization toolkit
CN112257405A (en) Webpage table editing method, device and equipment and computer readable storage medium
US20090070713A1 (en) Computer-Implemented Systems And Methods For Portlet Management
CN115577676B (en) Page table control method, device, equipment and storage medium
WO2007097526A1 (en) Method for providing hierarchical ring menu for graphic user interface and apparatus thereof
US20070043547A1 (en) Integrated debugging environment for a network simulation
US20070266337A1 (en) Contextual link display in a user interface
CN116719456A (en) Icon style switching method and device, electronic equipment and storage medium
JPH10289084A (en) Information processor and read-only storage medium
US20090307625A1 (en) Method, device, data carrier and computer program product for representing data in a user interface
US20050091400A1 (en) View routing in user interface applications
US20070124686A1 (en) Locating graphical elements for an object
JP3492014B2 (en) Data input / output method and computer device

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