A check box mutual exclusion processing method and device
By identifying and setting simulated checked and unavailable check boxes in check box status groups, the problem of mutual exclusion of check boxes is solved, application errors are avoided, and business operation efficiency is improved.
Patent Information
- Application Number
- CN202110913730.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-10
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-08-10
AI Technical Summary
The existing technology cannot effectively prevent check boxes with mutually exclusive relationships from being selected at the same time in business operation scenarios, resulting in application errors.
By determining the order of the currently selected check box and its status identifier in the preset check box status group, identify simulated selected and unavailable check boxes, set the target check box to a prohibited selection state, and avoid mutual selection. repulsive relationship.
It effectively avoids the simultaneous selection of mutually exclusive check boxes, prevents errors in business operation applications, and ensures business operation efficiency.
Smart Images

Figure CN113590009B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a method and device for processing mutual exclusion of check boxes. Background Art
[0002] With the development of Internet technology, the application scope of web browsers continues to expand.
[0003] Among them, the checkbox control is a basic control in web browsers that can select multiple checkboxes at the same time, and is used frequently. In some business operation scenarios, checkboxes may be mutually exclusive. For example, in the organization management content, two checkboxes, "Add" and "Remove", can be included, and these two checkboxes cannot be selected at the same time. When mutually exclusive checkboxes are selected at the same time, the application may have errors.
[0004] However, the prior art cannot effectively prohibit the simultaneous selection of mutually exclusive check boxes. Summary of the invention
[0005] In view of the above problems, the present invention provides a check box mutual exclusion processing method and device that overcomes the above problems or at least partially solves the above problems. The technical solution is as follows:
[0006] A check box mutual exclusion processing method, comprising:
[0007] Determine a currently selected check box, wherein the selected check box is a check box whose check box state is in a selected state;
[0008] Determining a target arrangement order of the check box state identifiers of the selected check boxes in at least one preset check box state group; wherein each of the check box state groups is composed of check box state identifiers of a plurality of check boxes arranged in order, wherein the plurality of check boxes include a simulated selected check box and at least one unavailable check box; in each of the check box state groups, check box state identifiers with the same arrangement order are check box state identifiers of the same check box; in the plurality of check boxes corresponding to one of the check box state groups, each unavailable check box has a mutually exclusive selected relationship with the simulated selected check box;
[0009] In each of the check box state groups, a check box state group whose check box state identifier in the target arrangement order is a simulated selected identifier is determined as a target check box state group; wherein the simulated selected identifier is a check box state identifier of a simulated selected check box;
[0010] Determine the check boxes corresponding to the unavailable marks in the target check box state group as target check boxes; wherein the unavailable marks are check box state marks of the unavailable check boxes;
[0011] The check box states of the target check boxes are all set to a prohibited selection state.
[0012] Optionally, the multiple check boxes further include at least one available check box; in the multiple check boxes corresponding to one of the check box status groups, each available check box has no mutually exclusive selected relationship with the simulated selected check box; the method further includes:
[0013] Determine the check boxes corresponding to the available identifiers in the target check box state group as selectable check boxes; wherein the available identifiers are check box state identifiers of the available check boxes;
[0014] The check box state of each of the selectable check boxes is determined to be a selectable state.
[0015] Optionally, the number of check box state identifiers in each of the check box state groups is the same.
[0016] Optionally, each of the check box state groups is a one-dimensional array consisting of check box state identifiers of a plurality of check boxes, and each of the check box state groups is combined into a two-dimensional array.
[0017] Optionally, the check box state identifier includes: first identification data and second identification data; wherein the first identification data is a check box state identifier of a simulated selected check box, and the second identification data is a check box state identifier of an unavailable check box.
[0018] A check box mutual exclusion processing device comprises: a first determining unit, a second determining unit, a third determining unit, a fourth determining unit and a first setting unit; wherein:
[0019] The first determining unit is configured to execute: determining a currently selected check box, wherein the selected check box is a check box whose check box state is in a selected state;
[0020] The second determining unit is configured to execute: determining a target arrangement order of the check box state identifiers of the selected check boxes in at least one preset check box state group; wherein each of the check box state groups is composed of check box state identifiers of a plurality of check boxes arranged in order, wherein the plurality of check boxes include a simulated selected check box and at least one unavailable check box; in each of the check box state groups, check box state identifiers with the same arrangement order are check box state identifiers of the same check box; in the plurality of check boxes corresponding to one of the check box state groups, each unavailable check box has a mutually exclusive selected relationship with the simulated selected check box;
[0021] The third determining unit is configured to execute: in each of the check box state groups, determine the check box state group whose check box state identifier in the target arrangement order is a simulated selected identifier as the target check box state group; wherein the simulated selected identifier is a check box state identifier of a simulated selected check box;
[0022] The fourth determining unit is configured to execute: determining the check boxes corresponding to the unavailable marks in the target check box state group as target check boxes; wherein the unavailable marks are check box state marks of the unavailable check boxes;
[0023] The first setting unit is configured to execute: setting the check box states of the target check boxes to a prohibited selection state.
[0024] Optionally, the plurality of check boxes further include at least one available check box; in the plurality of check boxes corresponding to one of the check box status groups, each available check box has no mutually exclusive selected relationship with the simulated selected check box; the device further includes: a fifth determining unit and a second setting unit;
[0025] The fifth determining unit is configured to execute: determining the check boxes corresponding to the available identifiers in the target check box state group as selectable check boxes; wherein the available identifiers are check box state identifiers of the available check boxes;
[0026] The second setting unit is configured to execute: determining the check box state of each of the selectable check boxes to be a selectable state.
[0027] Optionally, the number of check box state identifiers in each of the check box state groups is the same.
[0028] Optionally, each of the check box state groups is a one-dimensional array consisting of check box state identifiers of a plurality of check boxes, and each of the check box state groups is combined into a two-dimensional array.
[0029] Optionally, the check box state identifier includes: first identification data and second identification data; wherein the first identification data is a check box state identifier of a simulated selected check box, and the second identification data is a check box state identifier of an unavailable check box.
[0030] The check box mutual exclusion processing method and device proposed in the present embodiment can determine a currently selected check box, wherein the selected check box is a check box whose check box state is in a selected state; determine the target arrangement order of the check box state identifier of the selected check box in at least one preset check box state group; wherein each check box state group is composed of the check box state identifiers of a plurality of check boxes arranged in order, and the plurality of check boxes include a simulated selected check box and at least one unavailable check box; in each check box state group, the check box state identifiers of the same arrangement order are the check box state identifiers of the same check box; in the plurality of check boxes corresponding to a check box state group, each unavailable check box has a selected mutually exclusive relationship with the simulated selected check box; in each check box state group, the check box state group whose check box state identifier in the target arrangement order is a simulated selected identifier is determined as a target check box state group; wherein the simulated selected identifier is the check box state identifier of the simulated selected check box; the check boxes corresponding to each unavailable identifier in the target check box state group are all determined as target check boxes; wherein the unavailable identifier is the check box state identifier of the unavailable check box; and the check box states of the target check boxes are all set to a prohibited selection state. The present invention can avoid selecting a target check box that is mutually exclusive with the selected check box when the selected check box is already selected, avoid selecting mutually exclusive check boxes at the same time, avoid errors in business operation applications, and effectively ensure business operation efficiency.
[0031] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0033] Figure 1 A flowchart of a first check box mutual exclusion processing method provided by an embodiment of the present invention is shown;
[0034] Figure 2 A flowchart of a second check box mutual exclusion processing method provided by an embodiment of the present invention is shown;
[0035] Figure 3 A schematic structural diagram of a first check box mutual exclusion processing device provided by an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0036] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0037] like Figure 1 As shown, this embodiment proposes a first check box mutual exclusion processing method, which may include the following steps:
[0038] S101, determining a currently selected check box, wherein the selected check box is a check box whose check box state is in a selected state;
[0039] Specifically, the selected check box may be a check box that is currently selected.
[0040] It should be noted that the present invention can be applied to electronic devices equipped with a check box control, such as mobile phones and desktop computers.
[0041] Optionally, the check box state may include a selected state and a disabled state.
[0042] The selected state and the prohibited state can both be the actual states of the check box. For example, if the check box state of a check box is the selected state, it can be determined that the check box is actually selected; if the check box state of a check box is the prohibited state, it can be explained that the check box has a mutually exclusive relationship with the selected check box, and the check box is currently prohibited from being selected.
[0043] Optionally, the selected check box may be a check box selected by the electronic device in response to a check box selection instruction input by the user, or may be a check box selected by the electronic device in response to a check box selection instruction input by other electronic devices or applications.
[0044] S102, determining a target arrangement order of the check box state identifiers of the selected check boxes in at least one preset check box state group; wherein each check box state group is composed of check box state identifiers of a plurality of check boxes arranged in order, and the plurality of check boxes include a simulated selected check box and at least one unavailable check box; in each check box state group, check box state identifiers with the same arrangement order are check box state identifiers of the same check box; in the plurality of check boxes corresponding to one check box state group, each unavailable check box has a mutually exclusive selected relationship with the simulated selected check box;
[0045] The check box state group may be a set consisting of check box state identifiers of a plurality of check boxes arranged in order.
[0046] The check box state identifier may be a check box state identifier, and may be used to identify the state of the check box.
[0047] Specifically, in each check box state group, the arrangement order of the check box state identifiers of the same check box may be the same. For example, the check box state identifier of the first check box may be arranged in the first place in each check box state group.
[0048] Optionally, the present invention may first determine that there are actually check boxes in a mutually exclusive relationship, and then create a check box state group based on the check boxes in a mutually exclusive relationship. In the process of creating each check box state group, the check box state identifiers of the same check box may be arranged in the same order in each check box state group. For example, the check box state identifier of the first check box is arranged in the first position in each check box state group.
[0049] Specifically, the present invention can record the arrangement order of the check box state identifiers of each check box in each check box state group. For example, when the check box state identifier of the first check box is ranked first in each check box state group, the present invention can record the arrangement order of the check box state identifier of the first check box in each check box state group as the first; when the check box state identifier of the second check box is ranked second in each check box state group, the present invention can record the arrangement order of the check box state identifier of the second check box in each check box state group as the second.
[0050] It should be noted that a check box state group may correspond to multiple check boxes corresponding to the check box state identifiers it contains. For example, when a first check box state group includes the state identifiers of a first check box, a second check box, and a third check box, the first check box state group may correspond to multiple check boxes consisting of the first check box, the second check box, and the third check box.
[0051] Optionally, the number of check boxes in the multiple check boxes corresponding to different check box state groups may be the same or different. For example, the number of check boxes included in the multiple check boxes corresponding to the first check box state group may be five, while the number of check boxes included in the multiple check boxes corresponding to the second check box state group may be six. It is understandable that in the check box state mutually exclusive table, the number of check box state identifiers included in each check box state group may be the same or different. Optionally, in other check box mutually exclusive processing methods proposed in this embodiment, the number of check box state identifiers in each check box state group is the same.
[0052] Among them, among the multiple check boxes corresponding to a check box state group, one simulated selected check box and at least one unavailable check box may be included. For example, among the multiple check boxes corresponding to the first check box state, one simulated selected check box and at least one unavailable check box may be included, and among the multiple check boxes corresponding to the second check box state, one simulated selected check box and at least one unavailable check box may also be included.
[0053] The simulated selected check box may be a check box whose check box state is a simulated selected state.
[0054] The unavailable check box may be a check box whose check box state is an unavailable state.
[0055] Optionally, the check box state identifier may include a simulated selected identifier and an unavailable identifier, wherein the simulated selected identifier may be a check box state identifier of a simulated selected check box, and the unavailable identifier may be a check box state identifier of an unavailable check box.
[0056] It should be noted that the simulated selected flag and the unavailable flag can be used to reflect the mutually exclusive selected relationship between multiple check boxes in a check box state group, but cannot be used to identify the actual check box state that the check box is currently in. For example, in a check box state group, if the check box state flag of the first check box is a simulated selected flag, and the check box state flag of the second check box is an unavailable flag, it can be said that when the first check box is selected, the second check box must not be selected, that is, there is a mutually exclusive selected relationship between the first check box and the second check box.
[0057] It is understandable that the check box state identifiers of the same check box in different check box state groups may be different. For example, the check box state identifier of the first check box in the first check box state group may be a simulated selected identifier, while the check box state identifier of the first check box in the second check box state group may be an unavailable identifier. Specifically, the check box state identifiers of the same arrangement order in each check box state group may be different.
[0058] Specifically, after determining a currently selected check box, the present invention can determine the arrangement order of the check box state identifiers of the selected check boxes in each check box state group, and determine the determined arrangement order as the target arrangement order.
[0059] S103, in each check box state group, a check box state group whose check box state mark in the target arrangement order is a simulated selected mark is determined as a target check box state group; wherein the simulated selected mark is a check box state mark of a simulated selected check box;
[0060] Specifically, after determining the target arrangement order, the present invention can search in each check box state group respectively to find out the check box state group whose check box state mark in the target arrangement order is a simulated selection mark.
[0061] S104, determining the check boxes corresponding to the unavailable flags in the target check box state group as target check boxes; wherein the unavailable flag is the check box state flag of the unavailable check box;
[0062] Specifically, after determining the target check box state group, the present invention can determine the arrangement order of the unavailable identifiers in the target check box state group, and then determine the check boxes corresponding to the determined arrangement order as target check boxes.
[0063] It can be understood that the target check box may include one or more check boxes that are mutually exclusive with the selected check box.
[0064] S105. Set the check box states of the target check boxes to a prohibited selection state.
[0065] Specifically, after determining the target check box, the present invention can set the check box state of each check box in the target check box to a prohibited selection state.
[0066] Specifically, the present invention can set the checkbox state of the checkbox to a disabled state by setting CheckBox.disabled = true, wherein CheckBox is a checkbox.
[0067] It should also be noted that the prior art can set the checkbox CheckBox.disabled = true by using JavaScript scripts and mutually exclusive conditions between each checkbox. However, when there are many checkboxes and the mutually exclusive conditions are complex, the script complexity is high, the prior art is difficult to implement, prone to errors, and difficult to maintain. Figure 1 The steps shown implement setting the checkbox state of the checkbox without using JavaScript scripts, which can avoid the difficulties faced by using JavaScript scripts, effectively avoid errors in business operation applications, and ensure business operation efficiency.
[0068] It should be noted that when a selected check box is already selected, avoid selecting a target check box that is mutually exclusive with the selected check box, so as to effectively avoid selecting mutually exclusive check boxes at the same time, avoid errors in business operation applications, and effectively ensure business operation efficiency.
[0069] The check box mutual exclusion processing method proposed in this embodiment can determine a currently selected check box, wherein the selected check box is a check box whose check box state is in a selected state; determine the target arrangement order of the check box state identifier of the selected check box in at least one preset check box state group; wherein each check box state group is composed of the check box state identifiers of a plurality of check boxes arranged in order, and the plurality of check boxes include a simulated selected check box and at least one unavailable check box; in each check box state group, the check box state identifiers of the same arrangement order are the check box state identifiers of the same check box; in the plurality of check boxes corresponding to a check box state group, each unavailable check box has a selected mutually exclusive relationship with the simulated selected check box; in each check box state group, the check box state group whose check box state identifier in the target arrangement order is the simulated selected identifier is determined as the target check box state group; wherein the simulated selected identifier is the check box state identifier of the simulated selected check box; the check boxes corresponding to each unavailable identifier in the target check box state group are all determined as the target check boxes; wherein the unavailable identifier is the check box state identifier of the unavailable check box; and the check box states of the target check boxes are all set to the prohibited selection state. The present invention can avoid selecting a target check box that is mutually exclusive with the selected check box when the selected check box is already selected, avoid selecting mutually exclusive check boxes at the same time, avoid errors in business operation applications, and effectively ensure business operation efficiency.
[0070] based on Figure 1 The steps shown are as follows: Figure 2 As shown, this embodiment proposes a second method for processing mutually exclusive check boxes. In this method, the multiple check boxes also include at least one available check box; among the multiple check boxes corresponding to a check box state group, each available check box has no mutually exclusive relationship with the simulated selected check box; at this time, the above method may also include the following steps:
[0071] S201, determining the check boxes corresponding to the available identifiers in the target check box state group as selectable check boxes; wherein the available identifier is the check box state identifier of the available check box;
[0072] Specifically, the multiple check boxes corresponding to a check box state group may also include at least one available check box that does not have a mutually exclusive relationship with the simulated selected check box. At this time, the check box state group may also include a check box state identifier of the available check box, that is, an available identifier.
[0073] S202. Set the check box status of each selectable check box to a selectable state.
[0074] Specifically, the present invention can determine the order of each available identifier in the target check box state group and then determine the check boxes corresponding to the determined order of arrangement as selectable check boxes. After that, the present invention can set the check box state of each check box in the selectable check box to the selectable state, effectively realizing the function of simultaneously selecting multiple check boxes that do not have a mutually exclusive relationship of selection.
[0075] In the present invention, when setting the check box state of a check box to a selectable state, it can be achieved by setting the check box CheckBox.disabled=flush.
[0076] Optionally, each check box state group is a one-dimensional array consisting of check box state identifiers of multiple check boxes, and each check box state group is combined into a two-dimensional array.
[0077] Among them, the elements in the one-dimensional array can be a check box state identifier.
[0078] Optionally, the number of elements in each one-dimensional array can be the same.
[0079] Optionally, the check box state identifier includes: first identification data and second identification data; wherein the first identification data is a check box state identifier of a simulated selected check box, and the second identification data is a check box state identifier of an unavailable check box.
[0080] Specifically, both the first identification data and the second identification data may be character strings consisting of one or more characters of numbers, letters and / or punctuation marks, etc. For example, the first identification data may be 1, and the second identification data may be 0.
[0081] Optionally, the check box state identifier may further include third identification data. The third identification data may be a check box state identifier of an available check box. The third identification data may also be a string consisting of one or more characters of numbers, letters and / or punctuation marks, etc. For example, the third identification data may be 2.
[0082] It is understandable that the present invention can effectively reduce data storage pressure and improve data storage space utilization in the check box state group by using identification data with a smaller data volume as its constituent elements to record and identify the check box state of the check box.
[0083] To better illustrate the process of creating a check box state group, the following is presented and illustrated in conjunction with Example 1.
[0084] Example 1: The check boxes of the organization management content may include "addition", "upgrade", "downgrade", "cancellation", "relocation", "name change", "change of affiliation", "change of business scope" and "administrative level adjustment". Each check box status group may be composed of the identification data of the check box status of "addition", "upgrade", "downgrade", "cancellation", "relocation", "name change", "change of affiliation", "change of business scope" and "administrative level adjustment" in sequence. The first identification data may be 1, the second identification data may be 0, and the third identification data may be 2.
[0085] Specifically, the present invention can use each check box as a simulated selected check box to create a corresponding check box state group.
[0086] Optionally, the order of arrangement of the check box status indicators in the check box status group can be: "Addition", "Upgrade", "Downgrade", "Cancellation", "Relocation", "Rename", "Change of Affiliation", "Change of Business Scope" and "Administrative Level Adjustment" check box status indicators.
[0087] For example, "Add" and other check boxes are mutually exclusive. When the present invention uses "Add" as a simulated selected check box, a check box state group can be created: {1,0,0,0,0,0,0,0,0};
[0088] For another example, "upgrading" is mutually exclusive with "addition", "downgrading" and "cancellation", but is not mutually exclusive with "relocation", "rename", "change of affiliation", "change of business scope" and "administrative level adjustment". When "upgrading" is used as a simulated selected checkbox, the present invention can create a checkbox state group: {0,1,0,0,2,2,2,2,2}.
[0089] Specifically, the present invention can combine the created one-dimensional arrays into a two-dimensional array. At this time, when a selected checkbox is selected, the present invention can trigger the onclick="disableCheckBox()" event, traverse and search in the two-dimensional array, find out the one-dimensional array that uses the selected checkbox as a simulated selected checkbox, and determine it as the target one-dimensional array, that is, the target checkbox state group. For example, in the above example 1, when "Add" is selected, the present invention can traverse and search in the two-dimensional array, and find out the checkbox state group that uses "Add" as a simulated selected checkbox: {1,0,0,0,0,0,0,0,0,0}.
[0090] Specifically, after determining the target one-dimensional array, the present invention can set the checkbox state of the corresponding checkbox by setting the checkbox CheckBox.disabled = tuer / flase according to the checkbox state identifiers on each arrangement order in the target one-dimensional array. For example, in the above example 1, when the target one-dimensional array is {1, 0, 0, 0, 0, 0, 0, 0}, the present invention can determine that the checkbox states of the checkboxes corresponding to the arrangement orders 2 to 9 are all unavailable, then the present invention can determine that the current selected checkbox is "addition", and can set "promotion", "downgrading", "cancellation", "relocation", "rename", "change of affiliation", "change of business scope" and "administrative level adjustment" to CheckBox.disabled = flase, that is, the corresponding "promotion", "downgrading", "cancellation", "relocation", "rename", "change of affiliation", "change of business scope" and "administrative level adjustment" checkbox states are all set to a prohibited selection state.
[0091] For another example, in Example 1 above, when the target one-dimensional array is {0, 1, 0, 0, 2, 2, 2, 2, 2}, the present invention can determine that the currently selected check box is "Upgrade", and can set the check box states of "Addition", "Downgrade" and "Cancel" corresponding to arrangement orders 1, 3 and 4 respectively to a prohibited selection state, and set the check box states of "Relocation", "Change of Name", "Change of Affiliation", "Change of Business Scope" and "Administrative Level Adjustment" corresponding to arrangement orders 5 to 9 respectively to a selectable state.
[0092] The check box mutual exclusion processing method proposed in this embodiment can set the check box state of each check box in the selectable check box to a selectable state, effectively realizing the function of simultaneously selecting multiple check boxes that do not have a mutually exclusive relationship of selection.
[0093] and Figure 1 The steps shown correspond to Figure 3 As shown, this embodiment proposes a first check box mutual exclusion processing device, which may include: a first determining unit 101, a second determining unit 102, a third determining unit 103, a fourth determining unit 104 and a first setting unit 105; wherein:
[0094] The first determining unit 101 is configured to execute: determining a currently selected check box, wherein the selected check box is a check box whose check box state is in a selected state;
[0095] Specifically, the selected check box may be a check box that is currently selected.
[0096] It should be noted that the present invention can be applied to electronic devices equipped with a check box control, such as mobile phones and desktop computers.
[0097] Optionally, the check box state may include a selected state and a disabled state.
[0098] The selected state and the prohibited state can both be the actual states of the check box. For example, if the check box state of a check box is the selected state, it can be determined that the check box is actually selected; if the check box state of a check box is the prohibited state, it can be explained that the check box has a mutually exclusive relationship with the selected check box, and the check box is currently prohibited from being selected.
[0099] Optionally, the selected check box may be a check box selected by the electronic device in response to a check box selection instruction input by the user, or may be a check box selected by the electronic device in response to a check box selection instruction input by other electronic devices or applications.
[0100] The second determining unit 102 is configured to perform: determining a target arrangement order of the check box state identifiers of the selected check boxes in at least one preset check box state group; wherein each check box state group is composed of check box state identifiers of a plurality of check boxes arranged in order, wherein the plurality of check boxes include a simulated selected check box and at least one unavailable check box; in each check box state group, check box state identifiers with the same arrangement order are check box state identifiers of the same check box; in a plurality of check boxes corresponding to a check box state group, each unavailable check box has a mutually exclusive selected relationship with the simulated selected check box;
[0101] The check box state group may be a set consisting of check box state identifiers of a plurality of check boxes arranged in order.
[0102] The check box state identifier may be a check box state identifier, and may be used to identify the state of the check box.
[0103] Specifically, in each check box state group, the arrangement order of the check box state identifiers of the same check box may be the same.
[0104] Optionally, the present invention can first determine that there are actually check boxes with mutually exclusive relationships selected, and then create check box state groups based on the check boxes with mutually exclusive relationships selected. In the process of creating each check box state group, the check box state identifiers of the same check box can be arranged in the same order in each check box state group.
[0105] Specifically, the present invention may record the arrangement order of the check box state identifiers of each check box in each check box state group.
[0106] It should be noted that a check box state group and a plurality of check boxes corresponding to the check box state identifiers contained therein may correspond to each other.
[0107] Optionally, the number of check boxes in the multiple check boxes corresponding to different check box state groups may be the same or different. It is understandable that in the check box state mutually exclusive table, the number of check box state identifiers included in each check box state group may be the same or different. Optionally, in other check box mutually exclusive processing devices proposed in this embodiment, the number of check box state identifiers in each check box state group is the same.
[0108] Among the multiple check boxes corresponding to one check box state group, one simulated selected check box and at least one unavailable check box may be included.
[0109] The simulated selected check box may be a check box whose check box state is a simulated selected state.
[0110] The unavailable check box may be a check box whose check box state is an unavailable state.
[0111] Optionally, the check box state identifier may include a simulated selected identifier and an unavailable identifier, wherein the simulated selected identifier may be a check box state identifier of a simulated selected check box, and the unavailable identifier may be a check box state identifier of an unavailable check box.
[0112] It should be noted that the simulated selected flag and the unavailable flag can be used to reflect the mutually exclusive selected relationship between multiple check boxes in the check box state group, but cannot be used to identify the actual check box state of the check box.
[0113] It is understandable that the check box state identifiers of the same check box in different check box state groups may be different. Specifically, the check box state identifiers of the same check box in the same arrangement order in each check box state group may be different.
[0114] Specifically, after determining a currently selected check box, the present invention can determine the arrangement order of the check box state identifiers of the selected check boxes in each check box state group, and determine the determined arrangement order as the target arrangement order.
[0115] The third determining unit 103 is configured to execute: in each check box state group, determine the check box state group whose check box state mark on the target arrangement order is a simulated selected mark as the target check box state group; wherein the simulated selected mark is the check box state mark of the simulated selected check box;
[0116] Specifically, after determining the target arrangement order, the present invention can search in each check box state group respectively to find out the check box state group whose check box state mark in the target arrangement order is a simulated selection mark.
[0117] The fourth determining unit 104 is configured to execute: determining the check boxes corresponding to the unavailable marks in the target check box state group as target check boxes; wherein the unavailable mark is the check box state mark of the unavailable check box;
[0118] Specifically, after determining the target check box state group, the present invention can determine the arrangement order of the unavailable identifiers in the target check box state group, and then determine the check boxes corresponding to the determined arrangement order as target check boxes.
[0119] It can be understood that the target check box may include one or more check boxes that are mutually exclusive with the selected check box.
[0120] The first setting unit 105 is configured to execute: setting the check box states of all target check boxes to a prohibited selection state.
[0121] Specifically, after determining the target check box, the present invention can set the check box state of each check box in the target check box to a prohibited selection state.
[0122] Specifically, the present invention can set the checkbox state of the checkbox to a disabled state by setting CheckBox.disabled = true, wherein CheckBox is a checkbox.
[0123] The check box mutual exclusion processing device proposed in this embodiment can avoid selecting a target check box that is in a mutually exclusive relationship with a selected check box when a selected check box is already selected, avoid selecting mutually exclusive check boxes at the same time, avoid errors in business operation applications, and effectively ensure business operation efficiency.
[0124] based on Figure 3 As shown, this embodiment proposes a second check box mutually exclusive processing device. In the device, the plurality of check boxes mentioned above also include at least one available check box; among the plurality of check boxes corresponding to a check box state group, each available check box has no selected mutually exclusive relationship with the simulated selected check box; the device also includes: a fifth determining unit and a second setting unit;
[0125] The fifth determining unit is configured to execute: determining the check boxes corresponding to the available identifiers in the target check box state group as selectable check boxes; wherein the available identifier is the check box state identifier of the available check box;
[0126] The second setting unit is configured to execute: determining the check box state of each selectable check box to be a selectable state.
[0127] Specifically, the multiple check boxes corresponding to a check box state group may also include at least one available check box that does not have a mutually exclusive relationship with the simulated selected check box. At this time, the check box state group may also include a check box state identifier of the available check box, that is, an available identifier.
[0128] Specifically, the present invention can determine the order of each available identifier in the target check box state group and then determine the check boxes corresponding to the determined order of arrangement as selectable check boxes. After that, the present invention can set the check box state of each check box in the selectable check box to the selectable state, effectively realizing the function of simultaneously selecting multiple check boxes that do not have a mutually exclusive relationship of selection.
[0129] In the present invention, when setting the check box state of a check box to a selectable state, it can be achieved by setting the check box CheckBox.disabled=flush.
[0130] Optionally, each check box state group is a one-dimensional array consisting of check box state identifiers of multiple check boxes, and each check box state group is combined into a two-dimensional array.
[0131] Among them, the elements in the one-dimensional array can be a check box state identifier.
[0132] Optionally, the number of elements in each one-dimensional array can be the same.
[0133] Optionally, the check box state identifier includes: first identification data and second identification data; wherein the first identification data is a check box state identifier of a simulated selected check box, and the second identification data is a check box state identifier of an unavailable check box.
[0134] Specifically, both the first identification data and the second identification data may be character strings consisting of one or more characters such as numbers, letters and / or punctuation marks.
[0135] Optionally, the check box state identifier may further include third identification data. The third identification data may be a check box state identifier of an available check box. The third identification data may also be a string consisting of one or more characters of numbers, letters and / or punctuation marks, etc. For example, the third identification data may be 2.
[0136] It is understandable that the present invention can effectively reduce data storage pressure and improve data storage space utilization in the check box state group by using identification data with a smaller data volume as its constituent elements to record and identify the check box state of the check box.
[0137] The check box mutual exclusion processing device proposed in this embodiment can set the check box state of each check box in the selectable check box to a selectable state, effectively realizing the function of simultaneously selecting multiple check boxes that do not have a mutually exclusive relationship of selection.
[0138] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0139] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A check box mutual exclusion processing method, characterized in that: include: Determine a currently selected check box, wherein the selected check box is a check box whose check box state is in a selected state; Determine a target arrangement order of the check box state identifiers of the selected check boxes in at least one preset check box state group; wherein each of the check box state groups is a one-dimensional array composed of the check box state identifiers of a plurality of check boxes, and each of the check box state groups is combined into a two-dimensional array; each of the check box state groups is composed of the check box state identifiers of a plurality of check boxes arranged in order; the check box state identifiers include: first identification data 1, second identification data 0, and third identification data 2, wherein the first identification data 1 is a check box state identifier of a simulated selected check box, the second identification data 0 is a check box state identifier of an unavailable check box, and the third identification data 2 is a check box state identifier of an available check box; the plurality of check boxes include a simulated selected check box and at least one unavailable check box; in each of the check box state groups, the check box state identifiers with the same arrangement order are the check box state identifiers of the same check box; in the plurality of check boxes corresponding to one of the check box state groups, each unavailable check box has a mutually exclusive selected relationship with the simulated selected check box; In each of the check box state groups, the check box state group whose check box state is identified as the first identification data 1 in the target arrangement order is determined as the target check box state group; Determine the check boxes corresponding to the second identification data 0 in the target check box state group as target check boxes; and set the check box states of the target check boxes to a disabled state by setting CheckBox.disabled = true; The check boxes corresponding to the third identification data 2 in the target check box state group are all determined to be selectable check boxes; and by setting CheckBox.disabled=flase, the check box states of the selectable check boxes are all set to the selectable state.
2. The method according to claim 1, characterized in that: The number of check box state identifiers in each of the check box state groups is the same.
3. A check box mutual exclusion processing device, characterized in that: include: a first determining unit, a second determining unit, a third determining unit, a fourth determining unit and a first setting unit; wherein: The first determining unit is configured to execute: determining a currently selected check box, wherein the selected check box is a check box whose check box state is in a selected state; The second determining unit is configured to execute: determining a target arrangement order of the check box state identifiers of the selected check boxes in at least one preset check box state group; wherein each of the check box state groups is a one-dimensional array composed of the check box state identifiers of a plurality of check boxes, and each of the check box state groups is combined into a two-dimensional array; each of the check box state groups is composed of the check box state identifiers of a plurality of check boxes arranged in order; the check box state identifiers include: first identification data 1, second identification data 0, and third identification data 2, wherein the first identification data 1 is the check box state identifier of a simulated selected check box, the second identification data 0 is the check box state identifier of an unavailable check box, and the third identification data 2 is the check box state identifier of an available check box; the plurality of check boxes include a simulated selected check box and at least one unavailable check box; in each of the check box state groups, the check box state identifiers with the same arrangement order are the check box state identifiers of the same check box; in the plurality of check boxes corresponding to one of the check box state groups, each unavailable check box has a mutually exclusive selected relationship with the simulated selected check box; The third determining unit is configured to execute: in each of the check box state groups, determine the check box state group whose check box state is identified as the first identification data 1 in the target arrangement order as the target check box state group; The fourth determining unit is configured to execute: determining each check box corresponding to each second identification data 0 in the target check box state group as a target check box; The first setting unit is configured to execute: setting the check box states of the target check boxes to a disabled state by setting CheckBox.disabled = true; A fifth determining unit is configured to execute: determining each check box corresponding to each third identification data 2 in the target check box state group as a selectable check box; The second setting unit is configured to execute: by setting CheckBox.disabled=flase, the check box state of each of the selectable check boxes is determined to be a selectable state.
4. The device according to claim 3, characterized in that The number of check box state identifiers in each of the check box state groups is the same.
