CN111290752B - Frame processing method and device for web form - Google Patents

Frame processing method and device for web form Download PDF

Info

Publication number
CN111290752B
CN111290752B CN201911349518.5A CN201911349518A CN111290752B CN 111290752 B CN111290752 B CN 111290752B CN 201911349518 A CN201911349518 A CN 201911349518A CN 111290752 B CN111290752 B CN 111290752B
Authority
CN
China
Prior art keywords
cell
frame
attribute
comment
coordinates
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
CN201911349518.5A
Other languages
Chinese (zh)
Other versions
CN111290752A (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.)
Mingdu Zhiyun Zhejiang Technology Co Ltd
Original Assignee
Mingdu Zhiyun Zhejiang 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 Mingdu Zhiyun Zhejiang Technology Co Ltd filed Critical Mingdu Zhiyun Zhejiang Technology Co Ltd
Priority to CN201911349518.5A priority Critical patent/CN111290752B/en
Publication of CN111290752A publication Critical patent/CN111290752A/en
Application granted granted Critical
Publication of CN111290752B publication Critical patent/CN111290752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention discloses a frame processing method of a web form, which is used for displaying frames on the web form constructed based on handsonable and comprises the steps of acquiring coordinates of a selected area; according to the selected region coordinates, circularly traversing to obtain all cell coordinates in the selected region; judging the type of the set frame according to the input parameters; and selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area. The method solves the problems that when a handsonable plug-in is used for rendering a large number of cell frame patterns in batches in the web platform application at present, the rendering speed is too low, and the platform is crashed when user experience is affected even seriously, and the frame processing method of the web table can be used for performing quick rendering, optimizing the user experience and improving the use efficiency of the table.

Description

Frame processing method and device for web form
Technical Field
The present invention relates to the field of information display, and in particular, to a method and apparatus for processing a frame of a web form.
Background
Handsonable is a page-side tabular interactive plug-in based on JavaScript/HTML5, can be used for various technologies, such as React, angular and Vue, can be easily integrated with any data source and provides various useful functions, such as data binding, verification, ordering and powerful context menus, can process a large amount of data without worrying about performance problems, and is compatible with various mainstream browsers. The Handsonable realizes a table editing function in an HTML page and has an Excel-like editing effect, so that the method is a UI component of a current very popular web application program. By means of the method, the contents of the display form can be loaded, and the combination items, statistics, row and column dragging and the like can be supported. Meanwhile, various processes for the loaded form page are supported: adding/deleting rows/columns, merging cells, etc.
However, when there are too many rows or columns in the web form, the handleable may choose to render only part of the data for load speed, and only render the rest of the data again when the page is active. Therefore, when a large number of Excel cell frames are rendered, the rendering speed is too low, the user experience is seriously affected, and even the platform is crashed because the continuous rendering amount of the table is too large.
Disclosure of Invention
The invention provides a frame processing method of a web form, which is used for displaying frames on the web form constructed based on handsonable and comprises the following steps of: acquiring coordinates of a selected region; according to the selected region coordinates, circularly traversing to obtain all cell coordinates in the selected region; judging the type of the set frame according to the input parameters; and selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area.
Preferably, the frame types include a borderless type, all frame types, and an outer frame type.
Preferably, the step of selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area specifically includes: if the type is no frame, circularly traversing the set array of all the cell coordinates in the selected area to obtain the attribute of each cell; splitting the selected area according to the space to obtain a first attribute set array of the cell; judging whether a frame display element exists in the first generic attribute set array, if so, deleting corresponding parameters in the first generic attribute set array; performing character string splicing on the first attribute set array by taking spaces as intervals to obtain a second attribute set array; and setting a new display style for the cell according to the second attribute set array.
Preferably, the step of selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area further includes:
if the line index of the traversed cell is equal to the initial line, acquiring the attribute value of the previous line, and if the frame display element exists, setting the line index to be empty and resetting the cell pattern;
if the column index of the traversed cell is equal to the initial column, acquiring an attribute value of the previous column, and if the frame display element exists, setting the column index to be empty and resetting the cell pattern;
and refreshing and rendering the table according to the newly set cell format.
Preferably, the step of selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area specifically includes:
if the first set array is set to be of all frame types, circularly traversing the first set array of all cell coordinates in the selected area;
acquiring current style attributes of each cell;
adding a right frame display element and a lower frame display element of each cell in the style attribute of each cell, and forming a second attribute set array after setting;
and setting a new display style for the cell according to the second attribute set array.
Preferably, the step of selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area further includes:
if the row index of the traversed cell is equal to the initial row, judging whether the cell of the previous row has a lower frame display element, and if not, resetting the cell pattern for the cell;
if the column index of the traversed cell is equal to the initial column, judging whether the cell in the previous column has a right frame display element, and if not, resetting the cell style for the cell;
and refreshing and rendering the table according to the newly set cell format.
Preferably, the step of selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area further includes:
if the set is the outer frame type, circularly traversing the set array of all the cell coordinates in the selected area to acquire the attribute of each cell;
if the cell line index is equal to the end line and the column index is equal to the end column, setting a lower frame display element for the cell of the same row as the previous row if the line index is equal to the start line, and setting a right frame display element for the cell of the same row as the previous column if the column index is equal to the start line;
if the cell line index is equal to the end line but the column index is not equal to the end column, setting a right frame display element for the cell in the same row of the previous column if the column index is equal to the start column, and setting a lower frame display element for the cell in the same column of the previous column if the line index is equal to the start column;
if the cell line index is not equal to the end line, setting a lower frame display element for the cell of the same row as the previous line if the line index is equal to the start line, and setting a right frame display element for the cell of the same row as the previous line if the column index is equal to the start line.
Preferably, the table is a tab set page table.
The invention also discloses a processing device of the web form, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the steps of the processing method of the web form when executing the computer program.
The invention also discloses a computer readable storage medium storing a computer program which when executed by a processor implements the steps of the web form processing method described above.
According to the method, the problem that when a large number of cell frame patterns are required to be rendered in batches, the rendering speed is too slow, the platform is crashed when user experience is affected even seriously is frequently caused, and the problem that the frame processing method of the web table can be used for carrying out quick rendering, optimizing user experience and improving the table use efficiency is solved by encapsulating the frame processing method of the web table and calling according to requirements, so that the handleable plug-in is introduced into a front-end VUE frame at present, and the handleable plug-in is used for simulating an Excel function in web platform application.
Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a flowchart of a frame processing method of a web table in the prior art.
Fig. 2-4 are schematic flow diagrams of step S14 under no frame type, all frame types and outer frame type settings, respectively, according to an embodiment of the present invention.
Fig. 5 is a flowchart of a method for processing a web form according to another embodiment of the present invention.
Fig. 6 is a schematic flowchart of step S21 according to an embodiment of the present invention.
FIG. 7 is a diagram illustrating a display error of a comment box of a cell when the tab page is not in accordance with an embodiment of the present invention.
FIG. 8 is a diagram showing the correctness of the comment boxes of cells when the tab page is not in accordance with one embodiment of the present invention.
FIG. 9 is a diagram illustrating a display error of a comment box of a cell in a tab page according to an embodiment of the present invention.
Fig. 10 is a schematic diagram showing that a comment box of a cell in a tab page is correctly displayed according to an embodiment of the present invention.
Fig. 11 is a schematic diagram of a frame processing device of a web form according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. It will be apparent that the described embodiments are some, but not all, embodiments of the invention. All other embodiments, which can be made by a person skilled in the art without creative efforts, based on the described embodiments of the present invention fall within the protection scope of the present invention.
In the present invention, unless explicitly specified and limited otherwise, the terms "mounted," "connected," "secured," and the like are to be construed broadly and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention can be understood by those of ordinary skill in the art according to the specific circumstances.
In the present invention, unless expressly stated or limited otherwise, a first feature "above" or "below" a second feature may include both the first and second features being in direct contact, as well as the first and second features not being in direct contact but being in contact with each other through additional features therebetween. Moreover, a first feature being "above," "over" and "on" a second feature includes the first feature being directly above and obliquely above the second feature, or simply indicating that the first feature is higher in level than the second feature. The first feature being "under", "below" and "beneath" the second feature includes the first feature being directly under and obliquely below the second feature, or simply means that the first feature is less level than the second feature.
Unless defined otherwise, technical or scientific terms used herein should be given the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. The terms "first," "second," and the like in the description and in the claims, are not used for any order, quantity, or importance, but are used for distinguishing between different elements. Likewise, the terms "a" or "an" and the like do not denote a limitation of quantity, but rather denote the presence of at least one.
When a large number of Excel cell frames are rendered, the current web table is too slow in rendering speed, and user experience is very affected. As shown in fig. 1, this embodiment discloses a method for processing a frame of a web form, which is used for displaying a frame on a web form constructed based on handleability, and specifically includes:
s11, acquiring the coordinates of the selected area. Specifically, the coordinates of the current selected area selected by the input device such as a mouse, namely the corresponding coordinates of the starting row, the starting column, the ending row and the ending column, are obtained.
S12, according to the selected region coordinates, circularly traversing and obtaining all cell coordinates in the selected region. And circularly traversing to obtain all cell coordinates (row, col) in the current selected area according to the obtained selected area coordinates, wherein row is a row index, col is a column index, and marking the row index and col as an aggregate array srnd_arr_data of all cell coordinates in the current selected area.
S13, judging the type of the set frame according to the input parameters. The frame types may include a borderless type, all frame types, and an outer frame type, among others.
And S14, selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area.
When the selected frame type is a borderless type, borderless processing is required to be performed on the selected area, that is, all the frame lines are removed in the selected area, as shown in fig. 2, and the specific processing steps are as follows:
in step S1411, if the type is no frame, the set array of coordinates of all cells in the selected area is circularly traversed to obtain the attributes of each cell. And (3) circularly traversing the set array srand_arr_data obtained in the step (S12) to obtain a class style class name of each cell, wherein class is a style set attribute of HMLT elements used by front-end development in program development, and class name is a style attribute in class set.
In step S1412, the selected region is split according to the space, and the first attribute set array of the cell is obtained. The first attribute set array of the cells is an array cell_classname obtained by splitting the class attribute of each cell by using a string splitting method split.
Step 1413, judging whether a frame display element exists in the first attribute set array, and deleting corresponding parameters in the first attribute set array if the frame display element exists.
Judging whether htallBorder-right representing the right frame display element of the cell or htallBorder-bottom representing the lower frame display element of the cell exists in the first attribute set array cell_className, and if so, setting the first attribute set array cell_className as empty; and then calling a string. Trim method to remove null values for the array.
Step S1414, the first attribute set array is spliced by character strings with spaces as intervals, and a second attribute set array is obtained.
Specifically, the first attribute set array cell_classname is spliced by using a join method and using spaces as intervals, so that a second attribute set array new_cell_class is obtained.
Step S1415, setting a new display style for the cell according to the second attribute set array. After the splicing is successful, calling a set cell attribute method setCellMetaObject in the handleable to set a new style for the cell.
In this embodiment, the step S4 further includes boundary judgment, specifically as follows:
step S1416, if the row index of the traversed cell is equal to the initial row, acquiring the attribute value of the previous row, if the frame display element exists, setting the blank, and resetting the cell pattern;
step S1417, if the column index of the traversed cell is equal to the initial column, acquiring the attribute value of the previous column, and if the frame display element exists, setting the blank and resetting the cell pattern; and refreshing and rendering the table according to the newly set cell format.
Specifically, if the row of the traversed cell is equal to the initial row, acquiring a className of row-1, and if a cell lower frame display element htAllBorder-bottom exists, setting the cell to be empty and resetting the cell pattern; if col of the traversed cell is equal to the initial column, the className of col-1 column is obtained, and if the right frame display element htAllBorder-right exists, the cell pattern is set to be empty and reset. Finally, a handleable 1 refresh table method render (), refreshing the entire web table.
When the selected frame type is all frame types, all frame lines in the selected area need to be processed, namely, frame lines are set for all cells in the selected area, as shown in fig. 3, and the specific processing steps are as follows:
in step S1421, if all the frame types are set, the first set array srand_arr_data of all the cell coordinates in the selected area is circularly traversed.
Step S1422, obtaining the current style attribute of each cell, and obtaining the class string style set now_class of the current cell.
Step S1423, adding a right frame display element and a lower frame display element of each cell to the style attribute of each cell, and forming a second attribute set array after setting. Namely, on the basis of the non-class, a right frame display element htAllBorder-right and a cell lower frame display element htAllBorder-bottom are added.
Step S1424, setting a new display style for the cells according to the second attribute set array. The handleable set attribute method setCellMeta is called, and className is set for the cell.
In this embodiment, when the selected frame types are all frame types, the method may further include a boundary determining step, which is specifically as follows:
step S1425, if the row index of the traversed cell is equal to the initial row, judging whether the cell of the previous row has a lower frame display element, if not, resetting the cell pattern for the cell;
step S1426, if the column index of the traversed cell is equal to the initial column, judging whether the cell in the previous column has a right frame display element, if not, resetting the cell pattern for the cell;
and refreshing and rendering the table according to the newly set cell format.
Specifically, if the row of the traversed cell is equal to the initial row, judging whether the cell in the same column in the row-1 has a cell lower frame display element htAllBorder-bottom, and if not, setting the class attribute for the cell. If the traversal col is equal to the initial column, judging whether the cell of the col-1 column in the same row has a cell right frame display element htallBorde-right, and if not, setting the class attribute for the cell; and calling a handleable 1 table refreshing method render (), and refreshing the whole web table.
As shown in fig. 4, when the selected frame type is an outer frame type, where the outer frame type is that four borders of the current selection area are provided with frame lines, but no frame line is provided in the selection area, step S4 may further include the following specific steps:
in step S1431, if the frame type is set, the first set array srand_arr_data of all the cell coordinates in the selected area is circularly traversed to obtain the attributes of each cell.
In step S1432, if the cell row index is equal to the end row and the column index is equal to the end column, the lower frame display element is set for the cell in the same row as the previous row if the row index is equal to the start row, and the right frame display element is set for the cell in the same row as the previous column if the column index is equal to the start column. Specifically, when Row is equal to the end Row and col is equal to the end column, setting a cell lower frame display element htAllBorder-bottom for the cells of Row-1 in the same column if Row is equal to the start Row; if col is equal to the starting column, a cell right frame display element htAllBorder-right is set for cells with col-1 columns in the same row.
In step S1433, if the cell row index is equal to the end row but the column index is not equal to the end column, the right frame display element is set for the cell in the same row in the previous column if the column index is equal to the start column, and the lower frame display element is set for the cell in the same column in the previous column if the row index is equal to the start column. Specifically, if row is equal to the end row and col is equal to the start column, setting a right frame display element htAllBorder-right for the cells of col-1 column in the same row; if row is equal to the initial row, a lower frame display element htAllBorder-bottom is set for the cells of row-1 in the same column.
In step S1434, if the cell line index is not equal to the end line, a lower frame display element is set for the cell in the same row as the previous line if the line index is equal to the start line, and a right frame display element is set for the cell in the same column as the previous line if the line index is equal to the start line. Specifically, if row is equal to the initial row, setting a lower frame display element htAllBorder-bottom for the cells of row-1 in the same column; if col is equal to the starting column, a right frame display element htAllBorder-right is set for the cells of col-1 that are in the same row.
In this embodiment, the frame line may be 1 pixel or 2 pixels. The web table can be a tab setting page table, and can smoothly solve the page clamping phenomenon when a large number of cell frame patterns are rendered on the setting page.
The frame processing method of each web form disclosed by the embodiment is packaged and called according to the requirement, so that the problems that the frame processing method of each web form is used for fast rendering, optimizing the user experience and improving the use efficiency of the form due to too slow rendering speed and affecting the user experience even seriously when a large number of cell frame patterns are required to be rendered in batches and causing the platform to crash when the handleable plug-in is used for simulating an Excel function in web platform application at present are solved.
Fig. 5 is a schematic diagram of another processing method of a web form constructed based on handleable according to an embodiment of the present invention, which may be used to process form information display, and may solve the problem that when an Excel function is simulated by using a handleable plug-in, an abnormal display position occurs in a comment frame of a form used under the condition of merging cells and multiple tab pages, where the method may specifically include:
step S21, after splitting the style attribute of each cell, determining the cell containing the comment style attribute. As shown in fig. 6, step S21 may specifically include:
s211, declaring a handleable cell move-in and move-out event;
s212, acquiring an attribute value of a mouse moving-in cell in a moving-in event, and splitting the attribute value;
s213, judging whether the attribute value contains comment information attributes, and if so, judging whether the cell currently containing comment information is a merging cell.
Specifically, the handleable cell move in and out event is declared first. And in the move-in event, acquiring a css style attribute className attribute value of the mouse move-in cell, and splitting the css style attribute className attribute value by using a character string splitting method split.
Judging whether the current className attribute value contains an htCommentCell style attribute representing comment content. Where htCommentCell is a className style name, appearing in the cell with comment content, the cell having this identification is that the cell has comment content, and a mouse moving into the cell will display a small pop-up window.
S22, judging whether the cell currently containing comment information is a merging cell. And (3) screening the cells with comment content obtained in the step (S21) and judging whether the cells are merging cells or not.
S23, if the cells are merged, calculating the merging quantity of the current merged cells, obtaining the sum of the widths of the merged rows which do not contain the first cell, and resetting the current comment positioning value according to the sum of the widths.
If the cells are merged, acquiring the sum of all row widths before the row of the current cell after the preset time. Specifically, the delay function setTimeOut may be called to perform delay processing, where setTimeOut is used to execute the subsequent logic after a delay of one second when the method triggers, and the delay time may be set independently. And then executing the callback function to carry out callback processing, namely logically packaging the executed method after the delay time is over.
Specifically, the callback processing is as follows:
the sum of the widths of all columns preceding the column in which the current cell is located, colWidths, is obtained. The getColWidth in the handleable may be called to obtain the width of each column.
And resetting comment positioning values for the comment boxes. Specifically, the left edge of the comment box, that is, the left attribute value in the css positioning attribute, is obtained, and the sum of the current left attribute value and the colWidth value is used as a new left attribute value for updating the current left attribute value. The abnormal display state of the cell comment box shown in fig. 7 can be converted into the normal display state of the cell comment box shown in fig. 8 through the steps of the method.
In this embodiment, since the web form may also be applied to various tab pages, the following steps may be further included:
step S24: judging whether the current container is a tab page, if so, subtracting the sum of the widths of all tab pages in front of the current container from the current comment locating value to serve as an updated comment locating value, and if not, directly setting the comment locating value as current data. It may include:
if the current environment of the table is tab page, acquiring the number of other tab pages and the width of each tab page, and adjusting the left margin of the original comment frame according to the sum of the widths of other tab pages.
Specifically, if the environment in which the web form is currently located is inside the tab page, calculating and acquiring a new left edge left attribute value left of the current cell 1 As the left attribute value of the cell:
left 1 =left 0 +colWidths-(tabCount-1)*tabWidth;
wherein left is 0 For the original left edge left attribute value, colWidths is the sum of the widths of all columns in front of the column where the current cell is located, tabCount is the serial number of the tab page where the current cell is located, and tabWidth is the width of the tab page where the current cell is located.
If the current environment of the table is not tab page, setting the left margin of the original comment frame as a second comment frame position, wherein the second comment frame position is the sum of all column widths increased for the left margin of the original comment frame.
The abnormal display state of the cell comment frame in the tab page as shown in fig. 9 can be converted into the normal display state of the cell comment frame as shown in fig. 10 through the steps of the method.
S25, if the cells are not merged, directly setting comment positioning values as current data. If the comment boxes are not merged, the comment boxes of the cells are displayed normally, and the comment positioning values are not required to be adjusted.
According to the method and the device, the situation that the display positions of the comment boxes possibly existing in the web form are abnormal is judged and modified according to the tab page and the non-tab page, and therefore the problem that when the Excel form function is simulated by using the handsonable plug-in, the display positions of the used Excel comment boxes are abnormal under the condition of combining cells and multiple tab pages, and operation is affected can be effectively solved.
As shown in fig. 11, the present invention further provides a device for processing a frame of a web form, which includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor implements the steps of the method for processing a frame of a web form described in the foregoing embodiments when executing the computer program.
The frame processing means of the web form may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of a web form border processing apparatus, and does not constitute a limitation of the web form border processing apparatus device, and may include more or less components than illustrated, or may combine certain components, or different components, e.g., the web form border processing apparatus device may further include an input output device, a network access device, a bus, etc.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is a control center of the web form border processing device, connecting various portions of the overall web form border processing device using various interfaces and lines.
The memory may be used to store the computer program and/or module, and the processor may implement various functions of the web form border processing device by running or executing the computer program and/or module stored in the memory and invoking data stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like, and the memory may include a high-speed random access memory, and may further include a nonvolatile memory such as a hard disk, a memory, a plug-in type hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card), at least one disk storage device, a Flash memory device, or other volatile solid-state storage device.
The frame processing method of the web form may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by instructing related hardware by a computer program, where the computer program may be stored in a computer readable storage medium, and the computer program may implement the steps of the frame processing method embodiment of each web form when executed by a processor. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.
In summary, the foregoing description is only of the preferred embodiments of the present invention, and all equivalent changes and modifications made in accordance with the claims should be construed to fall within the scope of the invention.

Claims (7)

1. The frame processing method of the web form is used for displaying frames on the web form constructed based on handsonable, and is characterized by comprising the following steps:
acquiring coordinates of a selected region;
according to the selected region coordinates, circularly traversing to obtain all cell coordinates in the selected region;
judging the type of the set frame according to the input parameters;
selecting a corresponding frame processing mode according to the frame type to render all the cell coordinates in the selected area;
if the first set array is set to be of all frame types, circularly traversing the first set array of all cell coordinates in the selected area; acquiring current style attributes of each cell; adding a right frame display element and a lower frame display element of each cell in the style attribute of each cell, forming a second attribute set array after setting, and setting a new display style for the cell according to the second attribute set array;
after splitting the style attribute of each cell, determining the cell containing the comment style attribute; judging whether the cell currently containing comment information is a merging cell or not; if the cells are merged, calculating the merging quantity of the current merged cells, obtaining the sum of the widths of the merged rows which do not contain the first cell, and resetting the current comment positioning value according to the sum of the widths; if the cells are not merged, directly setting comment positioning values as current data;
judging whether the current environment of the table is a tab page, if so, acquiring the number of other tab pages and the width of each tab page, adjusting the left margin of the original comment frame according to the sum of the widths of the other tab pages, and subtracting the sum of the widths of all tab pages in front of the current tab page from the current comment positioning value to be used as an updated comment positioning value; wherein the new left edge left attribute value left of the current cell is calculated and obtained when the environment in which the web form is currently located is within the tab page 1 As the left attribute value of the cell: left (left) 1 = left 0 +colWidths- (tabCount-1) tabWidth, wherein left 0 For the original left edge left attribute value, colWidths is the sum of the widths of all columns in front of the column where the current cell is located, the sequence number of the tab page where the tab cell is located is the width of the tab page where the tab width is located;
if the current environment of the form is not tab page, setting the left margin of the original comment frame as a second comment frame position, wherein the second comment frame position is the sum of all column widths added to the left margin of the original comment frame.
2. The frame processing method of the web form according to claim 1, wherein: the frame types include a borderless type, all frame types, and an outer frame type.
3. The method for processing the frame of the web table according to claim 2, wherein the selecting the corresponding frame processing mode according to the frame type renders all the cell coordinates in the selected area, specifically includes:
if the type is no frame, circularly traversing the set array of all the cell coordinates in the selected area to obtain the attribute of each cell;
splitting the selected area according to the space to obtain a first attribute set array of the cell;
judging whether a frame display element exists in the first attribute set array, if so, deleting corresponding parameters in the first attribute set array;
performing character string splicing on the first attribute set array by taking spaces as intervals to obtain a second attribute set array;
and setting a new display style for the cell according to the second attribute set array.
4. The method for processing the frame of the web table according to claim 3, wherein selecting a corresponding frame processing mode according to the frame type renders all the cell coordinates in the selected area, further comprising:
if the line index of the traversed cell is equal to the initial line, acquiring the attribute value of the previous line, and if the frame display element exists, setting the line index to be empty and resetting the cell pattern;
if the column index of the traversed cell is equal to the initial column, acquiring an attribute value of the previous column, and if the frame display element exists, setting the column index to be empty and resetting the cell pattern;
and refreshing and rendering the table according to the newly set cell format.
5. The frame processing method of a web form according to any one of claims 1 to 4, wherein: the table sets a page table for tab.
6. A web form processing apparatus comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized by: the processor, when executing the computer program, implements the steps of the method according to any one of claims 1-4.
7. A computer-readable storage medium storing a computer program, characterized in that: the computer program implementing the steps of the method according to any of claims 1-4 when executed by a processor.
CN201911349518.5A 2019-12-24 2019-12-24 Frame processing method and device for web form Active CN111290752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911349518.5A CN111290752B (en) 2019-12-24 2019-12-24 Frame processing method and device for web form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911349518.5A CN111290752B (en) 2019-12-24 2019-12-24 Frame processing method and device for web form

Publications (2)

Publication Number Publication Date
CN111290752A CN111290752A (en) 2020-06-16
CN111290752B true CN111290752B (en) 2024-02-20

Family

ID=71029880

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911349518.5A Active CN111290752B (en) 2019-12-24 2019-12-24 Frame processing method and device for web form

Country Status (1)

Country Link
CN (1) CN111290752B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111931472B (en) * 2020-08-11 2023-10-20 抖音视界有限公司 Page table rendering method and device, electronic equipment and computer readable medium
CN112765506B (en) * 2021-01-22 2023-10-24 广州优谷信息技术有限公司 Page text content display method, device, equipment and storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021840A (en) * 2007-03-21 2007-08-22 金蝶软件(中国)有限公司 Electronic form unit grid drawing method and apparatus
CN102508826A (en) * 2011-11-03 2012-06-20 汉王科技股份有限公司 Method and device for displaying table in document
CN103279455A (en) * 2013-06-28 2013-09-04 中国农业银行股份有限公司 Spreadsheet style processing method and device
CN104142932A (en) * 2013-05-07 2014-11-12 苏州精易会信息技术有限公司 Method for displaying sub table borders of webpage spreadsheet
CN105786783A (en) * 2014-12-23 2016-07-20 远光软件股份有限公司 Data processing method and device of WEB table
CN106030492A (en) * 2013-12-17 2016-10-12 微软技术许可有限责任公司 Touch/gesture-enabled interaction with electronic spreadsheets
CN109446201A (en) * 2018-11-01 2019-03-08 郑州云海信息技术有限公司 A kind of method for sorting, device and the equipment of Excel table endorsement information
CN109491742A (en) * 2018-10-31 2019-03-19 天津字节跳动科技有限公司 Page tabular rendering method and device
CN109933321A (en) * 2019-01-17 2019-06-25 平安科技(深圳)有限公司 Table display method and device, storage medium based on Vue frame
CN110020344A (en) * 2017-09-04 2019-07-16 北京字节跳动科技有限公司 A kind of Webpage element mask method and system
CN110096507A (en) * 2019-04-25 2019-08-06 北京博跃科技有限公司 A kind of page complexity table rendering method, system, terminal and medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6442575B2 (en) * 1998-06-17 2002-08-27 Microsoft Corporation Method and system for merging cells in a table and for adding an integrated header and a nested table to a table in an electronic document
US20130339830A1 (en) * 2012-06-15 2013-12-19 Microsoft Corporation Optimized document views for mobile device interfaces
US10296577B1 (en) * 2017-11-03 2019-05-21 Dropbox, Inc. Spreadsheet comment navigation

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101021840A (en) * 2007-03-21 2007-08-22 金蝶软件(中国)有限公司 Electronic form unit grid drawing method and apparatus
CN102508826A (en) * 2011-11-03 2012-06-20 汉王科技股份有限公司 Method and device for displaying table in document
CN104142932A (en) * 2013-05-07 2014-11-12 苏州精易会信息技术有限公司 Method for displaying sub table borders of webpage spreadsheet
CN103279455A (en) * 2013-06-28 2013-09-04 中国农业银行股份有限公司 Spreadsheet style processing method and device
CN106030492A (en) * 2013-12-17 2016-10-12 微软技术许可有限责任公司 Touch/gesture-enabled interaction with electronic spreadsheets
CN105786783A (en) * 2014-12-23 2016-07-20 远光软件股份有限公司 Data processing method and device of WEB table
CN110020344A (en) * 2017-09-04 2019-07-16 北京字节跳动科技有限公司 A kind of Webpage element mask method and system
CN109491742A (en) * 2018-10-31 2019-03-19 天津字节跳动科技有限公司 Page tabular rendering method and device
CN109446201A (en) * 2018-11-01 2019-03-08 郑州云海信息技术有限公司 A kind of method for sorting, device and the equipment of Excel table endorsement information
CN109933321A (en) * 2019-01-17 2019-06-25 平安科技(深圳)有限公司 Table display method and device, storage medium based on Vue frame
CN110096507A (en) * 2019-04-25 2019-08-06 北京博跃科技有限公司 A kind of page complexity table rendering method, system, terminal and medium

Also Published As

Publication number Publication date
CN111290752A (en) 2020-06-16

Similar Documents

Publication Publication Date Title
EP3220249B1 (en) Method, device and terminal for implementing regional screen capture
CN111290752B (en) Frame processing method and device for web form
CN110032314B (en) Long screen capture method and device, storage medium and terminal equipment
CN111639289A (en) Webpage loading method and device
KR102170620B1 (en) Method and system for generating training data to train classifiers with localizable features
CN108459888B (en) Multi-page switching method, device, terminal device and storage medium
CN108021671B (en) Page transparent processing method and device
US11645357B2 (en) Convolution operation method and apparatus, computer device, and computer-readable storage medium
CN108052565B (en) Transparent processing method and device for page
CN109710362B (en) Screenshot processing method, computing device and computer storage medium
CN109218831B (en) Video playing down webpage processing method, electronic device and computer readable storage medium
CN104793945A (en) Large-batch picture displaying method for preventing memory overflow and device thereof
CN111476017B (en) Webpage form editing method and device and electronic equipment
CN111353272B (en) Information display method and device for web form
CN104318538A (en) Method for splicing two-dimension sequence frame picture into big picture and device
CN111813300A (en) Screen capture method and device
CN114579912A (en) Page layout method, device, equipment and medium
CN113592720B (en) Image scaling processing method, device, equipment and storage medium
CN109063085B (en) Thumbnail generation method and device
CN111161127A (en) Picture resource rendering optimization method
CN112580638B (en) Text detection method and device, storage medium and electronic equipment
CN113867862A (en) List page layout method and computing device
CN114359929A (en) Method, device, terminal and storage medium for translating cartoon file in JPG format
CN114332928A (en) Image segmentation method and device, electronic equipment and storage medium
CN112329407A (en) Method and device for adding data in table and electronic equipment

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
CB02 Change of applicant information

Address after: 310056 room 1701, 17th floor, building 3, No. 316, Jianghong South Road, Changhe street, Binjiang District, Hangzhou, Zhejiang

Applicant after: Mingdu Zhiyun (Zhejiang) Technology Co.,Ltd.

Address before: 310000 1, 3 building, No. 316 Jianghong Road, Changhe street, Binjiang District, Hangzhou, Zhejiang.

Applicant before: ZHEJIANG MINGDU INTELLIGENT CONTROL TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant