CN114780094B - Method, device and equipment for generating screening page and storage medium - Google Patents

Method, device and equipment for generating screening page and storage medium Download PDF

Info

Publication number
CN114780094B
CN114780094B CN202210684997.1A CN202210684997A CN114780094B CN 114780094 B CN114780094 B CN 114780094B CN 202210684997 A CN202210684997 A CN 202210684997A CN 114780094 B CN114780094 B CN 114780094B
Authority
CN
China
Prior art keywords
screening
target
page
json
items
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
CN202210684997.1A
Other languages
Chinese (zh)
Other versions
CN114780094A (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 CN202210684997.1A priority Critical patent/CN114780094B/en
Publication of CN114780094A publication Critical patent/CN114780094A/en
Application granted granted Critical
Publication of CN114780094B publication Critical patent/CN114780094B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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

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 application discloses a method, a device, equipment and a storage medium for generating a screening page, which relate to the technical field of computers and comprise the following steps: compiling a corresponding JSON set file for a screening title and a screening item in a target screening page to be generated; determining a target character string array required by the target screening page, and combining the target character string array with the JSON set file to obtain a list set; drawing a corresponding target layout control according to the type configured for the screening title and the screening item in the JSON set file; and adding the list set and the target layout control into an adapter to generate the target screening page. The method combines the written JSON set file with the character string array in the resource file, can greatly reduce the complexity of the layout of the screening page, improves the efficiency of generating the screening page, is convenient for subsequent expansion and modification, and has the characteristics of high flexibility and low coupling.

Description

Method, device and equipment for generating screening page and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating a filtering page.
Background
With the rapid development of various application programs, the provided functions are more and more powerful, and the generated page data is more and more, so that screening the data displayed on the application program page becomes one of the indispensable functional requirements. Through the provided page containing the plurality of screening items, the user can select the screening items according to the self requirement, so that the data content meeting the self requirement is inquired according to the screening items.
At present, the method for setting up the screening page is usually realized by manually adding user-defined views one by one in the layout file, the expansibility is poor, and when the screening page is changed or a screening option is newly added, the corresponding View in the layout file needs to be manually modified, newly added and the like, so that the complexity of later maintenance is increased, and time and labor are wasted.
Disclosure of Invention
In view of this, an object of the present application is to provide a method, an apparatus, a device and a storage medium for generating a filtering page, which can greatly reduce the complexity of the filtering page layout, improve the efficiency of generating the filtering page, facilitate subsequent expansion and modification, and have the characteristics of high flexibility and low coupling. The specific scheme is as follows:
in a first aspect, the present application discloses a method for generating a filter page, including:
compiling a corresponding JSON set file for a screening title and a screening item in a target screening page to be generated;
determining a target character string array required by the target screening page, and combining the target character string array with the JSON set file to obtain a list set;
drawing a corresponding target layout control according to the type configured for the screening title and the screening item in the JSON set file;
and adding the list set and the target layout control into an adapter to generate the target screening page.
Optionally, the determining a target character string array required by the target screening page, and combining the target character string array with the JSON set file to obtain a list set includes:
and determining a target character string array required by the target screening page from a resource file according to each position id in the JSON set file and a sublist set under each position id, and matching the JSON set file with the target character string array to obtain a list set.
Optionally, the drawing a corresponding target layout control according to the type configured for the filtering title and the filtering item in the JSON aggregate file includes:
and drawing corresponding single-selection and/or multi-selection layout controls according to the types configured for the screening titles and the screening items in the JSON set file.
Optionally, the drawing, according to the type configured for the filtering title and the filtering item in the JSON assembly file, a corresponding single-selection and/or multiple-selection layout control, includes:
drawing a custom grid layout control according to the type configured for the screening title and the screening item in the JSON set file and inheriting linear layout;
configuring single-selection and/or multi-selection subtitles and the character size, the character color and the occupied column number of the screening options positioned below the subtitles in the user-defined grid layout control to obtain the subtitle layout control.
Optionally, the method for generating a filter page further includes:
and carrying out average layout on all the screening items in the target screening page.
Optionally, the averagely laying out all the filter items in the target filter page includes:
determining the maximum number of the items of the screening items in a single row in the target screening page to obtain the maximum screening item number;
and performing item supplementing operation on the screening lines of which the number of items of the screening items in a single line in the target screening page is less than the maximum screening item number in a remainder taking mode.
Optionally, the method for generating a filter page further includes:
and when the screening titles and the screening items in the target screening page need to be expanded, modified or deleted, directly adding, modifying or deleting the corresponding sub-list sets in the list sets.
In a second aspect, the present application discloses a filtering page generating device, including:
the set file compiling module is used for compiling corresponding JSON set files for the screening titles and the screening items in the target screening page to be generated;
the character string array determining module is used for determining a target character string array required by the target screening page;
the combination module is used for combining the target character string array and the JSON set file to obtain a list set;
the layout control drawing module is used for drawing a corresponding target layout control according to the types configured for the screening titles and the screening items in the JSON set file;
and the screening page generation module is used for adding the list set and the target layout control into an adapter to generate the target screening page.
In a third aspect, the present application discloses an electronic device comprising a processor and a memory; wherein the processor implements the aforementioned filter page generation method when executing the computer program stored in the memory.
In a fourth aspect, the present application discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned filter page generation method.
Therefore, according to the method, firstly, corresponding JSON set files are written for the screening titles and the screening items in the target screening page to be generated, then the target character string arrays required by the target screening page are determined, the target character string arrays and the JSON set files are combined to obtain a list set, then corresponding target layout controls are drawn according to the types configured for the screening titles and the screening items in the JSON set files, and finally the list set and the target layout controls are added into an adapter to generate the target screening page. The method combines the written JSON set file with the character string array in the resource file, can greatly reduce the complexity of the layout of the screening page, improves the efficiency of generating the screening page, is convenient for subsequent expansion and modification, and has the characteristics of high flexibility and low coupling.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, 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 method for generating a screening page disclosed in the present application;
FIG. 2 is a schematic view of a particular screening page disclosed herein;
FIG. 3 is a flowchart of a method for generating a filter page disclosed in the present application;
fig. 4 is a schematic structural diagram of a filtering page generating apparatus disclosed in the present application;
fig. 5 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 obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
The embodiment of the application discloses a method for generating a screening page, which is shown in figure 1 and comprises the following steps:
step S11: and compiling a corresponding JSON set file for the screening title and the screening item in the target screening page to be generated.
In this embodiment, first, a target screening page to be generated needs to be acquired, and then, according to information such as positions, contents, and screening types of the screening titles and the screening items in the acquired target screening page, a JSON (JavaScript Object Notation) collection file corresponding to the screening titles and the screening items is written. The JSON set file comprises one or more JSON sub-items, the number of the JSON sub-items is related to the number of the screening titles and the screening items, and the JSON sub-items can comprise information such as location ids (Identity documents, Identity card identification numbers) of the screening titles and the screening items, a screening type, a screening item list, and other extension item fields.
Step S12: and determining a target character string array required by the target screening page, and combining the target character string array with the JSON set file to obtain a list set.
In this embodiment, after writing a corresponding JSON set file for a filtering title and a filtering item in a target filtering page to be generated, a target character string array required by the target filtering page may be further determined from a local resource file (i.e., a Values file), for example, a character string array required by a page color is called from the resource file, and then the target character string array and the JSON set file are combined, that is, the JSON set file is matched with the target character string array required by the target filtering page to obtain a corresponding List set, where the List set is a List set in a computer program. It is to be understood that since a JSON file is composed of lists, the JSON file can be considered as a List set.
Specifically, the determining a target character string array required by the target screening page, and combining the target character string array with the JSON set file to obtain a list set may include: and determining a target character string array required by the target screening page from a resource file according to each position id in the JSON set file and the sublist set under each position id, and matching the JSON set file with the target character string array to obtain a list set.
For example, a list set includes a plurality of set sub-items:
"list": [
{
"nameId": 0,
"checked": false
},// first set sub-item
{
"id": 0,
"nameId": 1,
"checked": true
},. // second Collection child
Xml of the corresponding resource file array
<array name="problem_filter_category" tools:ignore="InconsistentArrays">
< | correction status >
< item > @ string/filter _ flow _ allowed </item >// corresponding to the first collection sub-item
< item > @ string/text __ all </item >// corresponding second set sub-item
<item>@string/pend_rectification</item>
<item>@string/to_be_reviewed</item>
<item>@string/completion_of_rect</item>
<! -complaint state
<item>@string/unqualified</item>
<item>@string/homv2_problem_unresolve_revert</item>
<item>@string/homv2_problem_needcheek_revert</item>
<item>@string/completion_of_rect_revert</item>
<item>@string/homv2_problem_revert_failed</item>
<item>@string/problem_overdue</item>
As can be seen from the above, nameids of the sub-lists in the JSON set file are sequentially incremented from 0, and correspond to positions of the character string arrays in the resource file arrays.
Step S13: and drawing a corresponding target layout control according to the type configured for the screening title and the screening item in the JSON set file.
In this embodiment, after the target string array and the JSON set file are combined to obtain a list set, a corresponding target layout control may be drawn according to a type configured in the JSON set file for the filtering title and the filtering item in advance. Wherein the target layout controls include, but are not limited to, button controls, text entry box controls, check box buttons, and the like; the type refers to the control type corresponding to the filter title and the filter item. The method and the device for classifying the control in the JSON set file need to classify the screening title and the control corresponding to the screening item in the target screening page in advance, and then configure the corresponding type according to the classification result. Referring to fig. 2, fig. 2 shows a specific filtering page, which includes eight filtering titles, i.e., "flow status", "priority", "data source", "inspection mode", "automatic complaint pass", "time range", and "expiration time", and there is a corresponding filtering item under each of the eight filtering titles, which is selectable by a user, and there is also a difference in the types of the filtering items, for example, the filtering type corresponding to "flow status" is a multiple selection, so that the user can select multiple filtering items under the "flow status" filtering title, for example, two filtering items, i.e., "to be reviewed" and "to complete" by clicking at the same time. Since the controls corresponding to the "flow state", "priority", "data source", "inspection mode", and "automatic complaint pass" belong to the same type, and are all screening items that can be directly selected, the type types of the 6 controls corresponding to the controls can be set to 0 (i.e., type = 0); further, since the filtering items under the "time range" and "expiration time" filtering titles provide a user with a customized filtering mode, the controls corresponding to the "time range" and the "expiration time" belong to different control types, so that the types of the "time range" and the "expiration time" can be respectively set to 1 and 2, and after the types are obtained, the corresponding layout controls can be written according to the types.
In this embodiment, in the process of drawing a corresponding target layout control according to the type configured for the filtering title and the filtering item in the JSON aggregate file, an ItemViewDelegate as a base class auxiliary interface needs to be implemented. Specifically, the whole target screening page may be based on a recycleview (list base component), and during a process of drawing a corresponding target layout control according to a type configured for a screening title and a screening item of the target screening page in the JSON set file, the layout of multiple items (item) of the recycleview may be realized by inheriting itemvewdelete.
In this embodiment, the drawing a corresponding target layout control according to the type configured for the filtering title and the filtering item in the JSON aggregate file may specifically include: and drawing corresponding single-selection and/or multi-selection layout controls according to the types configured for the screening titles and the screening items in the JSON set file. For example, as shown in fig. 2, the filtering page further includes layout controls for single selection and multiple selection, which are used to prompt a user that one or more of the current filtering items can be selected according to a requirement, and according to types configured for each filtering title and each filtering item in the JSON set file, that is, a single selection type or a multiple selection type, a corresponding single-selection and/or multiple-selection subtitle can be drawn for each filtering title.
Specifically, the drawing a corresponding one-choice and/or multiple-choice layout control according to the type configured for the filtering title and the filtering item in the JSON assembly file may include: drawing a self-defined grid layout (such as GridSelectLayout) control according to the type configured for the screening title and the screening item in the JSON set file and inheriting a linear layout (namely LinearLayout); configuring single-selection and/or multi-selection subtitles and the character size, the character color and the occupied column number of the screening options positioned below the subtitles in the user-defined grid layout control to obtain the subtitle layout control. In this embodiment, a custom gridselect layout control is drawn according to a type configured for a screening title and a screening item in a JSON set file, then a linear layout is inherited in a process of drawing the custom gridselect layout control, a single-choice and/or multiple-choice subtitle can be configured through the gridselect layout control, and a text size, a text color and occupied column number of the screening item located below the subtitle can be configured, so that a layout control including the subtitle is obtained.
In this embodiment, the method for generating a filter page specifically further includes: and carrying out average layout on all the screening items in the target screening page. In a specific embodiment, the averagely laying out all the filter items in the target filter page may specifically include: determining the maximum number of the items of the screening items in a single row in the target screening page to obtain the maximum screening item number; and performing item supplementing operation on the screening lines of which the number of items of the screening items in a single line in the target screening page is less than the maximum screening item number in a remainder taking mode. In this embodiment, in order to prevent the width of each line of screening items from being inconsistent with the width of the screening items satisfying the preset number due to the parent layout width halving manner, the maximum number of the screening items in a single line in the target screening page may be determined first to obtain the maximum number of the screening items, and then the screening lines in the target screening page in which the number of the screening items in a single line is smaller than the maximum number of the screening items are subjected to item supplementing operation in a remainder taking manner, that is, the lines corresponding to the screening items in the preset number are supplemented, so that the width of the screening items under each screening title is kept consistent.
Specifically, in a specific embodiment, the supplementing the screening rows in which the number of items of the screening items in a single row in the target screening page is smaller than the maximum number of screening items by taking a remainder may specifically include: respectively counting the total number of the screening items corresponding to each screening title in the target screening page; dividing the total number of terms by the maximum screening number to obtain a remainder; if the remainder is not zero, subtracting the remainder from the maximum screening item number to obtain a screening item number to be compensated; supplementing the screening item tail part below the screening title with the same number of content blank items (namely items) as the number of the screening items to be supplemented, and setting the attribute of the items not to be displayed. For example, in fig. 2, 11 screening items of "all", "remote patrol", "on-site patrol", "video patrol", "manual creation", "universal spot inspection", "shake", "alarm", "snapshot comparison", "real-time monitoring", and "store self-inspection" are included under the screening title "inspection mode", each row of the screening items occupies at most 4 columns, that is, the maximum screening item number is 4, then the total screening item is divided by the maximum screening item number, that is, 11 is divided by 4 to obtain a remainder 3, then the remainder 3 is subtracted from the maximum screening item number 4 to obtain a to-be-complemented screening item number 1, then 1 item with blank contents is supplemented at the tail of the screening item under the screening title "inspection mode", and the attribute of the blank item is set to be not displayed, thereby realizing the width consistency of the screening items in the screening page.
Step S14: and adding the list set and the target layout control into an adapter to generate the target screening page.
In this embodiment, after drawing a corresponding target layout control according to the type configured for the filtering title and the filtering item in the JSON set file, the list set and the target layout control may be added to an adapter for adaptation, so as to generate the target filtering page.
Further, after generating the target filtering page, the method may further include: and when the screening titles and the screening items in the target screening page need to be expanded, modified or deleted, directly adding, modifying or deleting the corresponding sub-list sets in the list sets. In a specific application process, when the screening title and the screening item in the target screening page need to be expanded, modified or deleted, corresponding operations, such as adding, modifying or deleting a corresponding sub-list set, can be directly performed in the list set, so that the expansion of the screening item can be well solved, the complexity of layout is reduced, the code is simplified, and the code is easy to implement.
As can be seen, in the embodiment of the present application, a corresponding JSON set file is written for a filtering title and a filtering item in a target filtering page to be generated, then a target character string array required by the target filtering page is determined, the target character string array and the JSON set file are combined to obtain a list set, then a corresponding target layout control is drawn according to a type configured for the filtering title and the filtering item in the JSON set file, and finally the list set and the target layout control are added to an adapter to generate the target filtering page. According to the method and the device, the written JSON set file is combined with the character string array in the resource file, the complexity of screening page layout can be greatly reduced, the efficiency of screening page generation is improved, follow-up expansion and modification are facilitated, and the method and the device have the advantages of being high in flexibility and low in coupling.
Referring to fig. 3, fig. 3 shows a flowchart of a specific method for generating a filter page, which includes determining a target filter page to be generated, and then writing a corresponding JSON set file for filter titles and filter terms in the target filter page to be generated; the JSON set file stores a plurality of position IDs, the type (such as single selection/multiple selection) of each position ID and a sublist set under each position ID, and then the arrays array required by a target screening page is determined from a resource file (namely a Values file) according to the JSON set file; the specific content of each item set is stored in the arrays array, and then the JSON set file is matched with the arrays array to obtain a corresponding list set; then drawing corresponding target layout controls such as single-selection and multi-selection controls according to the type (type) configured for the screening titles and the screening items in the JSON set file; specifically, the drawing process of the single-selection and multi-selection control comprises the following steps: setting each line in a screening page to display n items, wherein each item is equally divided into equal lengths, subtracting 1 from the length of an array formed by each position id and the items under the position id to obtain all screening items corresponding to a single screening title, then dividing the screening items by the total column number 4 of the screening page to obtain a remainder x, then sequentially supplementing the x items with blank contents to the array formed by the items under the position id and the position id, setting the items with blank contents not to display the screening items, namely supplementing the screening lines with less than 4 items, and enabling the screening items in each line to be aligned up and down, left and right. And finally, adding the generated single selection, the multi-selection control and other controls into the adapter together to obtain a target screening page.
In the embodiment, the written JSON set file is combined with the array in the resource file, so that a complex screening page can be realized, the screening page supports multiple selection, single selection and other screening types, and the addition of other types of screening items is also convenient and has strong expansibility.
Correspondingly, an embodiment of the present application further discloses a filtering page generating device, as shown in fig. 4, the device includes:
the assembly file compiling module 11 is used for compiling corresponding JSON assembly files for the screening titles and the screening items in the target screening pages to be generated;
the character string array determining module 12 is configured to determine a target character string array required by the target screening page;
a combining module 13, configured to combine the target character string array and the JSON set file to obtain a list set;
a layout control drawing module 14, configured to draw a corresponding target layout control according to the type configured for the filtering title and the filtering item in the JSON aggregate file;
and a filtering page generating module 15, configured to add the list set and the target layout control to an adapter, and generate the target filtering page.
For the specific work flow of each module, reference may be made to corresponding content disclosed in the foregoing embodiments, and details are not repeated here.
As can be seen, in the embodiment of the present application, a corresponding JSON set file is written for a filtering title and a filtering item in a target filtering page to be generated, then a target character string array required by the target filtering page is determined, the target character string array and the JSON set file are combined to obtain a list set, then a corresponding target layout control is drawn according to a type configured for the filtering title and the filtering item in the JSON set file, and finally the list set and the target layout control are added to an adapter to generate the target filtering page. According to the method and the device, the written JSON set file is combined with the character string array in the resource file, the complexity of screening page layout can be greatly reduced, the efficiency of screening page generation is improved, follow-up expansion and modification are facilitated, and the method and the device have the advantages of being high in flexibility and low in coupling.
In some specific embodiments, the string array determining module 12 may specifically include:
a character string array determining unit, configured to determine, according to each position id in the JSON set file and a sublist set under each position id, a target character string array required by the target screening page from a resource file
In some specific embodiments, the combining module 13 may specifically include:
and the matching unit is used for matching the JSON set file with the target character string array to obtain a list set.
In some specific embodiments, the layout control drawing module 14 may specifically include:
and the layout control drawing unit is used for drawing corresponding single-choice and/or multi-choice layout controls according to the types configured for the screening titles and the screening items in the JSON set file.
In some specific embodiments, the layout control drawing unit may specifically include:
the custom control drawing unit is used for drawing a custom grid layout control according to the types configured for the screening titles and the screening items in the JSON set file and inheriting linear layout;
and the control configuration unit is used for configuring the single-choice and/or multi-choice subheadings and the character size, the character color and the occupied column number of the screening items positioned below the subheadings in the user-defined grid layout control to obtain the subheading layout control.
In some specific embodiments, the filtering page generating device may further include:
and the average layout unit is used for carrying out average layout on all the screening items in the target screening page.
In some specific embodiments, the average layout unit may specifically include:
the maximum item number determining unit is used for determining the maximum item number of the screening items in a single line in the target screening page to obtain the maximum screening item number;
and the item supplementing unit is used for supplementing the screening lines of which the number of items of the screening items in a single line in the target screening page is less than the maximum screening item number by taking the remainder.
In some specific embodiments, the filtering page generating device may further include:
and the JSON set file adjusting unit is used for directly adding, modifying or deleting the corresponding sub-list set in the list set when the screening title and the screening option in the target screening page need to be expanded, modified or deleted.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 5 is a block diagram of the electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 5 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 filtered page generating 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 applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain 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 resource storage, 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 or a permanent storage.
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 filtering page generation method disclosed in any of the foregoing embodiments and executed by the electronic device 20.
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 filter page generation 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 technical solution. 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, in this document, relational terms such as first and second, and the like are 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 phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method, the apparatus, the device and the storage medium for generating the filter page provided by the present application are described in detail above, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understanding the method and the core idea 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 (9)

1. A method for generating a screening page is characterized by comprising the following steps:
compiling a corresponding JSON set file for a screening title and a screening item in a target screening page to be generated;
determining a target character string array required by the target screening page, and combining the target character string array with the JSON set file to obtain a list set;
drawing a corresponding target layout control according to the type configured for the screening title and the screening item in the JSON set file;
adding the list set and the target layout control into an adapter to generate the target screening page;
determining a target character string array required by the target screening page, and combining the target character string array with the JSON set file to obtain a list set, wherein the list set comprises: and determining a target character string array required by the target screening page from a resource file according to each position id in the JSON set file and the sublist set under each position id, and matching the JSON set file with the target character string array to obtain a list set.
2. The method for generating filter pages according to claim 1, wherein said drawing corresponding target layout controls according to the types configured for the filter titles and the filter items in the JSON aggregate file includes:
and drawing corresponding single-selection and/or multi-selection layout controls according to the types configured for the screening titles and the screening items in the JSON set file.
3. The method for generating filter pages according to claim 2, wherein said drawing corresponding single-choice and/or multi-choice layout controls according to the types configured for the filter titles and the filter items in the JSON set file includes:
drawing a self-defined grid layout control according to the types configured for the screening titles and the screening items in the JSON set file and inheriting linear layout;
configuring single-selection and/or multi-selection subtitles and the character size, the character color and the occupied column number of the screening options positioned below the subtitles in the user-defined grid layout control to obtain the subtitle layout control.
4. The method for generating a filter page according to claim 1, further comprising:
and carrying out average layout on all the screening items in the target screening page.
5. The method for generating filter pages according to claim 4, wherein the averagely laying out all the filter items in the target filter page includes:
determining the maximum number of the items of the screening items in a single row in the target screening page to obtain the maximum screening item number;
and supplementing the screening lines with the number of items of the screening items in a single line in the target screening page smaller than the maximum screening item number by taking a remainder.
6. The method for generating a filter page according to any one of claims 1 to 5, further comprising:
and when the screening titles and the screening items in the target screening page need to be expanded, modified or deleted, directly adding, modifying or deleting the corresponding sub-list sets in the list sets.
7. A filtering page generating apparatus, comprising:
the set file compiling module is used for compiling corresponding JSON set files for the screening titles and the screening items in the target screening page to be generated;
the character string array determining module is used for determining a target character string array required by the target screening page;
the combination module is used for combining the target character string array and the JSON set file to obtain a list set;
the layout control drawing module is used for drawing a corresponding target layout control according to the types configured for the screening titles and the screening items in the JSON set file;
the screening page generation module is used for adding the list set and the target layout control into an adapter to generate the target screening page;
the character string array determining module is specifically configured to determine a target character string array required by the target screening page from a resource file according to each position id in the JSON set file and a sublist set under each position id;
the combination module is specifically configured to match the JSON set file with the target character string array to obtain a list set.
8. An electronic device comprising a processor and a memory; wherein the processor, when executing the computer program stored in the memory, implements the filter page generation method of any of claims 1 to 6.
9. A computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the method of filter page generation of any of claims 1 to 6.
CN202210684997.1A 2022-06-17 2022-06-17 Method, device and equipment for generating screening page and storage medium Active CN114780094B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210684997.1A CN114780094B (en) 2022-06-17 2022-06-17 Method, device and equipment for generating screening page and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210684997.1A CN114780094B (en) 2022-06-17 2022-06-17 Method, device and equipment for generating screening page and storage medium

Publications (2)

Publication Number Publication Date
CN114780094A CN114780094A (en) 2022-07-22
CN114780094B true CN114780094B (en) 2022-09-09

Family

ID=82421849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210684997.1A Active CN114780094B (en) 2022-06-17 2022-06-17 Method, device and equipment for generating screening page and storage medium

Country Status (1)

Country Link
CN (1) CN114780094B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103605733A (en) * 2013-11-20 2014-02-26 山东浪潮齐鲁软件产业股份有限公司 Page layout storage method based on JSON arrays
CN112433727A (en) * 2020-12-10 2021-03-02 建信金融科技有限责任公司 User interface configuration method and device, electronic equipment and readable storage medium
CN112560397B (en) * 2020-12-24 2022-02-25 成都极米科技股份有限公司 Drawing method, drawing device, terminal equipment and storage medium

Also Published As

Publication number Publication date
CN114780094A (en) 2022-07-22

Similar Documents

Publication Publication Date Title
US9524525B2 (en) Method, system, and graphical user interface for presenting an interactive hierarchy and indicating entry of information therein
US20150212717A1 (en) Dashboard and control point configurators
US10514910B2 (en) Automatically mapping data while designing process flows
US20210365447A1 (en) System and method for comparing and selectively merging database records
US20220035847A1 (en) Information retrieval
CN108369514B (en) System and method for executable content and executable content stream creation
US20210125144A1 (en) Bill of material conversion method, electronic apparatus and non-transitory computer-readable storage medium
CN109002334B (en) Operation and maintenance platform and data processing method thereof
CN106294740A (en) Data processing method, device and server
CN111414405A (en) Data acquisition method and device and electronic equipment
CN111176646A (en) Generation method and device of emergency plan web page
US11556702B2 (en) Orchestration of crud operations for a hierarchical web service data model in a spreadsheet
CN114780094B (en) Method, device and equipment for generating screening page and storage medium
CN113515275A (en) WYSIWYG cloud industrial configuration software system and development method thereof
US11570230B1 (en) System and method for creating a protocol-compliant uniform resource locator
CN112328149B (en) Picture format setting method and device and electronic equipment
CN111221610B (en) Page element acquisition method and device
CN111290683A (en) Method, device and equipment for visual application instantiation
CN113254006A (en) Method, system, device, electronic equipment and storage medium for robot interaction
US20230367471A1 (en) System and Method for Specifying Properties for a Protocol-Compliant Uniform Resource Locator
US20230418828A1 (en) System and method for creating a filtering protocol-compliant uniform resource locator
US11995296B2 (en) System and method for creating a single-entity protocol-compliant uniform resource locator
WO2018038065A1 (en) Information management device and file management method
CN117056416B (en) Flexible construction and management method for visualized data set model
CN116679856B (en) Visual application interface construction method, device, equipment and storage medium

Legal Events

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